diff --git a/sdk/workloads/azure-resourcemanager-workloads/CHANGELOG.md b/sdk/workloads/azure-resourcemanager-workloads/CHANGELOG.md index a0f1edda76309..cfc75ee559d04 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/CHANGELOG.md +++ b/sdk/workloads/azure-resourcemanager-workloads/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.1 (2023-01-31) + +- Azure Resource Manager Workloads client library for Java. This package contains Microsoft Azure SDK for Workloads Management SDK. Workloads client provides access to various workload operations. Package tag package-preview-2022-11. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/workloads/azure-resourcemanager-workloads/README.md b/sdk/workloads/azure-resourcemanager-workloads/README.md index 912f215b8f12c..50193bfe162bc 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/README.md +++ b/sdk/workloads/azure-resourcemanager-workloads/README.md @@ -2,7 +2,7 @@ Azure Resource Manager Workloads client library for Java. -This package contains Microsoft Azure SDK for Workloads Management SDK. Workloads client provides access to various workload operations. Package tag package-2021-12-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for Workloads Management SDK. Workloads client provides access to various workload operations. Package tag package-preview-2022-11. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-workloads - 1.0.0-beta.1 + 1.0.0-beta.2 ``` [//]: # ({x-version-update-end}) @@ -41,19 +41,19 @@ Various documentation is available to help you get started Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client. -[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation. +[Azure Identity][azure_identity] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation. ### Authentication -By default, Azure Active Directory token authentication depends on correct configure of following environment variables. +By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. - `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate. -In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`. +In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable. -With above configuration, `azure` client can be authenticated by following code: +With above configuration, `azure` client can be authenticated using the following code: ```java AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); @@ -83,13 +83,13 @@ See [API design][design] for general introduction on design and key concepts on ## Contributing -For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md). +For details on contributing to this repository, see the [contributing guide][cg]. -1. Fork it -1. Create your feature branch (`git checkout -b my-new-feature`) -1. Commit your changes (`git commit -am 'Add some feature'`) -1. Push to the branch (`git push origin my-new-feature`) -1. Create new Pull Request +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit . + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact with any additional questions or comments. [survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS @@ -100,3 +100,6 @@ For details on contributing to this repository, see the [contributing guide](htt [azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty [authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md [design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md +[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/workloads/azure-resourcemanager-workloads/SAMPLE.md b/sdk/workloads/azure-resourcemanager-workloads/SAMPLE.md index 2038db83900cc..96f36470910cd 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/SAMPLE.md +++ b/sdk/workloads/azure-resourcemanager-workloads/SAMPLE.md @@ -14,15 +14,6 @@ - [List](#operations_list) -## PhpWorkloads - -- [CreateOrUpdate](#phpworkloads_createorupdate) -- [Delete](#phpworkloads_delete) -- [GetByResourceGroup](#phpworkloads_getbyresourcegroup) -- [List](#phpworkloads_list) -- [ListByResourceGroup](#phpworkloads_listbyresourcegroup) -- [Update](#phpworkloads_update) - ## ProviderInstances - [Create](#providerinstances_create) @@ -43,6 +34,8 @@ - [Delete](#sapapplicationserverinstances_delete) - [Get](#sapapplicationserverinstances_get) - [List](#sapapplicationserverinstances_list) +- [StartInstance](#sapapplicationserverinstances_startinstance) +- [StopInstance](#sapapplicationserverinstances_stopinstance) - [Update](#sapapplicationserverinstances_update) ## SapCentralInstances @@ -51,6 +44,8 @@ - [Delete](#sapcentralinstances_delete) - [Get](#sapcentralinstances_get) - [List](#sapcentralinstances_list) +- [StartInstance](#sapcentralinstances_startinstance) +- [StopInstance](#sapcentralinstances_stopinstance) - [Update](#sapcentralinstances_update) ## SapDatabaseInstances @@ -59,8 +54,18 @@ - [Delete](#sapdatabaseinstances_delete) - [Get](#sapdatabaseinstances_get) - [List](#sapdatabaseinstances_list) +- [StartInstance](#sapdatabaseinstances_startinstance) +- [StopInstance](#sapdatabaseinstances_stopinstance) - [Update](#sapdatabaseinstances_update) +## SapLandscapeMonitor + +- [Create](#saplandscapemonitor_create) +- [Delete](#saplandscapemonitor_delete) +- [Get](#saplandscapemonitor_get) +- [List](#saplandscapemonitor_list) +- [Update](#saplandscapemonitor_update) + ## SapVirtualInstances - [Create](#sapvirtualinstances_create) @@ -71,17 +76,6 @@ - [Start](#sapvirtualinstances_start) - [Stop](#sapvirtualinstances_stop) - [Update](#sapvirtualinstances_update) - -## Skus - -- [List](#skus_list) - -## WordpressInstances - -- [CreateOrUpdate](#wordpressinstances_createorupdate) -- [Delete](#wordpressinstances_delete) -- [Get](#wordpressinstances_get) -- [List](#wordpressinstances_list) ### Monitors_Create ```java @@ -93,7 +87,7 @@ import java.util.Map; /** Samples for Monitors Create. */ public final class MonitorsCreateSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/monitors_Create.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/monitors_Create.json */ /** * Sample code: Create a SAP monitor. @@ -133,12 +127,10 @@ public final class MonitorsCreateSamples { ### Monitors_Delete ```java -import com.azure.core.util.Context; - /** Samples for Monitors Delete. */ public final class MonitorsDeleteSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/monitors_Delete.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/monitors_Delete.json */ /** * Sample code: Deletes a SAP monitor. @@ -146,7 +138,7 @@ public final class MonitorsDeleteSamples { * @param manager Entry point to WorkloadsManager. */ public static void deletesASAPMonitor(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.monitors().delete("myResourceGroup", "mySapMonitor", Context.NONE); + manager.monitors().delete("myResourceGroup", "mySapMonitor", com.azure.core.util.Context.NONE); } } ``` @@ -154,12 +146,10 @@ public final class MonitorsDeleteSamples { ### Monitors_GetByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for Monitors GetByResourceGroup. */ public final class MonitorsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/monitors_Get.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/monitors_Get.json */ /** * Sample code: Get properties of a SAP monitor. @@ -167,7 +157,9 @@ public final class MonitorsGetByResourceGroupSamples { * @param manager Entry point to WorkloadsManager. */ public static void getPropertiesOfASAPMonitor(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.monitors().getByResourceGroupWithResponse("myResourceGroup", "mySapMonitor", Context.NONE); + manager + .monitors() + .getByResourceGroupWithResponse("myResourceGroup", "mySapMonitor", com.azure.core.util.Context.NONE); } } ``` @@ -175,12 +167,10 @@ public final class MonitorsGetByResourceGroupSamples { ### Monitors_List ```java -import com.azure.core.util.Context; - /** Samples for Monitors List. */ public final class MonitorsListSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/monitors_List.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/monitors_List.json */ /** * Sample code: List all SAP monitors in a subscription. @@ -188,7 +178,7 @@ public final class MonitorsListSamples { * @param manager Entry point to WorkloadsManager. */ public static void listAllSAPMonitorsInASubscription(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.monitors().list(Context.NONE); + manager.monitors().list(com.azure.core.util.Context.NONE); } } ``` @@ -196,12 +186,10 @@ public final class MonitorsListSamples { ### Monitors_ListByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for Monitors ListByResourceGroup. */ public final class MonitorsListByResourceGroupSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/monitors_ListByRG.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/monitors_ListByRG.json */ /** * Sample code: List all SAP monitors in a resource group. @@ -210,7 +198,7 @@ public final class MonitorsListByResourceGroupSamples { */ public static void listAllSAPMonitorsInAResourceGroup( com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.monitors().listByResourceGroup("example-rg", Context.NONE); + manager.monitors().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } ``` @@ -218,7 +206,6 @@ public final class MonitorsListByResourceGroupSamples { ### Monitors_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.workloads.models.ManagedServiceIdentityType; import com.azure.resourcemanager.workloads.models.Monitor; import com.azure.resourcemanager.workloads.models.UserAssignedServiceIdentity; @@ -228,7 +215,7 @@ import java.util.Map; /** Samples for Monitors Update. */ public final class MonitorsUpdateSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/monitors_PatchTags_Delete.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/monitors_PatchTags_Delete.json */ /** * Sample code: Delete Tags field of a SAP monitor. @@ -239,7 +226,7 @@ public final class MonitorsUpdateSamples { Monitor resource = manager .monitors() - .getByResourceGroupWithResponse("myResourceGroup", "mySapMonitor", Context.NONE) + .getByResourceGroupWithResponse("myResourceGroup", "mySapMonitor", com.azure.core.util.Context.NONE) .getValue(); resource .update() @@ -249,7 +236,7 @@ public final class MonitorsUpdateSamples { } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/monitors_PatchTags.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/monitors_PatchTags.json */ /** * Sample code: Update Tags field of a SAP monitor. @@ -260,7 +247,7 @@ public final class MonitorsUpdateSamples { Monitor resource = manager .monitors() - .getByResourceGroupWithResponse("myResourceGroup", "mySapMonitor", Context.NONE) + .getByResourceGroupWithResponse("myResourceGroup", "mySapMonitor", com.azure.core.util.Context.NONE) .getValue(); resource .update() @@ -285,12 +272,10 @@ public final class MonitorsUpdateSamples { ### Operations_List ```java -import com.azure.core.util.Context; - /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/Operations_List.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/Operations_List.json */ /** * Sample code: Operations. @@ -298,307 +283,146 @@ public final class OperationsListSamples { * @param manager Entry point to WorkloadsManager. */ public static void operations(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.operations().list(Context.NONE); + manager.operations().list(com.azure.core.util.Context.NONE); } } ``` -### PhpWorkloads_CreateOrUpdate +### ProviderInstances_Create ```java -import com.azure.resourcemanager.workloads.models.AzureFrontDoorEnabled; -import com.azure.resourcemanager.workloads.models.BackupProfile; -import com.azure.resourcemanager.workloads.models.CacheProfile; -import com.azure.resourcemanager.workloads.models.DatabaseProfile; -import com.azure.resourcemanager.workloads.models.DatabaseTier; -import com.azure.resourcemanager.workloads.models.DatabaseType; -import com.azure.resourcemanager.workloads.models.DiskInfo; -import com.azure.resourcemanager.workloads.models.DiskStorageType; -import com.azure.resourcemanager.workloads.models.EnableBackup; -import com.azure.resourcemanager.workloads.models.EnableSslEnforcement; -import com.azure.resourcemanager.workloads.models.FileShareStorageType; -import com.azure.resourcemanager.workloads.models.FileShareType; -import com.azure.resourcemanager.workloads.models.FileshareProfile; -import com.azure.resourcemanager.workloads.models.HAEnabled; -import com.azure.resourcemanager.workloads.models.LoadBalancerType; -import com.azure.resourcemanager.workloads.models.ManagedRGConfiguration; -import com.azure.resourcemanager.workloads.models.NetworkProfile; -import com.azure.resourcemanager.workloads.models.NodeProfile; -import com.azure.resourcemanager.workloads.models.OSImageOffer; -import com.azure.resourcemanager.workloads.models.OSImagePublisher; -import com.azure.resourcemanager.workloads.models.OSImageSku; -import com.azure.resourcemanager.workloads.models.OSImageVersion; -import com.azure.resourcemanager.workloads.models.OsImageProfile; -import com.azure.resourcemanager.workloads.models.PhpProfile; -import com.azure.resourcemanager.workloads.models.PhpVersion; -import com.azure.resourcemanager.workloads.models.RedisCacheFamily; -import com.azure.resourcemanager.workloads.models.SearchProfile; -import com.azure.resourcemanager.workloads.models.SearchType; -import com.azure.resourcemanager.workloads.models.SiteProfile; -import com.azure.resourcemanager.workloads.models.Sku; -import com.azure.resourcemanager.workloads.models.UserProfile; -import com.azure.resourcemanager.workloads.models.VmssNodesProfile; -import com.azure.resourcemanager.workloads.models.WorkloadKind; +import com.azure.resourcemanager.workloads.models.DB2ProviderInstanceProperties; +import com.azure.resourcemanager.workloads.models.HanaDbProviderInstanceProperties; +import com.azure.resourcemanager.workloads.models.MsSqlServerProviderInstanceProperties; +import com.azure.resourcemanager.workloads.models.PrometheusHaClusterProviderInstanceProperties; +import com.azure.resourcemanager.workloads.models.PrometheusOSProviderInstanceProperties; +import com.azure.resourcemanager.workloads.models.SapNetWeaverProviderInstanceProperties; +import com.azure.resourcemanager.workloads.models.SslPreference; import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -/** Samples for PhpWorkloads CreateOrUpdate. */ -public final class PhpWorkloadsCreateOrUpdateSamples { +/** Samples for ProviderInstances Create. */ +public final class ProviderInstancesCreateSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/phpworkloads/PhpWorkloads_CreateOrUpdate.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/MsSqlServerProviderInstance_Create.json */ /** - * Sample code: Workloads. + * Sample code: Create a MsSqlServer provider. * * @param manager Entry point to WorkloadsManager. */ - public static void workloads(com.azure.resourcemanager.workloads.WorkloadsManager manager) { + public static void createAMsSqlServerProvider(com.azure.resourcemanager.workloads.WorkloadsManager manager) { manager - .phpWorkloads() - .define("wp39") - .withRegion("eastus2") - .withExistingResourceGroup("test-rg") - .withKind(WorkloadKind.WORD_PRESS) - .withTags(mapOf()) - .withSku(new Sku().withName("Large")) - .withAppLocation("eastus") - .withManagedResourceGroupConfiguration(new ManagedRGConfiguration().withName("php-mrg-wp39")) - .withAdminUserProfile(new UserProfile().withUsername("wpadmin").withSshPublicKey("===SSH=PUBLIC=KEY===")) - .withWebNodesProfile( - new VmssNodesProfile() - .withName("web-server") - .withNodeSku("Standard_DS2_v2") - .withOsImage( - new OsImageProfile() - .withPublisher(OSImagePublisher.CANONICAL) - .withOffer(OSImageOffer.UBUNTU_SERVER) - .withSku(OSImageSku.fromString("18.0-LTS")) - .withVersion(OSImageVersion.LATEST)) - .withOsDisk(new DiskInfo().withStorageType(DiskStorageType.PREMIUM_LRS)) - .withAutoScaleMinCount(1) - .withAutoScaleMaxCount(1)) - .withControllerProfile( - new NodeProfile() - .withName("contoller-vm") - .withNodeSku("Standard_DS2_v2") - .withOsImage( - new OsImageProfile() - .withPublisher(OSImagePublisher.CANONICAL) - .withOffer(OSImageOffer.UBUNTU_SERVER) - .withSku(OSImageSku.fromString("18.0-LTS")) - .withVersion(OSImageVersion.LATEST)) - .withOsDisk(new DiskInfo().withStorageType(DiskStorageType.PREMIUM_LRS)) - .withDataDisks( - Arrays.asList(new DiskInfo().withStorageType(DiskStorageType.PREMIUM_LRS).withSizeInGB(100L)))) - .withNetworkProfile( - new NetworkProfile() - .withLoadBalancerType(LoadBalancerType.LOAD_BALANCER) - .withLoadBalancerSku("Standard") - .withAzureFrontDoorEnabled(AzureFrontDoorEnabled.ENABLED)) - .withDatabaseProfile( - new DatabaseProfile() - .withType(DatabaseType.MY_SQL) - .withServerName("wp-db-server") - .withVersion("5.7") - .withSku("Standard_D32s_v4") - .withTier(DatabaseTier.GENERAL_PURPOSE) - .withHaEnabled(HAEnabled.DISABLED) - .withStorageSku("Premium_LRS") - .withStorageInGB(128L) - .withStorageIops(200L) - .withBackupRetentionDays(7) - .withSslEnforcementEnabled(EnableSslEnforcement.ENABLED)) - .withSiteProfile(new SiteProfile().withDomainName("www.example.com")) - .withFileshareProfile( - new FileshareProfile() - .withShareType(FileShareType.AZURE_FILES) - .withStorageType(FileShareStorageType.PREMIUM_LRS) - .withShareSizeInGB(100L)) - .withPhpProfile(new PhpProfile().withVersion(PhpVersion.SEVEN_THREE)) - .withSearchProfile( - new SearchProfile() - .withNodeSku("Standard_DS2_v2") - .withOsImage( - new OsImageProfile() - .withPublisher(OSImagePublisher.CANONICAL) - .withOffer(OSImageOffer.UBUNTU_SERVER) - .withSku(OSImageSku.fromString("18.0-LTS")) - .withVersion(OSImageVersion.LATEST)) - .withOsDisk(new DiskInfo().withStorageType(DiskStorageType.PREMIUM_LRS)) - .withSearchType(SearchType.ELASTIC)) - .withCacheProfile( - new CacheProfile() - .withName("wp-cache") - .withSkuName("Basic") - .withFamily(RedisCacheFamily.C) - .withCapacity(0L)) - .withBackupProfile(new BackupProfile().withBackupEnabled(EnableBackup.DISABLED)) + .providerInstances() + .define("myProviderInstance") + .withExistingMonitor("myResourceGroup", "mySapMonitor") + .withProviderSettings( + new MsSqlServerProviderInstanceProperties() + .withHostname("hostname") + .withDbPort("5912") + .withDbUsername("user") + .withDbPassword("fakeTokenPlaceholder") + .withDbPasswordUri("fakeTokenPlaceholder") + .withSapSid("sid") + .withSslPreference(SslPreference.SERVER_CERTIFICATE) + .withSslCertificateUri("https://storageaccount.blob.core.windows.net/containername/filename")) .create(); } - @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; - } -} -``` - -### PhpWorkloads_Delete - -```java -import com.azure.core.util.Context; - -/** Samples for PhpWorkloads Delete. */ -public final class PhpWorkloadsDeleteSamples { - /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/phpworkloads/PhpWorkloads_Delete.json - */ - /** - * Sample code: Workloads. - * - * @param manager Entry point to WorkloadsManager. - */ - public static void workloads(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.phpWorkloads().delete("test-rg", "wp39", "false", Context.NONE); - } -} -``` - -### PhpWorkloads_GetByResourceGroup - -```java -import com.azure.core.util.Context; - -/** Samples for PhpWorkloads GetByResourceGroup. */ -public final class PhpWorkloadsGetByResourceGroupSamples { - /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/phpworkloads/PhpWorkloads_Get.json - */ - /** - * Sample code: Workloads. - * - * @param manager Entry point to WorkloadsManager. - */ - public static void workloads(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.phpWorkloads().getByResourceGroupWithResponse("test-rg", "wp39", Context.NONE); - } -} -``` - -### PhpWorkloads_List - -```java -import com.azure.core.util.Context; - -/** Samples for PhpWorkloads List. */ -public final class PhpWorkloadsListSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/phpworkloads/PhpWorkloads_ListBySubscription.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/Db2ProviderInstances_Create_Root_Certificate.json */ /** - * Sample code: Workloads. + * Sample code: Create a Db2 provider with Root Certificate. * * @param manager Entry point to WorkloadsManager. */ - public static void workloads(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.phpWorkloads().list(Context.NONE); + public static void createADb2ProviderWithRootCertificate( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .providerInstances() + .define("myProviderInstance") + .withExistingMonitor("myResourceGroup", "mySapMonitor") + .withProviderSettings( + new DB2ProviderInstanceProperties() + .withHostname("hostname") + .withDbName("dbName") + .withDbPort("dbPort") + .withDbUsername("username") + .withDbPassword("fakeTokenPlaceholder") + .withDbPasswordUri("fakeTokenPlaceholder") + .withSapSid("SID") + .withSslPreference(SslPreference.ROOT_CERTIFICATE)) + .create(); } -} -``` - -### PhpWorkloads_ListByResourceGroup - -```java -import com.azure.core.util.Context; -/** Samples for PhpWorkloads ListByResourceGroup. */ -public final class PhpWorkloadsListByResourceGroupSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/phpworkloads/PhpWorkloads_ListByResourceGroup.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/ProviderInstances_Create.json */ /** - * Sample code: Workloads. + * Sample code: Create a SAP monitor Hana provider. * * @param manager Entry point to WorkloadsManager. */ - public static void workloads(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.phpWorkloads().listByResourceGroup("test-rg", Context.NONE); + public static void createASAPMonitorHanaProvider(com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .providerInstances() + .define("myProviderInstance") + .withExistingMonitor("myResourceGroup", "mySapMonitor") + .withProviderSettings( + new HanaDbProviderInstanceProperties() + .withHostname("name") + .withDbName("db") + .withSqlPort("0000") + .withInstanceNumber("00") + .withDbUsername("user") + .withDbPassword("fakeTokenPlaceholder") + .withDbPasswordUri("fakeTokenPlaceholder") + .withSslCertificateUri("https://storageaccount.blob.core.windows.net/containername/filename") + .withSslHostnameInCertificate("xyz.domain.com") + .withSslPreference(SslPreference.SERVER_CERTIFICATE) + .withSapSid("SID")) + .create(); } -} -``` - -### PhpWorkloads_Update - -```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.workloads.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.workloads.models.PatchResourceRequestBodyIdentity; -import com.azure.resourcemanager.workloads.models.PhpWorkloadResource; -import java.util.HashMap; -import java.util.Map; -/** Samples for PhpWorkloads Update. */ -public final class PhpWorkloadsUpdateSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/phpworkloads/PhpWorkloads_Update.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/NetWeaverProviderInstances_Create_Root_Certificate.json */ /** - * Sample code: Workloads. + * Sample code: Create a SAP monitor NetWeaver provider with Root Certificate. * * @param manager Entry point to WorkloadsManager. */ - public static void workloads(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - PhpWorkloadResource resource = - manager.phpWorkloads().getByResourceGroupWithResponse("test-rg", "wp39", Context.NONE).getValue(); - resource - .update() - .withTags(mapOf("tag_name", "tag_value")) - .withIdentity(new PatchResourceRequestBodyIdentity().withType(ManagedServiceIdentityType.NONE)) - .apply(); - } - - @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 createASAPMonitorNetWeaverProviderWithRootCertificate( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .providerInstances() + .define("myProviderInstance") + .withExistingMonitor("myResourceGroup", "mySapMonitor") + .withProviderSettings( + new SapNetWeaverProviderInstanceProperties() + .withSapSid("SID") + .withSapHostname("name") + .withSapInstanceNr("00") + .withSapHostFileEntries(Arrays.asList("127.0.0.1 name fqdn")) + .withSapUsername("username") + .withSapPassword("fakeTokenPlaceholder") + .withSapPasswordUri("fakeTokenPlaceholder") + .withSapClientId("111") + .withSapPortNumber("1234") + .withSslPreference(SslPreference.ROOT_CERTIFICATE)) + .create(); } -} -``` - -### ProviderInstances_Create - -```java -import com.azure.resourcemanager.workloads.models.DB2ProviderInstanceProperties; -import com.azure.resourcemanager.workloads.models.HanaDbProviderInstanceProperties; -import com.azure.resourcemanager.workloads.models.MsSqlServerProviderInstanceProperties; -import com.azure.resourcemanager.workloads.models.PrometheusHaClusterProviderInstanceProperties; -import com.azure.resourcemanager.workloads.models.PrometheusOSProviderInstanceProperties; -import com.azure.resourcemanager.workloads.models.SapNetWeaverProviderInstanceProperties; -import java.util.Arrays; -/** Samples for ProviderInstances Create. */ -public final class ProviderInstancesCreateSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/MsSqlServerProviderInstance_Create.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/MsSqlServerProviderInstance_Create_Root_Certificate.json */ /** - * Sample code: Create a MsSqlServer provider. + * Sample code: Create a MsSqlServer provider with Root Certificate. * * @param manager Entry point to WorkloadsManager. */ - public static void createAMsSqlServerProvider(com.azure.resourcemanager.workloads.WorkloadsManager manager) { + public static void createAMsSqlServerProviderWithRootCertificate( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { manager .providerInstances() .define("myProviderInstance") @@ -608,48 +432,47 @@ public final class ProviderInstancesCreateSamples { .withHostname("hostname") .withDbPort("5912") .withDbUsername("user") - .withDbPassword("****") - .withDbPasswordUri("") - .withSapSid("sid")) + .withDbPassword("fakeTokenPlaceholder") + .withDbPasswordUri("fakeTokenPlaceholder") + .withSapSid("sid") + .withSslPreference(SslPreference.ROOT_CERTIFICATE)) .create(); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/ProviderInstances_Create.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/PrometheusHaClusterProviderInstances_Create.json */ /** - * Sample code: Create a SAP monitor Hana provider. + * Sample code: Create a PrometheusHaCluster provider. * * @param manager Entry point to WorkloadsManager. */ - public static void createASAPMonitorHanaProvider(com.azure.resourcemanager.workloads.WorkloadsManager manager) { + public static void createAPrometheusHaClusterProvider( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { manager .providerInstances() .define("myProviderInstance") .withExistingMonitor("myResourceGroup", "mySapMonitor") .withProviderSettings( - new HanaDbProviderInstanceProperties() - .withHostname("name") - .withDbName("db") - .withSqlPort("0000") - .withInstanceNumber("00") - .withDbUsername("user") - .withDbPassword("****") - .withDbPasswordUri("") - .withDbSslCertificateUri("https://storageaccount.blob.core.windows.net/containername/filename") - .withSslHostnameInCertificate("xyz.domain.com")) + new PrometheusHaClusterProviderInstanceProperties() + .withPrometheusUrl("http://192.168.0.0:9090/metrics") + .withHostname("hostname") + .withSid("sid") + .withClusterName("clusterName") + .withSslPreference(SslPreference.SERVER_CERTIFICATE) + .withSslCertificateUri("https://storageaccount.blob.core.windows.net/containername/filename")) .create(); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/PrometheusHaClusterProviderInstances_Create.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/PrometheusHaClusterProviderInstances_Create_Root_Certificate.json */ /** - * Sample code: Create a PrometheusHaCluster provider. + * Sample code: Create a PrometheusHaCluster provider with Root Certificate. * * @param manager Entry point to WorkloadsManager. */ - public static void createAPrometheusHaClusterProvider( + public static void createAPrometheusHaClusterProviderWithRootCertificate( com.azure.resourcemanager.workloads.WorkloadsManager manager) { manager .providerInstances() @@ -660,12 +483,13 @@ public final class ProviderInstancesCreateSamples { .withPrometheusUrl("http://192.168.0.0:9090/metrics") .withHostname("hostname") .withSid("sid") - .withClusterName("clusterName")) + .withClusterName("clusterName") + .withSslPreference(SslPreference.ROOT_CERTIFICATE)) .create(); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/Db2ProviderInstances_Create.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/Db2ProviderInstances_Create.json */ /** * Sample code: Create a Db2 provider. @@ -683,14 +507,38 @@ public final class ProviderInstancesCreateSamples { .withDbName("dbName") .withDbPort("dbPort") .withDbUsername("username") - .withDbPassword("password") - .withDbPasswordUri("") + .withDbPassword("fakeTokenPlaceholder") + .withDbPasswordUri("fakeTokenPlaceholder") + .withSapSid("SID") + .withSslPreference(SslPreference.SERVER_CERTIFICATE) + .withSslCertificateUri("https://storageaccount.blob.core.windows.net/containername/filename")) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/PrometheusOSProviderInstances_Create_Root_Certificate.json + */ + /** + * Sample code: Create a OS provider with Root Certificate. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createAOSProviderWithRootCertificate( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .providerInstances() + .define("myProviderInstance") + .withExistingMonitor("myResourceGroup", "mySapMonitor") + .withProviderSettings( + new PrometheusOSProviderInstanceProperties() + .withPrometheusUrl("http://192.168.0.0:9090/metrics") + .withSslPreference(SslPreference.ROOT_CERTIFICATE) .withSapSid("SID")) .create(); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/PrometheusOSProviderInstances_Create.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/PrometheusOSProviderInstances_Create.json */ /** * Sample code: Create a OS provider. @@ -703,12 +551,16 @@ public final class ProviderInstancesCreateSamples { .define("myProviderInstance") .withExistingMonitor("myResourceGroup", "mySapMonitor") .withProviderSettings( - new PrometheusOSProviderInstanceProperties().withPrometheusUrl("http://192.168.0.0:9090/metrics")) + new PrometheusOSProviderInstanceProperties() + .withPrometheusUrl("http://192.168.0.0:9090/metrics") + .withSslPreference(SslPreference.SERVER_CERTIFICATE) + .withSslCertificateUri("https://storageaccount.blob.core.windows.net/containername/filename") + .withSapSid("SID")) .create(); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/NetWeaverProviderInstances_Create.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/NetWeaverProviderInstances_Create.json */ /** * Sample code: Create a SAP monitor NetWeaver provider. @@ -728,11 +580,41 @@ public final class ProviderInstancesCreateSamples { .withSapInstanceNr("00") .withSapHostFileEntries(Arrays.asList("127.0.0.1 name fqdn")) .withSapUsername("username") - .withSapPassword("****") - .withSapPasswordUri("") + .withSapPassword("fakeTokenPlaceholder") + .withSapPasswordUri("fakeTokenPlaceholder") .withSapClientId("111") .withSapPortNumber("1234") - .withSapSslCertificateUri("https://storageaccount.blob.core.windows.net/containername/filename")) + .withSslCertificateUri("https://storageaccount.blob.core.windows.net/containername/filename") + .withSslPreference(SslPreference.SERVER_CERTIFICATE)) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/ProviderInstances_Create_Root_Certificate.json + */ + /** + * Sample code: Create a SAP monitor Hana provider with Root Certificate. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createASAPMonitorHanaProviderWithRootCertificate( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .providerInstances() + .define("myProviderInstance") + .withExistingMonitor("myResourceGroup", "mySapMonitor") + .withProviderSettings( + new HanaDbProviderInstanceProperties() + .withHostname("name") + .withDbName("db") + .withSqlPort("0000") + .withInstanceNumber("00") + .withDbUsername("user") + .withDbPassword("fakeTokenPlaceholder") + .withDbPasswordUri("fakeTokenPlaceholder") + .withSslHostnameInCertificate("xyz.domain.com") + .withSslPreference(SslPreference.ROOT_CERTIFICATE) + .withSapSid("SID")) .create(); } } @@ -741,12 +623,10 @@ public final class ProviderInstancesCreateSamples { ### ProviderInstances_Delete ```java -import com.azure.core.util.Context; - /** Samples for ProviderInstances Delete. */ public final class ProviderInstancesDeleteSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/ProviderInstances_Delete.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/ProviderInstances_Delete.json */ /** * Sample code: Deletes a SAP monitor provider. @@ -754,7 +634,9 @@ public final class ProviderInstancesDeleteSamples { * @param manager Entry point to WorkloadsManager. */ public static void deletesASAPMonitorProvider(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.providerInstances().delete("myResourceGroup", "mySapMonitor", "myProviderInstance", Context.NONE); + manager + .providerInstances() + .delete("myResourceGroup", "mySapMonitor", "myProviderInstance", com.azure.core.util.Context.NONE); } } ``` @@ -762,12 +644,10 @@ public final class ProviderInstancesDeleteSamples { ### ProviderInstances_Get ```java -import com.azure.core.util.Context; - /** Samples for ProviderInstances Get. */ public final class ProviderInstancesGetSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/ProviderInstances_Get.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/ProviderInstances_Get.json */ /** * Sample code: Get properties of a SAP monitor Hana provider. @@ -778,11 +658,11 @@ public final class ProviderInstancesGetSamples { com.azure.resourcemanager.workloads.WorkloadsManager manager) { manager .providerInstances() - .getWithResponse("myResourceGroup", "mySapMonitor", "myProviderInstance", Context.NONE); + .getWithResponse("myResourceGroup", "mySapMonitor", "myProviderInstance", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/PrometheusHaClusterProviderInstances_Get.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/PrometheusHaClusterProviderInstances_Get.json */ /** * Sample code: Get properties of a PrometheusHaCluster provider. @@ -793,11 +673,11 @@ public final class ProviderInstancesGetSamples { com.azure.resourcemanager.workloads.WorkloadsManager manager) { manager .providerInstances() - .getWithResponse("myResourceGroup", "mySapMonitor", "myProviderInstance", Context.NONE); + .getWithResponse("myResourceGroup", "mySapMonitor", "myProviderInstance", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/PrometheusOSProviderInstances_Get.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/PrometheusOSProviderInstances_Get.json */ /** * Sample code: Get properties of a OS provider. @@ -807,11 +687,11 @@ public final class ProviderInstancesGetSamples { public static void getPropertiesOfAOSProvider(com.azure.resourcemanager.workloads.WorkloadsManager manager) { manager .providerInstances() - .getWithResponse("myResourceGroup", "mySapMonitor", "myProviderInstance", Context.NONE); + .getWithResponse("myResourceGroup", "mySapMonitor", "myProviderInstance", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/Db2ProviderInstances_Get.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/Db2ProviderInstances_Get.json */ /** * Sample code: Get properties of a Db2 provider. @@ -821,11 +701,11 @@ public final class ProviderInstancesGetSamples { public static void getPropertiesOfADb2Provider(com.azure.resourcemanager.workloads.WorkloadsManager manager) { manager .providerInstances() - .getWithResponse("myResourceGroup", "mySapMonitor", "myProviderInstance", Context.NONE); + .getWithResponse("myResourceGroup", "mySapMonitor", "myProviderInstance", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/MsSqlServerProviderInstance_Get.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/MsSqlServerProviderInstance_Get.json */ /** * Sample code: Get properties of a MsSqlServer provider. @@ -836,11 +716,11 @@ public final class ProviderInstancesGetSamples { com.azure.resourcemanager.workloads.WorkloadsManager manager) { manager .providerInstances() - .getWithResponse("myResourceGroup", "mySapMonitor", "myProviderInstance", Context.NONE); + .getWithResponse("myResourceGroup", "mySapMonitor", "myProviderInstance", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/NetWeaverProviderInstances_Get.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/NetWeaverProviderInstances_Get.json */ /** * Sample code: Get properties of a SAP monitor NetWeaver provider. @@ -851,7 +731,7 @@ public final class ProviderInstancesGetSamples { com.azure.resourcemanager.workloads.WorkloadsManager manager) { manager .providerInstances() - .getWithResponse("myResourceGroup", "mySapMonitor", "myProviderInstance", Context.NONE); + .getWithResponse("myResourceGroup", "mySapMonitor", "myProviderInstance", com.azure.core.util.Context.NONE); } } ``` @@ -859,12 +739,10 @@ public final class ProviderInstancesGetSamples { ### ProviderInstances_List ```java -import com.azure.core.util.Context; - /** Samples for ProviderInstances List. */ public final class ProviderInstancesListSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/ProviderInstances_List.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/ProviderInstances_List.json */ /** * Sample code: List all SAP monitors providers in a subscription. @@ -873,7 +751,7 @@ public final class ProviderInstancesListSamples { */ public static void listAllSAPMonitorsProvidersInASubscription( com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.providerInstances().list("myResourceGroup", "mySapMonitor", Context.NONE); + manager.providerInstances().list("myResourceGroup", "mySapMonitor", com.azure.core.util.Context.NONE); } } ``` @@ -881,12 +759,10 @@ public final class ProviderInstancesListSamples { ### ResourceProvider_SapAvailabilityZoneDetails ```java -import com.azure.core.util.Context; - /** Samples for ResourceProvider SapAvailabilityZoneDetails. */ public final class ResourceProviderSapAvailabilityZoneDetailsSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPAvailabilityZoneDetails_northeurope.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPAvailabilityZoneDetails_northeurope.json */ /** * Sample code: SAPAvailabilityZoneDetails_northeurope. @@ -895,11 +771,13 @@ public final class ResourceProviderSapAvailabilityZoneDetailsSamples { */ public static void sAPAvailabilityZoneDetailsNortheurope( com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.resourceProviders().sapAvailabilityZoneDetailsWithResponse("centralus", null, Context.NONE); + manager + .resourceProviders() + .sapAvailabilityZoneDetailsWithResponse("centralus", null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPAvailabilityZoneDetails_eastus.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPAvailabilityZoneDetails_eastus.json */ /** * Sample code: SAPAvailabilityZoneDetails_eastus. @@ -907,7 +785,9 @@ public final class ResourceProviderSapAvailabilityZoneDetailsSamples { * @param manager Entry point to WorkloadsManager. */ public static void sAPAvailabilityZoneDetailsEastus(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.resourceProviders().sapAvailabilityZoneDetailsWithResponse("centralus", null, Context.NONE); + manager + .resourceProviders() + .sapAvailabilityZoneDetailsWithResponse("centralus", null, com.azure.core.util.Context.NONE); } } ``` @@ -915,12 +795,10 @@ public final class ResourceProviderSapAvailabilityZoneDetailsSamples { ### ResourceProvider_SapDiskConfigurations ```java -import com.azure.core.util.Context; - /** Samples for ResourceProvider SapDiskConfigurations. */ public final class ResourceProviderSapDiskConfigurationsSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPDiskConfigurations_NonProd.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPDiskConfigurations_NonProd.json */ /** * Sample code: SAPDiskConfigurations_NonProd. @@ -928,11 +806,13 @@ public final class ResourceProviderSapDiskConfigurationsSamples { * @param manager Entry point to WorkloadsManager. */ public static void sAPDiskConfigurationsNonProd(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.resourceProviders().sapDiskConfigurationsWithResponse("centralus", null, Context.NONE); + manager + .resourceProviders() + .sapDiskConfigurationsWithResponse("centralus", null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPDiskConfigurations_Prod.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPDiskConfigurations_Prod.json */ /** * Sample code: SAPDiskConfigurations_Prod. @@ -940,7 +820,9 @@ public final class ResourceProviderSapDiskConfigurationsSamples { * @param manager Entry point to WorkloadsManager. */ public static void sAPDiskConfigurationsProd(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.resourceProviders().sapDiskConfigurationsWithResponse("centralus", null, Context.NONE); + manager + .resourceProviders() + .sapDiskConfigurationsWithResponse("centralus", null, com.azure.core.util.Context.NONE); } } ``` @@ -948,12 +830,10 @@ public final class ResourceProviderSapDiskConfigurationsSamples { ### ResourceProvider_SapSizingRecommendations ```java -import com.azure.core.util.Context; - /** Samples for ResourceProvider SapSizingRecommendations. */ public final class ResourceProviderSapSizingRecommendationsSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_Distributed.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_Distributed.json */ /** * Sample code: SAPSizingRecommendations_S4HANA_Distributed. @@ -962,11 +842,13 @@ public final class ResourceProviderSapSizingRecommendationsSamples { */ public static void sAPSizingRecommendationsS4HANADistributed( com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.resourceProviders().sapSizingRecommendationsWithResponse("centralus", null, Context.NONE); + manager + .resourceProviders() + .sapSizingRecommendationsWithResponse("centralus", null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_SingleServer.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_SingleServer.json */ /** * Sample code: SAPSizingRecommendations_S4HANA_SingleServer. @@ -975,11 +857,13 @@ public final class ResourceProviderSapSizingRecommendationsSamples { */ public static void sAPSizingRecommendationsS4HANASingleServer( com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.resourceProviders().sapSizingRecommendationsWithResponse("centralus", null, Context.NONE); + manager + .resourceProviders() + .sapSizingRecommendationsWithResponse("centralus", null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_HA_AvZone.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_HA_AvZone.json */ /** * Sample code: SAPSizingRecommendations_S4HANA_DistributedHA_AvZone. @@ -988,11 +872,13 @@ public final class ResourceProviderSapSizingRecommendationsSamples { */ public static void sAPSizingRecommendationsS4HANADistributedHAAvZone( com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.resourceProviders().sapSizingRecommendationsWithResponse("centralus", null, Context.NONE); + manager + .resourceProviders() + .sapSizingRecommendationsWithResponse("centralus", null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_HA_AvSet.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_HA_AvSet.json */ /** * Sample code: SAPSizingRecommendations_S4HANA_DistributedHA_AvSet. @@ -1001,7 +887,9 @@ public final class ResourceProviderSapSizingRecommendationsSamples { */ public static void sAPSizingRecommendationsS4HANADistributedHAAvSet( com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.resourceProviders().sapSizingRecommendationsWithResponse("centralus", null, Context.NONE); + manager + .resourceProviders() + .sapSizingRecommendationsWithResponse("centralus", null, com.azure.core.util.Context.NONE); } } ``` @@ -1009,12 +897,10 @@ public final class ResourceProviderSapSizingRecommendationsSamples { ### ResourceProvider_SapSupportedSku ```java -import com.azure.core.util.Context; - /** Samples for ResourceProvider SapSupportedSku. */ public final class ResourceProviderSapSupportedSkuSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPSupportedSkus_SingleServer.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPSupportedSkus_SingleServer.json */ /** * Sample code: SAPSupportedSkus_SingleServer. @@ -1022,11 +908,11 @@ public final class ResourceProviderSapSupportedSkuSamples { * @param manager Entry point to WorkloadsManager. */ public static void sAPSupportedSkusSingleServer(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.resourceProviders().sapSupportedSkuWithResponse("centralus", null, Context.NONE); + manager.resourceProviders().sapSupportedSkuWithResponse("centralus", null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPSupportedSkus_Distributed.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPSupportedSkus_Distributed.json */ /** * Sample code: SAPSupportedSkus_Distributed. @@ -1034,11 +920,11 @@ public final class ResourceProviderSapSupportedSkuSamples { * @param manager Entry point to WorkloadsManager. */ public static void sAPSupportedSkusDistributed(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.resourceProviders().sapSupportedSkuWithResponse("centralus", null, Context.NONE); + manager.resourceProviders().sapSupportedSkuWithResponse("centralus", null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPSupportedSkus_DistributedHA_AvZone.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPSupportedSkus_DistributedHA_AvZone.json */ /** * Sample code: SAPSupportedSkus_DistributedHA_AvZone. @@ -1047,11 +933,11 @@ public final class ResourceProviderSapSupportedSkuSamples { */ public static void sAPSupportedSkusDistributedHAAvZone( com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.resourceProviders().sapSupportedSkuWithResponse("centralus", null, Context.NONE); + manager.resourceProviders().sapSupportedSkuWithResponse("centralus", null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPSupportedSkus_DistributedHA_AvSet.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPSupportedSkus_DistributedHA_AvSet.json */ /** * Sample code: SAPSupportedSkus_DistributedHA_AvSet. @@ -1060,7 +946,7 @@ public final class ResourceProviderSapSupportedSkuSamples { */ public static void sAPSupportedSkusDistributedHAAvSet( com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.resourceProviders().sapSupportedSkuWithResponse("centralus", null, Context.NONE); + manager.resourceProviders().sapSupportedSkuWithResponse("centralus", null, com.azure.core.util.Context.NONE); } } ``` @@ -1074,7 +960,7 @@ import java.util.Map; /** Samples for SapApplicationServerInstances Create. */ public final class SapApplicationServerInstancesCreateSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPApplicationServerInstances_Create.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPApplicationServerInstances_Create.json */ /** * Sample code: SAPApplicationServerInstances_Create. @@ -1092,28 +978,45 @@ public final class SapApplicationServerInstancesCreateSamples { .create(); } - @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; - } -} + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPApplicationServerInstances_Create_HA_AvSet.json + */ + /** + * Sample code: Create SAP Application Server Instances for HA System with Availability Set. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createSAPApplicationServerInstancesForHASystemWithAvailabilitySet( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapApplicationServerInstances() + .define("app01") + .withRegion("westcentralus") + .withExistingSapVirtualInstance("test-rg", "X00") + .withTags(mapOf()) + .create(); + } + + @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; + } +} ``` ### SapApplicationServerInstances_Delete ```java -import com.azure.core.util.Context; - /** Samples for SapApplicationServerInstances Delete. */ public final class SapApplicationServerInstancesDeleteSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPApplicationServerInstances_Delete.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPApplicationServerInstances_Delete.json */ /** * Sample code: SAPApplicationServerInstances_Delete. @@ -1122,7 +1025,7 @@ public final class SapApplicationServerInstancesDeleteSamples { */ public static void sAPApplicationServerInstancesDelete( com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.sapApplicationServerInstances().delete("test-rg", "X00", "app01", Context.NONE); + manager.sapApplicationServerInstances().delete("test-rg", "X00", "app01", com.azure.core.util.Context.NONE); } } ``` @@ -1130,12 +1033,10 @@ public final class SapApplicationServerInstancesDeleteSamples { ### SapApplicationServerInstances_Get ```java -import com.azure.core.util.Context; - /** Samples for SapApplicationServerInstances Get. */ public final class SapApplicationServerInstancesGetSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPApplicationServerInstances_Get.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPApplicationServerInstances_Get.json */ /** * Sample code: SAPApplicationServerInstances_Get. @@ -1143,7 +1044,9 @@ public final class SapApplicationServerInstancesGetSamples { * @param manager Entry point to WorkloadsManager. */ public static void sAPApplicationServerInstancesGet(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.sapApplicationServerInstances().getWithResponse("test-rg", "X00", "app01", Context.NONE); + manager + .sapApplicationServerInstances() + .getWithResponse("test-rg", "X00", "app01", com.azure.core.util.Context.NONE); } } ``` @@ -1151,12 +1054,10 @@ public final class SapApplicationServerInstancesGetSamples { ### SapApplicationServerInstances_List ```java -import com.azure.core.util.Context; - /** Samples for SapApplicationServerInstances List. */ public final class SapApplicationServerInstancesListSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPApplicationServerInstances_List.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPApplicationServerInstances_List.json */ /** * Sample code: SAPApplicationServerInstances_List. @@ -1164,7 +1065,58 @@ public final class SapApplicationServerInstancesListSamples { * @param manager Entry point to WorkloadsManager. */ public static void sAPApplicationServerInstancesList(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.sapApplicationServerInstances().list("test-rg", "X00", Context.NONE); + manager.sapApplicationServerInstances().list("test-rg", "X00", com.azure.core.util.Context.NONE); + } +} +``` + +### SapApplicationServerInstances_StartInstance + +```java +/** Samples for SapApplicationServerInstances StartInstance. */ +public final class SapApplicationServerInstancesStartInstanceSamples { + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPApplicationServerInstances_StartInstance.json + */ + /** + * Sample code: Start the SAP Application Server Instance. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void startTheSAPApplicationServerInstance( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapApplicationServerInstances() + .startInstance("test-rg", "X00", "app01", com.azure.core.util.Context.NONE); + } +} +``` + +### SapApplicationServerInstances_StopInstance + +```java +import com.azure.resourcemanager.workloads.models.StopRequest; + +/** Samples for SapApplicationServerInstances StopInstance. */ +public final class SapApplicationServerInstancesStopInstanceSamples { + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPApplicationServerInstances_StopInstance.json + */ + /** + * Sample code: Stop the SAP Application Server Instance. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void stopTheSAPApplicationServerInstance( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapApplicationServerInstances() + .stopInstance( + "test-rg", + "X00", + "app01", + new StopRequest().withSoftStopTimeoutSeconds(0L), + com.azure.core.util.Context.NONE); } } ``` @@ -1172,7 +1124,6 @@ public final class SapApplicationServerInstancesListSamples { ### SapApplicationServerInstances_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.workloads.models.SapApplicationServerInstance; import java.util.HashMap; import java.util.Map; @@ -1180,7 +1131,7 @@ import java.util.Map; /** Samples for SapApplicationServerInstances Update. */ public final class SapApplicationServerInstancesUpdateSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPApplicationServerInstances_Update.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPApplicationServerInstances_Update.json */ /** * Sample code: SAPApplicationServerInstances_Update. @@ -1190,7 +1141,10 @@ public final class SapApplicationServerInstancesUpdateSamples { public static void sAPApplicationServerInstancesUpdate( com.azure.resourcemanager.workloads.WorkloadsManager manager) { SapApplicationServerInstance resource = - manager.sapApplicationServerInstances().getWithResponse("test-rg", "X00", "app01", Context.NONE).getValue(); + manager + .sapApplicationServerInstances() + .getWithResponse("test-rg", "X00", "app01", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("tag1", "value1")).apply(); } @@ -1216,7 +1170,26 @@ import java.util.Map; /** Samples for SapCentralInstances Create. */ public final class SapCentralInstancesCreateSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPCentralInstances_Create.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPCentralInstances_Create_HA_AvSet.json + */ + /** + * Sample code: Create SAP Central Instances for HA System with Availability Set. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createSAPCentralInstancesForHASystemWithAvailabilitySet( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapCentralInstances() + .define("centralServer") + .withRegion("westcentralus") + .withExistingSapVirtualInstance("test-rg", "X00") + .withTags(mapOf()) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPCentralInstances_Create.json */ /** * Sample code: SAPCentralInstances_Create. @@ -1249,12 +1222,10 @@ public final class SapCentralInstancesCreateSamples { ### SapCentralInstances_Delete ```java -import com.azure.core.util.Context; - /** Samples for SapCentralInstances Delete. */ public final class SapCentralInstancesDeleteSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPCentralInstances_Delete.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPCentralInstances_Delete.json */ /** * Sample code: SAPCentralInstances_Delete. @@ -1262,7 +1233,7 @@ public final class SapCentralInstancesDeleteSamples { * @param manager Entry point to WorkloadsManager. */ public static void sAPCentralInstancesDelete(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.sapCentralInstances().delete("test-rg", "X00", "centralServer", Context.NONE); + manager.sapCentralInstances().delete("test-rg", "X00", "centralServer", com.azure.core.util.Context.NONE); } } ``` @@ -1270,12 +1241,10 @@ public final class SapCentralInstancesDeleteSamples { ### SapCentralInstances_Get ```java -import com.azure.core.util.Context; - /** Samples for SapCentralInstances Get. */ public final class SapCentralInstancesGetSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPCentralInstances_Get.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPCentralInstances_Get.json */ /** * Sample code: SAPCentralInstances_Get. @@ -1283,7 +1252,9 @@ public final class SapCentralInstancesGetSamples { * @param manager Entry point to WorkloadsManager. */ public static void sAPCentralInstancesGet(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.sapCentralInstances().getWithResponse("test-rg", "X00", "centralServer", Context.NONE); + manager + .sapCentralInstances() + .getWithResponse("test-rg", "X00", "centralServer", com.azure.core.util.Context.NONE); } } ``` @@ -1291,12 +1262,10 @@ public final class SapCentralInstancesGetSamples { ### SapCentralInstances_List ```java -import com.azure.core.util.Context; - /** Samples for SapCentralInstances List. */ public final class SapCentralInstancesListSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPCentralInstances_List.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPCentralInstances_List.json */ /** * Sample code: SAPCentralInstances_List. @@ -1304,7 +1273,57 @@ public final class SapCentralInstancesListSamples { * @param manager Entry point to WorkloadsManager. */ public static void sAPCentralInstancesList(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.sapCentralInstances().list("test-rg", "X00", Context.NONE); + manager.sapCentralInstances().list("test-rg", "X00", com.azure.core.util.Context.NONE); + } +} +``` + +### SapCentralInstances_StartInstance + +```java +/** Samples for SapCentralInstances StartInstance. */ +public final class SapCentralInstancesStartInstanceSamples { + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPCentralInstances_StartInstance.json + */ + /** + * Sample code: Start the SAP Central Services Instance. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void startTheSAPCentralServicesInstance( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapCentralInstances() + .startInstance("test-rg", "X00", "centralServer", com.azure.core.util.Context.NONE); + } +} +``` + +### SapCentralInstances_StopInstance + +```java +import com.azure.resourcemanager.workloads.models.StopRequest; + +/** Samples for SapCentralInstances StopInstance. */ +public final class SapCentralInstancesStopInstanceSamples { + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPCentralInstances_StopInstance.json + */ + /** + * Sample code: Stop the SAP Central Services Instance. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void stopTheSAPCentralServicesInstance(com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapCentralInstances() + .stopInstance( + "test-rg", + "X00", + "centralServer", + new StopRequest().withSoftStopTimeoutSeconds(1200L), + com.azure.core.util.Context.NONE); } } ``` @@ -1312,7 +1331,6 @@ public final class SapCentralInstancesListSamples { ### SapCentralInstances_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.workloads.models.SapCentralServerInstance; import java.util.HashMap; import java.util.Map; @@ -1320,7 +1338,7 @@ import java.util.Map; /** Samples for SapCentralInstances Update. */ public final class SapCentralInstancesUpdateSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPCentralInstances_Update.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPCentralInstances_Update.json */ /** * Sample code: SAPCentralInstances_Update. @@ -1329,7 +1347,10 @@ public final class SapCentralInstancesUpdateSamples { */ public static void sAPCentralInstancesUpdate(com.azure.resourcemanager.workloads.WorkloadsManager manager) { SapCentralServerInstance resource = - manager.sapCentralInstances().getWithResponse("test-rg", "X00", "centralServer", Context.NONE).getValue(); + manager + .sapCentralInstances() + .getWithResponse("test-rg", "X00", "centralServer", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("tag1", "value1")).apply(); } @@ -1355,7 +1376,26 @@ import java.util.Map; /** Samples for SapDatabaseInstances Create. */ public final class SapDatabaseInstancesCreateSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPDatabaseInstances_Create.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPDatabaseInstances_Create_HA_AvSet.json + */ + /** + * Sample code: Create SAP Database Instances for HA System with Availability Set. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createSAPDatabaseInstancesForHASystemWithAvailabilitySet( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapDatabaseInstances() + .define("databaseServer") + .withRegion("westcentralus") + .withExistingSapVirtualInstance("test-rg", "X00") + .withTags(mapOf()) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPDatabaseInstances_Create.json */ /** * Sample code: SAPDatabaseInstances_Create. @@ -1388,12 +1428,10 @@ public final class SapDatabaseInstancesCreateSamples { ### SapDatabaseInstances_Delete ```java -import com.azure.core.util.Context; - /** Samples for SapDatabaseInstances Delete. */ public final class SapDatabaseInstancesDeleteSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPDatabaseInstances_Delete.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPDatabaseInstances_Delete.json */ /** * Sample code: SAPDatabaseInstances_Delete. @@ -1401,7 +1439,7 @@ public final class SapDatabaseInstancesDeleteSamples { * @param manager Entry point to WorkloadsManager. */ public static void sAPDatabaseInstancesDelete(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.sapDatabaseInstances().delete("test-rg", "X00", "databaseServer", Context.NONE); + manager.sapDatabaseInstances().delete("test-rg", "X00", "databaseServer", com.azure.core.util.Context.NONE); } } ``` @@ -1409,12 +1447,10 @@ public final class SapDatabaseInstancesDeleteSamples { ### SapDatabaseInstances_Get ```java -import com.azure.core.util.Context; - /** Samples for SapDatabaseInstances Get. */ public final class SapDatabaseInstancesGetSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPDatabaseInstances_Get.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPDatabaseInstances_Get.json */ /** * Sample code: SAPDatabaseInstances_Get. @@ -1422,7 +1458,9 @@ public final class SapDatabaseInstancesGetSamples { * @param manager Entry point to WorkloadsManager. */ public static void sAPDatabaseInstancesGet(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.sapDatabaseInstances().getWithResponse("test-rg", "X00", "databaseServer", Context.NONE); + manager + .sapDatabaseInstances() + .getWithResponse("test-rg", "X00", "databaseServer", com.azure.core.util.Context.NONE); } } ``` @@ -1430,12 +1468,10 @@ public final class SapDatabaseInstancesGetSamples { ### SapDatabaseInstances_List ```java -import com.azure.core.util.Context; - /** Samples for SapDatabaseInstances List. */ public final class SapDatabaseInstancesListSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPDatabaseInstances_List.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPDatabaseInstances_List.json */ /** * Sample code: SAPDatabaseInstances_List. @@ -1443,7 +1479,56 @@ public final class SapDatabaseInstancesListSamples { * @param manager Entry point to WorkloadsManager. */ public static void sAPDatabaseInstancesList(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.sapDatabaseInstances().list("test-rg", "X00", Context.NONE); + manager.sapDatabaseInstances().list("test-rg", "X00", com.azure.core.util.Context.NONE); + } +} +``` + +### SapDatabaseInstances_StartInstance + +```java +/** Samples for SapDatabaseInstances StartInstance. */ +public final class SapDatabaseInstancesStartInstanceSamples { + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPDatabaseInstances_StartInstance.json + */ + /** + * Sample code: Start the database instance of the SAP system. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void startTheDatabaseInstanceOfTheSAPSystem( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager.sapDatabaseInstances().startInstance("test-rg", "X00", "db0", com.azure.core.util.Context.NONE); + } +} +``` + +### SapDatabaseInstances_StopInstance + +```java +import com.azure.resourcemanager.workloads.models.StopRequest; + +/** Samples for SapDatabaseInstances StopInstance. */ +public final class SapDatabaseInstancesStopInstanceSamples { + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPDatabaseInstances_StopInstance.json + */ + /** + * Sample code: Stop the database instance of the SAP system. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void stopTheDatabaseInstanceOfTheSAPSystem( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapDatabaseInstances() + .stopInstance( + "test-rg", + "X00", + "db0", + new StopRequest().withSoftStopTimeoutSeconds(0L), + com.azure.core.util.Context.NONE); } } ``` @@ -1451,7 +1536,6 @@ public final class SapDatabaseInstancesListSamples { ### SapDatabaseInstances_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.workloads.models.SapDatabaseInstance; import java.util.HashMap; import java.util.Map; @@ -1459,7 +1543,7 @@ import java.util.Map; /** Samples for SapDatabaseInstances Update. */ public final class SapDatabaseInstancesUpdateSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPDatabaseInstances_Update.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPDatabaseInstances_Update.json */ /** * Sample code: SAPDatabaseInstances_Update. @@ -1468,7 +1552,10 @@ public final class SapDatabaseInstancesUpdateSamples { */ public static void sAPDatabaseInstancesUpdate(com.azure.resourcemanager.workloads.WorkloadsManager manager) { SapDatabaseInstance resource = - manager.sapDatabaseInstances().getWithResponse("test-rg", "X00", "databaseServer", Context.NONE).getValue(); + manager + .sapDatabaseInstances() + .getWithResponse("test-rg", "X00", "databaseServer", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("key1", "value1")).apply(); } @@ -1485,31 +1572,219 @@ public final class SapDatabaseInstancesUpdateSamples { } ``` +### SapLandscapeMonitor_Create + +```java +import com.azure.resourcemanager.workloads.fluent.models.SapLandscapeMonitorInner; +import com.azure.resourcemanager.workloads.models.SapLandscapeMonitorMetricThresholds; +import com.azure.resourcemanager.workloads.models.SapLandscapeMonitorPropertiesGrouping; +import com.azure.resourcemanager.workloads.models.SapLandscapeMonitorSidMapping; +import java.util.Arrays; + +/** Samples for SapLandscapeMonitor Create. */ +public final class SapLandscapeMonitorCreateSamples { + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/SapLandscapeMonitor_Create.json + */ + /** + * Sample code: Create for SAP Landscape monitor Dashboard. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createForSAPLandscapeMonitorDashboard( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapLandscapeMonitors() + .createWithResponse( + "myResourceGroup", + "mySapMonitor", + new SapLandscapeMonitorInner() + .withGrouping( + new SapLandscapeMonitorPropertiesGrouping() + .withLandscape( + Arrays + .asList( + new SapLandscapeMonitorSidMapping() + .withName("Prod") + .withTopSid(Arrays.asList("SID1", "SID2")))) + .withSapApplication( + Arrays + .asList( + new SapLandscapeMonitorSidMapping() + .withName("ERP1") + .withTopSid(Arrays.asList("SID1", "SID2"))))) + .withTopMetricsThresholds( + Arrays + .asList( + new SapLandscapeMonitorMetricThresholds() + .withName("Instance Availability") + .withGreen(90.0F) + .withYellow(75.0F) + .withRed(50.0F))), + com.azure.core.util.Context.NONE); + } +} +``` + +### SapLandscapeMonitor_Delete + +```java +/** Samples for SapLandscapeMonitor Delete. */ +public final class SapLandscapeMonitorDeleteSamples { + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/SapLandscapeMonitor_Delete.json + */ + /** + * Sample code: Deletes SAP monitor. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void deletesSAPMonitor(com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapLandscapeMonitors() + .deleteByResourceGroupWithResponse("myResourceGroup", "mySapMonitor", com.azure.core.util.Context.NONE); + } +} +``` + +### SapLandscapeMonitor_Get + +```java +/** Samples for SapLandscapeMonitor Get. */ +public final class SapLandscapeMonitorGetSamples { + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/SapLandscapeMonitor_Get.json + */ + /** + * Sample code: Get properties of a SAP monitor. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void getPropertiesOfASAPMonitor(com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapLandscapeMonitors() + .getWithResponse("myResourceGroup", "mySapMonitor", com.azure.core.util.Context.NONE); + } +} +``` + +### SapLandscapeMonitor_List + +```java +/** Samples for SapLandscapeMonitor List. */ +public final class SapLandscapeMonitorListSamples { + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/SapLandscapeMonitor_List.json + */ + /** + * Sample code: Get properties of a SAP monitor. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void getPropertiesOfASAPMonitor(com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapLandscapeMonitors() + .listWithResponse("myResourceGroup", "mySapMonitor", com.azure.core.util.Context.NONE); + } +} +``` + +### SapLandscapeMonitor_Update + +```java +import com.azure.resourcemanager.workloads.fluent.models.SapLandscapeMonitorInner; +import com.azure.resourcemanager.workloads.models.SapLandscapeMonitorMetricThresholds; +import com.azure.resourcemanager.workloads.models.SapLandscapeMonitorPropertiesGrouping; +import com.azure.resourcemanager.workloads.models.SapLandscapeMonitorSidMapping; +import java.util.Arrays; + +/** Samples for SapLandscapeMonitor Update. */ +public final class SapLandscapeMonitorUpdateSamples { + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/SapLandscapeMonitor_Update.json + */ + /** + * Sample code: Update SAP monitor. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void updateSAPMonitor(com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapLandscapeMonitors() + .updateWithResponse( + "myResourceGroup", + "mySapMonitor", + new SapLandscapeMonitorInner() + .withGrouping( + new SapLandscapeMonitorPropertiesGrouping() + .withLandscape( + Arrays + .asList( + new SapLandscapeMonitorSidMapping() + .withName("Prod") + .withTopSid(Arrays.asList("SID1", "SID2")))) + .withSapApplication( + Arrays + .asList( + new SapLandscapeMonitorSidMapping() + .withName("ERP1") + .withTopSid(Arrays.asList("SID1", "SID2"))))) + .withTopMetricsThresholds( + Arrays + .asList( + new SapLandscapeMonitorMetricThresholds() + .withName("Instance Availability") + .withGreen(90.0F) + .withYellow(75.0F) + .withRed(50.0F))), + com.azure.core.util.Context.NONE); + } +} +``` + ### SapVirtualInstances_Create ```java import com.azure.resourcemanager.workloads.models.ApplicationServerConfiguration; +import com.azure.resourcemanager.workloads.models.ApplicationServerFullResourceNames; import com.azure.resourcemanager.workloads.models.CentralServerConfiguration; +import com.azure.resourcemanager.workloads.models.CentralServerFullResourceNames; +import com.azure.resourcemanager.workloads.models.CreateAndMountFileShareConfiguration; import com.azure.resourcemanager.workloads.models.DatabaseConfiguration; -import com.azure.resourcemanager.workloads.models.DeployerVmPackages; +import com.azure.resourcemanager.workloads.models.DatabaseServerFullResourceNames; import com.azure.resourcemanager.workloads.models.DeploymentConfiguration; import com.azure.resourcemanager.workloads.models.DeploymentWithOSConfiguration; +import com.azure.resourcemanager.workloads.models.DiscoveryConfiguration; +import com.azure.resourcemanager.workloads.models.DiskConfiguration; +import com.azure.resourcemanager.workloads.models.DiskSku; +import com.azure.resourcemanager.workloads.models.DiskSkuName; +import com.azure.resourcemanager.workloads.models.DiskVolumeConfiguration; +import com.azure.resourcemanager.workloads.models.ExternalInstallationSoftwareConfiguration; import com.azure.resourcemanager.workloads.models.HighAvailabilityConfiguration; import com.azure.resourcemanager.workloads.models.ImageReference; import com.azure.resourcemanager.workloads.models.LinuxConfiguration; +import com.azure.resourcemanager.workloads.models.LoadBalancerResourceNames; +import com.azure.resourcemanager.workloads.models.MountFileShareConfiguration; import com.azure.resourcemanager.workloads.models.NetworkConfiguration; +import com.azure.resourcemanager.workloads.models.NetworkInterfaceResourceNames; import com.azure.resourcemanager.workloads.models.OSProfile; import com.azure.resourcemanager.workloads.models.OsSapConfiguration; import com.azure.resourcemanager.workloads.models.SapDatabaseType; import com.azure.resourcemanager.workloads.models.SapEnvironmentType; import com.azure.resourcemanager.workloads.models.SapHighAvailabilityType; +import com.azure.resourcemanager.workloads.models.SapInstallWithoutOSConfigSoftwareConfiguration; import com.azure.resourcemanager.workloads.models.SapProductType; +import com.azure.resourcemanager.workloads.models.SharedStorageResourceNames; import com.azure.resourcemanager.workloads.models.SingleServerConfiguration; +import com.azure.resourcemanager.workloads.models.SkipFileShareConfiguration; import com.azure.resourcemanager.workloads.models.SshConfiguration; import com.azure.resourcemanager.workloads.models.SshKeyPair; import com.azure.resourcemanager.workloads.models.SshPublicKey; +import com.azure.resourcemanager.workloads.models.StorageConfiguration; import com.azure.resourcemanager.workloads.models.ThreeTierConfiguration; +import com.azure.resourcemanager.workloads.models.ThreeTierFullResourceNames; import com.azure.resourcemanager.workloads.models.VirtualMachineConfiguration; +import com.azure.resourcemanager.workloads.models.VirtualMachineResourceNames; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -1517,19 +1792,19 @@ import java.util.Map; /** Samples for SapVirtualInstances Create. */ public final class SapVirtualInstancesCreateSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_HA_AvSet.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Install_Distributed.json */ /** - * Sample code: SAPVirtualInstances_Create_WithOSConfig_HA_AvSet. + * Sample code: Install SAP Software on Distributed System. * * @param manager Entry point to WorkloadsManager. */ - public static void sAPVirtualInstancesCreateWithOSConfigHAAvSet( + public static void installSAPSoftwareOnDistributedSystem( com.azure.resourcemanager.workloads.WorkloadsManager manager) { manager .sapVirtualInstances() .define("X00") - .withRegion("westcentralus") + .withRegion("eastus2") .withExistingResourceGroup("test-rg") .withEnvironment(SapEnvironmentType.PROD) .withSapProduct(SapProductType.S4HANA) @@ -1538,14 +1813,1720 @@ public final class SapVirtualInstancesCreateSamples { .withAppLocation("eastus") .withInfrastructureConfiguration( new ThreeTierConfiguration() - .withAppResourceGroup("X00-RG") + .withAppResourceGroup("{{resourcegrp}}") + .withNetworkConfiguration(new NetworkConfiguration().withIsSecondaryIpEnabled(true)) .withCentralServer( new CentralServerConfiguration() .withSubnetId( - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app") .withVirtualMachineConfiguration( new VirtualMachineConfiguration() - .withVmSize("Standard_E16ds_v4") + .withVmSize("Standard_E4ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP-HA") + .withSku("8.2") + .withVersion("8.2.2021091201")) + .withOsProfile( + new OSProfile() + .withAdminUsername("azureuser") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(1L)) + .withApplicationServer( + new ApplicationServerConfiguration() + .withSubnetId( + "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E4ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP-HA") + .withSku("8.2") + .withVersion("8.2.2021091201")) + .withOsProfile( + new OSProfile() + .withAdminUsername("azureuser") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(2L)) + .withDatabaseServer( + new DatabaseConfiguration() + .withSubnetId( + "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_M32ts") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP-HA") + .withSku("8.2") + .withVersion("8.2.2021091201")) + .withOsProfile( + new OSProfile() + .withAdminUsername("azureuser") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(1L))) + .withSoftwareConfiguration( + new SapInstallWithoutOSConfigSoftwareConfiguration() + .withBomUrl( + "https://teststorageaccount.blob.core.windows.net/sapbits/sapfiles/boms/S41909SPS03_v0011ms/S41909SPS03_v0011ms.yaml") + .withSapBitsStorageAccountId( + "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Storage/storageAccounts/teststorageaccount") + .withSoftwareVersion("SAP S/4HANA 1909 SPS 03")) + .withOsSapConfiguration(new OsSapConfiguration().withSapFqdn("sap.bpaas.com"))) + .withTags(mapOf("created by", "azureuser")) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_HA_AvZone.json + */ + /** + * Sample code: Create Infrastructure only for HA System with Availability Zone. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createInfrastructureOnlyForHASystemWithAvailabilityZone( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapVirtualInstances() + .define("X00") + .withRegion("westcentralus") + .withExistingResourceGroup("test-rg") + .withEnvironment(SapEnvironmentType.PROD) + .withSapProduct(SapProductType.S4HANA) + .withConfiguration( + new DeploymentConfiguration() + .withAppLocation("eastus") + .withInfrastructureConfiguration( + new ThreeTierConfiguration() + .withAppResourceGroup("X00-RG") + .withCentralServer( + new CentralServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E16ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSsh( + new SshConfiguration() + .withPublicKeys( + Arrays + .asList( + new SshPublicKey() + .withKeyData( + "fakeTokenPlaceholder"))))))) + .withInstanceCount(2L)) + .withApplicationServer( + new ApplicationServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E32ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSsh( + new SshConfiguration() + .withPublicKeys( + Arrays + .asList( + new SshPublicKey() + .withKeyData( + "fakeTokenPlaceholder"))))))) + .withInstanceCount(6L)) + .withDatabaseServer( + new DatabaseConfiguration() + .withDatabaseType(SapDatabaseType.HANA) + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_M32ts") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSsh( + new SshConfiguration() + .withPublicKeys( + Arrays + .asList( + new SshPublicKey() + .withKeyData( + "fakeTokenPlaceholder"))))))) + .withInstanceCount(2L)) + .withHighAvailabilityConfig( + new HighAvailabilityConfiguration() + .withHighAvailabilityType(SapHighAvailabilityType.AVAILABILITY_ZONE)))) + .withTags(mapOf()) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_Distributed.json + */ + /** + * Sample code: Create Infrastructure with OS configuration for Distributed System (Recommended). + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createInfrastructureWithOSConfigurationForDistributedSystemRecommended( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapVirtualInstances() + .define("X00") + .withRegion("westcentralus") + .withExistingResourceGroup("test-rg") + .withEnvironment(SapEnvironmentType.PROD) + .withSapProduct(SapProductType.S4HANA) + .withConfiguration( + new DeploymentWithOSConfiguration() + .withAppLocation("eastus") + .withInfrastructureConfiguration( + new ThreeTierConfiguration() + .withAppResourceGroup("X00-RG") + .withCentralServer( + new CentralServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E16ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(1L)) + .withApplicationServer( + new ApplicationServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E32ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(6L)) + .withDatabaseServer( + new DatabaseConfiguration() + .withDatabaseType(SapDatabaseType.HANA) + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_M32ts") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(1L))) + .withOsSapConfiguration(new OsSapConfiguration().withSapFqdn("xyz.test.com"))) + .withTags(mapOf()) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_DetectInstallation_SingleServer.json + */ + /** + * Sample code: Detect SAP Software Installation on a Single Server System. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void detectSAPSoftwareInstallationOnASingleServerSystem( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapVirtualInstances() + .define("X00") + .withRegion("westcentralus") + .withExistingResourceGroup("test-rg") + .withEnvironment(SapEnvironmentType.NON_PROD) + .withSapProduct(SapProductType.S4HANA) + .withConfiguration( + new DeploymentWithOSConfiguration() + .withAppLocation("eastus") + .withInfrastructureConfiguration( + new SingleServerConfiguration() + .withAppResourceGroup("X00-RG") + .withNetworkConfiguration(new NetworkConfiguration().withIsSecondaryIpEnabled(true)) + .withDatabaseType(SapDatabaseType.HANA) + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E32ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP-HA") + .withSku("84sapha-gen2") + .withVersion("8.4.2021091202")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder")))))) + .withSoftwareConfiguration( + new ExternalInstallationSoftwareConfiguration() + .withCentralServerVmId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0")) + .withOsSapConfiguration(new OsSapConfiguration().withSapFqdn("xyz.test.com"))) + .withTags(mapOf()) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_DiskDetails_HA_AvSet.json + */ + /** + * Sample code: Create Infrastructure with Disk and OS configuration for HA System with Availability Set + * (Recommended). + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createInfrastructureWithDiskAndOSConfigurationForHASystemWithAvailabilitySetRecommended( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapVirtualInstances() + .define("X00") + .withRegion("westcentralus") + .withExistingResourceGroup("test-rg") + .withEnvironment(SapEnvironmentType.PROD) + .withSapProduct(SapProductType.S4HANA) + .withConfiguration( + new DeploymentWithOSConfiguration() + .withAppLocation("eastus") + .withInfrastructureConfiguration( + new ThreeTierConfiguration() + .withAppResourceGroup("X00-RG") + .withCentralServer( + new CentralServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E16ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(2L)) + .withApplicationServer( + new ApplicationServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E32ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(6L)) + .withDatabaseServer( + new DatabaseConfiguration() + .withDatabaseType(SapDatabaseType.HANA) + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_M32ts") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(2L) + .withDiskConfiguration( + new DiskConfiguration() + .withDiskVolumeConfigurations( + mapOf( + "backup", + new DiskVolumeConfiguration() + .withCount(2L) + .withSizeGB(256L) + .withSku(new DiskSku().withName(DiskSkuName.STANDARD_SSD_LRS)), + "hana/data", + new DiskVolumeConfiguration() + .withCount(4L) + .withSizeGB(128L) + .withSku(new DiskSku().withName(DiskSkuName.PREMIUM_LRS)), + "hana/log", + new DiskVolumeConfiguration() + .withCount(3L) + .withSizeGB(128L) + .withSku(new DiskSku().withName(DiskSkuName.PREMIUM_LRS)), + "hana/shared", + new DiskVolumeConfiguration() + .withCount(1L) + .withSizeGB(256L) + .withSku(new DiskSku().withName(DiskSkuName.STANDARD_SSD_LRS)), + "os", + new DiskVolumeConfiguration() + .withCount(1L) + .withSizeGB(64L) + .withSku(new DiskSku().withName(DiskSkuName.STANDARD_SSD_LRS)), + "usr/sap", + new DiskVolumeConfiguration() + .withCount(1L) + .withSizeGB(128L) + .withSku(new DiskSku().withName(DiskSkuName.PREMIUM_LRS)))))) + .withHighAvailabilityConfig( + new HighAvailabilityConfiguration() + .withHighAvailabilityType(SapHighAvailabilityType.AVAILABILITY_SET))) + .withOsSapConfiguration(new OsSapConfiguration().withSapFqdn("xyz.test.com"))) + .withTags(mapOf()) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_Distributed_CreateTrans.json + */ + /** + * Sample code: Create Infrastructure with a new SAP Trans Fileshare. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createInfrastructureWithANewSAPTransFileshare( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapVirtualInstances() + .define("X00") + .withRegion("westcentralus") + .withExistingResourceGroup("test-rg") + .withEnvironment(SapEnvironmentType.PROD) + .withSapProduct(SapProductType.S4HANA) + .withConfiguration( + new DeploymentWithOSConfiguration() + .withAppLocation("eastus") + .withInfrastructureConfiguration( + new ThreeTierConfiguration() + .withAppResourceGroup("X00-RG") + .withCentralServer( + new CentralServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E16ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(1L)) + .withApplicationServer( + new ApplicationServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E32ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(6L)) + .withDatabaseServer( + new DatabaseConfiguration() + .withDatabaseType(SapDatabaseType.HANA) + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_M32ts") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(1L)) + .withStorageConfiguration( + new StorageConfiguration() + .withTransportFileShareConfiguration( + new CreateAndMountFileShareConfiguration() + .withResourceGroup("test-rg") + .withStorageAccountName("input-sa-name")))) + .withOsSapConfiguration(new OsSapConfiguration().withSapFqdn("xyz.test.com"))) + .withTags(mapOf()) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_Distributed_MountTrans.json + */ + /** + * Sample code: Create Infrastructure with an existing SAP Trans Fileshare. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createInfrastructureWithAnExistingSAPTransFileshare( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapVirtualInstances() + .define("X00") + .withRegion("westcentralus") + .withExistingResourceGroup("test-rg") + .withEnvironment(SapEnvironmentType.PROD) + .withSapProduct(SapProductType.S4HANA) + .withConfiguration( + new DeploymentWithOSConfiguration() + .withAppLocation("eastus") + .withInfrastructureConfiguration( + new ThreeTierConfiguration() + .withAppResourceGroup("X00-RG") + .withCentralServer( + new CentralServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E16ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(1L)) + .withApplicationServer( + new ApplicationServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E32ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(6L)) + .withDatabaseServer( + new DatabaseConfiguration() + .withDatabaseType(SapDatabaseType.HANA) + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_M32ts") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(1L)) + .withStorageConfiguration( + new StorageConfiguration() + .withTransportFileShareConfiguration( + new MountFileShareConfiguration() + .withId("fileshareID") + .withPrivateEndpointId("pe-arm-id")))) + .withOsSapConfiguration(new OsSapConfiguration().withSapFqdn("xyz.test.com"))) + .withTags(mapOf()) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_HA_AvSet.json + */ + /** + * Sample code: Create Infrastructure only for HA System with Availability Set. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createInfrastructureOnlyForHASystemWithAvailabilitySet( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapVirtualInstances() + .define("X00") + .withRegion("westcentralus") + .withExistingResourceGroup("test-rg") + .withEnvironment(SapEnvironmentType.PROD) + .withSapProduct(SapProductType.S4HANA) + .withConfiguration( + new DeploymentConfiguration() + .withAppLocation("eastus") + .withInfrastructureConfiguration( + new ThreeTierConfiguration() + .withAppResourceGroup("X00-RG") + .withCentralServer( + new CentralServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E16ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSsh( + new SshConfiguration() + .withPublicKeys( + Arrays + .asList( + new SshPublicKey() + .withKeyData( + "fakeTokenPlaceholder"))))))) + .withInstanceCount(2L)) + .withApplicationServer( + new ApplicationServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E32ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSsh( + new SshConfiguration() + .withPublicKeys( + Arrays + .asList( + new SshPublicKey() + .withKeyData( + "fakeTokenPlaceholder"))))))) + .withInstanceCount(5L)) + .withDatabaseServer( + new DatabaseConfiguration() + .withDatabaseType(SapDatabaseType.HANA) + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_M32ts") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSsh( + new SshConfiguration() + .withPublicKeys( + Arrays + .asList( + new SshPublicKey() + .withKeyData( + "fakeTokenPlaceholder"))))))) + .withInstanceCount(2L)) + .withHighAvailabilityConfig( + new HighAvailabilityConfiguration() + .withHighAvailabilityType(SapHighAvailabilityType.AVAILABILITY_SET)))) + .withTags(mapOf()) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_DetectInstallation_HA_AvZone.json + */ + /** + * Sample code: Detect SAP Software Installation on an HA System with Availability Zone. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void detectSAPSoftwareInstallationOnAnHASystemWithAvailabilityZone( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapVirtualInstances() + .define("X00") + .withRegion("westcentralus") + .withExistingResourceGroup("test-rg") + .withEnvironment(SapEnvironmentType.PROD) + .withSapProduct(SapProductType.S4HANA) + .withConfiguration( + new DeploymentWithOSConfiguration() + .withAppLocation("eastus") + .withInfrastructureConfiguration( + new ThreeTierConfiguration() + .withAppResourceGroup("X00-RG") + .withCentralServer( + new CentralServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E16ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP-HA") + .withSku("84sapha-gen2") + .withVersion("8.4.2021091202")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(2L)) + .withApplicationServer( + new ApplicationServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E32ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP-HA") + .withSku("84sapha-gen2") + .withVersion("8.4.2021091202")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(6L)) + .withDatabaseServer( + new DatabaseConfiguration() + .withDatabaseType(SapDatabaseType.HANA) + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_M32ts") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP-HA") + .withSku("84sapha-gen2") + .withVersion("8.4.2021091202")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(2L)) + .withHighAvailabilityConfig( + new HighAvailabilityConfiguration() + .withHighAvailabilityType(SapHighAvailabilityType.AVAILABILITY_ZONE))) + .withSoftwareConfiguration( + new ExternalInstallationSoftwareConfiguration() + .withCentralServerVmId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0")) + .withOsSapConfiguration(new OsSapConfiguration().withSapFqdn("xyz.test.com"))) + .withTags(mapOf()) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_SingleServer.json + */ + /** + * Sample code: Create Infrastructure only for Single Server System. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createInfrastructureOnlyForSingleServerSystem( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapVirtualInstances() + .define("X00") + .withRegion("westcentralus") + .withExistingResourceGroup("test-rg") + .withEnvironment(SapEnvironmentType.NON_PROD) + .withSapProduct(SapProductType.S4HANA) + .withConfiguration( + new DeploymentConfiguration() + .withAppLocation("eastus") + .withInfrastructureConfiguration( + new SingleServerConfiguration() + .withAppResourceGroup("X00-RG") + .withNetworkConfiguration(new NetworkConfiguration().withIsSecondaryIpEnabled(true)) + .withDatabaseType(SapDatabaseType.HANA) + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E32ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSsh( + new SshConfiguration() + .withPublicKeys( + Arrays + .asList( + new SshPublicKey() + .withKeyData("fakeTokenPlaceholder"))))))))) + .withTags(mapOf()) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_Discover.json + */ + /** + * Sample code: Register existing SAP system as Virtual Instance for SAP solutions. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void registerExistingSAPSystemAsVirtualInstanceForSAPSolutions( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapVirtualInstances() + .define("X00") + .withRegion("northeurope") + .withExistingResourceGroup("test-rg") + .withEnvironment(SapEnvironmentType.NON_PROD) + .withSapProduct(SapProductType.S4HANA) + .withConfiguration( + new DiscoveryConfiguration() + .withCentralServerVmId( + "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0")) + .withTags(mapOf("createdby", "abc@microsoft.com", "test", "abc")) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_CustomFullResourceNames_Distributed.json + */ + /** + * Sample code: Create Infrastructure (with OS configuration) with custom resource names for Distributed System. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createInfrastructureWithOSConfigurationWithCustomResourceNamesForDistributedSystem( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapVirtualInstances() + .define("X00") + .withRegion("westcentralus") + .withExistingResourceGroup("test-rg") + .withEnvironment(SapEnvironmentType.PROD) + .withSapProduct(SapProductType.S4HANA) + .withConfiguration( + new DeploymentWithOSConfiguration() + .withAppLocation("eastus") + .withInfrastructureConfiguration( + new ThreeTierConfiguration() + .withAppResourceGroup("X00-RG") + .withCentralServer( + new CentralServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E16ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(1L)) + .withApplicationServer( + new ApplicationServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E32ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(6L)) + .withDatabaseServer( + new DatabaseConfiguration() + .withDatabaseType(SapDatabaseType.HANA) + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_M32ts") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(1L)) + .withCustomResourceNames( + new ThreeTierFullResourceNames() + .withCentralServer( + new CentralServerFullResourceNames() + .withVirtualMachines( + Arrays + .asList( + new VirtualMachineResourceNames() + .withVmName("ascsvm") + .withHostname("ascshostName") + .withNetworkInterfaces( + Arrays + .asList( + new NetworkInterfaceResourceNames() + .withNetworkInterfaceName("ascsnic"))) + .withOsDiskName("ascsosdisk") + .withDataDiskNames( + mapOf("default", Arrays.asList("ascsdisk0")))))) + .withApplicationServer( + new ApplicationServerFullResourceNames() + .withVirtualMachines( + Arrays + .asList( + new VirtualMachineResourceNames() + .withVmName("appvm0") + .withHostname("apphostName0") + .withNetworkInterfaces( + Arrays + .asList( + new NetworkInterfaceResourceNames() + .withNetworkInterfaceName("appnic0"))) + .withOsDiskName("app0osdisk") + .withDataDiskNames( + mapOf("default", Arrays.asList("app0disk0"))), + new VirtualMachineResourceNames() + .withVmName("appvm1") + .withHostname("apphostName1") + .withNetworkInterfaces( + Arrays + .asList( + new NetworkInterfaceResourceNames() + .withNetworkInterfaceName("appnic1"))) + .withOsDiskName("app1osdisk") + .withDataDiskNames( + mapOf("default", Arrays.asList("app1disk0"))))) + .withAvailabilitySetName("appAvSet")) + .withDatabaseServer( + new DatabaseServerFullResourceNames() + .withVirtualMachines( + Arrays + .asList( + new VirtualMachineResourceNames() + .withVmName("dbvm") + .withHostname("dbhostName") + .withNetworkInterfaces( + Arrays + .asList( + new NetworkInterfaceResourceNames() + .withNetworkInterfaceName("dbnic"))) + .withOsDiskName("dbosdisk") + .withDataDiskNames( + mapOf( + "hanaData", + Arrays.asList("hanadata0", "hanadata1"), + "hanaLog", + Arrays.asList("hanalog0", "hanalog1", "hanalog2"), + "hanaShared", + Arrays.asList("hanashared0", "hanashared1"), + "usrSap", + Arrays.asList("usrsap0")))))) + .withSharedStorage( + new SharedStorageResourceNames() + .withSharedStorageAccountName("storageacc") + .withSharedStorageAccountPrivateEndPointName("peForxNFS")))) + .withOsSapConfiguration(new OsSapConfiguration().withSapFqdn("xyz.test.com"))) + .withTags(mapOf()) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_CustomFullResourceNames_SingleServer.json + */ + /** + * Sample code: Create Infrastructure (with OS configuration) with custom resource names for Single Server System. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createInfrastructureWithOSConfigurationWithCustomResourceNamesForSingleServerSystem( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapVirtualInstances() + .define("X00") + .withRegion("westcentralus") + .withExistingResourceGroup("test-rg") + .withEnvironment(SapEnvironmentType.NON_PROD) + .withSapProduct(SapProductType.S4HANA) + .withConfiguration( + new DeploymentWithOSConfiguration() + .withAppLocation("eastus") + .withInfrastructureConfiguration( + new SingleServerConfiguration() + .withAppResourceGroup("X00-RG") + .withNetworkConfiguration(new NetworkConfiguration().withIsSecondaryIpEnabled(true)) + .withDatabaseType(SapDatabaseType.HANA) + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E32ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder")))))) + .withOsSapConfiguration(new OsSapConfiguration().withSapFqdn("xyz.test.com"))) + .withTags(mapOf()) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_CustomFullResourceNames_HA_AvZone.json + */ + /** + * Sample code: Create Infrastructure (with OS configuration) with custom resource names for HA system with + * Availability Zone. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createInfrastructureWithOSConfigurationWithCustomResourceNamesForHASystemWithAvailabilityZone( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapVirtualInstances() + .define("X00") + .withRegion("westcentralus") + .withExistingResourceGroup("test-rg") + .withEnvironment(SapEnvironmentType.PROD) + .withSapProduct(SapProductType.S4HANA) + .withConfiguration( + new DeploymentWithOSConfiguration() + .withAppLocation("eastus") + .withInfrastructureConfiguration( + new ThreeTierConfiguration() + .withAppResourceGroup("X00-RG") + .withCentralServer( + new CentralServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E16ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(2L)) + .withApplicationServer( + new ApplicationServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E32ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(6L)) + .withDatabaseServer( + new DatabaseConfiguration() + .withDatabaseType(SapDatabaseType.HANA) + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_M32ts") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(2L)) + .withHighAvailabilityConfig( + new HighAvailabilityConfiguration() + .withHighAvailabilityType(SapHighAvailabilityType.AVAILABILITY_ZONE)) + .withCustomResourceNames( + new ThreeTierFullResourceNames() + .withCentralServer( + new CentralServerFullResourceNames() + .withVirtualMachines( + Arrays + .asList( + new VirtualMachineResourceNames() + .withVmName("ascsvm") + .withHostname("ascshostName") + .withNetworkInterfaces( + Arrays + .asList( + new NetworkInterfaceResourceNames() + .withNetworkInterfaceName("ascsnic"))) + .withOsDiskName("ascsosdisk"), + new VirtualMachineResourceNames() + .withVmName("ersvm") + .withHostname("ershostName") + .withNetworkInterfaces( + Arrays + .asList( + new NetworkInterfaceResourceNames() + .withNetworkInterfaceName("ersnic"))) + .withOsDiskName("ersosdisk"))) + .withLoadBalancer( + new LoadBalancerResourceNames() + .withLoadBalancerName("ascslb") + .withFrontendIpConfigurationNames( + Arrays.asList("ascsip0", "ersip0")) + .withBackendPoolNames(Arrays.asList("ascsBackendPool")) + .withHealthProbeNames( + Arrays.asList("ascsHealthProbe", "ersHealthProbe")))) + .withApplicationServer( + new ApplicationServerFullResourceNames() + .withVirtualMachines( + Arrays + .asList( + new VirtualMachineResourceNames() + .withVmName("appvm0") + .withHostname("apphostName0") + .withNetworkInterfaces( + Arrays + .asList( + new NetworkInterfaceResourceNames() + .withNetworkInterfaceName("appnic0"))) + .withOsDiskName("app0osdisk") + .withDataDiskNames( + mapOf("default", Arrays.asList("app0disk0"))), + new VirtualMachineResourceNames() + .withVmName("appvm1") + .withHostname("apphostName1") + .withNetworkInterfaces( + Arrays + .asList( + new NetworkInterfaceResourceNames() + .withNetworkInterfaceName("appnic1"))) + .withOsDiskName("app1osdisk") + .withDataDiskNames( + mapOf("default", Arrays.asList("app1disk0")))))) + .withDatabaseServer( + new DatabaseServerFullResourceNames() + .withVirtualMachines( + Arrays + .asList( + new VirtualMachineResourceNames() + .withVmName("dbvmpr") + .withHostname("dbprhostName") + .withNetworkInterfaces( + Arrays + .asList( + new NetworkInterfaceResourceNames() + .withNetworkInterfaceName("dbprnic"))) + .withOsDiskName("dbprosdisk") + .withDataDiskNames( + mapOf( + "hanaData", + Arrays.asList("hanadatapr0", "hanadatapr1"), + "hanaLog", + Arrays + .asList( + "hanalogpr0", "hanalogpr1", "hanalogpr2"), + "hanaShared", + Arrays.asList("hanasharedpr0", "hanasharedpr1"), + "usrSap", + Arrays.asList("usrsappr0"))), + new VirtualMachineResourceNames() + .withVmName("dbvmsr") + .withHostname("dbsrhostName") + .withNetworkInterfaces( + Arrays + .asList( + new NetworkInterfaceResourceNames() + .withNetworkInterfaceName("dbsrnic"))) + .withOsDiskName("dbsrosdisk") + .withDataDiskNames( + mapOf( + "hanaData", + Arrays.asList("hanadatasr0", "hanadatasr1"), + "hanaLog", + Arrays + .asList( + "hanalogsr0", "hanalogsr1", "hanalogsr2"), + "hanaShared", + Arrays.asList("hanasharedsr0", "hanasharedsr1"), + "usrSap", + Arrays.asList("usrsapsr0"))))) + .withLoadBalancer( + new LoadBalancerResourceNames() + .withLoadBalancerName("dblb") + .withFrontendIpConfigurationNames(Arrays.asList("dbip")) + .withBackendPoolNames(Arrays.asList("dbBackendPool")) + .withHealthProbeNames(Arrays.asList("dbHealthProbe")))) + .withSharedStorage( + new SharedStorageResourceNames() + .withSharedStorageAccountName("storageacc") + .withSharedStorageAccountPrivateEndPointName("peForxNFS")))) + .withOsSapConfiguration(new OsSapConfiguration().withSapFqdn("xyz.test.com"))) + .withTags(mapOf()) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_CustomFullResourceNames_HA_AvSet.json + */ + /** + * Sample code: Create Infrastructure (with OS configuration) with custom resource names for HA System with + * Availability Set. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createInfrastructureWithOSConfigurationWithCustomResourceNamesForHASystemWithAvailabilitySet( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapVirtualInstances() + .define("X00") + .withRegion("westcentralus") + .withExistingResourceGroup("test-rg") + .withEnvironment(SapEnvironmentType.PROD) + .withSapProduct(SapProductType.S4HANA) + .withConfiguration( + new DeploymentWithOSConfiguration() + .withAppLocation("eastus") + .withInfrastructureConfiguration( + new ThreeTierConfiguration() + .withAppResourceGroup("X00-RG") + .withCentralServer( + new CentralServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E16ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(2L)) + .withApplicationServer( + new ApplicationServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E32ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(6L)) + .withDatabaseServer( + new DatabaseConfiguration() + .withDatabaseType(SapDatabaseType.HANA) + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_M32ts") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(2L)) + .withHighAvailabilityConfig( + new HighAvailabilityConfiguration() + .withHighAvailabilityType(SapHighAvailabilityType.AVAILABILITY_SET)) + .withCustomResourceNames( + new ThreeTierFullResourceNames() + .withCentralServer( + new CentralServerFullResourceNames() + .withVirtualMachines( + Arrays + .asList( + new VirtualMachineResourceNames() + .withVmName("ascsvm") + .withHostname("ascshostName") + .withNetworkInterfaces( + Arrays + .asList( + new NetworkInterfaceResourceNames() + .withNetworkInterfaceName("ascsnic"))) + .withOsDiskName("ascsosdisk"), + new VirtualMachineResourceNames() + .withVmName("ersvm") + .withHostname("ershostName") + .withNetworkInterfaces( + Arrays + .asList( + new NetworkInterfaceResourceNames() + .withNetworkInterfaceName("ersnic"))) + .withOsDiskName("ersosdisk"))) + .withAvailabilitySetName("csAvSet") + .withLoadBalancer( + new LoadBalancerResourceNames() + .withLoadBalancerName("ascslb") + .withFrontendIpConfigurationNames( + Arrays.asList("ascsip0", "ersip0")) + .withBackendPoolNames(Arrays.asList("ascsBackendPool")) + .withHealthProbeNames( + Arrays.asList("ascsHealthProbe", "ersHealthProbe")))) + .withApplicationServer( + new ApplicationServerFullResourceNames() + .withVirtualMachines( + Arrays + .asList( + new VirtualMachineResourceNames() + .withVmName("appvm0") + .withHostname("apphostName0") + .withNetworkInterfaces( + Arrays + .asList( + new NetworkInterfaceResourceNames() + .withNetworkInterfaceName("appnic0"))) + .withOsDiskName("app0osdisk") + .withDataDiskNames( + mapOf("default", Arrays.asList("app0disk0"))), + new VirtualMachineResourceNames() + .withVmName("appvm1") + .withHostname("apphostName1") + .withNetworkInterfaces( + Arrays + .asList( + new NetworkInterfaceResourceNames() + .withNetworkInterfaceName("appnic1"))) + .withOsDiskName("app1osdisk") + .withDataDiskNames( + mapOf("default", Arrays.asList("app1disk0"))))) + .withAvailabilitySetName("appAvSet")) + .withDatabaseServer( + new DatabaseServerFullResourceNames() + .withVirtualMachines( + Arrays + .asList( + new VirtualMachineResourceNames() + .withVmName("dbvmpr") + .withHostname("dbprhostName") + .withNetworkInterfaces( + Arrays + .asList( + new NetworkInterfaceResourceNames() + .withNetworkInterfaceName("dbprnic"))) + .withOsDiskName("dbprosdisk") + .withDataDiskNames( + mapOf( + "hanaData", + Arrays.asList("hanadatapr0", "hanadatapr1"), + "hanaLog", + Arrays + .asList( + "hanalogpr0", "hanalogpr1", "hanalogpr2"), + "hanaShared", + Arrays.asList("hanasharedpr0", "hanasharedpr1"), + "usrSap", + Arrays.asList("usrsappr0"))), + new VirtualMachineResourceNames() + .withVmName("dbvmsr") + .withHostname("dbsrhostName") + .withNetworkInterfaces( + Arrays + .asList( + new NetworkInterfaceResourceNames() + .withNetworkInterfaceName("dbsrnic"))) + .withOsDiskName("dbsrosdisk") + .withDataDiskNames( + mapOf( + "hanaData", + Arrays.asList("hanadatasr0", "hanadatasr1"), + "hanaLog", + Arrays + .asList( + "hanalogsr0", "hanalogsr1", "hanalogsr2"), + "hanaShared", + Arrays.asList("hanasharedsr0", "hanasharedsr1"), + "usrSap", + Arrays.asList("usrsapsr0"))))) + .withAvailabilitySetName("dbAvSet") + .withLoadBalancer( + new LoadBalancerResourceNames() + .withLoadBalancerName("dblb") + .withFrontendIpConfigurationNames(Arrays.asList("dbip")) + .withBackendPoolNames(Arrays.asList("dbBackendPool")) + .withHealthProbeNames(Arrays.asList("dbHealthProbe")))) + .withSharedStorage( + new SharedStorageResourceNames() + .withSharedStorageAccountName("storageacc") + .withSharedStorageAccountPrivateEndPointName("peForxNFS")))) + .withOsSapConfiguration(new OsSapConfiguration().withSapFqdn("xyz.test.com"))) + .withTags(mapOf()) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_HA_AvSet.json + */ + /** + * Sample code: Create Infrastructure with OS configuration for HA System with Availability Set (Recommended). + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createInfrastructureWithOSConfigurationForHASystemWithAvailabilitySetRecommended( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapVirtualInstances() + .define("X00") + .withRegion("westcentralus") + .withExistingResourceGroup("test-rg") + .withEnvironment(SapEnvironmentType.PROD) + .withSapProduct(SapProductType.S4HANA) + .withConfiguration( + new DeploymentWithOSConfiguration() + .withAppLocation("eastus") + .withInfrastructureConfiguration( + new ThreeTierConfiguration() + .withAppResourceGroup("X00-RG") + .withCentralServer( + new CentralServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E16ds_v4") .withImageReference( new ImageReference() .withPublisher("RedHat") @@ -1560,13 +3541,13 @@ public final class SapVirtualInstancesCreateSamples { .withDisablePasswordAuthentication(true) .withSshKeyPair( new SshKeyPair() - .withPublicKey("abc") - .withPrivateKey("xyz"))))) + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) .withInstanceCount(2L)) .withApplicationServer( new ApplicationServerConfiguration() .withSubnetId( - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") .withVirtualMachineConfiguration( new VirtualMachineConfiguration() .withVmSize("Standard_E32ds_v4") @@ -1584,14 +3565,14 @@ public final class SapVirtualInstancesCreateSamples { .withDisablePasswordAuthentication(true) .withSshKeyPair( new SshKeyPair() - .withPublicKey("abc") - .withPrivateKey("xyz"))))) + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) .withInstanceCount(6L)) .withDatabaseServer( new DatabaseConfiguration() .withDatabaseType(SapDatabaseType.HANA) .withSubnetId( - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet") + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet") .withVirtualMachineConfiguration( new VirtualMachineConfiguration() .withVmSize("Standard_M32ts") @@ -1609,34 +3590,26 @@ public final class SapVirtualInstancesCreateSamples { .withDisablePasswordAuthentication(true) .withSshKeyPair( new SshKeyPair() - .withPublicKey("abc") - .withPrivateKey("xyz"))))) + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) .withInstanceCount(2L)) .withHighAvailabilityConfig( new HighAvailabilityConfiguration() .withHighAvailabilityType(SapHighAvailabilityType.AVAILABILITY_SET))) - .withOsSapConfiguration( - new OsSapConfiguration() - .withDeployerVmPackages( - new DeployerVmPackages() - .withUrl( - "https://ybteststorageaccount.blob.core.windows.net/sapbits/deployervmpackages/DeployerVMPackages.zip") - .withStorageAccountId( - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/yb-SapInstall/providers/Microsoft.Storage/storageAccounts/ybteststorageaccount")) - .withSapFqdn("xyz.test.com"))) + .withOsSapConfiguration(new OsSapConfiguration().withSapFqdn("xyz.test.com"))) .withTags(mapOf()) .create(); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_HA_AvZone.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_Distributed_SkipTransMount.json */ /** - * Sample code: SAPVirtualInstances_Create_WithOSConfig_HA_AvZone. + * Sample code: Create Infrastructure without SAP Trans Fileshare. * * @param manager Entry point to WorkloadsManager. */ - public static void sAPVirtualInstancesCreateWithOSConfigHAAvZone( + public static void createInfrastructureWithoutSAPTransFileshare( com.azure.resourcemanager.workloads.WorkloadsManager manager) { manager .sapVirtualInstances() @@ -1654,7 +3627,7 @@ public final class SapVirtualInstancesCreateSamples { .withCentralServer( new CentralServerConfiguration() .withSubnetId( - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") .withVirtualMachineConfiguration( new VirtualMachineConfiguration() .withVmSize("Standard_E16ds_v4") @@ -1672,13 +3645,13 @@ public final class SapVirtualInstancesCreateSamples { .withDisablePasswordAuthentication(true) .withSshKeyPair( new SshKeyPair() - .withPublicKey("abc") - .withPrivateKey("xyz"))))) - .withInstanceCount(2L)) + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(1L)) .withApplicationServer( new ApplicationServerConfiguration() .withSubnetId( - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") .withVirtualMachineConfiguration( new VirtualMachineConfiguration() .withVmSize("Standard_E32ds_v4") @@ -1696,14 +3669,14 @@ public final class SapVirtualInstancesCreateSamples { .withDisablePasswordAuthentication(true) .withSshKeyPair( new SshKeyPair() - .withPublicKey("abc") - .withPrivateKey("xyz"))))) + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) .withInstanceCount(6L)) .withDatabaseServer( new DatabaseConfiguration() .withDatabaseType(SapDatabaseType.HANA) .withSubnetId( - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet") + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet") .withVirtualMachineConfiguration( new VirtualMachineConfiguration() .withVmSize("Standard_M32ts") @@ -1721,34 +3694,26 @@ public final class SapVirtualInstancesCreateSamples { .withDisablePasswordAuthentication(true) .withSshKeyPair( new SshKeyPair() - .withPublicKey("abc") - .withPrivateKey("xyz"))))) - .withInstanceCount(2L)) - .withHighAvailabilityConfig( - new HighAvailabilityConfiguration() - .withHighAvailabilityType(SapHighAvailabilityType.AVAILABILITY_ZONE))) - .withOsSapConfiguration( - new OsSapConfiguration() - .withDeployerVmPackages( - new DeployerVmPackages() - .withUrl( - "https://ybteststorageaccount.blob.core.windows.net/sapbits/deployervmpackages/DeployerVMPackages.zip") - .withStorageAccountId( - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/yb-SapInstall/providers/Microsoft.Storage/storageAccounts/ybteststorageaccount")) - .withSapFqdn("xyz.test.com"))) + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(1L)) + .withStorageConfiguration( + new StorageConfiguration() + .withTransportFileShareConfiguration(new SkipFileShareConfiguration()))) + .withOsSapConfiguration(new OsSapConfiguration().withSapFqdn("xyz.test.com"))) .withTags(mapOf()) .create(); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_Distributed.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_DiskDetails_Distributed.json */ /** - * Sample code: SAPVirtualInstances_Create_Distributed. + * Sample code: Create Infrastructure with Disk and OS configuration for Distributed System (Recommended). * * @param manager Entry point to WorkloadsManager. */ - public static void sAPVirtualInstancesCreateDistributed( + public static void createInfrastructureWithDiskAndOSConfigurationForDistributedSystemRecommended( com.azure.resourcemanager.workloads.WorkloadsManager manager) { manager .sapVirtualInstances() @@ -1758,7 +3723,7 @@ public final class SapVirtualInstancesCreateSamples { .withEnvironment(SapEnvironmentType.PROD) .withSapProduct(SapProductType.S4HANA) .withConfiguration( - new DeploymentConfiguration() + new DeploymentWithOSConfiguration() .withAppLocation("eastus") .withInfrastructureConfiguration( new ThreeTierConfiguration() @@ -1782,14 +3747,10 @@ public final class SapVirtualInstancesCreateSamples { .withOsConfiguration( new LinuxConfiguration() .withDisablePasswordAuthentication(true) - .withSsh( - new SshConfiguration() - .withPublicKeys( - Arrays - .asList( - new SshPublicKey() - .withKeyData( - "ssh-rsa public key"))))))) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) .withInstanceCount(1L)) .withApplicationServer( new ApplicationServerConfiguration() @@ -1810,14 +3771,10 @@ public final class SapVirtualInstancesCreateSamples { .withOsConfiguration( new LinuxConfiguration() .withDisablePasswordAuthentication(true) - .withSsh( - new SshConfiguration() - .withPublicKeys( - Arrays - .asList( - new SshPublicKey() - .withKeyData( - "ssh-rsa public key"))))))) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) .withInstanceCount(6L)) .withDatabaseServer( new DatabaseConfiguration() @@ -1839,28 +3796,329 @@ public final class SapVirtualInstancesCreateSamples { .withOsConfiguration( new LinuxConfiguration() .withDisablePasswordAuthentication(true) - .withSsh( - new SshConfiguration() - .withPublicKeys( - Arrays - .asList( - new SshPublicKey() - .withKeyData( - "ssh-rsa public key"))))))) - .withInstanceCount(1L)))) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(1L) + .withDiskConfiguration( + new DiskConfiguration() + .withDiskVolumeConfigurations( + mapOf( + "backup", + new DiskVolumeConfiguration() + .withCount(2L) + .withSizeGB(256L) + .withSku(new DiskSku().withName(DiskSkuName.STANDARD_SSD_LRS)), + "hana/data", + new DiskVolumeConfiguration() + .withCount(4L) + .withSizeGB(128L) + .withSku(new DiskSku().withName(DiskSkuName.PREMIUM_LRS)), + "hana/log", + new DiskVolumeConfiguration() + .withCount(3L) + .withSizeGB(128L) + .withSku(new DiskSku().withName(DiskSkuName.PREMIUM_LRS)), + "hana/shared", + new DiskVolumeConfiguration() + .withCount(1L) + .withSizeGB(256L) + .withSku(new DiskSku().withName(DiskSkuName.STANDARD_SSD_LRS)), + "os", + new DiskVolumeConfiguration() + .withCount(1L) + .withSizeGB(64L) + .withSku(new DiskSku().withName(DiskSkuName.STANDARD_SSD_LRS)), + "usr/sap", + new DiskVolumeConfiguration() + .withCount(1L) + .withSizeGB(128L) + .withSku(new DiskSku().withName(DiskSkuName.PREMIUM_LRS))))))) + .withOsSapConfiguration(new OsSapConfiguration().withSapFqdn("xyz.test.com"))) + .withTags(mapOf()) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_DetectInstallation_Distributed.json + */ + /** + * Sample code: Detect SAP Software Installation on a Distributed System. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void detectSAPSoftwareInstallationOnADistributedSystem( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapVirtualInstances() + .define("X00") + .withRegion("eastus2") + .withExistingResourceGroup("test-rg") + .withEnvironment(SapEnvironmentType.PROD) + .withSapProduct(SapProductType.S4HANA) + .withConfiguration( + new DeploymentWithOSConfiguration() + .withAppLocation("eastus") + .withInfrastructureConfiguration( + new ThreeTierConfiguration() + .withAppResourceGroup("{{resourcegrp}}") + .withNetworkConfiguration(new NetworkConfiguration().withIsSecondaryIpEnabled(true)) + .withCentralServer( + new CentralServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E4ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP-HA") + .withSku("84sapha-gen2") + .withVersion("8.4.2021091202")) + .withOsProfile( + new OSProfile() + .withAdminUsername("azureuser") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(1L)) + .withApplicationServer( + new ApplicationServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E4ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP-HA") + .withSku("84sapha-gen2") + .withVersion("8.4.2021091202")) + .withOsProfile( + new OSProfile() + .withAdminUsername("azureuser") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(2L)) + .withDatabaseServer( + new DatabaseConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_M32ts") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP-HA") + .withSku("84sapha-gen2") + .withVersion("8.4.2021091202")) + .withOsProfile( + new OSProfile() + .withAdminUsername("azureuser") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(1L))) + .withSoftwareConfiguration( + new ExternalInstallationSoftwareConfiguration() + .withCentralServerVmId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0")) + .withOsSapConfiguration(new OsSapConfiguration().withSapFqdn("sap.bpaas.com"))) + .withTags(mapOf("created by", "azureuser")) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_DetectInstallation_HA_AvSet.json + */ + /** + * Sample code: Detect SAP Software Installation on an HA System with Availability Set. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void detectSAPSoftwareInstallationOnAnHASystemWithAvailabilitySet( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapVirtualInstances() + .define("X00") + .withRegion("westcentralus") + .withExistingResourceGroup("test-rg") + .withEnvironment(SapEnvironmentType.PROD) + .withSapProduct(SapProductType.S4HANA) + .withConfiguration( + new DeploymentWithOSConfiguration() + .withAppLocation("eastus") + .withInfrastructureConfiguration( + new ThreeTierConfiguration() + .withAppResourceGroup("X00-RG") + .withCentralServer( + new CentralServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E16ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP-HA") + .withSku("84sapha-gen2") + .withVersion("8.4.2021091202")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(2L)) + .withApplicationServer( + new ApplicationServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E32ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP-HA") + .withSku("84sapha-gen2") + .withVersion("8.4.2021091202")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(6L)) + .withDatabaseServer( + new DatabaseConfiguration() + .withDatabaseType(SapDatabaseType.HANA) + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_M32ts") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP-HA") + .withSku("84sapha-gen2") + .withVersion("8.4.2021091202")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(2L)) + .withHighAvailabilityConfig( + new HighAvailabilityConfiguration() + .withHighAvailabilityType(SapHighAvailabilityType.AVAILABILITY_SET))) + .withSoftwareConfiguration( + new ExternalInstallationSoftwareConfiguration() + .withCentralServerVmId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0")) + .withOsSapConfiguration(new OsSapConfiguration().withSapFqdn("xyz.test.com"))) + .withTags(mapOf()) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Install_SingleServer.json + */ + /** + * Sample code: Install SAP Software on Single Server System. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void installSAPSoftwareOnSingleServerSystem( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapVirtualInstances() + .define("X00") + .withRegion("eastus2") + .withExistingResourceGroup("test-rg") + .withEnvironment(SapEnvironmentType.NON_PROD) + .withSapProduct(SapProductType.S4HANA) + .withConfiguration( + new DeploymentWithOSConfiguration() + .withAppLocation("eastus") + .withInfrastructureConfiguration( + new SingleServerConfiguration() + .withAppResourceGroup("test-rg") + .withSubnetId( + "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/testsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E32ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("SUSE") + .withOffer("SLES-SAP") + .withSku("12-sp4-gen2") + .withVersion("2022.02.01")) + .withOsProfile( + new OSProfile() + .withAdminUsername("azureappadmin") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder")))))) + .withSoftwareConfiguration( + new SapInstallWithoutOSConfigSoftwareConfiguration() + .withBomUrl( + "https://teststorageaccount.blob.core.windows.net/sapbits/sapfiles/boms/S41909SPS03_v0011ms/S41909SPS03_v0011ms.yaml") + .withSapBitsStorageAccountId( + "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Storage/storageAccounts/teststorageaccount") + .withSoftwareVersion("SAP S/4HANA 1909 SPS 03")) + .withOsSapConfiguration(new OsSapConfiguration().withSapFqdn("sap.bpaas.com"))) .withTags(mapOf()) .create(); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_HA_AvZone.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_Distributed.json */ /** - * Sample code: SAPVirtualInstances_Create_HA_AvZone. + * Sample code: Create Infrastructure only for Distributed System. * * @param manager Entry point to WorkloadsManager. */ - public static void sAPVirtualInstancesCreateHAAvZone(com.azure.resourcemanager.workloads.WorkloadsManager manager) { + public static void createInfrastructureOnlyForDistributedSystem( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { manager .sapVirtualInstances() .define("X00") @@ -1877,7 +4135,7 @@ public final class SapVirtualInstancesCreateSamples { .withCentralServer( new CentralServerConfiguration() .withSubnetId( - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") .withVirtualMachineConfiguration( new VirtualMachineConfiguration() .withVmSize("Standard_E16ds_v4") @@ -1900,12 +4158,12 @@ public final class SapVirtualInstancesCreateSamples { .asList( new SshPublicKey() .withKeyData( - "ssh-rsa public key"))))))) - .withInstanceCount(2L)) + "fakeTokenPlaceholder"))))))) + .withInstanceCount(1L)) .withApplicationServer( new ApplicationServerConfiguration() .withSubnetId( - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") .withVirtualMachineConfiguration( new VirtualMachineConfiguration() .withVmSize("Standard_E32ds_v4") @@ -1928,13 +4186,13 @@ public final class SapVirtualInstancesCreateSamples { .asList( new SshPublicKey() .withKeyData( - "ssh-rsa public key"))))))) + "fakeTokenPlaceholder"))))))) .withInstanceCount(6L)) .withDatabaseServer( new DatabaseConfiguration() .withDatabaseType(SapDatabaseType.HANA) .withSubnetId( - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet") + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet") .withVirtualMachineConfiguration( new VirtualMachineConfiguration() .withVmSize("Standard_M32ts") @@ -1957,81 +4215,47 @@ public final class SapVirtualInstancesCreateSamples { .asList( new SshPublicKey() .withKeyData( - "ssh-rsa public key"))))))) - .withInstanceCount(2L)) - .withHighAvailabilityConfig( - new HighAvailabilityConfiguration() - .withHighAvailabilityType(SapHighAvailabilityType.AVAILABILITY_ZONE)))) + "fakeTokenPlaceholder"))))))) + .withInstanceCount(1L)))) .withTags(mapOf()) .create(); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_SingleServer.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_Discover_CustomMrgStorageAccountName.json */ /** - * Sample code: SAPVirtualInstances_Create_WithOSConfig_SingleServer. + * Sample code: Register existing SAP system as Virtual Instance for SAP solutions with optional customizations. * * @param manager Entry point to WorkloadsManager. */ - public static void sAPVirtualInstancesCreateWithOSConfigSingleServer( + public static void registerExistingSAPSystemAsVirtualInstanceForSAPSolutionsWithOptionalCustomizations( com.azure.resourcemanager.workloads.WorkloadsManager manager) { manager .sapVirtualInstances() .define("X00") - .withRegion("westcentralus") + .withRegion("northeurope") .withExistingResourceGroup("test-rg") .withEnvironment(SapEnvironmentType.NON_PROD) .withSapProduct(SapProductType.S4HANA) .withConfiguration( - new DeploymentWithOSConfiguration() - .withAppLocation("eastus") - .withInfrastructureConfiguration( - new SingleServerConfiguration() - .withAppResourceGroup("X00-RG") - .withNetworkConfiguration(new NetworkConfiguration().withIsSecondaryIpEnabled(true)) - .withDatabaseType(SapDatabaseType.HANA) - .withSubnetId( - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") - .withVirtualMachineConfiguration( - new VirtualMachineConfiguration() - .withVmSize("Standard_E32ds_v4") - .withImageReference( - new ImageReference() - .withPublisher("RedHat") - .withOffer("RHEL-SAP") - .withSku("7.4") - .withVersion("7.4.2019062505")) - .withOsProfile( - new OSProfile() - .withAdminUsername("{your-username}") - .withOsConfiguration( - new LinuxConfiguration() - .withDisablePasswordAuthentication(true) - .withSshKeyPair( - new SshKeyPair().withPublicKey("abc").withPrivateKey("xyz")))))) - .withOsSapConfiguration( - new OsSapConfiguration() - .withDeployerVmPackages( - new DeployerVmPackages() - .withUrl( - "https://ybteststorageaccount.blob.core.windows.net/sapbits/deployervmpackages/DeployerVMPackages.zip") - .withStorageAccountId( - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/yb-SapInstall/providers/Microsoft.Storage/storageAccounts/ybteststorageaccount")) - .withSapFqdn("xyz.test.com"))) - .withTags(mapOf()) + new DiscoveryConfiguration() + .withCentralServerVmId( + "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0") + .withManagedRgStorageAccountName("q20saacssgrs")) + .withTags(mapOf("createdby", "abc@microsoft.com", "test", "abc")) .create(); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_SingleServer.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_SingleServer.json */ /** - * Sample code: SAPVirtualInstances_Create_SingleServer. + * Sample code: Create Infrastructure with OS configuration for Single Server System (Recommended). * * @param manager Entry point to WorkloadsManager. */ - public static void sAPVirtualInstancesCreateSingleServer( + public static void createInfrastructureWithOSConfigurationForSingleServerSystemRecommended( com.azure.resourcemanager.workloads.WorkloadsManager manager) { manager .sapVirtualInstances() @@ -2041,7 +4265,7 @@ public final class SapVirtualInstancesCreateSamples { .withEnvironment(SapEnvironmentType.NON_PROD) .withSapProduct(SapProductType.S4HANA) .withConfiguration( - new DeploymentConfiguration() + new DeploymentWithOSConfiguration() .withAppLocation("eastus") .withInfrastructureConfiguration( new SingleServerConfiguration() @@ -2049,7 +4273,7 @@ public final class SapVirtualInstancesCreateSamples { .withNetworkConfiguration(new NetworkConfiguration().withIsSecondaryIpEnabled(true)) .withDatabaseType(SapDatabaseType.HANA) .withSubnetId( - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") .withVirtualMachineConfiguration( new VirtualMachineConfiguration() .withVmSize("Standard_E32ds_v4") @@ -2065,26 +4289,26 @@ public final class SapVirtualInstancesCreateSamples { .withOsConfiguration( new LinuxConfiguration() .withDisablePasswordAuthentication(true) - .withSsh( - new SshConfiguration() - .withPublicKeys( - Arrays - .asList( - new SshPublicKey() - .withKeyData("ssh-rsa public key"))))))))) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder")))))) + .withOsSapConfiguration(new OsSapConfiguration().withSapFqdn("xyz.test.com"))) .withTags(mapOf()) .create(); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_HA_AvSet.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_DiskDetails_HA_AvZone.json */ /** - * Sample code: SAPVirtualInstances_Create_HA_AvSet. + * Sample code: Create Infrastructure with Disk and OS configuration for HA System with Availability Zone + * (Recommended). * * @param manager Entry point to WorkloadsManager. */ - public static void sAPVirtualInstancesCreateHAAvSet(com.azure.resourcemanager.workloads.WorkloadsManager manager) { + public static void createInfrastructureWithDiskAndOSConfigurationForHASystemWithAvailabilityZoneRecommended( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { manager .sapVirtualInstances() .define("X00") @@ -2093,7 +4317,7 @@ public final class SapVirtualInstancesCreateSamples { .withEnvironment(SapEnvironmentType.PROD) .withSapProduct(SapProductType.S4HANA) .withConfiguration( - new DeploymentConfiguration() + new DeploymentWithOSConfiguration() .withAppLocation("eastus") .withInfrastructureConfiguration( new ThreeTierConfiguration() @@ -2117,14 +4341,10 @@ public final class SapVirtualInstancesCreateSamples { .withOsConfiguration( new LinuxConfiguration() .withDisablePasswordAuthentication(true) - .withSsh( - new SshConfiguration() - .withPublicKeys( - Arrays - .asList( - new SshPublicKey() - .withKeyData( - "ssh-rsa public key"))))))) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) .withInstanceCount(2L)) .withApplicationServer( new ApplicationServerConfiguration() @@ -2145,15 +4365,11 @@ public final class SapVirtualInstancesCreateSamples { .withOsConfiguration( new LinuxConfiguration() .withDisablePasswordAuthentication(true) - .withSsh( - new SshConfiguration() - .withPublicKeys( - Arrays - .asList( - new SshPublicKey() - .withKeyData( - "ssh-rsa public key"))))))) - .withInstanceCount(5L)) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(6L)) .withDatabaseServer( new DatabaseConfiguration() .withDatabaseType(SapDatabaseType.HANA) @@ -2174,31 +4390,62 @@ public final class SapVirtualInstancesCreateSamples { .withOsConfiguration( new LinuxConfiguration() .withDisablePasswordAuthentication(true) - .withSsh( - new SshConfiguration() - .withPublicKeys( - Arrays - .asList( - new SshPublicKey() - .withKeyData( - "ssh-rsa public key"))))))) - .withInstanceCount(2L)) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(2L) + .withDiskConfiguration( + new DiskConfiguration() + .withDiskVolumeConfigurations( + mapOf( + "backup", + new DiskVolumeConfiguration() + .withCount(2L) + .withSizeGB(256L) + .withSku(new DiskSku().withName(DiskSkuName.STANDARD_SSD_LRS)), + "hana/data", + new DiskVolumeConfiguration() + .withCount(4L) + .withSizeGB(128L) + .withSku(new DiskSku().withName(DiskSkuName.PREMIUM_LRS)), + "hana/log", + new DiskVolumeConfiguration() + .withCount(3L) + .withSizeGB(128L) + .withSku(new DiskSku().withName(DiskSkuName.PREMIUM_LRS)), + "hana/shared", + new DiskVolumeConfiguration() + .withCount(1L) + .withSizeGB(256L) + .withSku(new DiskSku().withName(DiskSkuName.STANDARD_SSD_LRS)), + "os", + new DiskVolumeConfiguration() + .withCount(1L) + .withSizeGB(64L) + .withSku(new DiskSku().withName(DiskSkuName.STANDARD_SSD_LRS)), + "usr/sap", + new DiskVolumeConfiguration() + .withCount(1L) + .withSizeGB(128L) + .withSku(new DiskSku().withName(DiskSkuName.PREMIUM_LRS)))))) .withHighAvailabilityConfig( new HighAvailabilityConfiguration() - .withHighAvailabilityType(SapHighAvailabilityType.AVAILABILITY_SET)))) + .withHighAvailabilityType(SapHighAvailabilityType.AVAILABILITY_ZONE))) + .withOsSapConfiguration(new OsSapConfiguration().withSapFqdn("xyz.test.com"))) .withTags(mapOf()) .create(); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_Distributed.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_HA_AvZone.json */ /** - * Sample code: SAPVirtualInstances_Create_WithOSConfig_Distributed. + * Sample code: Create Infrastructure with OS configuration for HA System with Availability Zone (Recommended). * * @param manager Entry point to WorkloadsManager. */ - public static void sAPVirtualInstancesCreateWithOSConfigDistributed( + public static void createInfrastructureWithOSConfigurationForHASystemWithAvailabilityZoneRecommended( com.azure.resourcemanager.workloads.WorkloadsManager manager) { manager .sapVirtualInstances() @@ -2216,7 +4463,7 @@ public final class SapVirtualInstancesCreateSamples { .withCentralServer( new CentralServerConfiguration() .withSubnetId( - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") .withVirtualMachineConfiguration( new VirtualMachineConfiguration() .withVmSize("Standard_E16ds_v4") @@ -2234,13 +4481,13 @@ public final class SapVirtualInstancesCreateSamples { .withDisablePasswordAuthentication(true) .withSshKeyPair( new SshKeyPair() - .withPublicKey("abc") - .withPrivateKey("xyz"))))) - .withInstanceCount(1L)) + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(2L)) .withApplicationServer( new ApplicationServerConfiguration() .withSubnetId( - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") .withVirtualMachineConfiguration( new VirtualMachineConfiguration() .withVmSize("Standard_E32ds_v4") @@ -2258,14 +4505,14 @@ public final class SapVirtualInstancesCreateSamples { .withDisablePasswordAuthentication(true) .withSshKeyPair( new SshKeyPair() - .withPublicKey("abc") - .withPrivateKey("xyz"))))) + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) .withInstanceCount(6L)) .withDatabaseServer( new DatabaseConfiguration() .withDatabaseType(SapDatabaseType.HANA) .withSubnetId( - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet") + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet") .withVirtualMachineConfiguration( new VirtualMachineConfiguration() .withVmSize("Standard_M32ts") @@ -2283,18 +4530,98 @@ public final class SapVirtualInstancesCreateSamples { .withDisablePasswordAuthentication(true) .withSshKeyPair( new SshKeyPair() - .withPublicKey("abc") - .withPrivateKey("xyz"))))) - .withInstanceCount(1L))) - .withOsSapConfiguration( - new OsSapConfiguration() - .withDeployerVmPackages( - new DeployerVmPackages() - .withUrl( - "https://ybteststorageaccount.blob.core.windows.net/sapbits/deployervmpackages/DeployerVMPackages.zip") - .withStorageAccountId( - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/yb-SapInstall/providers/Microsoft.Storage/storageAccounts/ybteststorageaccount")) - .withSapFqdn("xyz.test.com"))) + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(2L)) + .withHighAvailabilityConfig( + new HighAvailabilityConfiguration() + .withHighAvailabilityType(SapHighAvailabilityType.AVAILABILITY_ZONE))) + .withOsSapConfiguration(new OsSapConfiguration().withSapFqdn("xyz.test.com"))) + .withTags(mapOf()) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_DiskDetails_SingleServer.json + */ + /** + * Sample code: Create Infrastructure with Disk and OS configurations for Single Server System (Recommended). + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createInfrastructureWithDiskAndOSConfigurationsForSingleServerSystemRecommended( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapVirtualInstances() + .define("X00") + .withRegion("westcentralus") + .withExistingResourceGroup("test-rg") + .withEnvironment(SapEnvironmentType.NON_PROD) + .withSapProduct(SapProductType.S4HANA) + .withConfiguration( + new DeploymentWithOSConfiguration() + .withAppLocation("eastus") + .withInfrastructureConfiguration( + new SingleServerConfiguration() + .withAppResourceGroup("X00-RG") + .withNetworkConfiguration(new NetworkConfiguration().withIsSecondaryIpEnabled(true)) + .withDatabaseType(SapDatabaseType.HANA) + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E32ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withDbDiskConfiguration( + new DiskConfiguration() + .withDiskVolumeConfigurations( + mapOf( + "backup", + new DiskVolumeConfiguration() + .withCount(2L) + .withSizeGB(256L) + .withSku(new DiskSku().withName(DiskSkuName.STANDARD_SSD_LRS)), + "hana/data", + new DiskVolumeConfiguration() + .withCount(4L) + .withSizeGB(128L) + .withSku(new DiskSku().withName(DiskSkuName.PREMIUM_LRS)), + "hana/log", + new DiskVolumeConfiguration() + .withCount(3L) + .withSizeGB(128L) + .withSku(new DiskSku().withName(DiskSkuName.PREMIUM_LRS)), + "hana/shared", + new DiskVolumeConfiguration() + .withCount(1L) + .withSizeGB(256L) + .withSku(new DiskSku().withName(DiskSkuName.STANDARD_SSD_LRS)), + "os", + new DiskVolumeConfiguration() + .withCount(1L) + .withSizeGB(64L) + .withSku(new DiskSku().withName(DiskSkuName.STANDARD_SSD_LRS)), + "usr/sap", + new DiskVolumeConfiguration() + .withCount(1L) + .withSizeGB(128L) + .withSku(new DiskSku().withName(DiskSkuName.PREMIUM_LRS)))))) + .withOsSapConfiguration(new OsSapConfiguration().withSapFqdn("xyz.test.com"))) .withTags(mapOf()) .create(); } @@ -2315,12 +4642,10 @@ public final class SapVirtualInstancesCreateSamples { ### SapVirtualInstances_Delete ```java -import com.azure.core.util.Context; - /** Samples for SapVirtualInstances Delete. */ public final class SapVirtualInstancesDeleteSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Delete.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Delete.json */ /** * Sample code: SAPVirtualInstances_Delete. @@ -2328,7 +4653,7 @@ public final class SapVirtualInstancesDeleteSamples { * @param manager Entry point to WorkloadsManager. */ public static void sAPVirtualInstancesDelete(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.sapVirtualInstances().delete("test-rg", "X00", Context.NONE); + manager.sapVirtualInstances().delete("test-rg", "X00", com.azure.core.util.Context.NONE); } } ``` @@ -2336,12 +4661,10 @@ public final class SapVirtualInstancesDeleteSamples { ### SapVirtualInstances_GetByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for SapVirtualInstances GetByResourceGroup. */ public final class SapVirtualInstancesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Get.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Get.json */ /** * Sample code: SAPVirtualInstances_Get. @@ -2349,7 +4672,9 @@ public final class SapVirtualInstancesGetByResourceGroupSamples { * @param manager Entry point to WorkloadsManager. */ public static void sAPVirtualInstancesGet(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.sapVirtualInstances().getByResourceGroupWithResponse("test-rg", "X00", Context.NONE); + manager + .sapVirtualInstances() + .getByResourceGroupWithResponse("test-rg", "X00", com.azure.core.util.Context.NONE); } } ``` @@ -2357,12 +4682,10 @@ public final class SapVirtualInstancesGetByResourceGroupSamples { ### SapVirtualInstances_List ```java -import com.azure.core.util.Context; - /** Samples for SapVirtualInstances List. */ public final class SapVirtualInstancesListSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_ListBySubscription.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_ListBySubscription.json */ /** * Sample code: SAPVirtualInstances_ListBySubscription. @@ -2371,7 +4694,7 @@ public final class SapVirtualInstancesListSamples { */ public static void sAPVirtualInstancesListBySubscription( com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.sapVirtualInstances().list(Context.NONE); + manager.sapVirtualInstances().list(com.azure.core.util.Context.NONE); } } ``` @@ -2379,12 +4702,10 @@ public final class SapVirtualInstancesListSamples { ### SapVirtualInstances_ListByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for SapVirtualInstances ListByResourceGroup. */ public final class SapVirtualInstancesListByResourceGroupSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_ListByResourceGroup.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_ListByResourceGroup.json */ /** * Sample code: SAPVirtualInstances_ListByResourceGroup. @@ -2393,7 +4714,7 @@ public final class SapVirtualInstancesListByResourceGroupSamples { */ public static void sAPVirtualInstancesListByResourceGroup( com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.sapVirtualInstances().listByResourceGroup("test-rg", Context.NONE); + manager.sapVirtualInstances().listByResourceGroup("test-rg", com.azure.core.util.Context.NONE); } } ``` @@ -2401,12 +4722,10 @@ public final class SapVirtualInstancesListByResourceGroupSamples { ### SapVirtualInstances_Start ```java -import com.azure.core.util.Context; - /** Samples for SapVirtualInstances Start. */ public final class SapVirtualInstancesStartSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Start.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Start.json */ /** * Sample code: SAPVirtualInstances_Start. @@ -2414,7 +4733,7 @@ public final class SapVirtualInstancesStartSamples { * @param manager Entry point to WorkloadsManager. */ public static void sAPVirtualInstancesStart(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.sapVirtualInstances().start("test-rg", "X00", Context.NONE); + manager.sapVirtualInstances().start("test-rg", "X00", com.azure.core.util.Context.NONE); } } ``` @@ -2422,13 +4741,12 @@ public final class SapVirtualInstancesStartSamples { ### SapVirtualInstances_Stop ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.workloads.models.StopRequest; /** Samples for SapVirtualInstances Stop. */ public final class SapVirtualInstancesStopSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Stop.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Stop.json */ /** * Sample code: SAPVirtualInstances_Stop. @@ -2436,7 +4754,9 @@ public final class SapVirtualInstancesStopSamples { * @param manager Entry point to WorkloadsManager. */ public static void sAPVirtualInstancesStop(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.sapVirtualInstances().stop("test-rg", "X00", new StopRequest().withHardStop(false), Context.NONE); + manager + .sapVirtualInstances() + .stop("test-rg", "X00", new StopRequest().withSoftStopTimeoutSeconds(0L), com.azure.core.util.Context.NONE); } } ``` @@ -2444,7 +4764,6 @@ public final class SapVirtualInstancesStopSamples { ### SapVirtualInstances_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.workloads.models.ManagedServiceIdentityType; import com.azure.resourcemanager.workloads.models.SapVirtualInstance; import com.azure.resourcemanager.workloads.models.UserAssignedServiceIdentity; @@ -2454,7 +4773,7 @@ import java.util.Map; /** Samples for SapVirtualInstances Update. */ public final class SapVirtualInstancesUpdateSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Update.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Update.json */ /** * Sample code: SAPVirtualInstances_Update. @@ -2463,7 +4782,10 @@ public final class SapVirtualInstancesUpdateSamples { */ public static void sAPVirtualInstancesUpdate(com.azure.resourcemanager.workloads.WorkloadsManager manager) { SapVirtualInstance resource = - manager.sapVirtualInstances().getByResourceGroupWithResponse("test-rg", "X00", Context.NONE).getValue(); + manager + .sapVirtualInstances() + .getByResourceGroupWithResponse("test-rg", "X00", com.azure.core.util.Context.NONE) + .getValue(); resource .update() .withTags(mapOf("key1", "svi1")) @@ -2484,119 +4806,3 @@ public final class SapVirtualInstancesUpdateSamples { } ``` -### Skus_List - -```java -import com.azure.core.util.Context; - -/** Samples for Skus List. */ -public final class SkusListSamples { - /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/Skus_List.json - */ - /** - * Sample code: Skus. - * - * @param manager Entry point to WorkloadsManager. - */ - public static void skus(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.skus().list(Context.NONE); - } -} -``` - -### WordpressInstances_CreateOrUpdate - -```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.workloads.fluent.models.WordpressInstanceResourceInner; -import com.azure.resourcemanager.workloads.models.WordpressVersions; - -/** Samples for WordpressInstances CreateOrUpdate. */ -public final class WordpressInstancesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/phpworkloads/WordpressInstances_CreateOrUpdate.json - */ - /** - * Sample code: Workloads. - * - * @param manager Entry point to WorkloadsManager. - */ - public static void workloads(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager - .wordpressInstances() - .createOrUpdate( - "test-rg", - "wp39", - new WordpressInstanceResourceInner() - .withVersion(WordpressVersions.FIVE_FOUR_TWO) - .withDatabaseName("wpdb") - .withDatabaseUser("wpuser"), - Context.NONE); - } -} -``` - -### WordpressInstances_Delete - -```java -import com.azure.core.util.Context; - -/** Samples for WordpressInstances Delete. */ -public final class WordpressInstancesDeleteSamples { - /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/phpworkloads/WordpressInstances_Delete.json - */ - /** - * Sample code: Workloads. - * - * @param manager Entry point to WorkloadsManager. - */ - public static void workloads(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.wordpressInstances().deleteWithResponse("test-rg", "wp39", Context.NONE); - } -} -``` - -### WordpressInstances_Get - -```java -import com.azure.core.util.Context; - -/** Samples for WordpressInstances Get. */ -public final class WordpressInstancesGetSamples { - /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/phpworkloads/WordpressInstances_Get.json - */ - /** - * Sample code: Workloads. - * - * @param manager Entry point to WorkloadsManager. - */ - public static void workloads(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.wordpressInstances().getWithResponse("test-rg", "wp39", Context.NONE); - } -} -``` - -### WordpressInstances_List - -```java -import com.azure.core.util.Context; - -/** Samples for WordpressInstances List. */ -public final class WordpressInstancesListSamples { - /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/phpworkloads/WordpressInstances_List.json - */ - /** - * Sample code: Workloads. - * - * @param manager Entry point to WorkloadsManager. - */ - public static void workloads(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.wordpressInstances().list("test-rg", "wp39", Context.NONE); - } -} -``` - diff --git a/sdk/workloads/azure-resourcemanager-workloads/pom.xml b/sdk/workloads/azure-resourcemanager-workloads/pom.xml index 9f60c4d9a2d34..5f4e7c46e4517 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/pom.xml +++ b/sdk/workloads/azure-resourcemanager-workloads/pom.xml @@ -13,7 +13,7 @@ jar Microsoft Azure SDK for Workloads Management - This package contains Microsoft Azure SDK for Workloads Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Workloads client provides access to various workload operations. Package tag package-2021-12-01-preview. + This package contains Microsoft Azure SDK for Workloads Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Workloads client provides access to various workload operations. Package tag package-preview-2022-11. https://github.com/Azure/azure-sdk-for-java diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/WorkloadsManager.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/WorkloadsManager.java index 60a035e76ccda..5d12d606d6fe4 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/WorkloadsManager.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/WorkloadsManager.java @@ -26,27 +26,23 @@ import com.azure.resourcemanager.workloads.fluent.WorkloadsClient; import com.azure.resourcemanager.workloads.implementation.MonitorsImpl; import com.azure.resourcemanager.workloads.implementation.OperationsImpl; -import com.azure.resourcemanager.workloads.implementation.PhpWorkloadsImpl; import com.azure.resourcemanager.workloads.implementation.ProviderInstancesImpl; import com.azure.resourcemanager.workloads.implementation.ResourceProvidersImpl; import com.azure.resourcemanager.workloads.implementation.SapApplicationServerInstancesImpl; import com.azure.resourcemanager.workloads.implementation.SapCentralInstancesImpl; import com.azure.resourcemanager.workloads.implementation.SapDatabaseInstancesImpl; +import com.azure.resourcemanager.workloads.implementation.SapLandscapeMonitorsImpl; import com.azure.resourcemanager.workloads.implementation.SapVirtualInstancesImpl; -import com.azure.resourcemanager.workloads.implementation.SkusImpl; -import com.azure.resourcemanager.workloads.implementation.WordpressInstancesImpl; import com.azure.resourcemanager.workloads.implementation.WorkloadsClientBuilder; import com.azure.resourcemanager.workloads.models.Monitors; import com.azure.resourcemanager.workloads.models.Operations; -import com.azure.resourcemanager.workloads.models.PhpWorkloads; import com.azure.resourcemanager.workloads.models.ProviderInstances; import com.azure.resourcemanager.workloads.models.ResourceProviders; import com.azure.resourcemanager.workloads.models.SapApplicationServerInstances; import com.azure.resourcemanager.workloads.models.SapCentralInstances; import com.azure.resourcemanager.workloads.models.SapDatabaseInstances; +import com.azure.resourcemanager.workloads.models.SapLandscapeMonitors; import com.azure.resourcemanager.workloads.models.SapVirtualInstances; -import com.azure.resourcemanager.workloads.models.Skus; -import com.azure.resourcemanager.workloads.models.WordpressInstances; import java.time.Duration; import java.time.temporal.ChronoUnit; import java.util.ArrayList; @@ -56,10 +52,6 @@ /** Entry point to WorkloadsManager. Workloads client provides access to various workload operations. */ public final class WorkloadsManager { - private PhpWorkloads phpWorkloads; - - private WordpressInstances wordpressInstances; - private ResourceProviders resourceProviders; private SapVirtualInstances sapVirtualInstances; @@ -70,13 +62,13 @@ public final class WorkloadsManager { private SapApplicationServerInstances sapApplicationServerInstances; - private Operations operations; - private Monitors monitors; private ProviderInstances providerInstances; - private Skus skus; + private SapLandscapeMonitors sapLandscapeMonitors; + + private Operations operations; private final WorkloadsClient clientObject; @@ -300,30 +292,6 @@ public WorkloadsManager authenticate(TokenCredential credential, AzureProfile pr } } - /** - * Gets the resource collection API of PhpWorkloads. It manages PhpWorkloadResource. - * - * @return Resource collection API of PhpWorkloads. - */ - public PhpWorkloads phpWorkloads() { - if (this.phpWorkloads == null) { - this.phpWorkloads = new PhpWorkloadsImpl(clientObject.getPhpWorkloads(), this); - } - return phpWorkloads; - } - - /** - * Gets the resource collection API of WordpressInstances. - * - * @return Resource collection API of WordpressInstances. - */ - public WordpressInstances wordpressInstances() { - if (this.wordpressInstances == null) { - this.wordpressInstances = new WordpressInstancesImpl(clientObject.getWordpressInstances(), this); - } - return wordpressInstances; - } - /** * Gets the resource collection API of ResourceProviders. * @@ -385,18 +353,6 @@ public SapApplicationServerInstances sapApplicationServerInstances() { return sapApplicationServerInstances; } - /** - * 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 Monitors. It manages Monitor. * @@ -422,15 +378,27 @@ public ProviderInstances providerInstances() { } /** - * Gets the resource collection API of Skus. + * Gets the resource collection API of SapLandscapeMonitors. * - * @return Resource collection API of Skus. + * @return Resource collection API of SapLandscapeMonitors. */ - public Skus skus() { - if (this.skus == null) { - this.skus = new SkusImpl(clientObject.getSkus(), this); + public SapLandscapeMonitors sapLandscapeMonitors() { + if (this.sapLandscapeMonitors == null) { + this.sapLandscapeMonitors = new SapLandscapeMonitorsImpl(clientObject.getSapLandscapeMonitors(), this); } - return skus; + return sapLandscapeMonitors; + } + + /** + * 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; } /** diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/MonitorsClient.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/MonitorsClient.java index 932d8023a8ce8..7acd6d1bac49c 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/MonitorsClient.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/MonitorsClient.java @@ -18,8 +18,10 @@ /** An instance of this class provides access to all the operations defined in MonitorsClient. */ public interface MonitorsClient { /** - * Gets a list of SAP monitors in the specified subscription. The operations returns various properties of each SAP - * monitor. + * Gets a list of SAP monitors in the specified subscription. + * + *

Gets a list of SAP monitors in the specified subscription. The operations returns various properties of each + * SAP monitor. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -29,8 +31,10 @@ public interface MonitorsClient { PagedIterable list(); /** - * Gets a list of SAP monitors in the specified subscription. The operations returns various properties of each SAP - * monitor. + * Gets a list of SAP monitors in the specified subscription. + * + *

Gets a list of SAP monitors in the specified subscription. The operations returns various properties of each + * SAP monitor. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -42,7 +46,9 @@ public interface MonitorsClient { PagedIterable list(Context context); /** - * Gets a list of SAP monitors in the specified resource group. + * Gets a list of SAP monitors + * + *

Gets a list of SAP monitors in the specified resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -54,7 +60,9 @@ public interface MonitorsClient { PagedIterable listByResourceGroup(String resourceGroupName); /** - * Gets a list of SAP monitors in the specified resource group. + * Gets a list of SAP monitors + * + *

Gets a list of SAP monitors in the specified resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. @@ -67,36 +75,42 @@ public interface MonitorsClient { PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Gets properties of a SAP monitor for the specified subscription, resource group, and resource name. + * Gets properties of a SAP monitor. + * + *

Gets properties of a SAP monitor for the specified subscription, resource group, and resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor 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 properties of a SAP monitor for the specified subscription, resource group, and resource name. + * @return properties of a SAP monitor for the specified subscription, resource group, and resource name along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - MonitorInner getByResourceGroup(String resourceGroupName, String monitorName); + Response getByResourceGroupWithResponse( + String resourceGroupName, String monitorName, Context context); /** - * Gets properties of a SAP monitor for the specified subscription, resource group, and resource name. + * Gets properties of a SAP monitor. + * + *

Gets properties of a SAP monitor for the specified subscription, resource group, and resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor 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 properties of a SAP monitor for the specified subscription, resource group, and resource name along with - * {@link Response}. + * @return properties of a SAP monitor for the specified subscription, resource group, and resource name. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String monitorName, Context context); + MonitorInner getByResourceGroup(String resourceGroupName, String monitorName); /** - * Creates a SAP monitor for the specified subscription, resource group, and resource name. + * Creates a SAP monitor. + * + *

Creates a SAP monitor for the specified subscription, resource group, and resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -112,7 +126,9 @@ SyncPoller, MonitorInner> beginCreate( String resourceGroupName, String monitorName, MonitorInner monitorParameter); /** - * Creates a SAP monitor for the specified subscription, resource group, and resource name. + * Creates a SAP monitor. + * + *

Creates a SAP monitor for the specified subscription, resource group, and resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -129,7 +145,9 @@ SyncPoller, MonitorInner> beginCreate( String resourceGroupName, String monitorName, MonitorInner monitorParameter, Context context); /** - * Creates a SAP monitor for the specified subscription, resource group, and resource name. + * Creates a SAP monitor. + * + *

Creates a SAP monitor for the specified subscription, resource group, and resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -143,7 +161,9 @@ SyncPoller, MonitorInner> beginCreate( MonitorInner create(String resourceGroupName, String monitorName, MonitorInner monitorParameter); /** - * Creates a SAP monitor for the specified subscription, resource group, and resource name. + * Creates a SAP monitor. + * + *

Creates a SAP monitor for the specified subscription, resource group, and resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -158,7 +178,9 @@ SyncPoller, MonitorInner> beginCreate( MonitorInner create(String resourceGroupName, String monitorName, MonitorInner monitorParameter, Context context); /** - * Deletes a SAP monitor with the specified subscription, resource group, and SAP monitor name. + * Deletes a SAP monitor. + * + *

Deletes a SAP monitor with the specified subscription, resource group, and SAP monitor name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -172,7 +194,9 @@ SyncPoller, OperationStatusResultInner> b String resourceGroupName, String monitorName); /** - * Deletes a SAP monitor with the specified subscription, resource group, and SAP monitor name. + * Deletes a SAP monitor. + * + *

Deletes a SAP monitor with the specified subscription, resource group, and SAP monitor name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -187,7 +211,9 @@ SyncPoller, OperationStatusResultInner> b String resourceGroupName, String monitorName, Context context); /** - * Deletes a SAP monitor with the specified subscription, resource group, and SAP monitor name. + * Deletes a SAP monitor. + * + *

Deletes a SAP monitor with the specified subscription, resource group, and SAP monitor name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -200,7 +226,9 @@ SyncPoller, OperationStatusResultInner> b OperationStatusResultInner delete(String resourceGroupName, String monitorName); /** - * Deletes a SAP monitor with the specified subscription, resource group, and SAP monitor name. + * Deletes a SAP monitor. + * + *

Deletes a SAP monitor with the specified subscription, resource group, and SAP monitor name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -214,32 +242,36 @@ SyncPoller, OperationStatusResultInner> b OperationStatusResultInner delete(String resourceGroupName, String monitorName, Context context); /** - * Patches the Tags field of a SAP monitor for the specified subscription, resource group, and SAP monitor name. + * Patches the Tags field of a SAP monitor. + * + *

Patches the Tags field of a SAP monitor for the specified subscription, resource group, and SAP monitor name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. * @param body The Update SAP workload monitor request body. + * @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 sAP monitor info on Azure (ARM properties and SAP monitor properties). + * @return sAP monitor info on Azure (ARM properties and SAP monitor properties) along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - MonitorInner update(String resourceGroupName, String monitorName, UpdateMonitorRequest body); + Response updateWithResponse( + String resourceGroupName, String monitorName, UpdateMonitorRequest body, Context context); /** - * Patches the Tags field of a SAP monitor for the specified subscription, resource group, and SAP monitor name. + * Patches the Tags field of a SAP monitor. + * + *

Patches the Tags field of a SAP monitor for the specified subscription, resource group, and SAP monitor name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. * @param body The Update SAP workload monitor request body. - * @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 sAP monitor info on Azure (ARM properties and SAP monitor properties) along with {@link Response}. + * @return sAP monitor info on Azure (ARM properties and SAP monitor properties). */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, String monitorName, UpdateMonitorRequest body, Context context); + MonitorInner update(String resourceGroupName, String monitorName, UpdateMonitorRequest body); } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/PhpWorkloadsClient.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/PhpWorkloadsClient.java deleted file mode 100644 index eb4623d12ffca..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/PhpWorkloadsClient.java +++ /dev/null @@ -1,265 +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.workloads.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.workloads.fluent.models.PhpWorkloadResourceInner; -import com.azure.resourcemanager.workloads.models.PatchResourceRequestBody; - -/** An instance of this class provides access to all the operations defined in PhpWorkloadsClient. */ -public interface PhpWorkloadsClient { - /** - * Lists PHP workload resources for a 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 php workload resource list as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Lists PHP workload resources for a 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 php workload resource list as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * Lists PHP workload resources in a 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 php workload resource list as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Lists PHP workload resources in a 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 php workload resource list as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Gets the PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload 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 PHP workload resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PhpWorkloadResourceInner getByResourceGroup(String resourceGroupName, String phpWorkloadName); - - /** - * Gets the PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload 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 PHP workload resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String phpWorkloadName, Context context); - - /** - * Create or updated PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param phpWorkloadResource Resource create or update request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 php workload resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PhpWorkloadResourceInner> beginCreateOrUpdate( - String resourceGroupName, String phpWorkloadName, PhpWorkloadResourceInner phpWorkloadResource); - - /** - * Create or updated PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param phpWorkloadResource Resource create or update request payload. - * @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 php workload resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PhpWorkloadResourceInner> beginCreateOrUpdate( - String resourceGroupName, - String phpWorkloadName, - PhpWorkloadResourceInner phpWorkloadResource, - Context context); - - /** - * Create or updated PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param phpWorkloadResource Resource create or update request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 php workload resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PhpWorkloadResourceInner createOrUpdate( - String resourceGroupName, String phpWorkloadName, PhpWorkloadResourceInner phpWorkloadResource); - - /** - * Create or updated PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param phpWorkloadResource Resource create or update request payload. - * @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 php workload resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PhpWorkloadResourceInner createOrUpdate( - String resourceGroupName, - String phpWorkloadName, - PhpWorkloadResourceInner phpWorkloadResource, - Context context); - - /** - * Update PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param resourcePatchRequestBody Workload resource update data. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 php workload resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PhpWorkloadResourceInner update( - String resourceGroupName, String phpWorkloadName, PatchResourceRequestBody resourcePatchRequestBody); - - /** - * Update PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param resourcePatchRequestBody Workload resource update data. - * @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 php workload resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, - String phpWorkloadName, - PatchResourceRequestBody resourcePatchRequestBody, - Context context); - - /** - * Delete PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param deleteInfra Whether to delete infra along with workload 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.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String phpWorkloadName, String deleteInfra); - - /** - * Delete PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param deleteInfra Whether to delete infra along with workload 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.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String phpWorkloadName, String deleteInfra, Context context); - - /** - * Delete PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param deleteInfra Whether to delete infra along with workload 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String phpWorkloadName, String deleteInfra); - - /** - * Delete PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String phpWorkloadName); - - /** - * Delete PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param deleteInfra Whether to delete infra along with workload 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String phpWorkloadName, String deleteInfra, Context context); -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/ProviderInstancesClient.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/ProviderInstancesClient.java index 466ede81bac10..b66489a8ed566 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/ProviderInstancesClient.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/ProviderInstancesClient.java @@ -17,8 +17,10 @@ /** An instance of this class provides access to all the operations defined in ProviderInstancesClient. */ public interface ProviderInstancesClient { /** - * Gets a list of provider instances in the specified SAP monitor. The operations returns various properties of each - * provider instances. + * Gets a list of provider instances in the specified SAP monitor. + * + *

Gets a list of provider instances in the specified SAP monitor. The operations returns various properties of + * each provider instances. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -32,8 +34,10 @@ public interface ProviderInstancesClient { PagedIterable list(String resourceGroupName, String monitorName); /** - * Gets a list of provider instances in the specified SAP monitor. The operations returns various properties of each - * provider instances. + * Gets a list of provider instances in the specified SAP monitor. + * + *

Gets a list of provider instances in the specified SAP monitor. The operations returns various properties of + * each provider instances. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -48,41 +52,48 @@ public interface ProviderInstancesClient { PagedIterable list(String resourceGroupName, String monitorName, Context context); /** - * Gets properties of a provider instance for the specified subscription, resource group, SAP monitor name, and + * Gets properties of a provider instance. + * + *

Gets properties of a provider instance for the specified subscription, resource group, SAP monitor name, and * resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. * @param providerInstanceName Name of the provider instance. + * @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 properties of a provider instance for the specified subscription, resource group, SAP monitor name, and - * resource name. + * resource name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ProviderInstanceInner get(String resourceGroupName, String monitorName, String providerInstanceName); + Response getWithResponse( + String resourceGroupName, String monitorName, String providerInstanceName, Context context); /** - * Gets properties of a provider instance for the specified subscription, resource group, SAP monitor name, and + * Gets properties of a provider instance. + * + *

Gets properties of a provider instance for the specified subscription, resource group, SAP monitor name, and * resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. * @param providerInstanceName Name of the provider instance. - * @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 properties of a provider instance for the specified subscription, resource group, SAP monitor name, and - * resource name along with {@link Response}. + * resource name. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String monitorName, String providerInstanceName, Context context); + ProviderInstanceInner get(String resourceGroupName, String monitorName, String providerInstanceName); /** - * Creates a provider instance for the specified subscription, resource group, SAP monitor name, and resource name. + * Creates a provider instance. + * + *

Creates a provider instance for the specified subscription, resource group, SAP monitor name, and resource + * name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -101,7 +112,10 @@ SyncPoller, ProviderInstanceInner> beginCreate ProviderInstanceInner providerInstanceParameter); /** - * Creates a provider instance for the specified subscription, resource group, SAP monitor name, and resource name. + * Creates a provider instance. + * + *

Creates a provider instance for the specified subscription, resource group, SAP monitor name, and resource + * name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -122,7 +136,10 @@ SyncPoller, ProviderInstanceInner> beginCreate Context context); /** - * Creates a provider instance for the specified subscription, resource group, SAP monitor name, and resource name. + * Creates a provider instance. + * + *

Creates a provider instance for the specified subscription, resource group, SAP monitor name, and resource + * name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -141,7 +158,10 @@ ProviderInstanceInner create( ProviderInstanceInner providerInstanceParameter); /** - * Creates a provider instance for the specified subscription, resource group, SAP monitor name, and resource name. + * Creates a provider instance. + * + *

Creates a provider instance for the specified subscription, resource group, SAP monitor name, and resource + * name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -162,7 +182,10 @@ ProviderInstanceInner create( Context context); /** - * Deletes a provider instance for the specified subscription, resource group, SAP monitor name, and resource name. + * Deletes a provider instance. + * + *

Deletes a provider instance for the specified subscription, resource group, SAP monitor name, and resource + * name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -177,7 +200,10 @@ SyncPoller, OperationStatusResultInner> b String resourceGroupName, String monitorName, String providerInstanceName); /** - * Deletes a provider instance for the specified subscription, resource group, SAP monitor name, and resource name. + * Deletes a provider instance. + * + *

Deletes a provider instance for the specified subscription, resource group, SAP monitor name, and resource + * name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -193,7 +219,10 @@ SyncPoller, OperationStatusResultInner> b String resourceGroupName, String monitorName, String providerInstanceName, Context context); /** - * Deletes a provider instance for the specified subscription, resource group, SAP monitor name, and resource name. + * Deletes a provider instance. + * + *

Deletes a provider instance for the specified subscription, resource group, SAP monitor name, and resource + * name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -207,7 +236,10 @@ SyncPoller, OperationStatusResultInner> b OperationStatusResultInner delete(String resourceGroupName, String monitorName, String providerInstanceName); /** - * Deletes a provider instance for the specified subscription, resource group, SAP monitor name, and resource name. + * Deletes a provider instance. + * + *

Deletes a provider instance for the specified subscription, resource group, SAP monitor name, and resource + * name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/ResourceProvidersClient.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/ResourceProvidersClient.java index b7079ea3b8ff9..3902497c6dc18 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/ResourceProvidersClient.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/ResourceProvidersClient.java @@ -20,19 +20,8 @@ /** An instance of this class provides access to all the operations defined in ResourceProvidersClient. */ public interface ResourceProvidersClient { /** - * Get SAP sizing recommendations. - * - * @param location The name of Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 sAP sizing recommendations. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SapSizingRecommendationResultInner sapSizingRecommendations(String location); - - /** - * Get SAP sizing recommendations. + * Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database + * tier. * * @param location The name of Azure region. * @param sapSizingRecommendation SAP Sizing Recommendation Request body. @@ -40,26 +29,29 @@ public interface ResourceProvidersClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 sAP sizing recommendations along with {@link Response}. + * @return sAP sizing recommendations by providing input SAPS for application tier and memory required for database + * tier along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response sapSizingRecommendationsWithResponse( String location, SapSizingRecommendationRequest sapSizingRecommendation, Context context); /** - * Get SAP supported SKUs. + * Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database + * tier. * * @param location The name of Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 sAP supported SKUs. + * @return sAP sizing recommendations by providing input SAPS for application tier and memory required for database + * tier. */ @ServiceMethod(returns = ReturnType.SINGLE) - SapSupportedResourceSkusResultInner sapSupportedSku(String location); + SapSizingRecommendationResultInner sapSizingRecommendations(String location); /** - * Get SAP supported SKUs. + * Get a list of SAP supported SKUs for ASCS, Application and Database tier. * * @param location The name of Azure region. * @param sapSupportedSku SAP Supported SKU Request body. @@ -67,26 +59,26 @@ Response sapSizingRecommendationsWithRespons * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 sAP supported SKUs along with {@link Response}. + * @return a list of SAP supported SKUs for ASCS, Application and Database tier along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response sapSupportedSkuWithResponse( String location, SapSupportedSkusRequest sapSupportedSku, Context context); /** - * Get SAP Disk Configurations. + * Get a list of SAP supported SKUs for ASCS, Application and Database tier. * * @param location The name of Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 sAP Disk Configurations. + * @return a list of SAP supported SKUs for ASCS, Application and Database tier. */ @ServiceMethod(returns = ReturnType.SINGLE) - SapDiskConfigurationsResultInner sapDiskConfigurations(String location); + SapSupportedResourceSkusResultInner sapSupportedSku(String location); /** - * Get SAP Disk Configurations. + * Get the SAP Disk Configuration Layout prod/non-prod SAP System. * * @param location The name of Azure region. * @param sapDiskConfigurations SAP Disk Configurations Request body. @@ -94,26 +86,26 @@ Response sapSupportedSkuWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 sAP Disk Configurations along with {@link Response}. + * @return the SAP Disk Configuration Layout prod/non-prod SAP System along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response sapDiskConfigurationsWithResponse( String location, SapDiskConfigurationsRequest sapDiskConfigurations, Context context); /** - * Get SAP Availability Zone Details. + * Get the SAP Disk Configuration Layout prod/non-prod SAP System. * * @param location The name of Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 sAP Availability Zone Details. + * @return the SAP Disk Configuration Layout prod/non-prod SAP System. */ @ServiceMethod(returns = ReturnType.SINGLE) - SapAvailabilityZoneDetailsResultInner sapAvailabilityZoneDetails(String location); + SapDiskConfigurationsResultInner sapDiskConfigurations(String location); /** - * Get SAP Availability Zone Details. + * Get the recommended SAP Availability Zone Pair Details for your region. * * @param location The name of Azure region. * @param sapAvailabilityZoneDetails SAP Availability Zone Details Request body. @@ -121,9 +113,21 @@ Response sapDiskConfigurationsWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 sAP Availability Zone Details along with {@link Response}. + * @return the recommended SAP Availability Zone Pair Details for your region along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response sapAvailabilityZoneDetailsWithResponse( String location, SapAvailabilityZoneDetailsRequest sapAvailabilityZoneDetails, Context context); + + /** + * Get the recommended SAP Availability Zone Pair Details for your region. + * + * @param location The name of Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 recommended SAP Availability Zone Pair Details for your region. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SapAvailabilityZoneDetailsResultInner sapAvailabilityZoneDetails(String location); } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/SapApplicationServerInstancesClient.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/SapApplicationServerInstancesClient.java index f8509bfd6b4b5..78a554fa47650 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/SapApplicationServerInstancesClient.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/SapApplicationServerInstancesClient.java @@ -13,74 +13,72 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.workloads.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.workloads.fluent.models.SapApplicationServerInstanceInner; +import com.azure.resourcemanager.workloads.models.StopRequest; import com.azure.resourcemanager.workloads.models.UpdateSapApplicationInstanceRequest; /** An instance of this class provides access to all the operations defined in SapApplicationServerInstancesClient. */ public interface SapApplicationServerInstancesClient { /** - * Gets the SAP Application Server Instance. + * Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 SAP Application Server Instance. + * @return the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource + * along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - SapApplicationServerInstanceInner get( - String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName); + Response getWithResponse( + String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName, Context context); /** - * Gets the SAP Application Server Instance. + * Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. - * @param context The context to associate with this operation. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 SAP Application Server Instance along with {@link Response}. + * @return the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName, Context context); + SapApplicationServerInstanceInner get( + String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName); /** - * Puts the SAP Application Server Instance. <br><br>This will be used by service only. PUT by end user - * will return a Bad Request error. + * Puts the SAP Application Server Instance resource. <br><br>This will be used by service only. PUT by + * end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. - * @param body The SAP Application Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 define the SAP Application Server Instance. + * @return the {@link SyncPoller} for polling of define the SAP Application Server Instance resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, SapApplicationServerInstanceInner> beginCreate( - String resourceGroupName, - String sapVirtualInstanceName, - String applicationInstanceName, - SapApplicationServerInstanceInner body); + String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName); /** - * Puts the SAP Application Server Instance. <br><br>This will be used by service only. PUT by end user - * will return a Bad Request error. + * Puts the SAP Application Server Instance resource. <br><br>This will be used by service only. PUT by + * end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. - * @param body The SAP Application Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance resource. + * @param body The SAP Application Server Instance resource request body. * @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 define the SAP Application Server Instance. + * @return the {@link SyncPoller} for polling of define the SAP Application Server Instance resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, SapApplicationServerInstanceInner> beginCreate( @@ -91,54 +89,34 @@ SyncPoller, SapApplicationServerIn Context context); /** - * Puts the SAP Application Server Instance. <br><br>This will be used by service only. PUT by end user - * will return a Bad Request error. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. - * @param body The SAP Application Server instance request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 define the SAP Application Server Instance. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SapApplicationServerInstanceInner create( - String resourceGroupName, - String sapVirtualInstanceName, - String applicationInstanceName, - SapApplicationServerInstanceInner body); - - /** - * Puts the SAP Application Server Instance. <br><br>This will be used by service only. PUT by end user - * will return a Bad Request error. + * Puts the SAP Application Server Instance resource. <br><br>This will be used by service only. PUT by + * end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 define the SAP Application Server Instance. + * @return define the SAP Application Server Instance resource. */ @ServiceMethod(returns = ReturnType.SINGLE) SapApplicationServerInstanceInner create( String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName); /** - * Puts the SAP Application Server Instance. <br><br>This will be used by service only. PUT by end user - * will return a Bad Request error. + * Puts the SAP Application Server Instance resource. <br><br>This will be used by service only. PUT by + * end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. - * @param body The SAP Application Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance resource. + * @param body The SAP Application Server Instance resource request body. * @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 define the SAP Application Server Instance. + * @return define the SAP Application Server Instance resource. */ @ServiceMethod(returns = ReturnType.SINGLE) SapApplicationServerInstanceInner create( @@ -149,36 +127,32 @@ SapApplicationServerInstanceInner create( Context context); /** - * Puts the SAP Application Server Instance. + * Puts the SAP Application Server Instance resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. - * @param body The SAP Application Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 define the SAP Application Server Instance. + * @return the {@link SyncPoller} for polling of define the SAP Application Server Instance resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, SapApplicationServerInstanceInner> beginUpdate( - String resourceGroupName, - String sapVirtualInstanceName, - String applicationInstanceName, - UpdateSapApplicationInstanceRequest body); + String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName); /** - * Puts the SAP Application Server Instance. + * Puts the SAP Application Server Instance resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. - * @param body The SAP Application Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance resource. + * @param body The SAP Application Server Instance resource request body. * @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 define the SAP Application Server Instance. + * @return the {@link SyncPoller} for polling of define the SAP Application Server Instance resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, SapApplicationServerInstanceInner> beginUpdate( @@ -189,51 +163,32 @@ SyncPoller, SapApplicationServerIn Context context); /** - * Puts the SAP Application Server Instance. + * Puts the SAP Application Server Instance resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. - * @param body The SAP Application Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 define the SAP Application Server Instance. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SapApplicationServerInstanceInner update( - String resourceGroupName, - String sapVirtualInstanceName, - String applicationInstanceName, - UpdateSapApplicationInstanceRequest body); - - /** - * Puts the SAP Application Server Instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 define the SAP Application Server Instance. + * @return define the SAP Application Server Instance resource. */ @ServiceMethod(returns = ReturnType.SINGLE) SapApplicationServerInstanceInner update( String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName); /** - * Puts the SAP Application Server Instance. + * Puts the SAP Application Server Instance resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. - * @param body The SAP Application Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance resource. + * @param body The SAP Application Server Instance resource request body. * @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 define the SAP Application Server Instance. + * @return define the SAP Application Server Instance resource. */ @ServiceMethod(returns = ReturnType.SINGLE) SapApplicationServerInstanceInner update( @@ -244,12 +199,12 @@ SapApplicationServerInstanceInner update( Context context); /** - * Deletes the SAP Application Server Instance. <br><br>This operation will be used by service only. - * Delete by end user will return a Bad Request error. + * Deletes the SAP Application Server Instance resource. <br><br>This operation will be used by service + * only. Delete by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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. @@ -260,12 +215,12 @@ SyncPoller, OperationStatusResultInner> b String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName); /** - * Deletes the SAP Application Server Instance. <br><br>This operation will be used by service only. - * Delete by end user will return a Bad Request error. + * Deletes the SAP Application Server Instance resource. <br><br>This operation will be used by service + * only. Delete by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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. @@ -277,12 +232,12 @@ SyncPoller, OperationStatusResultInner> b String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName, Context context); /** - * Deletes the SAP Application Server Instance. <br><br>This operation will be used by service only. - * Delete by end user will return a Bad Request error. + * Deletes the SAP Application Server Instance resource. <br><br>This operation will be used by service + * only. Delete by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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. @@ -293,12 +248,12 @@ OperationStatusResultInner delete( String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName); /** - * Deletes the SAP Application Server Instance. <br><br>This operation will be used by service only. - * Delete by end user will return a Bad Request error. + * Deletes the SAP Application Server Instance resource. <br><br>This operation will be used by service + * only. Delete by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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. @@ -310,32 +265,166 @@ OperationStatusResultInner delete( String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName, Context context); /** - * Lists the SAP Application server Instances in an SVI. + * Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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 defines the collection of SAP Application Server Instances as paginated response with {@link + * @return defines the collection of SAP Application Server Instance resources as paginated response with {@link * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String sapVirtualInstanceName); /** - * Lists the SAP Application server Instances in an SVI. + * Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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 defines the collection of SAP Application Server Instances as paginated response with {@link + * @return defines the collection of SAP Application Server Instance resources as paginated response with {@link * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( String resourceGroupName, String sapVirtualInstanceName, Context context); + + /** + * Starts the SAP Application Server Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OperationStatusResultInner> beginStartInstance( + String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName); + + /** + * Starts the SAP Application Server Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OperationStatusResultInner> beginStartInstance( + String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName, Context context); + + /** + * Starts the SAP Application Server Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationStatusResultInner startInstance( + String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName); + + /** + * Starts the SAP Application Server Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationStatusResultInner startInstance( + String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName, Context context); + + /** + * Stops the SAP Application Server Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OperationStatusResultInner> beginStopInstance( + String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName); + + /** + * Stops the SAP Application Server Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance resource. + * @param body SAP Application server instance stop request body. + * @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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OperationStatusResultInner> beginStopInstance( + String resourceGroupName, + String sapVirtualInstanceName, + String applicationInstanceName, + StopRequest body, + Context context); + + /** + * Stops the SAP Application Server Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationStatusResultInner stopInstance( + String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName); + + /** + * Stops the SAP Application Server Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance resource. + * @param body SAP Application server instance stop request body. + * @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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationStatusResultInner stopInstance( + String resourceGroupName, + String sapVirtualInstanceName, + String applicationInstanceName, + StopRequest body, + Context context); } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/SapCentralInstancesClient.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/SapCentralInstancesClient.java index e1de49990520b..58e1e5a40657e 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/SapCentralInstancesClient.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/SapCentralInstancesClient.java @@ -13,78 +13,75 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.workloads.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.workloads.fluent.models.SapCentralServerInstanceInner; +import com.azure.resourcemanager.workloads.models.StopRequest; import com.azure.resourcemanager.workloads.models.UpdateSapCentralInstanceRequest; /** An instance of this class provides access to all the operations defined in SapCentralInstancesClient. */ public interface SapCentralInstancesClient { /** - * Gets the SAP Central Instance. + * Gets the SAP Central Services Instance resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @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 SAP Central Instance. + * @return the SAP Central Services Instance resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - SapCentralServerInstanceInner get( - String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName); + Response getWithResponse( + String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName, Context context); /** - * Gets the SAP Central Instance. + * Gets the SAP Central Services Instance resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. - * @param context The context to associate with this operation. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 SAP Central Instance along with {@link Response}. + * @return the SAP Central Services Instance resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName, Context context); + SapCentralServerInstanceInner get( + String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName); /** - * Puts the SAP Central Instance. <br><br>This will be used by service only. PUT by end user will return - * a Bad Request error. + * Creates the SAP Central Services Instance resource. <br><br>This will be used by service only. PUT + * operation on this resource by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. - * @param body The SAP Central Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 define the SAP Central Server Instance. + * @return the {@link SyncPoller} for polling of define the SAP Central Services Instance resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, SapCentralServerInstanceInner> beginCreate( - String resourceGroupName, - String sapVirtualInstanceName, - String centralInstanceName, - SapCentralServerInstanceInner body); + String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName); /** - * Puts the SAP Central Instance. <br><br>This will be used by service only. PUT by end user will return - * a Bad Request error. + * Creates the SAP Central Services Instance resource. <br><br>This will be used by service only. PUT + * operation on this resource by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. - * @param body The SAP Central Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @param body The SAP Central Services Instance request body. * @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 define the SAP Central Server Instance. + * @return the {@link SyncPoller} for polling of define the SAP Central Services Instance resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, SapCentralServerInstanceInner> beginCreate( @@ -95,57 +92,36 @@ SyncPoller, SapCentralServerInstanceIn Context context); /** - * Puts the SAP Central Instance. <br><br>This will be used by service only. PUT by end user will return - * a Bad Request error. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. - * @param body The SAP Central Server instance request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 define the SAP Central Server Instance. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SapCentralServerInstanceInner create( - String resourceGroupName, - String sapVirtualInstanceName, - String centralInstanceName, - SapCentralServerInstanceInner body); - - /** - * Puts the SAP Central Instance. <br><br>This will be used by service only. PUT by end user will return - * a Bad Request error. + * Creates the SAP Central Services Instance resource. <br><br>This will be used by service only. PUT + * operation on this resource by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 define the SAP Central Server Instance. + * @return define the SAP Central Services Instance resource. */ @ServiceMethod(returns = ReturnType.SINGLE) SapCentralServerInstanceInner create( String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName); /** - * Puts the SAP Central Instance. <br><br>This will be used by service only. PUT by end user will return - * a Bad Request error. + * Creates the SAP Central Services Instance resource. <br><br>This will be used by service only. PUT + * operation on this resource by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. - * @param body The SAP Central Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @param body The SAP Central Services Instance request body. * @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 define the SAP Central Server Instance. + * @return define the SAP Central Services Instance resource. */ @ServiceMethod(returns = ReturnType.SINGLE) SapCentralServerInstanceInner create( @@ -156,38 +132,36 @@ SapCentralServerInstanceInner create( Context context); /** - * Updates the SAP Central Instance. <br><br>This can be used to update tags. + * Updates the SAP Central Services Instance resource. <br><br>This can be used to update tags on the + * resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. - * @param body The SAP Central Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 define the SAP Central Server Instance. + * @return the {@link SyncPoller} for polling of define the SAP Central Services Instance resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, SapCentralServerInstanceInner> beginUpdate( - String resourceGroupName, - String sapVirtualInstanceName, - String centralInstanceName, - UpdateSapCentralInstanceRequest body); + String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName); /** - * Updates the SAP Central Instance. <br><br>This can be used to update tags. + * Updates the SAP Central Services Instance resource. <br><br>This can be used to update tags on the + * resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. - * @param body The SAP Central Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @param body The SAP Central Services Instance resource request body. * @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 define the SAP Central Server Instance. + * @return the {@link SyncPoller} for polling of define the SAP Central Services Instance resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, SapCentralServerInstanceInner> beginUpdate( @@ -198,54 +172,36 @@ SyncPoller, SapCentralServerInstanceIn Context context); /** - * Updates the SAP Central Instance. <br><br>This can be used to update tags. + * Updates the SAP Central Services Instance resource. <br><br>This can be used to update tags on the + * resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. - * @param body The SAP Central Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 define the SAP Central Server Instance. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SapCentralServerInstanceInner update( - String resourceGroupName, - String sapVirtualInstanceName, - String centralInstanceName, - UpdateSapCentralInstanceRequest body); - - /** - * Updates the SAP Central Instance. <br><br>This can be used to update tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 define the SAP Central Server Instance. + * @return define the SAP Central Services Instance resource. */ @ServiceMethod(returns = ReturnType.SINGLE) SapCentralServerInstanceInner update( String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName); /** - * Updates the SAP Central Instance. <br><br>This can be used to update tags. + * Updates the SAP Central Services Instance resource. <br><br>This can be used to update tags on the + * resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. - * @param body The SAP Central Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @param body The SAP Central Services Instance resource request body. * @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 define the SAP Central Server Instance. + * @return define the SAP Central Services Instance resource. */ @ServiceMethod(returns = ReturnType.SINGLE) SapCentralServerInstanceInner update( @@ -256,13 +212,14 @@ SapCentralServerInstanceInner update( Context context); /** - * Deletes the SAP Central Instance. <br><br>This will be used by service only. Delete by end user will - * return a Bad Request error. + * Deletes the SAP Central Services Instance resource. <br><br>This will be used by service only. Delete + * operation on this resource by end user will return a Bad Request error. You can delete the parent resource, which + * is the Virtual Instance for SAP solutions resource, using the delete operation on it. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -273,13 +230,14 @@ SyncPoller, OperationStatusResultInner> b String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName); /** - * Deletes the SAP Central Instance. <br><br>This will be used by service only. Delete by end user will - * return a Bad Request error. + * Deletes the SAP Central Services Instance resource. <br><br>This will be used by service only. Delete + * operation on this resource by end user will return a Bad Request error. You can delete the parent resource, which + * is the Virtual Instance for SAP solutions resource, using the delete operation on it. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. * @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. @@ -291,13 +249,14 @@ SyncPoller, OperationStatusResultInner> b String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName, Context context); /** - * Deletes the SAP Central Instance. <br><br>This will be used by service only. Delete by end user will - * return a Bad Request error. + * Deletes the SAP Central Services Instance resource. <br><br>This will be used by service only. Delete + * operation on this resource by end user will return a Bad Request error. You can delete the parent resource, which + * is the Virtual Instance for SAP solutions resource, using the delete operation on it. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -308,13 +267,14 @@ OperationStatusResultInner delete( String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName); /** - * Deletes the SAP Central Instance. <br><br>This will be used by service only. Delete by end user will - * return a Bad Request error. + * Deletes the SAP Central Services Instance resource. <br><br>This will be used by service only. Delete + * operation on this resource by end user will return a Bad Request error. You can delete the parent resource, which + * is the Virtual Instance for SAP solutions resource, using the delete operation on it. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. * @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. @@ -326,30 +286,174 @@ OperationStatusResultInner delete( String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName, Context context); /** - * Lists the SAP Central Instances in an SVI. + * Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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 defines the collection of SAP Central Instances as paginated response with {@link PagedIterable}. + * @return defines the collection of SAP Central Services Instance resources as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String sapVirtualInstanceName); /** - * Lists the SAP Central Instances in an SVI. + * Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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 defines the collection of SAP Central Instances as paginated response with {@link PagedIterable}. + * @return defines the collection of SAP Central Services Instance resources as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( String resourceGroupName, String sapVirtualInstanceName, Context context); + + /** + * Starts the SAP Central Services Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OperationStatusResultInner> beginStartInstance( + String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName); + + /** + * Starts the SAP Central Services Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OperationStatusResultInner> beginStartInstance( + String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName, Context context); + + /** + * Starts the SAP Central Services Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationStatusResultInner startInstance( + String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName); + + /** + * Starts the SAP Central Services Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationStatusResultInner startInstance( + String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName, Context context); + + /** + * Stops the SAP Central Services Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OperationStatusResultInner> beginStopInstance( + String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName); + + /** + * Stops the SAP Central Services Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @param body SAP Central Services instance stop request body. + * @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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OperationStatusResultInner> beginStopInstance( + String resourceGroupName, + String sapVirtualInstanceName, + String centralInstanceName, + StopRequest body, + Context context); + + /** + * Stops the SAP Central Services Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationStatusResultInner stopInstance( + String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName); + + /** + * Stops the SAP Central Services Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @param body SAP Central Services instance stop request body. + * @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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationStatusResultInner stopInstance( + String resourceGroupName, + String sapVirtualInstanceName, + String centralInstanceName, + StopRequest body, + Context context); } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/SapDatabaseInstancesClient.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/SapDatabaseInstancesClient.java index f82aa8fc463e1..91dae265c27df 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/SapDatabaseInstancesClient.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/SapDatabaseInstancesClient.java @@ -13,73 +13,74 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.workloads.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.workloads.fluent.models.SapDatabaseInstanceInner; +import com.azure.resourcemanager.workloads.models.StopRequest; import com.azure.resourcemanager.workloads.models.UpdateSapDatabaseInstanceRequest; /** An instance of this class provides access to all the operations defined in SapDatabaseInstancesClient. */ public interface SapDatabaseInstancesClient { /** - * Gets the SAP Database Instance. + * Gets the SAP Database Instance resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @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 SAP Database Instance. + * @return the SAP Database Instance resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - SapDatabaseInstanceInner get(String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName); + Response getWithResponse( + String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName, Context context); /** - * Gets the SAP Database Instance. + * Gets the SAP Database Instance resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. - * @param context The context to associate with this operation. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 SAP Database Instance along with {@link Response}. + * @return the SAP Database Instance resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName, Context context); + SapDatabaseInstanceInner get(String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName); /** - * Puts the SAP Database Instance. <br><br>This will be used by service only. PUT by end user will - * return a Bad Request error. + * Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource. + * <br><br>This will be used by service only. PUT by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. - * @param body The SAP Database Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 define the SAP Database Instance. + * @return the {@link SyncPoller} for polling of define the Database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, SapDatabaseInstanceInner> beginCreate( - String resourceGroupName, - String sapVirtualInstanceName, - String databaseInstanceName, - SapDatabaseInstanceInner body); + String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName); /** - * Puts the SAP Database Instance. <br><br>This will be used by service only. PUT by end user will - * return a Bad Request error. + * Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource. + * <br><br>This will be used by service only. PUT by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. - * @param body The SAP Database Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @param body Request body of Database resource of a SAP system. * @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 define the SAP Database Instance. + * @return the {@link SyncPoller} for polling of define the Database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, SapDatabaseInstanceInner> beginCreate( @@ -90,54 +91,36 @@ SyncPoller, SapDatabaseInstanceInner> begin Context context); /** - * Puts the SAP Database Instance. <br><br>This will be used by service only. PUT by end user will - * return a Bad Request error. + * Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource. + * <br><br>This will be used by service only. PUT by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. - * @param body The SAP Database Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 define the SAP Database Instance. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SapDatabaseInstanceInner create( - String resourceGroupName, - String sapVirtualInstanceName, - String databaseInstanceName, - SapDatabaseInstanceInner body); - - /** - * Puts the SAP Database Instance. <br><br>This will be used by service only. PUT by end user will - * return a Bad Request error. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 define the SAP Database Instance. + * @return define the Database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) SapDatabaseInstanceInner create( String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName); /** - * Puts the SAP Database Instance. <br><br>This will be used by service only. PUT by end user will - * return a Bad Request error. + * Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource. + * <br><br>This will be used by service only. PUT by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. - * @param body The SAP Database Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @param body Request body of Database resource of a SAP system. * @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 define the SAP Database Instance. + * @return define the Database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) SapDatabaseInstanceInner create( @@ -148,36 +131,34 @@ SapDatabaseInstanceInner create( Context context); /** - * Puts the SAP Database Instance. + * Updates the Database resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. - * @param body The SAP Database Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 define the SAP Database Instance. + * @return the {@link SyncPoller} for polling of define the Database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, SapDatabaseInstanceInner> beginUpdate( - String resourceGroupName, - String sapVirtualInstanceName, - String databaseInstanceName, - UpdateSapDatabaseInstanceRequest body); + String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName); /** - * Puts the SAP Database Instance. + * Updates the Database resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. - * @param body The SAP Database Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @param body Database resource update request body. * @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 define the SAP Database Instance. + * @return the {@link SyncPoller} for polling of define the Database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, SapDatabaseInstanceInner> beginUpdate( @@ -188,51 +169,34 @@ SyncPoller, SapDatabaseInstanceInner> begin Context context); /** - * Puts the SAP Database Instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. - * @param body The SAP Database Server instance request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 define the SAP Database Instance. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SapDatabaseInstanceInner update( - String resourceGroupName, - String sapVirtualInstanceName, - String databaseInstanceName, - UpdateSapDatabaseInstanceRequest body); - - /** - * Puts the SAP Database Instance. + * Updates the Database resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 define the SAP Database Instance. + * @return define the Database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) SapDatabaseInstanceInner update( String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName); /** - * Puts the SAP Database Instance. + * Updates the Database resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. - * @param body The SAP Database Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @param body Database resource update request body. * @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 define the SAP Database Instance. + * @return define the Database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) SapDatabaseInstanceInner update( @@ -243,12 +207,13 @@ SapDatabaseInstanceInner update( Context context); /** - * Deletes the SAP Database Instance. <br><br>This will be used by service only. Delete by end user will - * return a Bad Request error. + * Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource. + * <br><br>This will be used by service only. Delete by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -259,12 +224,13 @@ SyncPoller, OperationStatusResultInner> b String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName); /** - * Deletes the SAP Database Instance. <br><br>This will be used by service only. Delete by end user will - * return a Bad Request error. + * Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource. + * <br><br>This will be used by service only. Delete by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. * @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. @@ -276,12 +242,13 @@ SyncPoller, OperationStatusResultInner> b String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName, Context context); /** - * Deletes the SAP Database Instance. <br><br>This will be used by service only. Delete by end user will - * return a Bad Request error. + * Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource. + * <br><br>This will be used by service only. Delete by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -292,12 +259,13 @@ OperationStatusResultInner delete( String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName); /** - * Deletes the SAP Database Instance. <br><br>This will be used by service only. Delete by end user will - * return a Bad Request error. + * Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource. + * <br><br>This will be used by service only. Delete by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. * @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. @@ -309,10 +277,10 @@ OperationStatusResultInner delete( String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName, Context context); /** - * Lists the SAP Database Instances in an SVI. + * Lists the Database resources associated with a Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -322,10 +290,10 @@ OperationStatusResultInner delete( PagedIterable list(String resourceGroupName, String sapVirtualInstanceName); /** - * Lists the SAP Database Instances in an SVI. + * Lists the Database resources associated with a Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -335,4 +303,146 @@ OperationStatusResultInner delete( @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( String resourceGroupName, String sapVirtualInstanceName, Context context); + + /** + * Starts the database instance of the SAP system. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OperationStatusResultInner> beginStartInstance( + String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName); + + /** + * Starts the database instance of the SAP system. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OperationStatusResultInner> beginStartInstance( + String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName, Context context); + + /** + * Starts the database instance of the SAP system. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationStatusResultInner startInstance( + String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName); + + /** + * Starts the database instance of the SAP system. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationStatusResultInner startInstance( + String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName, Context context); + + /** + * Stops the database instance of the SAP system. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OperationStatusResultInner> beginStopInstance( + String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName); + + /** + * Stops the database instance of the SAP system. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @param body Stop request for the database instance of the SAP system. + * @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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OperationStatusResultInner> beginStopInstance( + String resourceGroupName, + String sapVirtualInstanceName, + String databaseInstanceName, + StopRequest body, + Context context); + + /** + * Stops the database instance of the SAP system. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationStatusResultInner stopInstance( + String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName); + + /** + * Stops the database instance of the SAP system. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @param body Stop request for the database instance of the SAP system. + * @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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationStatusResultInner stopInstance( + String resourceGroupName, + String sapVirtualInstanceName, + String databaseInstanceName, + StopRequest body, + Context context); } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/SapLandscapeMonitorsClient.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/SapLandscapeMonitorsClient.java new file mode 100644 index 0000000000000..6eb1325166694 --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/SapLandscapeMonitorsClient.java @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.workloads.fluent.models.SapLandscapeMonitorInner; +import com.azure.resourcemanager.workloads.fluent.models.SapLandscapeMonitorListResultInner; + +/** An instance of this class provides access to all the operations defined in SapLandscapeMonitorsClient. */ +public interface SapLandscapeMonitorsClient { + /** + * Gets configuration values for Single Pane Of Glass for SAP monitor. + * + *

Gets configuration values for Single Pane Of Glass for SAP monitor for the specified subscription, resource + * group, and resource name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor 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 configuration values for Single Pane Of Glass for SAP monitor for the specified subscription, resource + * group, and resource name along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String monitorName, Context context); + + /** + * Gets configuration values for Single Pane Of Glass for SAP monitor. + * + *

Gets configuration values for Single Pane Of Glass for SAP monitor for the specified subscription, resource + * group, and resource name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor 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 configuration values for Single Pane Of Glass for SAP monitor for the specified subscription, resource + * group, and resource name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SapLandscapeMonitorInner get(String resourceGroupName, String monitorName); + + /** + * Creates a SAP Landscape Monitor Dashboard. + * + *

Creates a SAP Landscape Monitor Dashboard for the specified subscription, resource group, and resource name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor resource. + * @param sapLandscapeMonitorParameter Request body representing a configuration for Sap Landscape Monitor + * Dashboard. + * @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 configuration associated with SAP Landscape Monitor Dashboard along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createWithResponse( + String resourceGroupName, + String monitorName, + SapLandscapeMonitorInner sapLandscapeMonitorParameter, + Context context); + + /** + * Creates a SAP Landscape Monitor Dashboard. + * + *

Creates a SAP Landscape Monitor Dashboard for the specified subscription, resource group, and resource name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor resource. + * @param sapLandscapeMonitorParameter Request body representing a configuration for Sap Landscape Monitor + * Dashboard. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 configuration associated with SAP Landscape Monitor Dashboard. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SapLandscapeMonitorInner create( + String resourceGroupName, String monitorName, SapLandscapeMonitorInner sapLandscapeMonitorParameter); + + /** + * Deletes a SAP Landscape Monitor Dashboard. + * + *

Deletes a SAP Landscape Monitor Dashboard with the specified subscription, resource group, and SAP monitor + * name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor 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 Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse(String resourceGroupName, String monitorName, Context context); + + /** + * Deletes a SAP Landscape Monitor Dashboard. + * + *

Deletes a SAP Landscape Monitor Dashboard with the specified subscription, resource group, and SAP monitor + * name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String monitorName); + + /** + * Patches the SAP Landscape Monitor Dashboard. + * + *

Patches the SAP Landscape Monitor Dashboard for the specified subscription, resource group, and SAP monitor + * name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor resource. + * @param sapLandscapeMonitorParameter Request body representing a configuration for Sap Landscape Monitor + * Dashboard. + * @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 configuration associated with SAP Landscape Monitor Dashboard along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse( + String resourceGroupName, + String monitorName, + SapLandscapeMonitorInner sapLandscapeMonitorParameter, + Context context); + + /** + * Patches the SAP Landscape Monitor Dashboard. + * + *

Patches the SAP Landscape Monitor Dashboard for the specified subscription, resource group, and SAP monitor + * name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor resource. + * @param sapLandscapeMonitorParameter Request body representing a configuration for Sap Landscape Monitor + * Dashboard. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 configuration associated with SAP Landscape Monitor Dashboard. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SapLandscapeMonitorInner update( + String resourceGroupName, String monitorName, SapLandscapeMonitorInner sapLandscapeMonitorParameter); + + /** + * Gets configuration values for Single Pane Of Glass for SAP monitor. + * + *

Gets configuration values for Single Pane Of Glass for SAP monitor for the specified subscription, resource + * group, and resource name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor 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 configuration values for Single Pane Of Glass for SAP monitor for the specified subscription, resource + * group, and resource name along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listWithResponse( + String resourceGroupName, String monitorName, Context context); + + /** + * Gets configuration values for Single Pane Of Glass for SAP monitor. + * + *

Gets configuration values for Single Pane Of Glass for SAP monitor for the specified subscription, resource + * group, and resource name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor 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 configuration values for Single Pane Of Glass for SAP monitor for the specified subscription, resource + * group, and resource name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SapLandscapeMonitorListResultInner list(String resourceGroupName, String monitorName); +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/SapVirtualInstancesClient.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/SapVirtualInstancesClient.java index f0c5f98d6f3e2..83af807733576 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/SapVirtualInstancesClient.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/SapVirtualInstancesClient.java @@ -19,142 +19,127 @@ /** An instance of this class provides access to all the operations defined in SapVirtualInstancesClient. */ public interface SapVirtualInstancesClient { /** - * Creates an Virtual Instance for SAP. + * Creates a Virtual Instance for SAP solutions (VIS) resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param body The Virtual Instance for SAP request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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 define the Virtual Instance for SAP. + * @return the {@link SyncPoller} for polling of define the Virtual Instance for SAP solutions resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, SapVirtualInstanceInner> beginCreate( - String resourceGroupName, String sapVirtualInstanceName, SapVirtualInstanceInner body); + String resourceGroupName, String sapVirtualInstanceName); /** - * Creates an Virtual Instance for SAP. + * Creates a Virtual Instance for SAP solutions (VIS) resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param body The Virtual Instance for SAP request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param body Virtual Instance for SAP solutions resource request body. * @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 define the Virtual Instance for SAP. + * @return the {@link SyncPoller} for polling of define the Virtual Instance for SAP solutions resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, SapVirtualInstanceInner> beginCreate( String resourceGroupName, String sapVirtualInstanceName, SapVirtualInstanceInner body, Context context); /** - * Creates an Virtual Instance for SAP. + * Creates a Virtual Instance for SAP solutions (VIS) resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param body The Virtual Instance for SAP request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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 define the Virtual Instance for SAP. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SapVirtualInstanceInner create( - String resourceGroupName, String sapVirtualInstanceName, SapVirtualInstanceInner body); - - /** - * Creates an Virtual Instance for SAP. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 define the Virtual Instance for SAP. + * @return define the Virtual Instance for SAP solutions resource. */ @ServiceMethod(returns = ReturnType.SINGLE) SapVirtualInstanceInner create(String resourceGroupName, String sapVirtualInstanceName); /** - * Creates an Virtual Instance for SAP. + * Creates a Virtual Instance for SAP solutions (VIS) resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param body The Virtual Instance for SAP request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param body Virtual Instance for SAP solutions resource request body. * @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 define the Virtual Instance for SAP. + * @return define the Virtual Instance for SAP solutions resource. */ @ServiceMethod(returns = ReturnType.SINGLE) SapVirtualInstanceInner create( String resourceGroupName, String sapVirtualInstanceName, SapVirtualInstanceInner body, Context context); /** - * Gets an Virtual Instance for SAP. + * Gets a Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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 an Virtual Instance for SAP. + * @return a Virtual Instance for SAP solutions resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - SapVirtualInstanceInner getByResourceGroup(String resourceGroupName, String sapVirtualInstanceName); + Response getByResourceGroupWithResponse( + String resourceGroupName, String sapVirtualInstanceName, Context context); /** - * Gets an Virtual Instance for SAP. + * Gets a Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param context The context to associate with this operation. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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 an Virtual Instance for SAP along with {@link Response}. + * @return a Virtual Instance for SAP solutions resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String sapVirtualInstanceName, Context context); + SapVirtualInstanceInner getByResourceGroup(String resourceGroupName, String sapVirtualInstanceName); /** - * Updates an Virtual Instance for SAP. + * Updates a Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param body Request body to update a Virtual Instance for SAP solutions 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 define the Virtual Instance for SAP. + * @return define the Virtual Instance for SAP solutions resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - SapVirtualInstanceInner update(String resourceGroupName, String sapVirtualInstanceName); + Response updateWithResponse( + String resourceGroupName, String sapVirtualInstanceName, UpdateSapVirtualInstanceRequest body, Context context); /** - * Updates an Virtual Instance for SAP. + * Updates a Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param body The Update Virtual Instance for SAP request body. - * @param context The context to associate with this operation. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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 define the Virtual Instance for SAP along with {@link Response}. + * @return define the Virtual Instance for SAP solutions resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, String sapVirtualInstanceName, UpdateSapVirtualInstanceRequest body, Context context); + SapVirtualInstanceInner update(String resourceGroupName, String sapVirtualInstanceName); /** - * Deletes an Virtual Instance for SAP. + * Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central + * Services Instance, Application Server Instances and Database Instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -165,10 +150,11 @@ SyncPoller, OperationStatusResultInner> b String resourceGroupName, String sapVirtualInstanceName); /** - * Deletes an Virtual Instance for SAP. + * Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central + * Services Instance, Application Server Instances and Database Instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -180,10 +166,11 @@ SyncPoller, OperationStatusResultInner> b String resourceGroupName, String sapVirtualInstanceName, Context context); /** - * Deletes an Virtual Instance for SAP. + * Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central + * Services Instance, Application Server Instances and Database Instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -193,10 +180,11 @@ SyncPoller, OperationStatusResultInner> b OperationStatusResultInner delete(String resourceGroupName, String sapVirtualInstanceName); /** - * Deletes an Virtual Instance for SAP. + * Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central + * Services Instance, Application Server Instances and Database Instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -207,57 +195,61 @@ SyncPoller, OperationStatusResultInner> b OperationStatusResultInner delete(String resourceGroupName, String sapVirtualInstanceName, Context context); /** - * Gets all Virtual Instances for SAP in a resource group. + * Gets all Virtual Instances for SAP solutions resources in a 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 Virtual Instances for SAP in a resource group as paginated response with {@link PagedIterable}. + * @return all Virtual Instances for SAP solutions resources in a Resource Group as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); /** - * Gets all Virtual Instances for SAP in a resource group. + * Gets all Virtual Instances for SAP solutions resources in a 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 Virtual Instances for SAP in a resource group as paginated response with {@link PagedIterable}. + * @return all Virtual Instances for SAP solutions resources in a Resource Group as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Gets all Virtual Instances for SAP in the subscription. + * Gets all Virtual Instances for SAP solutions resources in a 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 Virtual Instances for SAP in the subscription as paginated response with {@link PagedIterable}. + * @return all Virtual Instances for SAP solutions resources in a Subscription as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * Gets all Virtual Instances for SAP in the subscription. + * Gets all Virtual Instances for SAP solutions resources in a 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 Virtual Instances for SAP in the subscription as paginated response with {@link PagedIterable}. + * @return all Virtual Instances for SAP solutions resources in a Subscription as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); /** - * Starts the SAP System. + * Starts the SAP application, that is the Central Services instance and Application server instances. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -268,10 +260,10 @@ SyncPoller, OperationStatusResultInner> b String resourceGroupName, String sapVirtualInstanceName); /** - * Starts the SAP System. + * Starts the SAP application, that is the Central Services instance and Application server instances. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -283,10 +275,10 @@ SyncPoller, OperationStatusResultInner> b String resourceGroupName, String sapVirtualInstanceName, Context context); /** - * Starts the SAP System. + * Starts the SAP application, that is the Central Services instance and Application server instances. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -296,10 +288,10 @@ SyncPoller, OperationStatusResultInner> b OperationStatusResultInner start(String resourceGroupName, String sapVirtualInstanceName); /** - * Starts the SAP System. + * Starts the SAP application, that is the Central Services instance and Application server instances. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -310,11 +302,10 @@ SyncPoller, OperationStatusResultInner> b OperationStatusResultInner start(String resourceGroupName, String sapVirtualInstanceName, Context context); /** - * Stops the SAP System. + * Stops the SAP Application, that is the Application server instances and Central Services instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param body The Virtual Instances for SAP stop request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -322,14 +313,14 @@ SyncPoller, OperationStatusResultInner> b */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationStatusResultInner> beginStop( - String resourceGroupName, String sapVirtualInstanceName, StopRequest body); + String resourceGroupName, String sapVirtualInstanceName); /** - * Stops the SAP System. + * Stops the SAP Application, that is the Application server instances and Central Services instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param body The Virtual Instances for SAP stop request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param body The Virtual Instance for SAP solutions resource stop request body. * @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. @@ -341,24 +332,10 @@ SyncPoller, OperationStatusResultInner> b String resourceGroupName, String sapVirtualInstanceName, StopRequest body, Context context); /** - * Stops the SAP System. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param body The Virtual Instances for SAP stop request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner stop(String resourceGroupName, String sapVirtualInstanceName, StopRequest body); - - /** - * Stops the SAP System. + * Stops the SAP Application, that is the Application server instances and Central Services instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -368,11 +345,11 @@ SyncPoller, OperationStatusResultInner> b OperationStatusResultInner stop(String resourceGroupName, String sapVirtualInstanceName); /** - * Stops the SAP System. + * Stops the SAP Application, that is the Application server instances and Central Services instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param body The Virtual Instances for SAP stop request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param body The Virtual Instance for SAP solutions resource stop request body. * @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. diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/SkusClient.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/SkusClient.java deleted file mode 100644 index 5b1f460487566..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/SkusClient.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.workloads.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.workloads.fluent.models.SkuDefinitionInner; - -/** An instance of this class provides access to all the operations defined in SkusClient. */ -public interface SkusClient { - /** - * Lists all the available SKUs under this PR. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of SKUs supported by an Azure Resource Provider as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Lists all the available SKUs under this PR. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of SKUs supported by an Azure Resource Provider as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/WordpressInstancesClient.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/WordpressInstancesClient.java deleted file mode 100644 index 88f5c177b998b..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/WordpressInstancesClient.java +++ /dev/null @@ -1,167 +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.workloads.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.workloads.fluent.models.WordpressInstanceResourceInner; - -/** An instance of this class provides access to all the operations defined in WordpressInstancesClient. */ -public interface WordpressInstancesClient { - /** - * Lists WordPress instance resources under a phpWorkload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload 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 wordPress instance resource list as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String phpWorkloadName); - - /** - * Lists WordPress instance resources under a phpWorkload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload 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 wordPress instance resource list as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String phpWorkloadName, Context context); - - /** - * Gets the WordPress instance resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload 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 WordPress instance resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WordpressInstanceResourceInner get(String resourceGroupName, String phpWorkloadName); - - /** - * Gets the WordPress instance resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload 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 WordPress instance resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String phpWorkloadName, Context context); - - /** - * Create or updated WordPress instance resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param wordpressInstanceResource Resource create or update request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 wordPress instance resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WordpressInstanceResourceInner> beginCreateOrUpdate( - String resourceGroupName, String phpWorkloadName, WordpressInstanceResourceInner wordpressInstanceResource); - - /** - * Create or updated WordPress instance resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param wordpressInstanceResource Resource create or update request payload. - * @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 wordPress instance resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WordpressInstanceResourceInner> beginCreateOrUpdate( - String resourceGroupName, - String phpWorkloadName, - WordpressInstanceResourceInner wordpressInstanceResource, - Context context); - - /** - * Create or updated WordPress instance resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param wordpressInstanceResource Resource create or update request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 wordPress instance resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WordpressInstanceResourceInner createOrUpdate( - String resourceGroupName, String phpWorkloadName, WordpressInstanceResourceInner wordpressInstanceResource); - - /** - * Create or updated WordPress instance resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param wordpressInstanceResource Resource create or update request payload. - * @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 wordPress instance resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WordpressInstanceResourceInner createOrUpdate( - String resourceGroupName, - String phpWorkloadName, - WordpressInstanceResourceInner wordpressInstanceResource, - Context context); - - /** - * Delete WordPress instance resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String phpWorkloadName); - - /** - * Delete WordPress instance resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload 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 {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String phpWorkloadName, Context context); -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/WorkloadsClient.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/WorkloadsClient.java index fc54bccec567a..75046ed2db4ec 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/WorkloadsClient.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/WorkloadsClient.java @@ -44,20 +44,6 @@ public interface WorkloadsClient { */ Duration getDefaultPollInterval(); - /** - * Gets the PhpWorkloadsClient object to access its operations. - * - * @return the PhpWorkloadsClient object. - */ - PhpWorkloadsClient getPhpWorkloads(); - - /** - * Gets the WordpressInstancesClient object to access its operations. - * - * @return the WordpressInstancesClient object. - */ - WordpressInstancesClient getWordpressInstances(); - /** * Gets the ResourceProvidersClient object to access its operations. * @@ -93,13 +79,6 @@ public interface WorkloadsClient { */ SapApplicationServerInstancesClient getSapApplicationServerInstances(); - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - OperationsClient getOperations(); - /** * Gets the MonitorsClient object to access its operations. * @@ -115,9 +94,16 @@ public interface WorkloadsClient { ProviderInstancesClient getProviderInstances(); /** - * Gets the SkusClient object to access its operations. + * Gets the SapLandscapeMonitorsClient object to access its operations. * - * @return the SkusClient object. + * @return the SapLandscapeMonitorsClient object. */ - SkusClient getSkus(); + SapLandscapeMonitorsClient getSapLandscapeMonitors(); + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + OperationsClient getOperations(); } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/MonitorInner.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/MonitorInner.java index af1f6e216f0b4..5ead140f64c8e 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/MonitorInner.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/MonitorInner.java @@ -31,12 +31,15 @@ public final class MonitorInner extends Resource { private MonitorProperties innerProperties; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /** Creates an instance of MonitorInner class. */ + public MonitorInner() { + } + /** * Get the identity property: Managed service identity (user assigned identities). * @@ -157,6 +160,31 @@ public MonitorInner withRoutingPreference(RoutingPreference routingPreference) { return this; } + /** + * Get the zoneRedundancyPreference property: Sets the preference for zone redundancy on resources created for the + * SAP monitor. By default resources will be created which do not support zone redundancy. + * + * @return the zoneRedundancyPreference value. + */ + public String zoneRedundancyPreference() { + return this.innerProperties() == null ? null : this.innerProperties().zoneRedundancyPreference(); + } + + /** + * Set the zoneRedundancyPreference property: Sets the preference for zone redundancy on resources created for the + * SAP monitor. By default resources will be created which do not support zone redundancy. + * + * @param zoneRedundancyPreference the zoneRedundancyPreference value to set. + * @return the MonitorInner object itself. + */ + public MonitorInner withZoneRedundancyPreference(String zoneRedundancyPreference) { + if (this.innerProperties() == null) { + this.innerProperties = new MonitorProperties(); + } + this.innerProperties().withZoneRedundancyPreference(zoneRedundancyPreference); + return this; + } + /** * Get the managedResourceGroupConfiguration property: Managed resource group configuration. * @@ -238,6 +266,15 @@ public String msiArmId() { return this.innerProperties() == null ? null : this.innerProperties().msiArmId(); } + /** + * Get the storageAccountArmId property: The ARM ID of the Storage account used for SAP monitoring. + * + * @return the storageAccountArmId value. + */ + public String storageAccountArmId() { + return this.innerProperties() == null ? null : this.innerProperties().storageAccountArmId(); + } + /** * Validates the instance. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/MonitorProperties.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/MonitorProperties.java index 8fd2268a33b74..4f1250fe00835 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/MonitorProperties.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/MonitorProperties.java @@ -27,19 +27,25 @@ public final class MonitorProperties { private MonitorPropertiesErrors errors; /* - * The SAP monitor resources will be deployed in the SAP monitoring region. - * The subnet region should be same as the SAP monitoring region. + * The SAP monitor resources will be deployed in the SAP monitoring region. The subnet region should be same as the + * SAP monitoring region. */ @JsonProperty(value = "appLocation") private String appLocation; /* - * Sets the routing preference of the SAP monitor. By default only RFC1918 - * traffic is routed to the customer VNET. + * Sets the routing preference of the SAP monitor. By default only RFC1918 traffic is routed to the customer VNET. */ @JsonProperty(value = "routingPreference") private RoutingPreference routingPreference; + /* + * Sets the preference for zone redundancy on resources created for the SAP monitor. By default resources will be + * created which do not support zone redundancy. + */ + @JsonProperty(value = "zoneRedundancyPreference") + private String zoneRedundancyPreference; + /* * Managed resource group configuration */ @@ -47,8 +53,7 @@ public final class MonitorProperties { private ManagedRGConfiguration managedResourceGroupConfiguration; /* - * The ARM ID of the Log Analytics Workspace that is used for SAP - * monitoring. + * The ARM ID of the Log Analytics Workspace that is used for SAP monitoring. */ @JsonProperty(value = "logAnalyticsWorkspaceArmId") private String logAnalyticsWorkspaceArmId; @@ -65,6 +70,16 @@ public final class MonitorProperties { @JsonProperty(value = "msiArmId", access = JsonProperty.Access.WRITE_ONLY) private String msiArmId; + /* + * The ARM ID of the Storage account used for SAP monitoring. + */ + @JsonProperty(value = "storageAccountArmId", access = JsonProperty.Access.WRITE_ONLY) + private String storageAccountArmId; + + /** Creates an instance of MonitorProperties class. */ + public MonitorProperties() { + } + /** * Get the provisioningState property: State of provisioning of the SAP monitor. * @@ -127,6 +142,28 @@ public MonitorProperties withRoutingPreference(RoutingPreference routingPreferen return this; } + /** + * Get the zoneRedundancyPreference property: Sets the preference for zone redundancy on resources created for the + * SAP monitor. By default resources will be created which do not support zone redundancy. + * + * @return the zoneRedundancyPreference value. + */ + public String zoneRedundancyPreference() { + return this.zoneRedundancyPreference; + } + + /** + * Set the zoneRedundancyPreference property: Sets the preference for zone redundancy on resources created for the + * SAP monitor. By default resources will be created which do not support zone redundancy. + * + * @param zoneRedundancyPreference the zoneRedundancyPreference value to set. + * @return the MonitorProperties object itself. + */ + public MonitorProperties withZoneRedundancyPreference(String zoneRedundancyPreference) { + this.zoneRedundancyPreference = zoneRedundancyPreference; + return this; + } + /** * Get the managedResourceGroupConfiguration property: Managed resource group configuration. * @@ -199,6 +236,15 @@ public String msiArmId() { return this.msiArmId; } + /** + * Get the storageAccountArmId property: The ARM ID of the Storage account used for SAP monitoring. + * + * @return the storageAccountArmId value. + */ + public String storageAccountArmId() { + return this.storageAccountArmId; + } + /** * Validates the instance. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/OperationInner.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/OperationInner.java index 2d8c1bea3db70..7fab65435ada5 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/OperationInner.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/OperationInner.java @@ -10,20 +10,23 @@ import com.azure.resourcemanager.workloads.models.Origin; import com.fasterxml.jackson.annotation.JsonProperty; -/** REST API Operation Details of a REST API operation, returned from the Resource Provider Operations API. */ +/** + * REST API Operation + * + *

Details of a REST API operation, returned from the Resource Provider Operations API. + */ @Fluent public final class OperationInner { /* - * The name of the operation, as per Resource-Based Access Control (RBAC). - * Examples: "Microsoft.Compute/virtualMachines/write", - * "Microsoft.Compute/virtualMachines/capture/action" + * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" */ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private String name; /* - * Whether the operation applies to data-plane. This is "true" for - * data-plane operations and "false" for ARM/control-plane operations. + * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for + * ARM/control-plane operations. */ @JsonProperty(value = "isDataAction", access = JsonProperty.Access.WRITE_ONLY) private Boolean isDataAction; @@ -35,19 +38,22 @@ public final class OperationInner { private OperationDisplay display; /* - * The intended executor of the operation; as in Resource Based Access - * Control (RBAC) and audit logs UX. Default value is "user,system" + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default + * value is "user,system" */ @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY) private Origin origin; /* - * Enum. Indicates the action type. "Internal" refers to actions that are - * for internal only APIs. + * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ @JsonProperty(value = "actionType", access = JsonProperty.Access.WRITE_ONLY) private ActionType actionType; + /** Creates an instance of OperationInner class. */ + public OperationInner() { + } + /** * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/OperationStatusResultInner.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/OperationStatusResultInner.java index 6acba2304ee65..54f58574ee5fc 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/OperationStatusResultInner.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/OperationStatusResultInner.java @@ -62,6 +62,10 @@ public final class OperationStatusResultInner { @JsonProperty(value = "error") private ManagementError error; + /** Creates an instance of OperationStatusResultInner class. */ + public OperationStatusResultInner() { + } + /** * Get the id property: Fully qualified ID for the async operation. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/PhpWorkloadResourceInner.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/PhpWorkloadResourceInner.java deleted file mode 100644 index 5b2fa23649c58..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/PhpWorkloadResourceInner.java +++ /dev/null @@ -1,472 +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.workloads.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.workloads.models.BackupProfile; -import com.azure.resourcemanager.workloads.models.CacheProfile; -import com.azure.resourcemanager.workloads.models.DatabaseProfile; -import com.azure.resourcemanager.workloads.models.FileshareProfile; -import com.azure.resourcemanager.workloads.models.ManagedRGConfiguration; -import com.azure.resourcemanager.workloads.models.NetworkProfile; -import com.azure.resourcemanager.workloads.models.NodeProfile; -import com.azure.resourcemanager.workloads.models.PhpProfile; -import com.azure.resourcemanager.workloads.models.PhpWorkloadProvisioningState; -import com.azure.resourcemanager.workloads.models.PhpWorkloadResourceIdentity; -import com.azure.resourcemanager.workloads.models.SearchProfile; -import com.azure.resourcemanager.workloads.models.SiteProfile; -import com.azure.resourcemanager.workloads.models.Sku; -import com.azure.resourcemanager.workloads.models.UserProfile; -import com.azure.resourcemanager.workloads.models.VmssNodesProfile; -import com.azure.resourcemanager.workloads.models.WorkloadKind; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Php workload resource. */ -@Fluent -public final class PhpWorkloadResourceInner extends Resource { - /* - * Resource properties - */ - @JsonProperty(value = "properties") - private PhpWorkloadResourceProperties innerProperties; - - /* - * Indicates which kind of php workload this resource represent e.g - * WordPress - */ - @JsonProperty(value = "kind", required = true) - private WorkloadKind kind; - - /* - * Php workloads SKU - */ - @JsonProperty(value = "sku") - private Sku sku; - - /* - * Identity for the resource. Currently not supported - */ - @JsonProperty(value = "identity") - private PhpWorkloadResourceIdentity identity; - - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private PhpWorkloadResourceProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the kind property: Indicates which kind of php workload this resource represent e.g WordPress. - * - * @return the kind value. - */ - public WorkloadKind kind() { - return this.kind; - } - - /** - * Set the kind property: Indicates which kind of php workload this resource represent e.g WordPress. - * - * @param kind the kind value to set. - * @return the PhpWorkloadResourceInner object itself. - */ - public PhpWorkloadResourceInner withKind(WorkloadKind kind) { - this.kind = kind; - return this; - } - - /** - * Get the sku property: Php workloads SKU. - * - * @return the sku value. - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku property: Php workloads SKU. - * - * @param sku the sku value to set. - * @return the PhpWorkloadResourceInner object itself. - */ - public PhpWorkloadResourceInner withSku(Sku sku) { - this.sku = sku; - return this; - } - - /** - * Get the identity property: Identity for the resource. Currently not supported. - * - * @return the identity value. - */ - public PhpWorkloadResourceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: Identity for the resource. Currently not supported. - * - * @param identity the identity value to set. - * @return the PhpWorkloadResourceInner object itself. - */ - public PhpWorkloadResourceInner withIdentity(PhpWorkloadResourceIdentity identity) { - this.identity = identity; - return this; - } - - /** {@inheritDoc} */ - @Override - public PhpWorkloadResourceInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public PhpWorkloadResourceInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Get the appLocation property: The infra resources for PHP workload will be created in this location. - * - * @return the appLocation value. - */ - public String appLocation() { - return this.innerProperties() == null ? null : this.innerProperties().appLocation(); - } - - /** - * Set the appLocation property: The infra resources for PHP workload will be created in this location. - * - * @param appLocation the appLocation value to set. - * @return the PhpWorkloadResourceInner object itself. - */ - public PhpWorkloadResourceInner withAppLocation(String appLocation) { - if (this.innerProperties() == null) { - this.innerProperties = new PhpWorkloadResourceProperties(); - } - this.innerProperties().withAppLocation(appLocation); - return this; - } - - /** - * Get the managedResourceGroupConfiguration property: Managed resource group configuration of the workload. - * - * @return the managedResourceGroupConfiguration value. - */ - public ManagedRGConfiguration managedResourceGroupConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().managedResourceGroupConfiguration(); - } - - /** - * Set the managedResourceGroupConfiguration property: Managed resource group configuration of the workload. - * - * @param managedResourceGroupConfiguration the managedResourceGroupConfiguration value to set. - * @return the PhpWorkloadResourceInner object itself. - */ - public PhpWorkloadResourceInner withManagedResourceGroupConfiguration( - ManagedRGConfiguration managedResourceGroupConfiguration) { - if (this.innerProperties() == null) { - this.innerProperties = new PhpWorkloadResourceProperties(); - } - this.innerProperties().withManagedResourceGroupConfiguration(managedResourceGroupConfiguration); - return this; - } - - /** - * Get the adminUserProfile property: Admin user profile used for VM and VMSS. - * - * @return the adminUserProfile value. - */ - public UserProfile adminUserProfile() { - return this.innerProperties() == null ? null : this.innerProperties().adminUserProfile(); - } - - /** - * Set the adminUserProfile property: Admin user profile used for VM and VMSS. - * - * @param adminUserProfile the adminUserProfile value to set. - * @return the PhpWorkloadResourceInner object itself. - */ - public PhpWorkloadResourceInner withAdminUserProfile(UserProfile adminUserProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new PhpWorkloadResourceProperties(); - } - this.innerProperties().withAdminUserProfile(adminUserProfile); - return this; - } - - /** - * Get the webNodesProfile property: VMSS web nodes profile. - * - * @return the webNodesProfile value. - */ - public VmssNodesProfile webNodesProfile() { - return this.innerProperties() == null ? null : this.innerProperties().webNodesProfile(); - } - - /** - * Set the webNodesProfile property: VMSS web nodes profile. - * - * @param webNodesProfile the webNodesProfile value to set. - * @return the PhpWorkloadResourceInner object itself. - */ - public PhpWorkloadResourceInner withWebNodesProfile(VmssNodesProfile webNodesProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new PhpWorkloadResourceProperties(); - } - this.innerProperties().withWebNodesProfile(webNodesProfile); - return this; - } - - /** - * Get the controllerProfile property: Controller VM profile. - * - * @return the controllerProfile value. - */ - public NodeProfile controllerProfile() { - return this.innerProperties() == null ? null : this.innerProperties().controllerProfile(); - } - - /** - * Set the controllerProfile property: Controller VM profile. - * - * @param controllerProfile the controllerProfile value to set. - * @return the PhpWorkloadResourceInner object itself. - */ - public PhpWorkloadResourceInner withControllerProfile(NodeProfile controllerProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new PhpWorkloadResourceProperties(); - } - this.innerProperties().withControllerProfile(controllerProfile); - return this; - } - - /** - * Get the networkProfile property: Network profile. - * - * @return the networkProfile value. - */ - public NetworkProfile networkProfile() { - return this.innerProperties() == null ? null : this.innerProperties().networkProfile(); - } - - /** - * Set the networkProfile property: Network profile. - * - * @param networkProfile the networkProfile value to set. - * @return the PhpWorkloadResourceInner object itself. - */ - public PhpWorkloadResourceInner withNetworkProfile(NetworkProfile networkProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new PhpWorkloadResourceProperties(); - } - this.innerProperties().withNetworkProfile(networkProfile); - return this; - } - - /** - * Get the databaseProfile property: Database profile. - * - * @return the databaseProfile value. - */ - public DatabaseProfile databaseProfile() { - return this.innerProperties() == null ? null : this.innerProperties().databaseProfile(); - } - - /** - * Set the databaseProfile property: Database profile. - * - * @param databaseProfile the databaseProfile value to set. - * @return the PhpWorkloadResourceInner object itself. - */ - public PhpWorkloadResourceInner withDatabaseProfile(DatabaseProfile databaseProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new PhpWorkloadResourceProperties(); - } - this.innerProperties().withDatabaseProfile(databaseProfile); - return this; - } - - /** - * Get the siteProfile property: Site profile. - * - * @return the siteProfile value. - */ - public SiteProfile siteProfile() { - return this.innerProperties() == null ? null : this.innerProperties().siteProfile(); - } - - /** - * Set the siteProfile property: Site profile. - * - * @param siteProfile the siteProfile value to set. - * @return the PhpWorkloadResourceInner object itself. - */ - public PhpWorkloadResourceInner withSiteProfile(SiteProfile siteProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new PhpWorkloadResourceProperties(); - } - this.innerProperties().withSiteProfile(siteProfile); - return this; - } - - /** - * Get the fileshareProfile property: File share profile. - * - * @return the fileshareProfile value. - */ - public FileshareProfile fileshareProfile() { - return this.innerProperties() == null ? null : this.innerProperties().fileshareProfile(); - } - - /** - * Set the fileshareProfile property: File share profile. - * - * @param fileshareProfile the fileshareProfile value to set. - * @return the PhpWorkloadResourceInner object itself. - */ - public PhpWorkloadResourceInner withFileshareProfile(FileshareProfile fileshareProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new PhpWorkloadResourceProperties(); - } - this.innerProperties().withFileshareProfile(fileshareProfile); - return this; - } - - /** - * Get the phpProfile property: PHP profile. - * - * @return the phpProfile value. - */ - public PhpProfile phpProfile() { - return this.innerProperties() == null ? null : this.innerProperties().phpProfile(); - } - - /** - * Set the phpProfile property: PHP profile. - * - * @param phpProfile the phpProfile value to set. - * @return the PhpWorkloadResourceInner object itself. - */ - public PhpWorkloadResourceInner withPhpProfile(PhpProfile phpProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new PhpWorkloadResourceProperties(); - } - this.innerProperties().withPhpProfile(phpProfile); - return this; - } - - /** - * Get the searchProfile property: Search profile. - * - * @return the searchProfile value. - */ - public SearchProfile searchProfile() { - return this.innerProperties() == null ? null : this.innerProperties().searchProfile(); - } - - /** - * Set the searchProfile property: Search profile. - * - * @param searchProfile the searchProfile value to set. - * @return the PhpWorkloadResourceInner object itself. - */ - public PhpWorkloadResourceInner withSearchProfile(SearchProfile searchProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new PhpWorkloadResourceProperties(); - } - this.innerProperties().withSearchProfile(searchProfile); - return this; - } - - /** - * Get the cacheProfile property: Cache profile. - * - * @return the cacheProfile value. - */ - public CacheProfile cacheProfile() { - return this.innerProperties() == null ? null : this.innerProperties().cacheProfile(); - } - - /** - * Set the cacheProfile property: Cache profile. - * - * @param cacheProfile the cacheProfile value to set. - * @return the PhpWorkloadResourceInner object itself. - */ - public PhpWorkloadResourceInner withCacheProfile(CacheProfile cacheProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new PhpWorkloadResourceProperties(); - } - this.innerProperties().withCacheProfile(cacheProfile); - return this; - } - - /** - * Get the backupProfile property: Backup profile. - * - * @return the backupProfile value. - */ - public BackupProfile backupProfile() { - return this.innerProperties() == null ? null : this.innerProperties().backupProfile(); - } - - /** - * Set the backupProfile property: Backup profile. - * - * @param backupProfile the backupProfile value to set. - * @return the PhpWorkloadResourceInner object itself. - */ - public PhpWorkloadResourceInner withBackupProfile(BackupProfile backupProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new PhpWorkloadResourceProperties(); - } - this.innerProperties().withBackupProfile(backupProfile); - return this; - } - - /** - * Get the provisioningState property: Php workload resource provisioning state. - * - * @return the provisioningState value. - */ - public PhpWorkloadProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - if (kind() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property kind in model PhpWorkloadResourceInner")); - } - if (sku() != null) { - sku().validate(); - } - if (identity() != null) { - identity().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(PhpWorkloadResourceInner.class); -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/PhpWorkloadResourceProperties.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/PhpWorkloadResourceProperties.java deleted file mode 100644 index eeaf3a6031550..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/PhpWorkloadResourceProperties.java +++ /dev/null @@ -1,452 +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.workloads.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.workloads.models.BackupProfile; -import com.azure.resourcemanager.workloads.models.CacheProfile; -import com.azure.resourcemanager.workloads.models.DatabaseProfile; -import com.azure.resourcemanager.workloads.models.FileshareProfile; -import com.azure.resourcemanager.workloads.models.ManagedRGConfiguration; -import com.azure.resourcemanager.workloads.models.NetworkProfile; -import com.azure.resourcemanager.workloads.models.NodeProfile; -import com.azure.resourcemanager.workloads.models.PhpProfile; -import com.azure.resourcemanager.workloads.models.PhpWorkloadProvisioningState; -import com.azure.resourcemanager.workloads.models.SearchProfile; -import com.azure.resourcemanager.workloads.models.SiteProfile; -import com.azure.resourcemanager.workloads.models.UserProfile; -import com.azure.resourcemanager.workloads.models.VmssNodesProfile; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** PHP workload resource properties. */ -@Fluent -public final class PhpWorkloadResourceProperties { - /* - * The infra resources for PHP workload will be created in this location - */ - @JsonProperty(value = "appLocation", required = true) - private String appLocation; - - /* - * Managed resource group configuration of the workload - */ - @JsonProperty(value = "managedResourceGroupConfiguration") - private ManagedRGConfiguration managedResourceGroupConfiguration; - - /* - * Admin user profile used for VM and VMSS - */ - @JsonProperty(value = "adminUserProfile", required = true) - private UserProfile adminUserProfile; - - /* - * VMSS web nodes profile - */ - @JsonProperty(value = "webNodesProfile", required = true) - private VmssNodesProfile webNodesProfile; - - /* - * Controller VM profile - */ - @JsonProperty(value = "controllerProfile", required = true) - private NodeProfile controllerProfile; - - /* - * Network profile - */ - @JsonProperty(value = "networkProfile") - private NetworkProfile networkProfile; - - /* - * Database profile - */ - @JsonProperty(value = "databaseProfile", required = true) - private DatabaseProfile databaseProfile; - - /* - * Site profile - */ - @JsonProperty(value = "siteProfile") - private SiteProfile siteProfile; - - /* - * File share profile - */ - @JsonProperty(value = "fileshareProfile") - private FileshareProfile fileshareProfile; - - /* - * PHP profile - */ - @JsonProperty(value = "phpProfile") - private PhpProfile phpProfile; - - /* - * Search profile - */ - @JsonProperty(value = "searchProfile") - private SearchProfile searchProfile; - - /* - * Cache profile - */ - @JsonProperty(value = "cacheProfile") - private CacheProfile cacheProfile; - - /* - * Backup profile - */ - @JsonProperty(value = "backupProfile") - private BackupProfile backupProfile; - - /* - * Php workload resource provisioning state - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private PhpWorkloadProvisioningState provisioningState; - - /** - * Get the appLocation property: The infra resources for PHP workload will be created in this location. - * - * @return the appLocation value. - */ - public String appLocation() { - return this.appLocation; - } - - /** - * Set the appLocation property: The infra resources for PHP workload will be created in this location. - * - * @param appLocation the appLocation value to set. - * @return the PhpWorkloadResourceProperties object itself. - */ - public PhpWorkloadResourceProperties withAppLocation(String appLocation) { - this.appLocation = appLocation; - return this; - } - - /** - * Get the managedResourceGroupConfiguration property: Managed resource group configuration of the workload. - * - * @return the managedResourceGroupConfiguration value. - */ - public ManagedRGConfiguration managedResourceGroupConfiguration() { - return this.managedResourceGroupConfiguration; - } - - /** - * Set the managedResourceGroupConfiguration property: Managed resource group configuration of the workload. - * - * @param managedResourceGroupConfiguration the managedResourceGroupConfiguration value to set. - * @return the PhpWorkloadResourceProperties object itself. - */ - public PhpWorkloadResourceProperties withManagedResourceGroupConfiguration( - ManagedRGConfiguration managedResourceGroupConfiguration) { - this.managedResourceGroupConfiguration = managedResourceGroupConfiguration; - return this; - } - - /** - * Get the adminUserProfile property: Admin user profile used for VM and VMSS. - * - * @return the adminUserProfile value. - */ - public UserProfile adminUserProfile() { - return this.adminUserProfile; - } - - /** - * Set the adminUserProfile property: Admin user profile used for VM and VMSS. - * - * @param adminUserProfile the adminUserProfile value to set. - * @return the PhpWorkloadResourceProperties object itself. - */ - public PhpWorkloadResourceProperties withAdminUserProfile(UserProfile adminUserProfile) { - this.adminUserProfile = adminUserProfile; - return this; - } - - /** - * Get the webNodesProfile property: VMSS web nodes profile. - * - * @return the webNodesProfile value. - */ - public VmssNodesProfile webNodesProfile() { - return this.webNodesProfile; - } - - /** - * Set the webNodesProfile property: VMSS web nodes profile. - * - * @param webNodesProfile the webNodesProfile value to set. - * @return the PhpWorkloadResourceProperties object itself. - */ - public PhpWorkloadResourceProperties withWebNodesProfile(VmssNodesProfile webNodesProfile) { - this.webNodesProfile = webNodesProfile; - return this; - } - - /** - * Get the controllerProfile property: Controller VM profile. - * - * @return the controllerProfile value. - */ - public NodeProfile controllerProfile() { - return this.controllerProfile; - } - - /** - * Set the controllerProfile property: Controller VM profile. - * - * @param controllerProfile the controllerProfile value to set. - * @return the PhpWorkloadResourceProperties object itself. - */ - public PhpWorkloadResourceProperties withControllerProfile(NodeProfile controllerProfile) { - this.controllerProfile = controllerProfile; - return this; - } - - /** - * Get the networkProfile property: Network profile. - * - * @return the networkProfile value. - */ - public NetworkProfile networkProfile() { - return this.networkProfile; - } - - /** - * Set the networkProfile property: Network profile. - * - * @param networkProfile the networkProfile value to set. - * @return the PhpWorkloadResourceProperties object itself. - */ - public PhpWorkloadResourceProperties withNetworkProfile(NetworkProfile networkProfile) { - this.networkProfile = networkProfile; - return this; - } - - /** - * Get the databaseProfile property: Database profile. - * - * @return the databaseProfile value. - */ - public DatabaseProfile databaseProfile() { - return this.databaseProfile; - } - - /** - * Set the databaseProfile property: Database profile. - * - * @param databaseProfile the databaseProfile value to set. - * @return the PhpWorkloadResourceProperties object itself. - */ - public PhpWorkloadResourceProperties withDatabaseProfile(DatabaseProfile databaseProfile) { - this.databaseProfile = databaseProfile; - return this; - } - - /** - * Get the siteProfile property: Site profile. - * - * @return the siteProfile value. - */ - public SiteProfile siteProfile() { - return this.siteProfile; - } - - /** - * Set the siteProfile property: Site profile. - * - * @param siteProfile the siteProfile value to set. - * @return the PhpWorkloadResourceProperties object itself. - */ - public PhpWorkloadResourceProperties withSiteProfile(SiteProfile siteProfile) { - this.siteProfile = siteProfile; - return this; - } - - /** - * Get the fileshareProfile property: File share profile. - * - * @return the fileshareProfile value. - */ - public FileshareProfile fileshareProfile() { - return this.fileshareProfile; - } - - /** - * Set the fileshareProfile property: File share profile. - * - * @param fileshareProfile the fileshareProfile value to set. - * @return the PhpWorkloadResourceProperties object itself. - */ - public PhpWorkloadResourceProperties withFileshareProfile(FileshareProfile fileshareProfile) { - this.fileshareProfile = fileshareProfile; - return this; - } - - /** - * Get the phpProfile property: PHP profile. - * - * @return the phpProfile value. - */ - public PhpProfile phpProfile() { - return this.phpProfile; - } - - /** - * Set the phpProfile property: PHP profile. - * - * @param phpProfile the phpProfile value to set. - * @return the PhpWorkloadResourceProperties object itself. - */ - public PhpWorkloadResourceProperties withPhpProfile(PhpProfile phpProfile) { - this.phpProfile = phpProfile; - return this; - } - - /** - * Get the searchProfile property: Search profile. - * - * @return the searchProfile value. - */ - public SearchProfile searchProfile() { - return this.searchProfile; - } - - /** - * Set the searchProfile property: Search profile. - * - * @param searchProfile the searchProfile value to set. - * @return the PhpWorkloadResourceProperties object itself. - */ - public PhpWorkloadResourceProperties withSearchProfile(SearchProfile searchProfile) { - this.searchProfile = searchProfile; - return this; - } - - /** - * Get the cacheProfile property: Cache profile. - * - * @return the cacheProfile value. - */ - public CacheProfile cacheProfile() { - return this.cacheProfile; - } - - /** - * Set the cacheProfile property: Cache profile. - * - * @param cacheProfile the cacheProfile value to set. - * @return the PhpWorkloadResourceProperties object itself. - */ - public PhpWorkloadResourceProperties withCacheProfile(CacheProfile cacheProfile) { - this.cacheProfile = cacheProfile; - return this; - } - - /** - * Get the backupProfile property: Backup profile. - * - * @return the backupProfile value. - */ - public BackupProfile backupProfile() { - return this.backupProfile; - } - - /** - * Set the backupProfile property: Backup profile. - * - * @param backupProfile the backupProfile value to set. - * @return the PhpWorkloadResourceProperties object itself. - */ - public PhpWorkloadResourceProperties withBackupProfile(BackupProfile backupProfile) { - this.backupProfile = backupProfile; - return this; - } - - /** - * Get the provisioningState property: Php workload resource provisioning state. - * - * @return the provisioningState value. - */ - public PhpWorkloadProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (appLocation() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property appLocation in model PhpWorkloadResourceProperties")); - } - if (managedResourceGroupConfiguration() != null) { - managedResourceGroupConfiguration().validate(); - } - if (adminUserProfile() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property adminUserProfile in model PhpWorkloadResourceProperties")); - } else { - adminUserProfile().validate(); - } - if (webNodesProfile() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property webNodesProfile in model PhpWorkloadResourceProperties")); - } else { - webNodesProfile().validate(); - } - if (controllerProfile() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property controllerProfile in model PhpWorkloadResourceProperties")); - } else { - controllerProfile().validate(); - } - if (networkProfile() != null) { - networkProfile().validate(); - } - if (databaseProfile() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property databaseProfile in model PhpWorkloadResourceProperties")); - } else { - databaseProfile().validate(); - } - if (siteProfile() != null) { - siteProfile().validate(); - } - if (fileshareProfile() != null) { - fileshareProfile().validate(); - } - if (phpProfile() != null) { - phpProfile().validate(); - } - if (searchProfile() != null) { - searchProfile().validate(); - } - if (cacheProfile() != null) { - cacheProfile().validate(); - } - if (backupProfile() != null) { - backupProfile().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(PhpWorkloadResourceProperties.class); -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/ProviderInstanceInner.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/ProviderInstanceInner.java index f4c243d1b516a..944c31292e365 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/ProviderInstanceInner.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/ProviderInstanceInner.java @@ -29,12 +29,15 @@ public final class ProviderInstanceInner extends ProxyResource { private ProviderInstanceProperties innerProperties; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /** Creates an instance of ProviderInstanceInner class. */ + public ProviderInstanceInner() { + } + /** * Get the identity property: Managed service identity (user assigned identities). * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/ProviderInstanceProperties.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/ProviderInstanceProperties.java index b35c2f48d0b56..cf8d97271daff 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/ProviderInstanceProperties.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/ProviderInstanceProperties.java @@ -31,6 +31,10 @@ public final class ProviderInstanceProperties { @JsonProperty(value = "providerSettings") private ProviderSpecificProperties providerSettings; + /** Creates an instance of ProviderInstanceProperties class. */ + public ProviderInstanceProperties() { + } + /** * Get the provisioningState property: State of provisioning of the provider instance. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapApplicationServerInstanceInner.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapApplicationServerInstanceInner.java index f71b53ccb4893..5d1e4d089cd52 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapApplicationServerInstanceInner.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapApplicationServerInstanceInner.java @@ -7,31 +7,37 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; +import com.azure.resourcemanager.workloads.models.ApplicationServerVmDetails; +import com.azure.resourcemanager.workloads.models.LoadBalancerDetails; import com.azure.resourcemanager.workloads.models.SapHealthState; import com.azure.resourcemanager.workloads.models.SapVirtualInstanceError; import com.azure.resourcemanager.workloads.models.SapVirtualInstanceProvisioningState; import com.azure.resourcemanager.workloads.models.SapVirtualInstanceStatus; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; import java.util.Map; -/** Define the SAP Application Server Instance. */ +/** Define the SAP Application Server Instance resource. */ @Fluent public final class SapApplicationServerInstanceInner extends Resource { /* - * Defines the SAP Application Server properties. + * Defines the SAP Application Server instance properties. */ @JsonProperty(value = "properties") private SapApplicationServerProperties innerProperties; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /** Creates an instance of SapApplicationServerInstanceInner class. */ + public SapApplicationServerInstanceInner() { + } + /** - * Get the innerProperties property: Defines the SAP Application Server properties. + * Get the innerProperties property: Defines the SAP Application Server instance properties. * * @return the innerProperties value. */ @@ -63,7 +69,7 @@ public SapApplicationServerInstanceInner withTags(Map tags) { } /** - * Get the instanceNo property: The application server instance id. + * Get the instanceNo property: Application server Instance Number. * * @return the instanceNo value. */ @@ -72,7 +78,7 @@ public String instanceNo() { } /** - * Get the subnet property: The application server subnet. + * Get the subnet property: Application server Subnet. * * @return the subnet value. */ @@ -81,7 +87,7 @@ public String subnet() { } /** - * Get the hostname property: The application server SAP host name. + * Get the hostname property: Application server instance SAP hostname. * * @return the hostname value. */ @@ -90,7 +96,7 @@ public String hostname() { } /** - * Get the kernelVersion property: The application server SAP kernel version. + * Get the kernelVersion property: Application server instance SAP Kernel Version. * * @return the kernelVersion value. */ @@ -99,7 +105,7 @@ public String kernelVersion() { } /** - * Get the kernelPatch property: The application server SAP kernel patch. + * Get the kernelPatch property: Application server instance SAP Kernel Patch level. * * @return the kernelPatch value. */ @@ -108,7 +114,7 @@ public String kernelPatch() { } /** - * Get the ipAddress property: The application server SAP IP Address. + * Get the ipAddress property: Application server instance SAP IP Address. * * @return the ipAddress value. */ @@ -117,7 +123,7 @@ public String ipAddress() { } /** - * Get the gatewayPort property: The application server gateway Port. + * Get the gatewayPort property: Application server instance gateway Port. * * @return the gatewayPort value. */ @@ -126,7 +132,7 @@ public Long gatewayPort() { } /** - * Get the icmHttpPort property: The application server ICM HTTP Port. + * Get the icmHttpPort property: Application server instance ICM HTTP Port. * * @return the icmHttpPort value. */ @@ -135,7 +141,7 @@ public Long icmHttpPort() { } /** - * Get the icmHttpsPort property: The application server ICM HTTPS Port. + * Get the icmHttpsPort property: Application server instance ICM HTTPS Port. * * @return the icmHttpsPort value. */ @@ -144,12 +150,22 @@ public Long icmHttpsPort() { } /** - * Get the virtualMachineId property: The virtual machine. + * Get the loadBalancerDetails property: The Load Balancer details such as LoadBalancer ID attached to Application + * Server Virtual Machines. + * + * @return the loadBalancerDetails value. + */ + public LoadBalancerDetails loadBalancerDetails() { + return this.innerProperties() == null ? null : this.innerProperties().loadBalancerDetails(); + } + + /** + * Get the vmDetails property: The list of virtual machines. * - * @return the virtualMachineId value. + * @return the vmDetails value. */ - public String virtualMachineId() { - return this.innerProperties() == null ? null : this.innerProperties().virtualMachineId(); + public List vmDetails() { + return this.innerProperties() == null ? null : this.innerProperties().vmDetails(); } /** @@ -162,7 +178,7 @@ public SapVirtualInstanceStatus status() { } /** - * Get the health property: Defines the SAP Instance health. + * Get the health property: Defines the health of SAP Instances. * * @return the health value. */ diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapApplicationServerProperties.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapApplicationServerProperties.java index 43bfc4739e587..a96f08ebfbec9 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapApplicationServerProperties.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapApplicationServerProperties.java @@ -5,74 +5,83 @@ package com.azure.resourcemanager.workloads.fluent.models; import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.workloads.models.ApplicationServerVmDetails; +import com.azure.resourcemanager.workloads.models.LoadBalancerDetails; import com.azure.resourcemanager.workloads.models.SapHealthState; import com.azure.resourcemanager.workloads.models.SapVirtualInstanceError; import com.azure.resourcemanager.workloads.models.SapVirtualInstanceProvisioningState; import com.azure.resourcemanager.workloads.models.SapVirtualInstanceStatus; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; -/** Defines the SAP Application Server properties. */ +/** Defines the SAP Application Server instance properties. */ @Immutable public final class SapApplicationServerProperties { /* - * The application server instance id. + * Application server Instance Number. */ @JsonProperty(value = "instanceNo", access = JsonProperty.Access.WRITE_ONLY) private String instanceNo; /* - * The application server subnet. + * Application server Subnet. */ @JsonProperty(value = "subnet", access = JsonProperty.Access.WRITE_ONLY) private String subnet; /* - * The application server SAP host name. + * Application server instance SAP hostname. */ @JsonProperty(value = "hostname", access = JsonProperty.Access.WRITE_ONLY) private String hostname; /* - * The application server SAP kernel version. + * Application server instance SAP Kernel Version. */ @JsonProperty(value = "kernelVersion", access = JsonProperty.Access.WRITE_ONLY) private String kernelVersion; /* - * The application server SAP kernel patch. + * Application server instance SAP Kernel Patch level. */ @JsonProperty(value = "kernelPatch", access = JsonProperty.Access.WRITE_ONLY) private String kernelPatch; /* - * The application server SAP IP Address. + * Application server instance SAP IP Address. */ @JsonProperty(value = "ipAddress", access = JsonProperty.Access.WRITE_ONLY) private String ipAddress; /* - * The application server gateway Port. + * Application server instance gateway Port. */ @JsonProperty(value = "gatewayPort", access = JsonProperty.Access.WRITE_ONLY) private Long gatewayPort; /* - * The application server ICM HTTP Port. + * Application server instance ICM HTTP Port. */ @JsonProperty(value = "icmHttpPort", access = JsonProperty.Access.WRITE_ONLY) private Long icmHttpPort; /* - * The application server ICM HTTPS Port. + * Application server instance ICM HTTPS Port. */ @JsonProperty(value = "icmHttpsPort", access = JsonProperty.Access.WRITE_ONLY) private Long icmHttpsPort; /* - * The virtual machine. + * The Load Balancer details such as LoadBalancer ID attached to Application Server Virtual Machines */ - @JsonProperty(value = "virtualMachineId", access = JsonProperty.Access.WRITE_ONLY) - private String virtualMachineId; + @JsonProperty(value = "loadBalancerDetails", access = JsonProperty.Access.WRITE_ONLY) + private LoadBalancerDetails loadBalancerDetails; + + /* + * The list of virtual machines. + */ + @JsonProperty(value = "vmDetails", access = JsonProperty.Access.WRITE_ONLY) + private List vmDetails; /* * Defines the SAP Instance status. @@ -81,7 +90,7 @@ public final class SapApplicationServerProperties { private SapVirtualInstanceStatus status; /* - * Defines the SAP Instance health. + * Defines the health of SAP Instances. */ @JsonProperty(value = "health", access = JsonProperty.Access.WRITE_ONLY) private SapHealthState health; @@ -98,8 +107,12 @@ public final class SapApplicationServerProperties { @JsonProperty(value = "errors", access = JsonProperty.Access.WRITE_ONLY) private SapVirtualInstanceError errors; + /** Creates an instance of SapApplicationServerProperties class. */ + public SapApplicationServerProperties() { + } + /** - * Get the instanceNo property: The application server instance id. + * Get the instanceNo property: Application server Instance Number. * * @return the instanceNo value. */ @@ -108,7 +121,7 @@ public String instanceNo() { } /** - * Get the subnet property: The application server subnet. + * Get the subnet property: Application server Subnet. * * @return the subnet value. */ @@ -117,7 +130,7 @@ public String subnet() { } /** - * Get the hostname property: The application server SAP host name. + * Get the hostname property: Application server instance SAP hostname. * * @return the hostname value. */ @@ -126,7 +139,7 @@ public String hostname() { } /** - * Get the kernelVersion property: The application server SAP kernel version. + * Get the kernelVersion property: Application server instance SAP Kernel Version. * * @return the kernelVersion value. */ @@ -135,7 +148,7 @@ public String kernelVersion() { } /** - * Get the kernelPatch property: The application server SAP kernel patch. + * Get the kernelPatch property: Application server instance SAP Kernel Patch level. * * @return the kernelPatch value. */ @@ -144,7 +157,7 @@ public String kernelPatch() { } /** - * Get the ipAddress property: The application server SAP IP Address. + * Get the ipAddress property: Application server instance SAP IP Address. * * @return the ipAddress value. */ @@ -153,7 +166,7 @@ public String ipAddress() { } /** - * Get the gatewayPort property: The application server gateway Port. + * Get the gatewayPort property: Application server instance gateway Port. * * @return the gatewayPort value. */ @@ -162,7 +175,7 @@ public Long gatewayPort() { } /** - * Get the icmHttpPort property: The application server ICM HTTP Port. + * Get the icmHttpPort property: Application server instance ICM HTTP Port. * * @return the icmHttpPort value. */ @@ -171,7 +184,7 @@ public Long icmHttpPort() { } /** - * Get the icmHttpsPort property: The application server ICM HTTPS Port. + * Get the icmHttpsPort property: Application server instance ICM HTTPS Port. * * @return the icmHttpsPort value. */ @@ -180,12 +193,22 @@ public Long icmHttpsPort() { } /** - * Get the virtualMachineId property: The virtual machine. + * Get the loadBalancerDetails property: The Load Balancer details such as LoadBalancer ID attached to Application + * Server Virtual Machines. + * + * @return the loadBalancerDetails value. + */ + public LoadBalancerDetails loadBalancerDetails() { + return this.loadBalancerDetails; + } + + /** + * Get the vmDetails property: The list of virtual machines. * - * @return the virtualMachineId value. + * @return the vmDetails value. */ - public String virtualMachineId() { - return this.virtualMachineId; + public List vmDetails() { + return this.vmDetails; } /** @@ -198,7 +221,7 @@ public SapVirtualInstanceStatus status() { } /** - * Get the health property: Defines the SAP Instance health. + * Get the health property: Defines the health of SAP Instances. * * @return the health value. */ @@ -230,6 +253,12 @@ public SapVirtualInstanceError errors() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (loadBalancerDetails() != null) { + loadBalancerDetails().validate(); + } + if (vmDetails() != null) { + vmDetails().forEach(e -> e.validate()); + } if (errors() != null) { errors().validate(); } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapAvailabilityZoneDetailsResultInner.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapAvailabilityZoneDetailsResultInner.java index 1fb1de1c4bcec..d9f76ccef12cd 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapAvailabilityZoneDetailsResultInner.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapAvailabilityZoneDetailsResultInner.java @@ -18,6 +18,10 @@ public final class SapAvailabilityZoneDetailsResultInner { @JsonProperty(value = "availabilityZonePairs") private List availabilityZonePairs; + /** Creates an instance of SapAvailabilityZoneDetailsResultInner class. */ + public SapAvailabilityZoneDetailsResultInner() { + } + /** * Get the availabilityZonePairs property: Gets the list of availability zone pairs. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapCentralServerInstanceInner.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapCentralServerInstanceInner.java index e29c48d3ca4a0..73e7d5d91b285 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapCentralServerInstanceInner.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapCentralServerInstanceInner.java @@ -11,6 +11,7 @@ import com.azure.resourcemanager.workloads.models.EnqueueReplicationServerProperties; import com.azure.resourcemanager.workloads.models.EnqueueServerProperties; import com.azure.resourcemanager.workloads.models.GatewayServerProperties; +import com.azure.resourcemanager.workloads.models.LoadBalancerDetails; import com.azure.resourcemanager.workloads.models.MessageServerProperties; import com.azure.resourcemanager.workloads.models.SapHealthState; import com.azure.resourcemanager.workloads.models.SapVirtualInstanceError; @@ -20,24 +21,27 @@ import java.util.List; import java.util.Map; -/** Define the SAP Central Server Instance. */ +/** Define the SAP Central Services Instance resource. */ @Fluent public final class SapCentralServerInstanceInner extends Resource { /* - * Defines the SAP Central Server properties. + * Defines the SAP Central Services Instance properties. */ @JsonProperty(value = "properties") private SapCentralServerProperties innerProperties; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /** Creates an instance of SapCentralServerInstanceInner class. */ + public SapCentralServerInstanceInner() { + } + /** - * Get the innerProperties property: Defines the SAP Central Server properties. + * Get the innerProperties property: Defines the SAP Central Services Instance properties. * * @return the innerProperties value. */ @@ -69,7 +73,7 @@ public SapCentralServerInstanceInner withTags(Map tags) { } /** - * Get the instanceNo property: The central server instance id. + * Get the instanceNo property: The central services instance number. * * @return the instanceNo value. */ @@ -78,7 +82,7 @@ public String instanceNo() { } /** - * Get the subnet property: The central server subnet. + * Get the subnet property: The central services instance subnet. * * @return the subnet value. */ @@ -87,7 +91,7 @@ public String subnet() { } /** - * Get the messageServerProperties property: Defines the SAP message server properties. + * Get the messageServerProperties property: Defines the SAP Message Server properties. * * @return the messageServerProperties value. */ @@ -96,7 +100,7 @@ public MessageServerProperties messageServerProperties() { } /** - * Set the messageServerProperties property: Defines the SAP message server properties. + * Set the messageServerProperties property: Defines the SAP Message Server properties. * * @param messageServerProperties the messageServerProperties value to set. * @return the SapCentralServerInstanceInner object itself. @@ -110,7 +114,7 @@ public SapCentralServerInstanceInner withMessageServerProperties(MessageServerPr } /** - * Get the enqueueServerProperties property: Defines the SAP enqueue server properties. + * Get the enqueueServerProperties property: Defines the SAP Enqueue Server properties. * * @return the enqueueServerProperties value. */ @@ -119,7 +123,7 @@ public EnqueueServerProperties enqueueServerProperties() { } /** - * Set the enqueueServerProperties property: Defines the SAP enqueue server properties. + * Set the enqueueServerProperties property: Defines the SAP Enqueue Server properties. * * @param enqueueServerProperties the enqueueServerProperties value to set. * @return the SapCentralServerInstanceInner object itself. @@ -156,7 +160,7 @@ public SapCentralServerInstanceInner withGatewayServerProperties(GatewayServerPr } /** - * Get the enqueueReplicationServerProperties property: Defines the SAP ERS Server properties. + * Get the enqueueReplicationServerProperties property: Defines the SAP Enqueue Replication Server (ERS) properties. * * @return the enqueueReplicationServerProperties value. */ @@ -165,7 +169,7 @@ public EnqueueReplicationServerProperties enqueueReplicationServerProperties() { } /** - * Set the enqueueReplicationServerProperties property: Defines the SAP ERS Server properties. + * Set the enqueueReplicationServerProperties property: Defines the SAP Enqueue Replication Server (ERS) properties. * * @param enqueueReplicationServerProperties the enqueueReplicationServerProperties value to set. * @return the SapCentralServerInstanceInner object itself. @@ -180,7 +184,7 @@ public SapCentralServerInstanceInner withEnqueueReplicationServerProperties( } /** - * Get the kernelVersion property: The central server kernel version. + * Get the kernelVersion property: The central services instance Kernel Version. * * @return the kernelVersion value. */ @@ -189,7 +193,7 @@ public String kernelVersion() { } /** - * Get the kernelPatch property: The central server kernel patch. + * Get the kernelPatch property: The central services instance Kernel Patch level. * * @return the kernelPatch value. */ @@ -198,7 +202,17 @@ public String kernelPatch() { } /** - * Get the vmDetails property: The list of virtual machines. + * Get the loadBalancerDetails property: The Load Balancer details such as LoadBalancer ID attached to ASCS Virtual + * Machines. + * + * @return the loadBalancerDetails value. + */ + public LoadBalancerDetails loadBalancerDetails() { + return this.innerProperties() == null ? null : this.innerProperties().loadBalancerDetails(); + } + + /** + * Get the vmDetails property: The list of virtual machines corresponding to the Central Services instance. * * @return the vmDetails value. */ @@ -216,7 +230,7 @@ public SapVirtualInstanceStatus status() { } /** - * Get the health property: Defines the SAP Instance health. + * Get the health property: Defines the health of SAP Instances. * * @return the health value. */ @@ -234,7 +248,7 @@ public SapVirtualInstanceProvisioningState provisioningState() { } /** - * Get the errors property: Defines the Central Instance errors. + * Get the errors property: Defines the errors related to SAP Central Services Instance resource. * * @return the errors value. */ diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapCentralServerProperties.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapCentralServerProperties.java index d8fdca9d94c0a..e4d78073d6132 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapCentralServerProperties.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapCentralServerProperties.java @@ -9,6 +9,7 @@ import com.azure.resourcemanager.workloads.models.EnqueueReplicationServerProperties; import com.azure.resourcemanager.workloads.models.EnqueueServerProperties; import com.azure.resourcemanager.workloads.models.GatewayServerProperties; +import com.azure.resourcemanager.workloads.models.LoadBalancerDetails; import com.azure.resourcemanager.workloads.models.MessageServerProperties; import com.azure.resourcemanager.workloads.models.SapHealthState; import com.azure.resourcemanager.workloads.models.SapVirtualInstanceError; @@ -17,29 +18,29 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Defines the SAP Central Server properties. */ +/** Defines the SAP Central Services Instance properties. */ @Fluent public final class SapCentralServerProperties { /* - * The central server instance id. + * The central services instance number. */ @JsonProperty(value = "instanceNo", access = JsonProperty.Access.WRITE_ONLY) private String instanceNo; /* - * The central server subnet. + * The central services instance subnet. */ @JsonProperty(value = "subnet", access = JsonProperty.Access.WRITE_ONLY) private String subnet; /* - * Defines the SAP message server properties. + * Defines the SAP Message Server properties. */ @JsonProperty(value = "messageServerProperties") private MessageServerProperties messageServerProperties; /* - * Defines the SAP enqueue server properties. + * Defines the SAP Enqueue Server properties. */ @JsonProperty(value = "enqueueServerProperties") private EnqueueServerProperties enqueueServerProperties; @@ -51,25 +52,31 @@ public final class SapCentralServerProperties { private GatewayServerProperties gatewayServerProperties; /* - * Defines the SAP ERS Server properties. + * Defines the SAP Enqueue Replication Server (ERS) properties. */ @JsonProperty(value = "enqueueReplicationServerProperties") private EnqueueReplicationServerProperties enqueueReplicationServerProperties; /* - * The central server kernel version. + * The central services instance Kernel Version. */ @JsonProperty(value = "kernelVersion", access = JsonProperty.Access.WRITE_ONLY) private String kernelVersion; /* - * The central server kernel patch. + * The central services instance Kernel Patch level. */ @JsonProperty(value = "kernelPatch", access = JsonProperty.Access.WRITE_ONLY) private String kernelPatch; /* - * The list of virtual machines. + * The Load Balancer details such as LoadBalancer ID attached to ASCS Virtual Machines + */ + @JsonProperty(value = "loadBalancerDetails", access = JsonProperty.Access.WRITE_ONLY) + private LoadBalancerDetails loadBalancerDetails; + + /* + * The list of virtual machines corresponding to the Central Services instance. */ @JsonProperty(value = "vmDetails", access = JsonProperty.Access.WRITE_ONLY) private List vmDetails; @@ -81,7 +88,7 @@ public final class SapCentralServerProperties { private SapVirtualInstanceStatus status; /* - * Defines the SAP Instance health. + * Defines the health of SAP Instances. */ @JsonProperty(value = "health", access = JsonProperty.Access.WRITE_ONLY) private SapHealthState health; @@ -93,13 +100,17 @@ public final class SapCentralServerProperties { private SapVirtualInstanceProvisioningState provisioningState; /* - * Defines the Central Instance errors. + * Defines the errors related to SAP Central Services Instance resource. */ @JsonProperty(value = "errors", access = JsonProperty.Access.WRITE_ONLY) private SapVirtualInstanceError errors; + /** Creates an instance of SapCentralServerProperties class. */ + public SapCentralServerProperties() { + } + /** - * Get the instanceNo property: The central server instance id. + * Get the instanceNo property: The central services instance number. * * @return the instanceNo value. */ @@ -108,7 +119,7 @@ public String instanceNo() { } /** - * Get the subnet property: The central server subnet. + * Get the subnet property: The central services instance subnet. * * @return the subnet value. */ @@ -117,7 +128,7 @@ public String subnet() { } /** - * Get the messageServerProperties property: Defines the SAP message server properties. + * Get the messageServerProperties property: Defines the SAP Message Server properties. * * @return the messageServerProperties value. */ @@ -126,7 +137,7 @@ public MessageServerProperties messageServerProperties() { } /** - * Set the messageServerProperties property: Defines the SAP message server properties. + * Set the messageServerProperties property: Defines the SAP Message Server properties. * * @param messageServerProperties the messageServerProperties value to set. * @return the SapCentralServerProperties object itself. @@ -137,7 +148,7 @@ public SapCentralServerProperties withMessageServerProperties(MessageServerPrope } /** - * Get the enqueueServerProperties property: Defines the SAP enqueue server properties. + * Get the enqueueServerProperties property: Defines the SAP Enqueue Server properties. * * @return the enqueueServerProperties value. */ @@ -146,7 +157,7 @@ public EnqueueServerProperties enqueueServerProperties() { } /** - * Set the enqueueServerProperties property: Defines the SAP enqueue server properties. + * Set the enqueueServerProperties property: Defines the SAP Enqueue Server properties. * * @param enqueueServerProperties the enqueueServerProperties value to set. * @return the SapCentralServerProperties object itself. @@ -177,7 +188,7 @@ public SapCentralServerProperties withGatewayServerProperties(GatewayServerPrope } /** - * Get the enqueueReplicationServerProperties property: Defines the SAP ERS Server properties. + * Get the enqueueReplicationServerProperties property: Defines the SAP Enqueue Replication Server (ERS) properties. * * @return the enqueueReplicationServerProperties value. */ @@ -186,7 +197,7 @@ public EnqueueReplicationServerProperties enqueueReplicationServerProperties() { } /** - * Set the enqueueReplicationServerProperties property: Defines the SAP ERS Server properties. + * Set the enqueueReplicationServerProperties property: Defines the SAP Enqueue Replication Server (ERS) properties. * * @param enqueueReplicationServerProperties the enqueueReplicationServerProperties value to set. * @return the SapCentralServerProperties object itself. @@ -198,7 +209,7 @@ public SapCentralServerProperties withEnqueueReplicationServerProperties( } /** - * Get the kernelVersion property: The central server kernel version. + * Get the kernelVersion property: The central services instance Kernel Version. * * @return the kernelVersion value. */ @@ -207,7 +218,7 @@ public String kernelVersion() { } /** - * Get the kernelPatch property: The central server kernel patch. + * Get the kernelPatch property: The central services instance Kernel Patch level. * * @return the kernelPatch value. */ @@ -216,7 +227,17 @@ public String kernelPatch() { } /** - * Get the vmDetails property: The list of virtual machines. + * Get the loadBalancerDetails property: The Load Balancer details such as LoadBalancer ID attached to ASCS Virtual + * Machines. + * + * @return the loadBalancerDetails value. + */ + public LoadBalancerDetails loadBalancerDetails() { + return this.loadBalancerDetails; + } + + /** + * Get the vmDetails property: The list of virtual machines corresponding to the Central Services instance. * * @return the vmDetails value. */ @@ -234,7 +255,7 @@ public SapVirtualInstanceStatus status() { } /** - * Get the health property: Defines the SAP Instance health. + * Get the health property: Defines the health of SAP Instances. * * @return the health value. */ @@ -252,7 +273,7 @@ public SapVirtualInstanceProvisioningState provisioningState() { } /** - * Get the errors property: Defines the Central Instance errors. + * Get the errors property: Defines the errors related to SAP Central Services Instance resource. * * @return the errors value. */ @@ -278,6 +299,9 @@ public void validate() { if (enqueueReplicationServerProperties() != null) { enqueueReplicationServerProperties().validate(); } + if (loadBalancerDetails() != null) { + loadBalancerDetails().validate(); + } if (vmDetails() != null) { vmDetails().forEach(e -> e.validate()); } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapDatabaseInstanceInner.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapDatabaseInstanceInner.java index ec6ff25a8927f..297adc819c989 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapDatabaseInstanceInner.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapDatabaseInstanceInner.java @@ -8,6 +8,7 @@ import com.azure.core.management.Resource; import com.azure.core.management.SystemData; import com.azure.resourcemanager.workloads.models.DatabaseVmDetails; +import com.azure.resourcemanager.workloads.models.LoadBalancerDetails; import com.azure.resourcemanager.workloads.models.SapVirtualInstanceError; import com.azure.resourcemanager.workloads.models.SapVirtualInstanceProvisioningState; import com.azure.resourcemanager.workloads.models.SapVirtualInstanceStatus; @@ -15,24 +16,27 @@ import java.util.List; import java.util.Map; -/** Define the SAP Database Instance. */ +/** Define the Database resource. */ @Fluent public final class SapDatabaseInstanceInner extends Resource { /* - * Defines the SAP Database properties. + * Defines the Database properties. */ @JsonProperty(value = "properties") private SapDatabaseProperties innerProperties; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /** Creates an instance of SapDatabaseInstanceInner class. */ + public SapDatabaseInstanceInner() { + } + /** - * Get the innerProperties property: Defines the SAP Database properties. + * Get the innerProperties property: Defines the Database properties. * * @return the innerProperties value. */ @@ -64,7 +68,7 @@ public SapDatabaseInstanceInner withTags(Map tags) { } /** - * Get the subnet property: The database subnet. + * Get the subnet property: Database subnet. * * @return the subnet value. */ @@ -73,7 +77,7 @@ public String subnet() { } /** - * Get the databaseSid property: The database SID. + * Get the databaseSid property: Database SID name. * * @return the databaseSid value. */ @@ -82,7 +86,8 @@ public String databaseSid() { } /** - * Get the databaseType property: The SAP database type. + * Get the databaseType property: Database type, that is if the DB is HANA, DB2, Oracle, SAP ASE, Max DB or MS SQL + * Server. * * @return the databaseType value. */ @@ -91,7 +96,7 @@ public String databaseType() { } /** - * Get the ipAddress property: The database IP Address. + * Get the ipAddress property: Database IP Address. * * @return the ipAddress value. */ @@ -100,7 +105,17 @@ public String ipAddress() { } /** - * Get the vmDetails property: The list of virtual machines. + * Get the loadBalancerDetails property: The Load Balancer details such as LoadBalancer ID attached to Database + * Virtual Machines. + * + * @return the loadBalancerDetails value. + */ + public LoadBalancerDetails loadBalancerDetails() { + return this.innerProperties() == null ? null : this.innerProperties().loadBalancerDetails(); + } + + /** + * Get the vmDetails property: The list of virtual machines corresponding to the Database resource. * * @return the vmDetails value. */ @@ -127,7 +142,7 @@ public SapVirtualInstanceProvisioningState provisioningState() { } /** - * Get the errors property: Defines the Database Instance errors. + * Get the errors property: Defines the errors related to Database resource. * * @return the errors value. */ diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapDatabaseProperties.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapDatabaseProperties.java index c658637718395..72dafff00b386 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapDatabaseProperties.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapDatabaseProperties.java @@ -6,41 +6,48 @@ import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.workloads.models.DatabaseVmDetails; +import com.azure.resourcemanager.workloads.models.LoadBalancerDetails; import com.azure.resourcemanager.workloads.models.SapVirtualInstanceError; import com.azure.resourcemanager.workloads.models.SapVirtualInstanceProvisioningState; import com.azure.resourcemanager.workloads.models.SapVirtualInstanceStatus; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Defines the SAP Database properties. */ +/** Defines the Database properties. */ @Immutable public final class SapDatabaseProperties { /* - * The database subnet. + * Database subnet. */ @JsonProperty(value = "subnet", access = JsonProperty.Access.WRITE_ONLY) private String subnet; /* - * The database SID. + * Database SID name. */ @JsonProperty(value = "databaseSid", access = JsonProperty.Access.WRITE_ONLY) private String databaseSid; /* - * The SAP database type. + * Database type, that is if the DB is HANA, DB2, Oracle, SAP ASE, Max DB or MS SQL Server. */ @JsonProperty(value = "databaseType", access = JsonProperty.Access.WRITE_ONLY) private String databaseType; /* - * The database IP Address. + * Database IP Address. */ @JsonProperty(value = "ipAddress", access = JsonProperty.Access.WRITE_ONLY) private String ipAddress; /* - * The list of virtual machines. + * The Load Balancer details such as LoadBalancer ID attached to Database Virtual Machines + */ + @JsonProperty(value = "loadBalancerDetails", access = JsonProperty.Access.WRITE_ONLY) + private LoadBalancerDetails loadBalancerDetails; + + /* + * The list of virtual machines corresponding to the Database resource. */ @JsonProperty(value = "vmDetails", access = JsonProperty.Access.WRITE_ONLY) private List vmDetails; @@ -58,13 +65,17 @@ public final class SapDatabaseProperties { private SapVirtualInstanceProvisioningState provisioningState; /* - * Defines the Database Instance errors. + * Defines the errors related to Database resource. */ @JsonProperty(value = "errors", access = JsonProperty.Access.WRITE_ONLY) private SapVirtualInstanceError errors; + /** Creates an instance of SapDatabaseProperties class. */ + public SapDatabaseProperties() { + } + /** - * Get the subnet property: The database subnet. + * Get the subnet property: Database subnet. * * @return the subnet value. */ @@ -73,7 +84,7 @@ public String subnet() { } /** - * Get the databaseSid property: The database SID. + * Get the databaseSid property: Database SID name. * * @return the databaseSid value. */ @@ -82,7 +93,8 @@ public String databaseSid() { } /** - * Get the databaseType property: The SAP database type. + * Get the databaseType property: Database type, that is if the DB is HANA, DB2, Oracle, SAP ASE, Max DB or MS SQL + * Server. * * @return the databaseType value. */ @@ -91,7 +103,7 @@ public String databaseType() { } /** - * Get the ipAddress property: The database IP Address. + * Get the ipAddress property: Database IP Address. * * @return the ipAddress value. */ @@ -100,7 +112,17 @@ public String ipAddress() { } /** - * Get the vmDetails property: The list of virtual machines. + * Get the loadBalancerDetails property: The Load Balancer details such as LoadBalancer ID attached to Database + * Virtual Machines. + * + * @return the loadBalancerDetails value. + */ + public LoadBalancerDetails loadBalancerDetails() { + return this.loadBalancerDetails; + } + + /** + * Get the vmDetails property: The list of virtual machines corresponding to the Database resource. * * @return the vmDetails value. */ @@ -127,7 +149,7 @@ public SapVirtualInstanceProvisioningState provisioningState() { } /** - * Get the errors property: Defines the Database Instance errors. + * Get the errors property: Defines the errors related to Database resource. * * @return the errors value. */ @@ -141,6 +163,9 @@ public SapVirtualInstanceError errors() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (loadBalancerDetails() != null) { + loadBalancerDetails().validate(); + } if (vmDetails() != null) { vmDetails().forEach(e -> e.validate()); } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapDiskConfigurationsResultInner.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapDiskConfigurationsResultInner.java index f736eb9f7f78b..58f12f42a97d4 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapDiskConfigurationsResultInner.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapDiskConfigurationsResultInner.java @@ -6,35 +6,45 @@ import com.azure.core.annotation.Fluent; import com.azure.resourcemanager.workloads.models.SapDiskConfiguration; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; +import java.util.Map; /** The list of disk configuration for vmSku which are part of SAP deployment. */ @Fluent public final class SapDiskConfigurationsResultInner { /* - * Gets the list of Disk Configurations. + * The disk configuration for the db volume. For HANA, Required volumes are: ['hana/data', 'hana/log', + * hana/shared', 'usr/sap', 'os'], Optional volume : ['backup']. */ - @JsonProperty(value = "diskConfigurations") - private List diskConfigurations; + @JsonProperty(value = "volumeConfigurations") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map volumeConfigurations; + + /** Creates an instance of SapDiskConfigurationsResultInner class. */ + public SapDiskConfigurationsResultInner() { + } /** - * Get the diskConfigurations property: Gets the list of Disk Configurations. + * Get the volumeConfigurations property: The disk configuration for the db volume. For HANA, Required volumes are: + * ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os'], Optional volume : ['backup']. * - * @return the diskConfigurations value. + * @return the volumeConfigurations value. */ - public List diskConfigurations() { - return this.diskConfigurations; + public Map volumeConfigurations() { + return this.volumeConfigurations; } /** - * Set the diskConfigurations property: Gets the list of Disk Configurations. + * Set the volumeConfigurations property: The disk configuration for the db volume. For HANA, Required volumes are: + * ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os'], Optional volume : ['backup']. * - * @param diskConfigurations the diskConfigurations value to set. + * @param volumeConfigurations the volumeConfigurations value to set. * @return the SapDiskConfigurationsResultInner object itself. */ - public SapDiskConfigurationsResultInner withDiskConfigurations(List diskConfigurations) { - this.diskConfigurations = diskConfigurations; + public SapDiskConfigurationsResultInner withVolumeConfigurations( + Map volumeConfigurations) { + this.volumeConfigurations = volumeConfigurations; return this; } @@ -44,8 +54,15 @@ public SapDiskConfigurationsResultInner withDiskConfigurations(List e.validate()); + if (volumeConfigurations() != null) { + volumeConfigurations() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); } } } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapLandscapeMonitorInner.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapLandscapeMonitorInner.java new file mode 100644 index 0000000000000..be8cbc10ad774 --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapLandscapeMonitorInner.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.workloads.models.SapLandscapeMonitorMetricThresholds; +import com.azure.resourcemanager.workloads.models.SapLandscapeMonitorPropertiesGrouping; +import com.azure.resourcemanager.workloads.models.SapLandscapeMonitorProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** configuration associated with SAP Landscape Monitor Dashboard. */ +@Fluent +public final class SapLandscapeMonitorInner extends ProxyResource { + /* + * Sap Landscape Monitor properties + */ + @JsonProperty(value = "properties") + private SapLandscapeMonitorProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of SapLandscapeMonitorInner class. */ + public SapLandscapeMonitorInner() { + } + + /** + * Get the innerProperties property: Sap Landscape Monitor properties. + * + * @return the innerProperties value. + */ + private SapLandscapeMonitorProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the provisioningState property: State of provisioning of the SAP monitor. + * + * @return the provisioningState value. + */ + public SapLandscapeMonitorProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the grouping property: Gets or sets the SID groupings by landscape and Environment. + * + * @return the grouping value. + */ + public SapLandscapeMonitorPropertiesGrouping grouping() { + return this.innerProperties() == null ? null : this.innerProperties().grouping(); + } + + /** + * Set the grouping property: Gets or sets the SID groupings by landscape and Environment. + * + * @param grouping the grouping value to set. + * @return the SapLandscapeMonitorInner object itself. + */ + public SapLandscapeMonitorInner withGrouping(SapLandscapeMonitorPropertiesGrouping grouping) { + if (this.innerProperties() == null) { + this.innerProperties = new SapLandscapeMonitorProperties(); + } + this.innerProperties().withGrouping(grouping); + return this; + } + + /** + * Get the topMetricsThresholds property: Gets or sets the list Top Metric Thresholds for SAP Landscape Monitor + * Dashboard. + * + * @return the topMetricsThresholds value. + */ + public List topMetricsThresholds() { + return this.innerProperties() == null ? null : this.innerProperties().topMetricsThresholds(); + } + + /** + * Set the topMetricsThresholds property: Gets or sets the list Top Metric Thresholds for SAP Landscape Monitor + * Dashboard. + * + * @param topMetricsThresholds the topMetricsThresholds value to set. + * @return the SapLandscapeMonitorInner object itself. + */ + public SapLandscapeMonitorInner withTopMetricsThresholds( + List topMetricsThresholds) { + if (this.innerProperties() == null) { + this.innerProperties = new SapLandscapeMonitorProperties(); + } + this.innerProperties().withTopMetricsThresholds(topMetricsThresholds); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapLandscapeMonitorListResultInner.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapLandscapeMonitorListResultInner.java new file mode 100644 index 0000000000000..913ca74547993 --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapLandscapeMonitorListResultInner.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The response from the List SAP Landscape Monitor Dashboard operation. */ +@Fluent +public final class SapLandscapeMonitorListResultInner { + /* + * The list of Sap Landscape Monitor configuration. + */ + @JsonProperty(value = "value") + private List value; + + /* + * The URL to get the next set of SAP Landscape Monitor Dashboard. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of SapLandscapeMonitorListResultInner class. */ + public SapLandscapeMonitorListResultInner() { + } + + /** + * Get the value property: The list of Sap Landscape Monitor configuration. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The list of Sap Landscape Monitor configuration. + * + * @param value the value value to set. + * @return the SapLandscapeMonitorListResultInner object itself. + */ + public SapLandscapeMonitorListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to get the next set of SAP Landscape Monitor Dashboard. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The URL to get the next set of SAP Landscape Monitor Dashboard. + * + * @param nextLink the nextLink value to set. + * @return the SapLandscapeMonitorListResultInner object itself. + */ + public SapLandscapeMonitorListResultInner 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) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapLandscapeMonitorProperties.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapLandscapeMonitorProperties.java new file mode 100644 index 0000000000000..9be9f21580565 --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapLandscapeMonitorProperties.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.workloads.models.SapLandscapeMonitorMetricThresholds; +import com.azure.resourcemanager.workloads.models.SapLandscapeMonitorPropertiesGrouping; +import com.azure.resourcemanager.workloads.models.SapLandscapeMonitorProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Gets or sets the properties for Sap Landscape Monitor Dashboard. */ +@Fluent +public final class SapLandscapeMonitorProperties { + /* + * State of provisioning of the SAP monitor. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private SapLandscapeMonitorProvisioningState provisioningState; + + /* + * Gets or sets the SID groupings by landscape and Environment. + */ + @JsonProperty(value = "grouping") + private SapLandscapeMonitorPropertiesGrouping grouping; + + /* + * Gets or sets the list Top Metric Thresholds for SAP Landscape Monitor Dashboard + */ + @JsonProperty(value = "topMetricsThresholds") + private List topMetricsThresholds; + + /** Creates an instance of SapLandscapeMonitorProperties class. */ + public SapLandscapeMonitorProperties() { + } + + /** + * Get the provisioningState property: State of provisioning of the SAP monitor. + * + * @return the provisioningState value. + */ + public SapLandscapeMonitorProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the grouping property: Gets or sets the SID groupings by landscape and Environment. + * + * @return the grouping value. + */ + public SapLandscapeMonitorPropertiesGrouping grouping() { + return this.grouping; + } + + /** + * Set the grouping property: Gets or sets the SID groupings by landscape and Environment. + * + * @param grouping the grouping value to set. + * @return the SapLandscapeMonitorProperties object itself. + */ + public SapLandscapeMonitorProperties withGrouping(SapLandscapeMonitorPropertiesGrouping grouping) { + this.grouping = grouping; + return this; + } + + /** + * Get the topMetricsThresholds property: Gets or sets the list Top Metric Thresholds for SAP Landscape Monitor + * Dashboard. + * + * @return the topMetricsThresholds value. + */ + public List topMetricsThresholds() { + return this.topMetricsThresholds; + } + + /** + * Set the topMetricsThresholds property: Gets or sets the list Top Metric Thresholds for SAP Landscape Monitor + * Dashboard. + * + * @param topMetricsThresholds the topMetricsThresholds value to set. + * @return the SapLandscapeMonitorProperties object itself. + */ + public SapLandscapeMonitorProperties withTopMetricsThresholds( + List topMetricsThresholds) { + this.topMetricsThresholds = topMetricsThresholds; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (grouping() != null) { + grouping().validate(); + } + if (topMetricsThresholds() != null) { + topMetricsThresholds().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapSizingRecommendationResultInner.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapSizingRecommendationResultInner.java index 9682dd90d4dde..352fb140eed62 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapSizingRecommendationResultInner.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapSizingRecommendationResultInner.java @@ -24,6 +24,10 @@ }) @Immutable public class SapSizingRecommendationResultInner { + /** Creates an instance of SapSizingRecommendationResultInner class. */ + public SapSizingRecommendationResultInner() { + } + /** * Validates the instance. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapSupportedResourceSkusResultInner.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapSupportedResourceSkusResultInner.java index e670708a56a24..db246502d4d57 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapSupportedResourceSkusResultInner.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapSupportedResourceSkusResultInner.java @@ -18,6 +18,10 @@ public final class SapSupportedResourceSkusResultInner { @JsonProperty(value = "supportedSkus") private List supportedSkus; + /** Creates an instance of SapSupportedResourceSkusResultInner class. */ + public SapSupportedResourceSkusResultInner() { + } + /** * Get the supportedSkus property: Gets the list of SAP supported SKUs. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapVirtualInstanceInner.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapVirtualInstanceInner.java index 2b2e4d95186d9..a4349f3f3d614 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapVirtualInstanceInner.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapVirtualInstanceInner.java @@ -21,7 +21,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Define the Virtual Instance for SAP. */ +/** Define the Virtual Instance for SAP solutions resource. */ @Fluent public final class SapVirtualInstanceInner extends Resource { /* @@ -31,18 +31,21 @@ public final class SapVirtualInstanceInner extends Resource { private UserAssignedServiceIdentity identity; /* - * Defines the Virtual Instance for SAP properties. + * Defines the Virtual Instance for SAP solutions resource properties. */ @JsonProperty(value = "properties", required = true) private SapVirtualInstanceProperties innerProperties = new SapVirtualInstanceProperties(); /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /** Creates an instance of SapVirtualInstanceInner class. */ + public SapVirtualInstanceInner() { + } + /** * Get the identity property: Managed service identity (user assigned identities). * @@ -64,7 +67,7 @@ public SapVirtualInstanceInner withIdentity(UserAssignedServiceIdentity identity } /** - * Get the innerProperties property: Defines the Virtual Instance for SAP properties. + * Get the innerProperties property: Defines the Virtual Instance for SAP solutions resource properties. * * @return the innerProperties value. */ @@ -142,8 +145,8 @@ public SapVirtualInstanceInner withSapProduct(SapProductType sapProduct) { } /** - * Get the configuration property: Defines if an existing SAP system is being registered or a new SAP system is - * being created. + * Get the configuration property: Defines if the SAP system is being created using Azure Center for SAP solutions + * (ACSS) or if an existing SAP system is being registered with ACSS. * * @return the configuration value. */ @@ -152,8 +155,8 @@ public SapConfiguration configuration() { } /** - * Set the configuration property: Defines if an existing SAP system is being registered or a new SAP system is - * being created. + * Set the configuration property: Defines if the SAP system is being created using Azure Center for SAP solutions + * (ACSS) or if an existing SAP system is being registered with ACSS. * * @param configuration the configuration value to set. * @return the SapVirtualInstanceInner object itself. @@ -200,7 +203,7 @@ public SapVirtualInstanceStatus status() { } /** - * Get the health property: Defines the SAP Instance health. + * Get the health property: Defines the health of SAP Instances. * * @return the health value. */ @@ -227,7 +230,7 @@ public SapVirtualInstanceProvisioningState provisioningState() { } /** - * Get the errors property: Defines the Virtual Instance for SAP errors. + * Get the errors property: Indicates any errors on the Virtual Instance for SAP solutions resource. * * @return the errors value. */ diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapVirtualInstanceProperties.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapVirtualInstanceProperties.java index 2ea0106371a85..5f68faa5ff1ff 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapVirtualInstanceProperties.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SapVirtualInstanceProperties.java @@ -17,7 +17,7 @@ import com.azure.resourcemanager.workloads.models.SapVirtualInstanceStatus; import com.fasterxml.jackson.annotation.JsonProperty; -/** Defines the Virtual Instance for SAP properties. */ +/** Defines the Virtual Instance for SAP solutions resource properties. */ @Fluent public final class SapVirtualInstanceProperties { /* @@ -33,8 +33,8 @@ public final class SapVirtualInstanceProperties { private SapProductType sapProduct; /* - * Defines if an existing SAP system is being registered or a new SAP - * system is being created + * Defines if the SAP system is being created using Azure Center for SAP solutions (ACSS) or if an existing SAP + * system is being registered with ACSS */ @JsonProperty(value = "configuration", required = true) private SapConfiguration configuration; @@ -52,7 +52,7 @@ public final class SapVirtualInstanceProperties { private SapVirtualInstanceStatus status; /* - * Defines the SAP Instance health. + * Defines the health of SAP Instances. */ @JsonProperty(value = "health", access = JsonProperty.Access.WRITE_ONLY) private SapHealthState health; @@ -70,11 +70,15 @@ public final class SapVirtualInstanceProperties { private SapVirtualInstanceProvisioningState provisioningState; /* - * Defines the Virtual Instance for SAP errors. + * Indicates any errors on the Virtual Instance for SAP solutions resource. */ @JsonProperty(value = "errors", access = JsonProperty.Access.WRITE_ONLY) private SapVirtualInstanceError errors; + /** Creates an instance of SapVirtualInstanceProperties class. */ + public SapVirtualInstanceProperties() { + } + /** * Get the environment property: Defines the environment type - Production/Non Production. * @@ -116,8 +120,8 @@ public SapVirtualInstanceProperties withSapProduct(SapProductType sapProduct) { } /** - * Get the configuration property: Defines if an existing SAP system is being registered or a new SAP system is - * being created. + * Get the configuration property: Defines if the SAP system is being created using Azure Center for SAP solutions + * (ACSS) or if an existing SAP system is being registered with ACSS. * * @return the configuration value. */ @@ -126,8 +130,8 @@ public SapConfiguration configuration() { } /** - * Set the configuration property: Defines if an existing SAP system is being registered or a new SAP system is - * being created. + * Set the configuration property: Defines if the SAP system is being created using Azure Center for SAP solutions + * (ACSS) or if an existing SAP system is being registered with ACSS. * * @param configuration the configuration value to set. * @return the SapVirtualInstanceProperties object itself. @@ -168,7 +172,7 @@ public SapVirtualInstanceStatus status() { } /** - * Get the health property: Defines the SAP Instance health. + * Get the health property: Defines the health of SAP Instances. * * @return the health value. */ @@ -195,7 +199,7 @@ public SapVirtualInstanceProvisioningState provisioningState() { } /** - * Get the errors property: Defines the Virtual Instance for SAP errors. + * Get the errors property: Indicates any errors on the Virtual Instance for SAP solutions resource. * * @return the errors value. */ diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SkuDefinitionInner.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SkuDefinitionInner.java deleted file mode 100644 index d6be559017953..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/SkuDefinitionInner.java +++ /dev/null @@ -1,373 +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.workloads.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.workloads.models.SkuCapability; -import com.azure.resourcemanager.workloads.models.SkuCost; -import com.azure.resourcemanager.workloads.models.SkuLocationAndZones; -import com.azure.resourcemanager.workloads.models.SkuRestriction; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The SKU definition. */ -@Fluent -public final class SkuDefinitionInner { - /* - * The name of the SKU. - */ - @JsonProperty(value = "name", required = true) - private String name; - - /* - * Resource type the SKU applicable for. - */ - @JsonProperty(value = "resourceType") - private String resourceType; - - /* - * This field is required to be implemented by the Resource Provider if the - * service has more than one tier, but is not required on a PUT. - */ - @JsonProperty(value = "tier") - private String tier; - - /* - * The SKU size. When the name field is the combination of tier and some - * other value, this would be the standalone code. - */ - @JsonProperty(value = "size") - private String size; - - /* - * If the service has different generations of hardware, for the same SKU, - * then that can be captured here. - */ - @JsonProperty(value = "family") - private String family; - - /* - * If the service has different kinds of hardware, for the same SKU, then - * that can be captured here. - */ - @JsonProperty(value = "kind") - private String kind; - - /* - * List of locations where this SKU is available. - */ - @JsonProperty(value = "locations") - private List locations; - - /* - * List of locations where this SKU is available. - */ - @JsonProperty(value = "locationInfo") - private List locationInfo; - - /* - * If the SKU supports scale out/in then the capacity integer should be - * included. If scale out/in is not possible for the resource this may be - * omitted. - */ - @JsonProperty(value = "capacity") - private Object capacity; - - /* - * The SKU costs. - */ - @JsonProperty(value = "costs") - private List costs; - - /* - * The SKU capabilities. - */ - @JsonProperty(value = "capabilities") - private List capabilities; - - /* - * The SKU restrictions. - */ - @JsonProperty(value = "restrictions") - private List restrictions; - - /** - * Get the name property: The name of the SKU. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name of the SKU. - * - * @param name the name value to set. - * @return the SkuDefinitionInner object itself. - */ - public SkuDefinitionInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the resourceType property: Resource type the SKU applicable for. - * - * @return the resourceType value. - */ - public String resourceType() { - return this.resourceType; - } - - /** - * Set the resourceType property: Resource type the SKU applicable for. - * - * @param resourceType the resourceType value to set. - * @return the SkuDefinitionInner object itself. - */ - public SkuDefinitionInner withResourceType(String resourceType) { - this.resourceType = resourceType; - return this; - } - - /** - * Get the tier property: This field is required to be implemented by the Resource Provider if the service has more - * than one tier, but is not required on a PUT. - * - * @return the tier value. - */ - public String tier() { - return this.tier; - } - - /** - * Set the tier property: This field is required to be implemented by the Resource Provider if the service has more - * than one tier, but is not required on a PUT. - * - * @param tier the tier value to set. - * @return the SkuDefinitionInner object itself. - */ - public SkuDefinitionInner withTier(String tier) { - this.tier = tier; - return this; - } - - /** - * Get the size property: The SKU size. When the name field is the combination of tier and some other value, this - * would be the standalone code. - * - * @return the size value. - */ - public String size() { - return this.size; - } - - /** - * Set the size property: The SKU size. When the name field is the combination of tier and some other value, this - * would be the standalone code. - * - * @param size the size value to set. - * @return the SkuDefinitionInner object itself. - */ - public SkuDefinitionInner withSize(String size) { - this.size = size; - return this; - } - - /** - * Get the family property: If the service has different generations of hardware, for the same SKU, then that can be - * captured here. - * - * @return the family value. - */ - public String family() { - return this.family; - } - - /** - * Set the family property: If the service has different generations of hardware, for the same SKU, then that can be - * captured here. - * - * @param family the family value to set. - * @return the SkuDefinitionInner object itself. - */ - public SkuDefinitionInner withFamily(String family) { - this.family = family; - return this; - } - - /** - * Get the kind property: If the service has different kinds of hardware, for the same SKU, then that can be - * captured here. - * - * @return the kind value. - */ - public String kind() { - return this.kind; - } - - /** - * Set the kind property: If the service has different kinds of hardware, for the same SKU, then that can be - * captured here. - * - * @param kind the kind value to set. - * @return the SkuDefinitionInner object itself. - */ - public SkuDefinitionInner withKind(String kind) { - this.kind = kind; - return this; - } - - /** - * Get the locations property: List of locations where this SKU is available. - * - * @return the locations value. - */ - public List locations() { - return this.locations; - } - - /** - * Set the locations property: List of locations where this SKU is available. - * - * @param locations the locations value to set. - * @return the SkuDefinitionInner object itself. - */ - public SkuDefinitionInner withLocations(List locations) { - this.locations = locations; - return this; - } - - /** - * Get the locationInfo property: List of locations where this SKU is available. - * - * @return the locationInfo value. - */ - public List locationInfo() { - return this.locationInfo; - } - - /** - * Set the locationInfo property: List of locations where this SKU is available. - * - * @param locationInfo the locationInfo value to set. - * @return the SkuDefinitionInner object itself. - */ - public SkuDefinitionInner withLocationInfo(List locationInfo) { - this.locationInfo = locationInfo; - return this; - } - - /** - * Get the capacity property: If the SKU supports scale out/in then the capacity integer should be included. If - * scale out/in is not possible for the resource this may be omitted. - * - * @return the capacity value. - */ - public Object capacity() { - return this.capacity; - } - - /** - * Set the capacity property: If the SKU supports scale out/in then the capacity integer should be included. If - * scale out/in is not possible for the resource this may be omitted. - * - * @param capacity the capacity value to set. - * @return the SkuDefinitionInner object itself. - */ - public SkuDefinitionInner withCapacity(Object capacity) { - this.capacity = capacity; - return this; - } - - /** - * Get the costs property: The SKU costs. - * - * @return the costs value. - */ - public List costs() { - return this.costs; - } - - /** - * Set the costs property: The SKU costs. - * - * @param costs the costs value to set. - * @return the SkuDefinitionInner object itself. - */ - public SkuDefinitionInner withCosts(List costs) { - this.costs = costs; - return this; - } - - /** - * Get the capabilities property: The SKU capabilities. - * - * @return the capabilities value. - */ - public List capabilities() { - return this.capabilities; - } - - /** - * Set the capabilities property: The SKU capabilities. - * - * @param capabilities the capabilities value to set. - * @return the SkuDefinitionInner object itself. - */ - public SkuDefinitionInner withCapabilities(List capabilities) { - this.capabilities = capabilities; - return this; - } - - /** - * Get the restrictions property: The SKU restrictions. - * - * @return the restrictions value. - */ - public List restrictions() { - return this.restrictions; - } - - /** - * Set the restrictions property: The SKU restrictions. - * - * @param restrictions the restrictions value to set. - * @return the SkuDefinitionInner object itself. - */ - public SkuDefinitionInner withRestrictions(List restrictions) { - this.restrictions = restrictions; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property name in model SkuDefinitionInner")); - } - if (locationInfo() != null) { - locationInfo().forEach(e -> e.validate()); - } - if (costs() != null) { - costs().forEach(e -> e.validate()); - } - if (capabilities() != null) { - capabilities().forEach(e -> e.validate()); - } - if (restrictions() != null) { - restrictions().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SkuDefinitionInner.class); -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/WordpressInstanceResourceInner.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/WordpressInstanceResourceInner.java deleted file mode 100644 index 532596c529a47..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/WordpressInstanceResourceInner.java +++ /dev/null @@ -1,128 +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.workloads.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.resourcemanager.workloads.models.ApplicationProvisioningState; -import com.azure.resourcemanager.workloads.models.WordpressVersions; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** WordPress instance resource. */ -@Fluent -public final class WordpressInstanceResourceInner extends ProxyResource { - /* - * Resource properties - */ - @JsonProperty(value = "properties") - private WordpressInstanceResourceProperties innerProperties; - - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private WordpressInstanceResourceProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the version property: Application version. - * - * @return the version value. - */ - public WordpressVersions version() { - return this.innerProperties() == null ? null : this.innerProperties().version(); - } - - /** - * Set the version property: Application version. - * - * @param version the version value to set. - * @return the WordpressInstanceResourceInner object itself. - */ - public WordpressInstanceResourceInner withVersion(WordpressVersions version) { - if (this.innerProperties() == null) { - this.innerProperties = new WordpressInstanceResourceProperties(); - } - this.innerProperties().withVersion(version); - return this; - } - - /** - * Get the databaseName property: Database name used by the application. - * - * @return the databaseName value. - */ - public String databaseName() { - return this.innerProperties() == null ? null : this.innerProperties().databaseName(); - } - - /** - * Set the databaseName property: Database name used by the application. - * - * @param databaseName the databaseName value to set. - * @return the WordpressInstanceResourceInner object itself. - */ - public WordpressInstanceResourceInner withDatabaseName(String databaseName) { - if (this.innerProperties() == null) { - this.innerProperties = new WordpressInstanceResourceProperties(); - } - this.innerProperties().withDatabaseName(databaseName); - return this; - } - - /** - * Get the databaseUser property: User name used by the application to connect to database. - * - * @return the databaseUser value. - */ - public String databaseUser() { - return this.innerProperties() == null ? null : this.innerProperties().databaseUser(); - } - - /** - * Set the databaseUser property: User name used by the application to connect to database. - * - * @param databaseUser the databaseUser value to set. - * @return the WordpressInstanceResourceInner object itself. - */ - public WordpressInstanceResourceInner withDatabaseUser(String databaseUser) { - if (this.innerProperties() == null) { - this.innerProperties = new WordpressInstanceResourceProperties(); - } - this.innerProperties().withDatabaseUser(databaseUser); - return this; - } - - /** - * Get the siteUrl property: Site Url to access the WordPress application. - * - * @return the siteUrl value. - */ - public String siteUrl() { - return this.innerProperties() == null ? null : this.innerProperties().siteUrl(); - } - - /** - * Get the provisioningState property: WordPress instance provisioning state. - * - * @return the provisioningState value. - */ - public ApplicationProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/WordpressInstanceResourceProperties.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/WordpressInstanceResourceProperties.java deleted file mode 100644 index e53546603543d..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/fluent/models/WordpressInstanceResourceProperties.java +++ /dev/null @@ -1,139 +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.workloads.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.workloads.models.ApplicationProvisioningState; -import com.azure.resourcemanager.workloads.models.WordpressVersions; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** WordPress instance properties. */ -@Fluent -public final class WordpressInstanceResourceProperties { - /* - * Application version - */ - @JsonProperty(value = "version", required = true) - private WordpressVersions version; - - /* - * Database name used by the application - */ - @JsonProperty(value = "databaseName") - private String databaseName; - - /* - * User name used by the application to connect to database - */ - @JsonProperty(value = "databaseUser") - private String databaseUser; - - /* - * Site Url to access the WordPress application - */ - @JsonProperty(value = "siteUrl", access = JsonProperty.Access.WRITE_ONLY) - private String siteUrl; - - /* - * WordPress instance provisioning state - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ApplicationProvisioningState provisioningState; - - /** - * Get the version property: Application version. - * - * @return the version value. - */ - public WordpressVersions version() { - return this.version; - } - - /** - * Set the version property: Application version. - * - * @param version the version value to set. - * @return the WordpressInstanceResourceProperties object itself. - */ - public WordpressInstanceResourceProperties withVersion(WordpressVersions version) { - this.version = version; - return this; - } - - /** - * Get the databaseName property: Database name used by the application. - * - * @return the databaseName value. - */ - public String databaseName() { - return this.databaseName; - } - - /** - * Set the databaseName property: Database name used by the application. - * - * @param databaseName the databaseName value to set. - * @return the WordpressInstanceResourceProperties object itself. - */ - public WordpressInstanceResourceProperties withDatabaseName(String databaseName) { - this.databaseName = databaseName; - return this; - } - - /** - * Get the databaseUser property: User name used by the application to connect to database. - * - * @return the databaseUser value. - */ - public String databaseUser() { - return this.databaseUser; - } - - /** - * Set the databaseUser property: User name used by the application to connect to database. - * - * @param databaseUser the databaseUser value to set. - * @return the WordpressInstanceResourceProperties object itself. - */ - public WordpressInstanceResourceProperties withDatabaseUser(String databaseUser) { - this.databaseUser = databaseUser; - return this; - } - - /** - * Get the siteUrl property: Site Url to access the WordPress application. - * - * @return the siteUrl value. - */ - public String siteUrl() { - return this.siteUrl; - } - - /** - * Get the provisioningState property: WordPress instance provisioning state. - * - * @return the provisioningState value. - */ - public ApplicationProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (version() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property version in model WordpressInstanceResourceProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(WordpressInstanceResourceProperties.class); -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/MonitorImpl.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/MonitorImpl.java index 7bee86f50735d..753da3f2929f1 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/MonitorImpl.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/MonitorImpl.java @@ -72,6 +72,10 @@ public RoutingPreference routingPreference() { return this.innerModel().routingPreference(); } + public String zoneRedundancyPreference() { + return this.innerModel().zoneRedundancyPreference(); + } + public ManagedRGConfiguration managedResourceGroupConfiguration() { return this.innerModel().managedResourceGroupConfiguration(); } @@ -88,6 +92,10 @@ public String msiArmId() { return this.innerModel().msiArmId(); } + public String storageAccountArmId() { + return this.innerModel().storageAccountArmId(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -235,6 +243,11 @@ public MonitorImpl withRoutingPreference(RoutingPreference routingPreference) { return this; } + public MonitorImpl withZoneRedundancyPreference(String zoneRedundancyPreference) { + this.innerModel().withZoneRedundancyPreference(zoneRedundancyPreference); + return this; + } + public MonitorImpl withManagedResourceGroupConfiguration(ManagedRGConfiguration managedResourceGroupConfiguration) { this.innerModel().withManagedResourceGroupConfiguration(managedResourceGroupConfiguration); return this; diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/MonitorsClientImpl.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/MonitorsClientImpl.java index b1e8d9c2caed9..62658a97ebf88 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/MonitorsClientImpl.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/MonitorsClientImpl.java @@ -65,7 +65,7 @@ public final class MonitorsClientImpl implements MonitorsClient { */ @Host("{$host}") @ServiceInterface(name = "WorkloadsClientMonit") - private interface MonitorsService { + public interface MonitorsService { @Headers({"Content-Type: application/json"}) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Workloads/monitors") @ExpectedResponses({200}) @@ -174,8 +174,10 @@ Mono> listByResourceGroupNext( } /** - * Gets a list of SAP monitors in the specified subscription. The operations returns various properties of each SAP - * monitor. + * Gets a list of SAP monitors in the specified subscription. + * + *

Gets a list of SAP monitors in the specified subscription. The operations returns various properties of each + * SAP monitor. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -220,8 +222,10 @@ private Mono> listSinglePageAsync() { } /** - * Gets a list of SAP monitors in the specified subscription. The operations returns various properties of each SAP - * monitor. + * Gets a list of SAP monitors in the specified subscription. + * + *

Gets a list of SAP monitors in the specified subscription. The operations returns various properties of each + * SAP monitor. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -265,8 +269,10 @@ private Mono> listSinglePageAsync(Context context) { } /** - * Gets a list of SAP monitors in the specified subscription. The operations returns various properties of each SAP - * monitor. + * Gets a list of SAP monitors in the specified subscription. + * + *

Gets a list of SAP monitors in the specified subscription. The operations returns various properties of each + * SAP monitor. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -278,8 +284,10 @@ private PagedFlux listAsync() { } /** - * Gets a list of SAP monitors in the specified subscription. The operations returns various properties of each SAP - * monitor. + * Gets a list of SAP monitors in the specified subscription. + * + *

Gets a list of SAP monitors in the specified subscription. The operations returns various properties of each + * SAP monitor. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -294,8 +302,10 @@ private PagedFlux listAsync(Context context) { } /** - * Gets a list of SAP monitors in the specified subscription. The operations returns various properties of each SAP - * monitor. + * Gets a list of SAP monitors in the specified subscription. + * + *

Gets a list of SAP monitors in the specified subscription. The operations returns various properties of each + * SAP monitor. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -307,8 +317,10 @@ public PagedIterable list() { } /** - * Gets a list of SAP monitors in the specified subscription. The operations returns various properties of each SAP - * monitor. + * Gets a list of SAP monitors in the specified subscription. + * + *

Gets a list of SAP monitors in the specified subscription. The operations returns various properties of each + * SAP monitor. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -322,7 +334,9 @@ public PagedIterable list(Context context) { } /** - * Gets a list of SAP monitors in the specified resource group. + * Gets a list of SAP monitors + * + *

Gets a list of SAP monitors in the specified resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -374,7 +388,9 @@ private Mono> listByResourceGroupSinglePageAsync(Str } /** - * Gets a list of SAP monitors in the specified resource group. + * Gets a list of SAP monitors + * + *

Gets a list of SAP monitors in the specified resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. @@ -425,7 +441,9 @@ private Mono> listByResourceGroupSinglePageAsync( } /** - * Gets a list of SAP monitors in the specified resource group. + * Gets a list of SAP monitors + * + *

Gets a list of SAP monitors in the specified resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -441,7 +459,9 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupNam } /** - * Gets a list of SAP monitors in the specified resource group. + * Gets a list of SAP monitors + * + *

Gets a list of SAP monitors in the specified resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. @@ -458,7 +478,9 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupNam } /** - * Gets a list of SAP monitors in the specified resource group. + * Gets a list of SAP monitors + * + *

Gets a list of SAP monitors in the specified resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -472,7 +494,9 @@ public PagedIterable listByResourceGroup(String resourceGroupName) } /** - * Gets a list of SAP monitors in the specified resource group. + * Gets a list of SAP monitors + * + *

Gets a list of SAP monitors in the specified resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. @@ -487,7 +511,9 @@ public PagedIterable listByResourceGroup(String resourceGroupName, } /** - * Gets properties of a SAP monitor for the specified subscription, resource group, and resource name. + * Gets properties of a SAP monitor. + * + *

Gets properties of a SAP monitor for the specified subscription, resource group, and resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -536,7 +562,9 @@ private Mono> getByResourceGroupWithResponseAsync( } /** - * Gets properties of a SAP monitor for the specified subscription, resource group, and resource name. + * Gets properties of a SAP monitor. + * + *

Gets properties of a SAP monitor for the specified subscription, resource group, and resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -583,7 +611,9 @@ private Mono> getByResourceGroupWithResponseAsync( } /** - * Gets properties of a SAP monitor for the specified subscription, resource group, and resource name. + * Gets properties of a SAP monitor. + * + *

Gets properties of a SAP monitor for the specified subscription, resource group, and resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -600,40 +630,46 @@ private Mono getByResourceGroupAsync(String resourceGroupName, Str } /** - * Gets properties of a SAP monitor for the specified subscription, resource group, and resource name. + * Gets properties of a SAP monitor. + * + *

Gets properties of a SAP monitor for the specified subscription, resource group, and resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor 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 properties of a SAP monitor for the specified subscription, resource group, and resource name. + * @return properties of a SAP monitor for the specified subscription, resource group, and resource name along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MonitorInner getByResourceGroup(String resourceGroupName, String monitorName) { - return getByResourceGroupAsync(resourceGroupName, monitorName).block(); + public Response getByResourceGroupWithResponse( + String resourceGroupName, String monitorName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, monitorName, context).block(); } /** - * Gets properties of a SAP monitor for the specified subscription, resource group, and resource name. + * Gets properties of a SAP monitor. + * + *

Gets properties of a SAP monitor for the specified subscription, resource group, and resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor 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 properties of a SAP monitor for the specified subscription, resource group, and resource name along with - * {@link Response}. + * @return properties of a SAP monitor for the specified subscription, resource group, and resource name. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String monitorName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, monitorName, context).block(); + public MonitorInner getByResourceGroup(String resourceGroupName, String monitorName) { + return getByResourceGroupWithResponse(resourceGroupName, monitorName, Context.NONE).getValue(); } /** - * Creates a SAP monitor for the specified subscription, resource group, and resource name. + * Creates a SAP monitor. + * + *

Creates a SAP monitor for the specified subscription, resource group, and resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -690,7 +726,9 @@ private Mono>> createWithResponseAsync( } /** - * Creates a SAP monitor for the specified subscription, resource group, and resource name. + * Creates a SAP monitor. + * + *

Creates a SAP monitor for the specified subscription, resource group, and resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -745,7 +783,9 @@ private Mono>> createWithResponseAsync( } /** - * Creates a SAP monitor for the specified subscription, resource group, and resource name. + * Creates a SAP monitor. + * + *

Creates a SAP monitor for the specified subscription, resource group, and resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -768,7 +808,9 @@ private PollerFlux, MonitorInner> beginCreateAsync( } /** - * Creates a SAP monitor for the specified subscription, resource group, and resource name. + * Creates a SAP monitor. + * + *

Creates a SAP monitor for the specified subscription, resource group, and resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -793,7 +835,9 @@ private PollerFlux, MonitorInner> beginCreateAsync( } /** - * Creates a SAP monitor for the specified subscription, resource group, and resource name. + * Creates a SAP monitor. + * + *

Creates a SAP monitor for the specified subscription, resource group, and resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -807,11 +851,13 @@ private PollerFlux, MonitorInner> beginCreateAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, MonitorInner> beginCreate( String resourceGroupName, String monitorName, MonitorInner monitorParameter) { - return beginCreateAsync(resourceGroupName, monitorName, monitorParameter).getSyncPoller(); + return this.beginCreateAsync(resourceGroupName, monitorName, monitorParameter).getSyncPoller(); } /** - * Creates a SAP monitor for the specified subscription, resource group, and resource name. + * Creates a SAP monitor. + * + *

Creates a SAP monitor for the specified subscription, resource group, and resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -826,11 +872,13 @@ public SyncPoller, MonitorInner> beginCreate( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, MonitorInner> beginCreate( String resourceGroupName, String monitorName, MonitorInner monitorParameter, Context context) { - return beginCreateAsync(resourceGroupName, monitorName, monitorParameter, context).getSyncPoller(); + return this.beginCreateAsync(resourceGroupName, monitorName, monitorParameter, context).getSyncPoller(); } /** - * Creates a SAP monitor for the specified subscription, resource group, and resource name. + * Creates a SAP monitor. + * + *

Creates a SAP monitor for the specified subscription, resource group, and resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -850,7 +898,9 @@ private Mono createAsync( } /** - * Creates a SAP monitor for the specified subscription, resource group, and resource name. + * Creates a SAP monitor. + * + *

Creates a SAP monitor for the specified subscription, resource group, and resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -871,7 +921,9 @@ private Mono createAsync( } /** - * Creates a SAP monitor for the specified subscription, resource group, and resource name. + * Creates a SAP monitor. + * + *

Creates a SAP monitor for the specified subscription, resource group, and resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -887,7 +939,9 @@ public MonitorInner create(String resourceGroupName, String monitorName, Monitor } /** - * Creates a SAP monitor for the specified subscription, resource group, and resource name. + * Creates a SAP monitor. + * + *

Creates a SAP monitor for the specified subscription, resource group, and resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -905,7 +959,9 @@ public MonitorInner create( } /** - * Deletes a SAP monitor with the specified subscription, resource group, and SAP monitor name. + * Deletes a SAP monitor. + * + *

Deletes a SAP monitor with the specified subscription, resource group, and SAP monitor name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -953,7 +1009,9 @@ private Mono>> deleteWithResponseAsync(String resource } /** - * Deletes a SAP monitor with the specified subscription, resource group, and SAP monitor name. + * Deletes a SAP monitor. + * + *

Deletes a SAP monitor with the specified subscription, resource group, and SAP monitor name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -1000,7 +1058,9 @@ private Mono>> deleteWithResponseAsync( } /** - * Deletes a SAP monitor with the specified subscription, resource group, and SAP monitor name. + * Deletes a SAP monitor. + * + *

Deletes a SAP monitor with the specified subscription, resource group, and SAP monitor name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -1024,7 +1084,9 @@ private PollerFlux, OperationStatusResult } /** - * Deletes a SAP monitor with the specified subscription, resource group, and SAP monitor name. + * Deletes a SAP monitor. + * + *

Deletes a SAP monitor with the specified subscription, resource group, and SAP monitor name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -1050,7 +1112,9 @@ private PollerFlux, OperationStatusResult } /** - * Deletes a SAP monitor with the specified subscription, resource group, and SAP monitor name. + * Deletes a SAP monitor. + * + *

Deletes a SAP monitor with the specified subscription, resource group, and SAP monitor name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -1062,11 +1126,13 @@ private PollerFlux, OperationStatusResult @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationStatusResultInner> beginDelete( String resourceGroupName, String monitorName) { - return beginDeleteAsync(resourceGroupName, monitorName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, monitorName).getSyncPoller(); } /** - * Deletes a SAP monitor with the specified subscription, resource group, and SAP monitor name. + * Deletes a SAP monitor. + * + *

Deletes a SAP monitor with the specified subscription, resource group, and SAP monitor name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -1079,11 +1145,13 @@ public SyncPoller, OperationStatusResultI @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationStatusResultInner> beginDelete( String resourceGroupName, String monitorName, Context context) { - return beginDeleteAsync(resourceGroupName, monitorName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, monitorName, context).getSyncPoller(); } /** - * Deletes a SAP monitor with the specified subscription, resource group, and SAP monitor name. + * Deletes a SAP monitor. + * + *

Deletes a SAP monitor with the specified subscription, resource group, and SAP monitor name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -1098,7 +1166,9 @@ private Mono deleteAsync(String resourceGroupName, S } /** - * Deletes a SAP monitor with the specified subscription, resource group, and SAP monitor name. + * Deletes a SAP monitor. + * + *

Deletes a SAP monitor with the specified subscription, resource group, and SAP monitor name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -1117,7 +1187,9 @@ private Mono deleteAsync( } /** - * Deletes a SAP monitor with the specified subscription, resource group, and SAP monitor name. + * Deletes a SAP monitor. + * + *

Deletes a SAP monitor with the specified subscription, resource group, and SAP monitor name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -1132,7 +1204,9 @@ public OperationStatusResultInner delete(String resourceGroupName, String monito } /** - * Deletes a SAP monitor with the specified subscription, resource group, and SAP monitor name. + * Deletes a SAP monitor. + * + *

Deletes a SAP monitor with the specified subscription, resource group, and SAP monitor name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -1148,7 +1222,9 @@ public OperationStatusResultInner delete(String resourceGroupName, String monito } /** - * Patches the Tags field of a SAP monitor for the specified subscription, resource group, and SAP monitor name. + * Patches the Tags field of a SAP monitor. + * + *

Patches the Tags field of a SAP monitor for the specified subscription, resource group, and SAP monitor name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -1204,7 +1280,9 @@ private Mono> updateWithResponseAsync( } /** - * Patches the Tags field of a SAP monitor for the specified subscription, resource group, and SAP monitor name. + * Patches the Tags field of a SAP monitor. + * + *

Patches the Tags field of a SAP monitor for the specified subscription, resource group, and SAP monitor name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -1258,7 +1336,9 @@ private Mono> updateWithResponseAsync( } /** - * Patches the Tags field of a SAP monitor for the specified subscription, resource group, and SAP monitor name. + * Patches the Tags field of a SAP monitor. + * + *

Patches the Tags field of a SAP monitor for the specified subscription, resource group, and SAP monitor name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -1276,43 +1356,48 @@ private Mono updateAsync(String resourceGroupName, String monitorN } /** - * Patches the Tags field of a SAP monitor for the specified subscription, resource group, and SAP monitor name. + * Patches the Tags field of a SAP monitor. + * + *

Patches the Tags field of a SAP monitor for the specified subscription, resource group, and SAP monitor name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. * @param body The Update SAP workload monitor request body. + * @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 sAP monitor info on Azure (ARM properties and SAP monitor properties). + * @return sAP monitor info on Azure (ARM properties and SAP monitor properties) along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MonitorInner update(String resourceGroupName, String monitorName, UpdateMonitorRequest body) { - return updateAsync(resourceGroupName, monitorName, body).block(); + public Response updateWithResponse( + String resourceGroupName, String monitorName, UpdateMonitorRequest body, Context context) { + return updateWithResponseAsync(resourceGroupName, monitorName, body, context).block(); } /** - * Patches the Tags field of a SAP monitor for the specified subscription, resource group, and SAP monitor name. + * Patches the Tags field of a SAP monitor. + * + *

Patches the Tags field of a SAP monitor for the specified subscription, resource group, and SAP monitor name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. * @param body The Update SAP workload monitor request body. - * @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 sAP monitor info on Azure (ARM properties and SAP monitor properties) along with {@link Response}. + * @return sAP monitor info on Azure (ARM properties and SAP monitor properties). */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, String monitorName, UpdateMonitorRequest body, Context context) { - return updateWithResponseAsync(resourceGroupName, monitorName, body, context).block(); + public MonitorInner update(String resourceGroupName, String monitorName, UpdateMonitorRequest body) { + return updateWithResponse(resourceGroupName, monitorName, body, Context.NONE).getValue(); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1348,7 +1433,8 @@ private Mono> listNextSinglePageAsync(String nextLin /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1385,7 +1471,8 @@ private Mono> listNextSinglePageAsync(String nextLin /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1422,7 +1509,8 @@ private Mono> listByResourceGroupNextSinglePageAsync /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/MonitorsImpl.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/MonitorsImpl.java index f5fd0c82586d8..d50767189fe13 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/MonitorsImpl.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/MonitorsImpl.java @@ -49,15 +49,6 @@ public PagedIterable listByResourceGroup(String resourceGroupName, Cont return Utils.mapPage(inner, inner1 -> new MonitorImpl(inner1, this.manager())); } - public Monitor getByResourceGroup(String resourceGroupName, String monitorName) { - MonitorInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, monitorName); - if (inner != null) { - return new MonitorImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getByResourceGroupWithResponse( String resourceGroupName, String monitorName, Context context) { Response inner = @@ -73,6 +64,15 @@ public Response getByResourceGroupWithResponse( } } + public Monitor getByResourceGroup(String resourceGroupName, String monitorName) { + MonitorInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, monitorName); + if (inner != null) { + return new MonitorImpl(inner, this.manager()); + } else { + return null; + } + } + public OperationStatusResult deleteByResourceGroup(String resourceGroupName, String monitorName) { OperationStatusResultInner inner = this.serviceClient().delete(resourceGroupName, monitorName); if (inner != null) { diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/OperationsClientImpl.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/OperationsClientImpl.java index e03d98681708e..e135611e9e9f4 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/OperationsClientImpl.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/OperationsClientImpl.java @@ -55,7 +55,7 @@ public final class OperationsClientImpl implements OperationsClient { */ @Host("{$host}") @ServiceInterface(name = "WorkloadsClientOpera") - private interface OperationsService { + public interface OperationsService { @Headers({"Content-Type: application/json"}) @Get("/providers/Microsoft.Workloads/operations") @ExpectedResponses({200}) @@ -202,7 +202,8 @@ public PagedIterable list(Context context) { /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -238,7 +239,8 @@ private Mono> listNextSinglePageAsync(String nextL /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/PhpWorkloadResourceImpl.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/PhpWorkloadResourceImpl.java deleted file mode 100644 index ac35c5e9aff88..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/PhpWorkloadResourceImpl.java +++ /dev/null @@ -1,348 +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.workloads.implementation; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.workloads.fluent.models.PhpWorkloadResourceInner; -import com.azure.resourcemanager.workloads.models.BackupProfile; -import com.azure.resourcemanager.workloads.models.CacheProfile; -import com.azure.resourcemanager.workloads.models.DatabaseProfile; -import com.azure.resourcemanager.workloads.models.FileshareProfile; -import com.azure.resourcemanager.workloads.models.ManagedRGConfiguration; -import com.azure.resourcemanager.workloads.models.NetworkProfile; -import com.azure.resourcemanager.workloads.models.NodeProfile; -import com.azure.resourcemanager.workloads.models.PatchResourceRequestBody; -import com.azure.resourcemanager.workloads.models.PatchResourceRequestBodyIdentity; -import com.azure.resourcemanager.workloads.models.PhpProfile; -import com.azure.resourcemanager.workloads.models.PhpWorkloadProvisioningState; -import com.azure.resourcemanager.workloads.models.PhpWorkloadResource; -import com.azure.resourcemanager.workloads.models.PhpWorkloadResourceIdentity; -import com.azure.resourcemanager.workloads.models.SearchProfile; -import com.azure.resourcemanager.workloads.models.SiteProfile; -import com.azure.resourcemanager.workloads.models.Sku; -import com.azure.resourcemanager.workloads.models.UserProfile; -import com.azure.resourcemanager.workloads.models.VmssNodesProfile; -import com.azure.resourcemanager.workloads.models.WorkloadKind; -import java.util.Collections; -import java.util.Map; - -public final class PhpWorkloadResourceImpl - implements PhpWorkloadResource, PhpWorkloadResource.Definition, PhpWorkloadResource.Update { - private PhpWorkloadResourceInner innerObject; - - private final com.azure.resourcemanager.workloads.WorkloadsManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - 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) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public WorkloadKind kind() { - return this.innerModel().kind(); - } - - public Sku sku() { - return this.innerModel().sku(); - } - - public PhpWorkloadResourceIdentity identity() { - return this.innerModel().identity(); - } - - public String appLocation() { - return this.innerModel().appLocation(); - } - - public ManagedRGConfiguration managedResourceGroupConfiguration() { - return this.innerModel().managedResourceGroupConfiguration(); - } - - public UserProfile adminUserProfile() { - return this.innerModel().adminUserProfile(); - } - - public VmssNodesProfile webNodesProfile() { - return this.innerModel().webNodesProfile(); - } - - public NodeProfile controllerProfile() { - return this.innerModel().controllerProfile(); - } - - public NetworkProfile networkProfile() { - return this.innerModel().networkProfile(); - } - - public DatabaseProfile databaseProfile() { - return this.innerModel().databaseProfile(); - } - - public SiteProfile siteProfile() { - return this.innerModel().siteProfile(); - } - - public FileshareProfile fileshareProfile() { - return this.innerModel().fileshareProfile(); - } - - public PhpProfile phpProfile() { - return this.innerModel().phpProfile(); - } - - public SearchProfile searchProfile() { - return this.innerModel().searchProfile(); - } - - public CacheProfile cacheProfile() { - return this.innerModel().cacheProfile(); - } - - public BackupProfile backupProfile() { - return this.innerModel().backupProfile(); - } - - public PhpWorkloadProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public PhpWorkloadResourceInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.workloads.WorkloadsManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String phpWorkloadName; - - private PatchResourceRequestBody updateResourcePatchRequestBody; - - public PhpWorkloadResourceImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public PhpWorkloadResource create() { - this.innerObject = - serviceManager - .serviceClient() - .getPhpWorkloads() - .createOrUpdate(resourceGroupName, phpWorkloadName, this.innerModel(), Context.NONE); - return this; - } - - public PhpWorkloadResource create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getPhpWorkloads() - .createOrUpdate(resourceGroupName, phpWorkloadName, this.innerModel(), context); - return this; - } - - PhpWorkloadResourceImpl(String name, com.azure.resourcemanager.workloads.WorkloadsManager serviceManager) { - this.innerObject = new PhpWorkloadResourceInner(); - this.serviceManager = serviceManager; - this.phpWorkloadName = name; - } - - public PhpWorkloadResourceImpl update() { - this.updateResourcePatchRequestBody = new PatchResourceRequestBody(); - return this; - } - - public PhpWorkloadResource apply() { - this.innerObject = - serviceManager - .serviceClient() - .getPhpWorkloads() - .updateWithResponse(resourceGroupName, phpWorkloadName, updateResourcePatchRequestBody, Context.NONE) - .getValue(); - return this; - } - - public PhpWorkloadResource apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getPhpWorkloads() - .updateWithResponse(resourceGroupName, phpWorkloadName, updateResourcePatchRequestBody, context) - .getValue(); - return this; - } - - PhpWorkloadResourceImpl( - PhpWorkloadResourceInner innerObject, com.azure.resourcemanager.workloads.WorkloadsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.phpWorkloadName = Utils.getValueFromIdByName(innerObject.id(), "phpWorkloads"); - } - - public PhpWorkloadResource refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getPhpWorkloads() - .getByResourceGroupWithResponse(resourceGroupName, phpWorkloadName, Context.NONE) - .getValue(); - return this; - } - - public PhpWorkloadResource refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getPhpWorkloads() - .getByResourceGroupWithResponse(resourceGroupName, phpWorkloadName, context) - .getValue(); - return this; - } - - public PhpWorkloadResourceImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public PhpWorkloadResourceImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public PhpWorkloadResourceImpl withKind(WorkloadKind kind) { - this.innerModel().withKind(kind); - return this; - } - - public PhpWorkloadResourceImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateResourcePatchRequestBody.withTags(tags); - return this; - } - } - - public PhpWorkloadResourceImpl withSku(Sku sku) { - this.innerModel().withSku(sku); - return this; - } - - public PhpWorkloadResourceImpl withIdentity(PhpWorkloadResourceIdentity identity) { - this.innerModel().withIdentity(identity); - return this; - } - - public PhpWorkloadResourceImpl withAppLocation(String appLocation) { - this.innerModel().withAppLocation(appLocation); - return this; - } - - public PhpWorkloadResourceImpl withManagedResourceGroupConfiguration( - ManagedRGConfiguration managedResourceGroupConfiguration) { - this.innerModel().withManagedResourceGroupConfiguration(managedResourceGroupConfiguration); - return this; - } - - public PhpWorkloadResourceImpl withAdminUserProfile(UserProfile adminUserProfile) { - this.innerModel().withAdminUserProfile(adminUserProfile); - return this; - } - - public PhpWorkloadResourceImpl withWebNodesProfile(VmssNodesProfile webNodesProfile) { - this.innerModel().withWebNodesProfile(webNodesProfile); - return this; - } - - public PhpWorkloadResourceImpl withControllerProfile(NodeProfile controllerProfile) { - this.innerModel().withControllerProfile(controllerProfile); - return this; - } - - public PhpWorkloadResourceImpl withNetworkProfile(NetworkProfile networkProfile) { - this.innerModel().withNetworkProfile(networkProfile); - return this; - } - - public PhpWorkloadResourceImpl withDatabaseProfile(DatabaseProfile databaseProfile) { - this.innerModel().withDatabaseProfile(databaseProfile); - return this; - } - - public PhpWorkloadResourceImpl withSiteProfile(SiteProfile siteProfile) { - this.innerModel().withSiteProfile(siteProfile); - return this; - } - - public PhpWorkloadResourceImpl withFileshareProfile(FileshareProfile fileshareProfile) { - this.innerModel().withFileshareProfile(fileshareProfile); - return this; - } - - public PhpWorkloadResourceImpl withPhpProfile(PhpProfile phpProfile) { - this.innerModel().withPhpProfile(phpProfile); - return this; - } - - public PhpWorkloadResourceImpl withSearchProfile(SearchProfile searchProfile) { - this.innerModel().withSearchProfile(searchProfile); - return this; - } - - public PhpWorkloadResourceImpl withCacheProfile(CacheProfile cacheProfile) { - this.innerModel().withCacheProfile(cacheProfile); - return this; - } - - public PhpWorkloadResourceImpl withBackupProfile(BackupProfile backupProfile) { - this.innerModel().withBackupProfile(backupProfile); - return this; - } - - public PhpWorkloadResourceImpl withIdentity(PatchResourceRequestBodyIdentity identity) { - this.updateResourcePatchRequestBody.withIdentity(identity); - return this; - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/PhpWorkloadsClientImpl.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/PhpWorkloadsClientImpl.java deleted file mode 100644 index cb7d53cac3dad..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/PhpWorkloadsClientImpl.java +++ /dev/null @@ -1,1517 +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.workloads.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -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.workloads.fluent.PhpWorkloadsClient; -import com.azure.resourcemanager.workloads.fluent.models.PhpWorkloadResourceInner; -import com.azure.resourcemanager.workloads.models.PatchResourceRequestBody; -import com.azure.resourcemanager.workloads.models.PhpWorkloadResourceList; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in PhpWorkloadsClient. */ -public final class PhpWorkloadsClientImpl implements PhpWorkloadsClient { - /** The proxy service used to perform REST calls. */ - private final PhpWorkloadsService service; - - /** The service client containing this operation class. */ - private final WorkloadsClientImpl client; - - /** - * Initializes an instance of PhpWorkloadsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - PhpWorkloadsClientImpl(WorkloadsClientImpl client) { - this.service = - RestProxy.create(PhpWorkloadsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for WorkloadsClientPhpWorkloads to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "WorkloadsClientPhpWo") - private interface PhpWorkloadsService { - @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Workloads/phpWorkloads") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads" - + "/phpWorkloads") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @PathParam("resourceGroupName") String resourceGroupName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads" - + "/phpWorkloads/{phpWorkloadName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("phpWorkloadName") String phpWorkloadName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads" - + "/phpWorkloads/{phpWorkloadName}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("phpWorkloadName") String phpWorkloadName, - @BodyParam("application/json") PhpWorkloadResourceInner phpWorkloadResource, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads" - + "/phpWorkloads/{phpWorkloadName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("phpWorkloadName") String phpWorkloadName, - @BodyParam("application/json") PatchResourceRequestBody resourcePatchRequestBody, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads" - + "/phpWorkloads/{phpWorkloadName}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("phpWorkloadName") String phpWorkloadName, - @QueryParam("delete-infra") String deleteInfra, - @HeaderParam("Accept") String accept, - Context context); - - @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); - - @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, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Lists PHP workload resources for a subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return php workload resource list along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists PHP workload resources for a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return php workload resource list along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Lists PHP workload resources for a subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return php workload resource list as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>( - () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * Lists PHP workload resources for a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return php workload resource list as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists PHP workload resources for a subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return php workload resource list as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Lists PHP workload resources for a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return php workload resource list as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * Lists PHP workload resources in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return php workload resource list along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - resourceGroupName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists PHP workload resources in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return php workload resource list along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - resourceGroupName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Lists PHP workload resources in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return php workload resource list as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Lists PHP workload resources in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return php workload resource list as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists PHP workload resources in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return php workload resource list as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); - } - - /** - * Lists PHP workload resources in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return php workload resource list as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); - } - - /** - * Gets the PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload 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 PHP workload resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String phpWorkloadName) { - 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 (phpWorkloadName == null) { - return Mono - .error(new IllegalArgumentException("Parameter phpWorkloadName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - resourceGroupName, - phpWorkloadName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload 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 PHP workload resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String phpWorkloadName, 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 (phpWorkloadName == null) { - return Mono - .error(new IllegalArgumentException("Parameter phpWorkloadName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - resourceGroupName, - phpWorkloadName, - accept, - context); - } - - /** - * Gets the PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload 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 PHP workload resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String phpWorkloadName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, phpWorkloadName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload 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 PHP workload resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PhpWorkloadResourceInner getByResourceGroup(String resourceGroupName, String phpWorkloadName) { - return getByResourceGroupAsync(resourceGroupName, phpWorkloadName).block(); - } - - /** - * Gets the PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload 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 PHP workload resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String phpWorkloadName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, phpWorkloadName, context).block(); - } - - /** - * Create or updated PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param phpWorkloadResource Resource create or update request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return php workload resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String phpWorkloadName, PhpWorkloadResourceInner phpWorkloadResource) { - 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 (phpWorkloadName == null) { - return Mono - .error(new IllegalArgumentException("Parameter phpWorkloadName is required and cannot be null.")); - } - if (phpWorkloadResource == null) { - return Mono - .error(new IllegalArgumentException("Parameter phpWorkloadResource is required and cannot be null.")); - } else { - phpWorkloadResource.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - resourceGroupName, - phpWorkloadName, - phpWorkloadResource, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or updated PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param phpWorkloadResource Resource create or update request payload. - * @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 php workload resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String phpWorkloadName, - PhpWorkloadResourceInner phpWorkloadResource, - 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 (phpWorkloadName == null) { - return Mono - .error(new IllegalArgumentException("Parameter phpWorkloadName is required and cannot be null.")); - } - if (phpWorkloadResource == null) { - return Mono - .error(new IllegalArgumentException("Parameter phpWorkloadResource is required and cannot be null.")); - } else { - phpWorkloadResource.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - resourceGroupName, - phpWorkloadName, - phpWorkloadResource, - accept, - context); - } - - /** - * Create or updated PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param phpWorkloadResource Resource create or update request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 php workload resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, PhpWorkloadResourceInner> beginCreateOrUpdateAsync( - String resourceGroupName, String phpWorkloadName, PhpWorkloadResourceInner phpWorkloadResource) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, phpWorkloadName, phpWorkloadResource); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - PhpWorkloadResourceInner.class, - PhpWorkloadResourceInner.class, - this.client.getContext()); - } - - /** - * Create or updated PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param phpWorkloadResource Resource create or update request payload. - * @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 php workload resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, PhpWorkloadResourceInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String phpWorkloadName, - PhpWorkloadResourceInner phpWorkloadResource, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, phpWorkloadName, phpWorkloadResource, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - PhpWorkloadResourceInner.class, - PhpWorkloadResourceInner.class, - context); - } - - /** - * Create or updated PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param phpWorkloadResource Resource create or update request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 php workload resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PhpWorkloadResourceInner> beginCreateOrUpdate( - String resourceGroupName, String phpWorkloadName, PhpWorkloadResourceInner phpWorkloadResource) { - return beginCreateOrUpdateAsync(resourceGroupName, phpWorkloadName, phpWorkloadResource).getSyncPoller(); - } - - /** - * Create or updated PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param phpWorkloadResource Resource create or update request payload. - * @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 php workload resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PhpWorkloadResourceInner> beginCreateOrUpdate( - String resourceGroupName, - String phpWorkloadName, - PhpWorkloadResourceInner phpWorkloadResource, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, phpWorkloadName, phpWorkloadResource, context) - .getSyncPoller(); - } - - /** - * Create or updated PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param phpWorkloadResource Resource create or update request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return php workload resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String phpWorkloadName, PhpWorkloadResourceInner phpWorkloadResource) { - return beginCreateOrUpdateAsync(resourceGroupName, phpWorkloadName, phpWorkloadResource) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or updated PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param phpWorkloadResource Resource create or update request payload. - * @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 php workload resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String phpWorkloadName, - PhpWorkloadResourceInner phpWorkloadResource, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, phpWorkloadName, phpWorkloadResource, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or updated PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param phpWorkloadResource Resource create or update request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return php workload resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PhpWorkloadResourceInner createOrUpdate( - String resourceGroupName, String phpWorkloadName, PhpWorkloadResourceInner phpWorkloadResource) { - return createOrUpdateAsync(resourceGroupName, phpWorkloadName, phpWorkloadResource).block(); - } - - /** - * Create or updated PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param phpWorkloadResource Resource create or update request payload. - * @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 php workload resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PhpWorkloadResourceInner createOrUpdate( - String resourceGroupName, - String phpWorkloadName, - PhpWorkloadResourceInner phpWorkloadResource, - Context context) { - return createOrUpdateAsync(resourceGroupName, phpWorkloadName, phpWorkloadResource, context).block(); - } - - /** - * Update PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param resourcePatchRequestBody Workload resource update data. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return php workload resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, String phpWorkloadName, PatchResourceRequestBody resourcePatchRequestBody) { - 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 (phpWorkloadName == null) { - return Mono - .error(new IllegalArgumentException("Parameter phpWorkloadName is required and cannot be null.")); - } - if (resourcePatchRequestBody == null) { - return Mono - .error( - new IllegalArgumentException("Parameter resourcePatchRequestBody is required and cannot be null.")); - } else { - resourcePatchRequestBody.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - phpWorkloadName, - resourcePatchRequestBody, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param resourcePatchRequestBody Workload resource update data. - * @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 php workload resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String phpWorkloadName, - PatchResourceRequestBody resourcePatchRequestBody, - 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 (phpWorkloadName == null) { - return Mono - .error(new IllegalArgumentException("Parameter phpWorkloadName is required and cannot be null.")); - } - if (resourcePatchRequestBody == null) { - return Mono - .error( - new IllegalArgumentException("Parameter resourcePatchRequestBody is required and cannot be null.")); - } else { - resourcePatchRequestBody.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - phpWorkloadName, - resourcePatchRequestBody, - accept, - context); - } - - /** - * Update PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param resourcePatchRequestBody Workload resource update data. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return php workload resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String phpWorkloadName, PatchResourceRequestBody resourcePatchRequestBody) { - return updateWithResponseAsync(resourceGroupName, phpWorkloadName, resourcePatchRequestBody) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Update PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param resourcePatchRequestBody Workload resource update data. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return php workload resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PhpWorkloadResourceInner update( - String resourceGroupName, String phpWorkloadName, PatchResourceRequestBody resourcePatchRequestBody) { - return updateAsync(resourceGroupName, phpWorkloadName, resourcePatchRequestBody).block(); - } - - /** - * Update PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param resourcePatchRequestBody Workload resource update data. - * @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 php workload resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String phpWorkloadName, - PatchResourceRequestBody resourcePatchRequestBody, - Context context) { - return updateWithResponseAsync(resourceGroupName, phpWorkloadName, resourcePatchRequestBody, context).block(); - } - - /** - * Delete PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param deleteInfra Whether to delete infra along with workload 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 phpWorkloadName, String deleteInfra) { - 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 (phpWorkloadName == null) { - return Mono - .error(new IllegalArgumentException("Parameter phpWorkloadName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - resourceGroupName, - phpWorkloadName, - deleteInfra, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param deleteInfra Whether to delete infra along with workload 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 phpWorkloadName, String deleteInfra, 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 (phpWorkloadName == null) { - return Mono - .error(new IllegalArgumentException("Parameter phpWorkloadName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - resourceGroupName, - phpWorkloadName, - deleteInfra, - accept, - context); - } - - /** - * Delete PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param deleteInfra Whether to delete infra along with workload 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 phpWorkloadName, String deleteInfra) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, phpWorkloadName, deleteInfra); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Delete PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param deleteInfra Whether to delete infra along with workload 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 phpWorkloadName, String deleteInfra, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, phpWorkloadName, deleteInfra, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Delete PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param deleteInfra Whether to delete infra along with workload 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 phpWorkloadName, String deleteInfra) { - return beginDeleteAsync(resourceGroupName, phpWorkloadName, deleteInfra).getSyncPoller(); - } - - /** - * Delete PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param deleteInfra Whether to delete infra along with workload 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 phpWorkloadName, String deleteInfra, Context context) { - return beginDeleteAsync(resourceGroupName, phpWorkloadName, deleteInfra, context).getSyncPoller(); - } - - /** - * Delete PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param deleteInfra Whether to delete infra along with workload 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 phpWorkloadName, String deleteInfra) { - return beginDeleteAsync(resourceGroupName, phpWorkloadName, deleteInfra) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload 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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String phpWorkloadName) { - final String deleteInfra = null; - return beginDeleteAsync(resourceGroupName, phpWorkloadName, deleteInfra) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param deleteInfra Whether to delete infra along with workload 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 phpWorkloadName, String deleteInfra, Context context) { - return beginDeleteAsync(resourceGroupName, phpWorkloadName, deleteInfra, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param deleteInfra Whether to delete infra along with workload 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 phpWorkloadName, String deleteInfra) { - deleteAsync(resourceGroupName, phpWorkloadName, deleteInfra).block(); - } - - /** - * Delete PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String phpWorkloadName) { - final String deleteInfra = null; - deleteAsync(resourceGroupName, phpWorkloadName, deleteInfra).block(); - } - - /** - * Delete PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param deleteInfra Whether to delete infra along with workload 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 phpWorkloadName, String deleteInfra, Context context) { - deleteAsync(resourceGroupName, phpWorkloadName, deleteInfra, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return php workload resource list along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(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.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return php workload resource list along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync( - 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 - .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return php workload resource list along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(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.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return php workload resource list along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync( - 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 - .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/PhpWorkloadsImpl.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/PhpWorkloadsImpl.java deleted file mode 100644 index b93a4b64f7704..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/PhpWorkloadsImpl.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.workloads.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.workloads.fluent.PhpWorkloadsClient; -import com.azure.resourcemanager.workloads.fluent.models.PhpWorkloadResourceInner; -import com.azure.resourcemanager.workloads.models.PhpWorkloadResource; -import com.azure.resourcemanager.workloads.models.PhpWorkloads; - -public final class PhpWorkloadsImpl implements PhpWorkloads { - private static final ClientLogger LOGGER = new ClientLogger(PhpWorkloadsImpl.class); - - private final PhpWorkloadsClient innerClient; - - private final com.azure.resourcemanager.workloads.WorkloadsManager serviceManager; - - public PhpWorkloadsImpl( - PhpWorkloadsClient innerClient, com.azure.resourcemanager.workloads.WorkloadsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new PhpWorkloadResourceImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new PhpWorkloadResourceImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new PhpWorkloadResourceImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = - this.serviceClient().listByResourceGroup(resourceGroupName, context); - return Utils.mapPage(inner, inner1 -> new PhpWorkloadResourceImpl(inner1, this.manager())); - } - - public PhpWorkloadResource getByResourceGroup(String resourceGroupName, String phpWorkloadName) { - PhpWorkloadResourceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, phpWorkloadName); - if (inner != null) { - return new PhpWorkloadResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getByResourceGroupWithResponse( - String resourceGroupName, String phpWorkloadName, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, phpWorkloadName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new PhpWorkloadResourceImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String phpWorkloadName, String deleteInfra) { - this.serviceClient().delete(resourceGroupName, phpWorkloadName, deleteInfra); - } - - public void delete(String resourceGroupName, String phpWorkloadName) { - this.serviceClient().delete(resourceGroupName, phpWorkloadName); - } - - public void delete(String resourceGroupName, String phpWorkloadName, String deleteInfra, Context context) { - this.serviceClient().delete(resourceGroupName, phpWorkloadName, deleteInfra, context); - } - - public PhpWorkloadResource getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String phpWorkloadName = Utils.getValueFromIdByName(id, "phpWorkloads"); - if (phpWorkloadName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'phpWorkloads'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, phpWorkloadName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String phpWorkloadName = Utils.getValueFromIdByName(id, "phpWorkloads"); - if (phpWorkloadName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'phpWorkloads'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, phpWorkloadName, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String phpWorkloadName = Utils.getValueFromIdByName(id, "phpWorkloads"); - if (phpWorkloadName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'phpWorkloads'.", id))); - } - String localDeleteInfra = null; - this.delete(resourceGroupName, phpWorkloadName, localDeleteInfra, Context.NONE); - } - - public void deleteByIdWithResponse(String id, String deleteInfra, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String phpWorkloadName = Utils.getValueFromIdByName(id, "phpWorkloads"); - if (phpWorkloadName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'phpWorkloads'.", id))); - } - this.delete(resourceGroupName, phpWorkloadName, deleteInfra, context); - } - - private PhpWorkloadsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.workloads.WorkloadsManager manager() { - return this.serviceManager; - } - - public PhpWorkloadResourceImpl define(String name) { - return new PhpWorkloadResourceImpl(name, this.manager()); - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/ProviderInstancesClientImpl.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/ProviderInstancesClientImpl.java index 9c4673b2a6f27..b0ce5c2643b77 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/ProviderInstancesClientImpl.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/ProviderInstancesClientImpl.java @@ -64,7 +64,7 @@ public final class ProviderInstancesClientImpl implements ProviderInstancesClien */ @Host("{$host}") @ServiceInterface(name = "WorkloadsClientProvi") - private interface ProviderInstancesService { + public interface ProviderInstancesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/monitors" @@ -141,8 +141,10 @@ Mono> listNext( } /** - * Gets a list of provider instances in the specified SAP monitor. The operations returns various properties of each - * provider instances. + * Gets a list of provider instances in the specified SAP monitor. + * + *

Gets a list of provider instances in the specified SAP monitor. The operations returns various properties of + * each provider instances. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -200,8 +202,10 @@ private Mono> listSinglePageAsync( } /** - * Gets a list of provider instances in the specified SAP monitor. The operations returns various properties of each - * provider instances. + * Gets a list of provider instances in the specified SAP monitor. + * + *

Gets a list of provider instances in the specified SAP monitor. The operations returns various properties of + * each provider instances. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -257,8 +261,10 @@ private Mono> listSinglePageAsync( } /** - * Gets a list of provider instances in the specified SAP monitor. The operations returns various properties of each - * provider instances. + * Gets a list of provider instances in the specified SAP monitor. + * + *

Gets a list of provider instances in the specified SAP monitor. The operations returns various properties of + * each provider instances. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -274,8 +280,10 @@ private PagedFlux listAsync(String resourceGroupName, Str } /** - * Gets a list of provider instances in the specified SAP monitor. The operations returns various properties of each - * provider instances. + * Gets a list of provider instances in the specified SAP monitor. + * + *

Gets a list of provider instances in the specified SAP monitor. The operations returns various properties of + * each provider instances. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -293,8 +301,10 @@ private PagedFlux listAsync(String resourceGroupName, Str } /** - * Gets a list of provider instances in the specified SAP monitor. The operations returns various properties of each - * provider instances. + * Gets a list of provider instances in the specified SAP monitor. + * + *

Gets a list of provider instances in the specified SAP monitor. The operations returns various properties of + * each provider instances. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -310,8 +320,10 @@ public PagedIterable list(String resourceGroupName, Strin } /** - * Gets a list of provider instances in the specified SAP monitor. The operations returns various properties of each - * provider instances. + * Gets a list of provider instances in the specified SAP monitor. + * + *

Gets a list of provider instances in the specified SAP monitor. The operations returns various properties of + * each provider instances. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -328,7 +340,9 @@ public PagedIterable list(String resourceGroupName, Strin } /** - * Gets properties of a provider instance for the specified subscription, resource group, SAP monitor name, and + * Gets properties of a provider instance. + * + *

Gets properties of a provider instance for the specified subscription, resource group, SAP monitor name, and * resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -384,7 +398,9 @@ private Mono> getWithResponseAsync( } /** - * Gets properties of a provider instance for the specified subscription, resource group, SAP monitor name, and + * Gets properties of a provider instance. + * + *

Gets properties of a provider instance for the specified subscription, resource group, SAP monitor name, and * resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -438,7 +454,9 @@ private Mono> getWithResponseAsync( } /** - * Gets properties of a provider instance for the specified subscription, resource group, SAP monitor name, and + * Gets properties of a provider instance. + * + *

Gets properties of a provider instance for the specified subscription, resource group, SAP monitor name, and * resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -458,45 +476,52 @@ private Mono getAsync( } /** - * Gets properties of a provider instance for the specified subscription, resource group, SAP monitor name, and + * Gets properties of a provider instance. + * + *

Gets properties of a provider instance for the specified subscription, resource group, SAP monitor name, and * resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. * @param providerInstanceName Name of the provider instance. + * @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 properties of a provider instance for the specified subscription, resource group, SAP monitor name, and - * resource name. + * resource name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ProviderInstanceInner get(String resourceGroupName, String monitorName, String providerInstanceName) { - return getAsync(resourceGroupName, monitorName, providerInstanceName).block(); + public Response getWithResponse( + String resourceGroupName, String monitorName, String providerInstanceName, Context context) { + return getWithResponseAsync(resourceGroupName, monitorName, providerInstanceName, context).block(); } /** - * Gets properties of a provider instance for the specified subscription, resource group, SAP monitor name, and + * Gets properties of a provider instance. + * + *

Gets properties of a provider instance for the specified subscription, resource group, SAP monitor name, and * resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. * @param providerInstanceName Name of the provider instance. - * @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 properties of a provider instance for the specified subscription, resource group, SAP monitor name, and - * resource name along with {@link Response}. + * resource name. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String monitorName, String providerInstanceName, Context context) { - return getWithResponseAsync(resourceGroupName, monitorName, providerInstanceName, context).block(); + public ProviderInstanceInner get(String resourceGroupName, String monitorName, String providerInstanceName) { + return getWithResponse(resourceGroupName, monitorName, providerInstanceName, Context.NONE).getValue(); } /** - * Creates a provider instance for the specified subscription, resource group, SAP monitor name, and resource name. + * Creates a provider instance. + * + *

Creates a provider instance for the specified subscription, resource group, SAP monitor name, and resource + * name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -564,7 +589,10 @@ private Mono>> createWithResponseAsync( } /** - * Creates a provider instance for the specified subscription, resource group, SAP monitor name, and resource name. + * Creates a provider instance. + * + *

Creates a provider instance for the specified subscription, resource group, SAP monitor name, and resource + * name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -631,7 +659,10 @@ private Mono>> createWithResponseAsync( } /** - * Creates a provider instance for the specified subscription, resource group, SAP monitor name, and resource name. + * Creates a provider instance. + * + *

Creates a provider instance for the specified subscription, resource group, SAP monitor name, and resource + * name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -661,7 +692,10 @@ private PollerFlux, ProviderInstanceInner> beg } /** - * Creates a provider instance for the specified subscription, resource group, SAP monitor name, and resource name. + * Creates a provider instance. + * + *

Creates a provider instance for the specified subscription, resource group, SAP monitor name, and resource + * name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -691,7 +725,10 @@ private PollerFlux, ProviderInstanceInner> beg } /** - * Creates a provider instance for the specified subscription, resource group, SAP monitor name, and resource name. + * Creates a provider instance. + * + *

Creates a provider instance for the specified subscription, resource group, SAP monitor name, and resource + * name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -708,12 +745,16 @@ public SyncPoller, ProviderInstanceInner> begi String monitorName, String providerInstanceName, ProviderInstanceInner providerInstanceParameter) { - return beginCreateAsync(resourceGroupName, monitorName, providerInstanceName, providerInstanceParameter) + return this + .beginCreateAsync(resourceGroupName, monitorName, providerInstanceName, providerInstanceParameter) .getSyncPoller(); } /** - * Creates a provider instance for the specified subscription, resource group, SAP monitor name, and resource name. + * Creates a provider instance. + * + *

Creates a provider instance for the specified subscription, resource group, SAP monitor name, and resource + * name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -732,13 +773,16 @@ public SyncPoller, ProviderInstanceInner> begi String providerInstanceName, ProviderInstanceInner providerInstanceParameter, Context context) { - return beginCreateAsync( - resourceGroupName, monitorName, providerInstanceName, providerInstanceParameter, context) + return this + .beginCreateAsync(resourceGroupName, monitorName, providerInstanceName, providerInstanceParameter, context) .getSyncPoller(); } /** - * Creates a provider instance for the specified subscription, resource group, SAP monitor name, and resource name. + * Creates a provider instance. + * + *

Creates a provider instance for the specified subscription, resource group, SAP monitor name, and resource + * name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -761,7 +805,10 @@ private Mono createAsync( } /** - * Creates a provider instance for the specified subscription, resource group, SAP monitor name, and resource name. + * Creates a provider instance. + * + *

Creates a provider instance for the specified subscription, resource group, SAP monitor name, and resource + * name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -787,7 +834,10 @@ private Mono createAsync( } /** - * Creates a provider instance for the specified subscription, resource group, SAP monitor name, and resource name. + * Creates a provider instance. + * + *

Creates a provider instance for the specified subscription, resource group, SAP monitor name, and resource + * name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -808,7 +858,10 @@ public ProviderInstanceInner create( } /** - * Creates a provider instance for the specified subscription, resource group, SAP monitor name, and resource name. + * Creates a provider instance. + * + *

Creates a provider instance for the specified subscription, resource group, SAP monitor name, and resource + * name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -832,7 +885,10 @@ public ProviderInstanceInner create( } /** - * Deletes a provider instance for the specified subscription, resource group, SAP monitor name, and resource name. + * Deletes a provider instance. + * + *

Deletes a provider instance for the specified subscription, resource group, SAP monitor name, and resource + * name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -887,7 +943,10 @@ private Mono>> deleteWithResponseAsync( } /** - * Deletes a provider instance for the specified subscription, resource group, SAP monitor name, and resource name. + * Deletes a provider instance. + * + *

Deletes a provider instance for the specified subscription, resource group, SAP monitor name, and resource + * name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -940,7 +999,10 @@ private Mono>> deleteWithResponseAsync( } /** - * Deletes a provider instance for the specified subscription, resource group, SAP monitor name, and resource name. + * Deletes a provider instance. + * + *

Deletes a provider instance for the specified subscription, resource group, SAP monitor name, and resource + * name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -966,7 +1028,10 @@ private PollerFlux, OperationStatusResult } /** - * Deletes a provider instance for the specified subscription, resource group, SAP monitor name, and resource name. + * Deletes a provider instance. + * + *

Deletes a provider instance for the specified subscription, resource group, SAP monitor name, and resource + * name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -994,7 +1059,10 @@ private PollerFlux, OperationStatusResult } /** - * Deletes a provider instance for the specified subscription, resource group, SAP monitor name, and resource name. + * Deletes a provider instance. + * + *

Deletes a provider instance for the specified subscription, resource group, SAP monitor name, and resource + * name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -1007,11 +1075,14 @@ private PollerFlux, OperationStatusResult @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationStatusResultInner> beginDelete( String resourceGroupName, String monitorName, String providerInstanceName) { - return beginDeleteAsync(resourceGroupName, monitorName, providerInstanceName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, monitorName, providerInstanceName).getSyncPoller(); } /** - * Deletes a provider instance for the specified subscription, resource group, SAP monitor name, and resource name. + * Deletes a provider instance. + * + *

Deletes a provider instance for the specified subscription, resource group, SAP monitor name, and resource + * name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -1025,11 +1096,14 @@ public SyncPoller, OperationStatusResultI @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationStatusResultInner> beginDelete( String resourceGroupName, String monitorName, String providerInstanceName, Context context) { - return beginDeleteAsync(resourceGroupName, monitorName, providerInstanceName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, monitorName, providerInstanceName, context).getSyncPoller(); } /** - * Deletes a provider instance for the specified subscription, resource group, SAP monitor name, and resource name. + * Deletes a provider instance. + * + *

Deletes a provider instance for the specified subscription, resource group, SAP monitor name, and resource + * name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -1048,7 +1122,10 @@ private Mono deleteAsync( } /** - * Deletes a provider instance for the specified subscription, resource group, SAP monitor name, and resource name. + * Deletes a provider instance. + * + *

Deletes a provider instance for the specified subscription, resource group, SAP monitor name, and resource + * name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -1068,7 +1145,10 @@ private Mono deleteAsync( } /** - * Deletes a provider instance for the specified subscription, resource group, SAP monitor name, and resource name. + * Deletes a provider instance. + * + *

Deletes a provider instance for the specified subscription, resource group, SAP monitor name, and resource + * name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -1085,7 +1165,10 @@ public OperationStatusResultInner delete( } /** - * Deletes a provider instance for the specified subscription, resource group, SAP monitor name, and resource name. + * Deletes a provider instance. + * + *

Deletes a provider instance for the specified subscription, resource group, SAP monitor name, and resource + * name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -1105,7 +1188,8 @@ public OperationStatusResultInner delete( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1141,7 +1225,8 @@ private Mono> listNextSinglePageAsync(Strin /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/ProviderInstancesImpl.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/ProviderInstancesImpl.java index 8b5d9d2d244f2..3024306681c96 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/ProviderInstancesImpl.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/ProviderInstancesImpl.java @@ -39,15 +39,6 @@ public PagedIterable list(String resourceGroupName, String mon return Utils.mapPage(inner, inner1 -> new ProviderInstanceImpl(inner1, this.manager())); } - public ProviderInstance get(String resourceGroupName, String monitorName, String providerInstanceName) { - ProviderInstanceInner inner = this.serviceClient().get(resourceGroupName, monitorName, providerInstanceName); - if (inner != null) { - return new ProviderInstanceImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String monitorName, String providerInstanceName, Context context) { Response inner = @@ -63,6 +54,15 @@ public Response getWithResponse( } } + public ProviderInstance get(String resourceGroupName, String monitorName, String providerInstanceName) { + ProviderInstanceInner inner = this.serviceClient().get(resourceGroupName, monitorName, providerInstanceName); + if (inner != null) { + return new ProviderInstanceImpl(inner, this.manager()); + } else { + return null; + } + } + public OperationStatusResult delete(String resourceGroupName, String monitorName, String providerInstanceName) { OperationStatusResultInner inner = this.serviceClient().delete(resourceGroupName, monitorName, providerInstanceName); diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/ResourceProvidersClientImpl.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/ResourceProvidersClientImpl.java index 5fe6175079608..e24d82bdae6c4 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/ResourceProvidersClientImpl.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/ResourceProvidersClientImpl.java @@ -58,7 +58,7 @@ public final class ResourceProvidersClientImpl implements ResourceProvidersClien */ @Host("{$host}") @ServiceInterface(name = "WorkloadsClientResou") - private interface ResourceProvidersService { + public interface ResourceProvidersService { @Headers({"Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}" @@ -121,14 +121,16 @@ Mono> sapAvailabilityZoneDetails } /** - * Get SAP sizing recommendations. + * Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database + * tier. * * @param location The name of Azure region. * @param sapSizingRecommendation SAP Sizing Recommendation Request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sAP sizing recommendations along with {@link Response} on successful completion of {@link Mono}. + * @return sAP sizing recommendations by providing input SAPS for application tier and memory required for database + * tier along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> sapSizingRecommendationsWithResponseAsync( @@ -168,7 +170,8 @@ private Mono> sapSizingRecommendati } /** - * Get SAP sizing recommendations. + * Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database + * tier. * * @param location The name of Azure region. * @param sapSizingRecommendation SAP Sizing Recommendation Request body. @@ -176,7 +179,8 @@ private Mono> sapSizingRecommendati * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sAP sizing recommendations along with {@link Response} on successful completion of {@link Mono}. + * @return sAP sizing recommendations by providing input SAPS for application tier and memory required for database + * tier along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> sapSizingRecommendationsWithResponseAsync( @@ -213,30 +217,15 @@ private Mono> sapSizingRecommendati } /** - * Get SAP sizing recommendations. - * - * @param location The name of Azure region. - * @param sapSizingRecommendation SAP Sizing Recommendation Request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sAP sizing recommendations on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono sapSizingRecommendationsAsync( - String location, SapSizingRecommendationRequest sapSizingRecommendation) { - return sapSizingRecommendationsWithResponseAsync(location, sapSizingRecommendation) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get SAP sizing recommendations. + * Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database + * tier. * * @param location The name of Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sAP sizing recommendations on successful completion of {@link Mono}. + * @return sAP sizing recommendations by providing input SAPS for application tier and memory required for database + * tier on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono sapSizingRecommendationsAsync(String location) { @@ -246,46 +235,51 @@ private Mono sapSizingRecommendationsAsync(S } /** - * Get SAP sizing recommendations. + * Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database + * tier. * * @param location The name of Azure region. + * @param sapSizingRecommendation SAP Sizing Recommendation Request body. + * @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 sAP sizing recommendations. + * @return sAP sizing recommendations by providing input SAPS for application tier and memory required for database + * tier along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SapSizingRecommendationResultInner sapSizingRecommendations(String location) { - final SapSizingRecommendationRequest sapSizingRecommendation = null; - return sapSizingRecommendationsAsync(location, sapSizingRecommendation).block(); + public Response sapSizingRecommendationsWithResponse( + String location, SapSizingRecommendationRequest sapSizingRecommendation, Context context) { + return sapSizingRecommendationsWithResponseAsync(location, sapSizingRecommendation, context).block(); } /** - * Get SAP sizing recommendations. + * Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database + * tier. * * @param location The name of Azure region. - * @param sapSizingRecommendation SAP Sizing Recommendation Request body. - * @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 sAP sizing recommendations along with {@link Response}. + * @return sAP sizing recommendations by providing input SAPS for application tier and memory required for database + * tier. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response sapSizingRecommendationsWithResponse( - String location, SapSizingRecommendationRequest sapSizingRecommendation, Context context) { - return sapSizingRecommendationsWithResponseAsync(location, sapSizingRecommendation, context).block(); + public SapSizingRecommendationResultInner sapSizingRecommendations(String location) { + final SapSizingRecommendationRequest sapSizingRecommendation = null; + return sapSizingRecommendationsWithResponse(location, sapSizingRecommendation, Context.NONE).getValue(); } /** - * Get SAP supported SKUs. + * Get a list of SAP supported SKUs for ASCS, Application and Database tier. * * @param location The name of Azure region. * @param sapSupportedSku SAP Supported SKU Request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sAP supported SKUs along with {@link Response} on successful completion of {@link Mono}. + * @return a list of SAP supported SKUs for ASCS, Application and Database tier along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> sapSupportedSkuWithResponseAsync( @@ -325,7 +319,7 @@ private Mono> sapSupportedSkuWithR } /** - * Get SAP supported SKUs. + * Get a list of SAP supported SKUs for ASCS, Application and Database tier. * * @param location The name of Azure region. * @param sapSupportedSku SAP Supported SKU Request body. @@ -333,7 +327,8 @@ private Mono> sapSupportedSkuWithR * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sAP supported SKUs along with {@link Response} on successful completion of {@link Mono}. + * @return a list of SAP supported SKUs for ASCS, Application and Database tier along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> sapSupportedSkuWithResponseAsync( @@ -370,30 +365,14 @@ private Mono> sapSupportedSkuWithR } /** - * Get SAP supported SKUs. - * - * @param location The name of Azure region. - * @param sapSupportedSku SAP Supported SKU Request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sAP supported SKUs on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono sapSupportedSkuAsync( - String location, SapSupportedSkusRequest sapSupportedSku) { - return sapSupportedSkuWithResponseAsync(location, sapSupportedSku) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get SAP supported SKUs. + * Get a list of SAP supported SKUs for ASCS, Application and Database tier. * * @param location The name of Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sAP supported SKUs on successful completion of {@link Mono}. + * @return a list of SAP supported SKUs for ASCS, Application and Database tier on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono sapSupportedSkuAsync(String location) { @@ -403,46 +382,47 @@ private Mono sapSupportedSkuAsync(String lo } /** - * Get SAP supported SKUs. + * Get a list of SAP supported SKUs for ASCS, Application and Database tier. * * @param location The name of Azure region. + * @param sapSupportedSku SAP Supported SKU Request body. + * @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 sAP supported SKUs. + * @return a list of SAP supported SKUs for ASCS, Application and Database tier along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SapSupportedResourceSkusResultInner sapSupportedSku(String location) { - final SapSupportedSkusRequest sapSupportedSku = null; - return sapSupportedSkuAsync(location, sapSupportedSku).block(); + public Response sapSupportedSkuWithResponse( + String location, SapSupportedSkusRequest sapSupportedSku, Context context) { + return sapSupportedSkuWithResponseAsync(location, sapSupportedSku, context).block(); } /** - * Get SAP supported SKUs. + * Get a list of SAP supported SKUs for ASCS, Application and Database tier. * * @param location The name of Azure region. - * @param sapSupportedSku SAP Supported SKU Request body. - * @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 sAP supported SKUs along with {@link Response}. + * @return a list of SAP supported SKUs for ASCS, Application and Database tier. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response sapSupportedSkuWithResponse( - String location, SapSupportedSkusRequest sapSupportedSku, Context context) { - return sapSupportedSkuWithResponseAsync(location, sapSupportedSku, context).block(); + public SapSupportedResourceSkusResultInner sapSupportedSku(String location) { + final SapSupportedSkusRequest sapSupportedSku = null; + return sapSupportedSkuWithResponse(location, sapSupportedSku, Context.NONE).getValue(); } /** - * Get SAP Disk Configurations. + * Get the SAP Disk Configuration Layout prod/non-prod SAP System. * * @param location The name of Azure region. * @param sapDiskConfigurations SAP Disk Configurations Request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sAP Disk Configurations along with {@link Response} on successful completion of {@link Mono}. + * @return the SAP Disk Configuration Layout prod/non-prod SAP System along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> sapDiskConfigurationsWithResponseAsync( @@ -482,7 +462,7 @@ private Mono> sapDiskConfigurationsWi } /** - * Get SAP Disk Configurations. + * Get the SAP Disk Configuration Layout prod/non-prod SAP System. * * @param location The name of Azure region. * @param sapDiskConfigurations SAP Disk Configurations Request body. @@ -490,7 +470,8 @@ private Mono> sapDiskConfigurationsWi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sAP Disk Configurations along with {@link Response} on successful completion of {@link Mono}. + * @return the SAP Disk Configuration Layout prod/non-prod SAP System along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> sapDiskConfigurationsWithResponseAsync( @@ -527,30 +508,13 @@ private Mono> sapDiskConfigurationsWi } /** - * Get SAP Disk Configurations. - * - * @param location The name of Azure region. - * @param sapDiskConfigurations SAP Disk Configurations Request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sAP Disk Configurations on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono sapDiskConfigurationsAsync( - String location, SapDiskConfigurationsRequest sapDiskConfigurations) { - return sapDiskConfigurationsWithResponseAsync(location, sapDiskConfigurations) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get SAP Disk Configurations. + * Get the SAP Disk Configuration Layout prod/non-prod SAP System. * * @param location The name of Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sAP Disk Configurations on successful completion of {@link Mono}. + * @return the SAP Disk Configuration Layout prod/non-prod SAP System on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono sapDiskConfigurationsAsync(String location) { @@ -560,46 +524,47 @@ private Mono sapDiskConfigurationsAsync(String } /** - * Get SAP Disk Configurations. + * Get the SAP Disk Configuration Layout prod/non-prod SAP System. * * @param location The name of Azure region. + * @param sapDiskConfigurations SAP Disk Configurations Request body. + * @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 sAP Disk Configurations. + * @return the SAP Disk Configuration Layout prod/non-prod SAP System along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SapDiskConfigurationsResultInner sapDiskConfigurations(String location) { - final SapDiskConfigurationsRequest sapDiskConfigurations = null; - return sapDiskConfigurationsAsync(location, sapDiskConfigurations).block(); + public Response sapDiskConfigurationsWithResponse( + String location, SapDiskConfigurationsRequest sapDiskConfigurations, Context context) { + return sapDiskConfigurationsWithResponseAsync(location, sapDiskConfigurations, context).block(); } /** - * Get SAP Disk Configurations. + * Get the SAP Disk Configuration Layout prod/non-prod SAP System. * * @param location The name of Azure region. - * @param sapDiskConfigurations SAP Disk Configurations Request body. - * @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 sAP Disk Configurations along with {@link Response}. + * @return the SAP Disk Configuration Layout prod/non-prod SAP System. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response sapDiskConfigurationsWithResponse( - String location, SapDiskConfigurationsRequest sapDiskConfigurations, Context context) { - return sapDiskConfigurationsWithResponseAsync(location, sapDiskConfigurations, context).block(); + public SapDiskConfigurationsResultInner sapDiskConfigurations(String location) { + final SapDiskConfigurationsRequest sapDiskConfigurations = null; + return sapDiskConfigurationsWithResponse(location, sapDiskConfigurations, Context.NONE).getValue(); } /** - * Get SAP Availability Zone Details. + * Get the recommended SAP Availability Zone Pair Details for your region. * * @param location The name of Azure region. * @param sapAvailabilityZoneDetails SAP Availability Zone Details Request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sAP Availability Zone Details along with {@link Response} on successful completion of {@link Mono}. + * @return the recommended SAP Availability Zone Pair Details for your region along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> sapAvailabilityZoneDetailsWithResponseAsync( @@ -639,7 +604,7 @@ private Mono> sapAvailabilityZon } /** - * Get SAP Availability Zone Details. + * Get the recommended SAP Availability Zone Pair Details for your region. * * @param location The name of Azure region. * @param sapAvailabilityZoneDetails SAP Availability Zone Details Request body. @@ -647,7 +612,8 @@ private Mono> sapAvailabilityZon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sAP Availability Zone Details along with {@link Response} on successful completion of {@link Mono}. + * @return the recommended SAP Availability Zone Pair Details for your region along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> sapAvailabilityZoneDetailsWithResponseAsync( @@ -684,30 +650,14 @@ private Mono> sapAvailabilityZon } /** - * Get SAP Availability Zone Details. - * - * @param location The name of Azure region. - * @param sapAvailabilityZoneDetails SAP Availability Zone Details Request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sAP Availability Zone Details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono sapAvailabilityZoneDetailsAsync( - String location, SapAvailabilityZoneDetailsRequest sapAvailabilityZoneDetails) { - return sapAvailabilityZoneDetailsWithResponseAsync(location, sapAvailabilityZoneDetails) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get SAP Availability Zone Details. + * Get the recommended SAP Availability Zone Pair Details for your region. * * @param location The name of Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sAP Availability Zone Details on successful completion of {@link Mono}. + * @return the recommended SAP Availability Zone Pair Details for your region on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono sapAvailabilityZoneDetailsAsync(String location) { @@ -717,34 +667,34 @@ private Mono sapAvailabilityZoneDetailsAs } /** - * Get SAP Availability Zone Details. + * Get the recommended SAP Availability Zone Pair Details for your region. * * @param location The name of Azure region. + * @param sapAvailabilityZoneDetails SAP Availability Zone Details Request body. + * @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 sAP Availability Zone Details. + * @return the recommended SAP Availability Zone Pair Details for your region along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SapAvailabilityZoneDetailsResultInner sapAvailabilityZoneDetails(String location) { - final SapAvailabilityZoneDetailsRequest sapAvailabilityZoneDetails = null; - return sapAvailabilityZoneDetailsAsync(location, sapAvailabilityZoneDetails).block(); + public Response sapAvailabilityZoneDetailsWithResponse( + String location, SapAvailabilityZoneDetailsRequest sapAvailabilityZoneDetails, Context context) { + return sapAvailabilityZoneDetailsWithResponseAsync(location, sapAvailabilityZoneDetails, context).block(); } /** - * Get SAP Availability Zone Details. + * Get the recommended SAP Availability Zone Pair Details for your region. * * @param location The name of Azure region. - * @param sapAvailabilityZoneDetails SAP Availability Zone Details Request body. - * @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 sAP Availability Zone Details along with {@link Response}. + * @return the recommended SAP Availability Zone Pair Details for your region. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response sapAvailabilityZoneDetailsWithResponse( - String location, SapAvailabilityZoneDetailsRequest sapAvailabilityZoneDetails, Context context) { - return sapAvailabilityZoneDetailsWithResponseAsync(location, sapAvailabilityZoneDetails, context).block(); + public SapAvailabilityZoneDetailsResultInner sapAvailabilityZoneDetails(String location) { + final SapAvailabilityZoneDetailsRequest sapAvailabilityZoneDetails = null; + return sapAvailabilityZoneDetailsWithResponse(location, sapAvailabilityZoneDetails, Context.NONE).getValue(); } } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/ResourceProvidersImpl.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/ResourceProvidersImpl.java index a72563be7d6c3..e05b0d34100dc 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/ResourceProvidersImpl.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/ResourceProvidersImpl.java @@ -36,15 +36,6 @@ public ResourceProvidersImpl( this.serviceManager = serviceManager; } - public SapSizingRecommendationResult sapSizingRecommendations(String location) { - SapSizingRecommendationResultInner inner = this.serviceClient().sapSizingRecommendations(location); - if (inner != null) { - return new SapSizingRecommendationResultImpl(inner, this.manager()); - } else { - return null; - } - } - public Response sapSizingRecommendationsWithResponse( String location, SapSizingRecommendationRequest sapSizingRecommendation, Context context) { Response inner = @@ -60,10 +51,10 @@ public Response sapSizingRecommendationsWithRespo } } - public SapSupportedResourceSkusResult sapSupportedSku(String location) { - SapSupportedResourceSkusResultInner inner = this.serviceClient().sapSupportedSku(location); + public SapSizingRecommendationResult sapSizingRecommendations(String location) { + SapSizingRecommendationResultInner inner = this.serviceClient().sapSizingRecommendations(location); if (inner != null) { - return new SapSupportedResourceSkusResultImpl(inner, this.manager()); + return new SapSizingRecommendationResultImpl(inner, this.manager()); } else { return null; } @@ -84,10 +75,10 @@ public Response sapSupportedSkuWithResponse( } } - public SapDiskConfigurationsResult sapDiskConfigurations(String location) { - SapDiskConfigurationsResultInner inner = this.serviceClient().sapDiskConfigurations(location); + public SapSupportedResourceSkusResult sapSupportedSku(String location) { + SapSupportedResourceSkusResultInner inner = this.serviceClient().sapSupportedSku(location); if (inner != null) { - return new SapDiskConfigurationsResultImpl(inner, this.manager()); + return new SapSupportedResourceSkusResultImpl(inner, this.manager()); } else { return null; } @@ -108,10 +99,10 @@ public Response sapDiskConfigurationsWithResponse( } } - public SapAvailabilityZoneDetailsResult sapAvailabilityZoneDetails(String location) { - SapAvailabilityZoneDetailsResultInner inner = this.serviceClient().sapAvailabilityZoneDetails(location); + public SapDiskConfigurationsResult sapDiskConfigurations(String location) { + SapDiskConfigurationsResultInner inner = this.serviceClient().sapDiskConfigurations(location); if (inner != null) { - return new SapAvailabilityZoneDetailsResultImpl(inner, this.manager()); + return new SapDiskConfigurationsResultImpl(inner, this.manager()); } else { return null; } @@ -132,6 +123,15 @@ public Response sapAvailabilityZoneDetailsWith } } + public SapAvailabilityZoneDetailsResult sapAvailabilityZoneDetails(String location) { + SapAvailabilityZoneDetailsResultInner inner = this.serviceClient().sapAvailabilityZoneDetails(location); + if (inner != null) { + return new SapAvailabilityZoneDetailsResultImpl(inner, this.manager()); + } else { + return null; + } + } + private ResourceProvidersClient serviceClient() { return this.innerClient; } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapApplicationServerInstanceImpl.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapApplicationServerInstanceImpl.java index e698142b6480f..54f3d4455c24c 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapApplicationServerInstanceImpl.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapApplicationServerInstanceImpl.java @@ -8,13 +8,18 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.workloads.fluent.models.SapApplicationServerInstanceInner; +import com.azure.resourcemanager.workloads.models.ApplicationServerVmDetails; +import com.azure.resourcemanager.workloads.models.LoadBalancerDetails; +import com.azure.resourcemanager.workloads.models.OperationStatusResult; import com.azure.resourcemanager.workloads.models.SapApplicationServerInstance; import com.azure.resourcemanager.workloads.models.SapHealthState; import com.azure.resourcemanager.workloads.models.SapVirtualInstanceError; import com.azure.resourcemanager.workloads.models.SapVirtualInstanceProvisioningState; import com.azure.resourcemanager.workloads.models.SapVirtualInstanceStatus; +import com.azure.resourcemanager.workloads.models.StopRequest; import com.azure.resourcemanager.workloads.models.UpdateSapApplicationInstanceRequest; import java.util.Collections; +import java.util.List; import java.util.Map; public final class SapApplicationServerInstanceImpl @@ -90,8 +95,17 @@ public Long icmHttpsPort() { return this.innerModel().icmHttpsPort(); } - public String virtualMachineId() { - return this.innerModel().virtualMachineId(); + public LoadBalancerDetails loadBalancerDetails() { + return this.innerModel().loadBalancerDetails(); + } + + public List vmDetails() { + List inner = this.innerModel().vmDetails(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } } public SapVirtualInstanceStatus status() { @@ -227,6 +241,30 @@ public SapApplicationServerInstance refresh(Context context) { return this; } + public OperationStatusResult startInstance() { + return serviceManager + .sapApplicationServerInstances() + .startInstance(resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + } + + public OperationStatusResult startInstance(Context context) { + return serviceManager + .sapApplicationServerInstances() + .startInstance(resourceGroupName, sapVirtualInstanceName, applicationInstanceName, context); + } + + public OperationStatusResult stopInstance() { + return serviceManager + .sapApplicationServerInstances() + .stopInstance(resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + } + + public OperationStatusResult stopInstance(StopRequest body, Context context) { + return serviceManager + .sapApplicationServerInstances() + .stopInstance(resourceGroupName, sapVirtualInstanceName, applicationInstanceName, body, context); + } + public SapApplicationServerInstanceImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapApplicationServerInstancesClientImpl.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapApplicationServerInstancesClientImpl.java index 38c118b940893..89ef222b7a953 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapApplicationServerInstancesClientImpl.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapApplicationServerInstancesClientImpl.java @@ -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; @@ -36,6 +37,7 @@ import com.azure.resourcemanager.workloads.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.workloads.fluent.models.SapApplicationServerInstanceInner; import com.azure.resourcemanager.workloads.models.SapApplicationServerInstanceList; +import com.azure.resourcemanager.workloads.models.StopRequest; import com.azure.resourcemanager.workloads.models.UpdateSapApplicationInstanceRequest; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -70,7 +72,7 @@ public final class SapApplicationServerInstancesClientImpl implements SapApplica */ @Host("{$host}") @ServiceInterface(name = "WorkloadsClientSapAp") - private interface SapApplicationServerInstancesService { + public interface SapApplicationServerInstancesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads" @@ -152,6 +154,39 @@ Mono> list( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads" + + "/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName}/start") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> startInstance( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("sapVirtualInstanceName") String sapVirtualInstanceName, + @PathParam("applicationInstanceName") String applicationInstanceName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads" + + "/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName}/stop") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> stopInstance( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("sapVirtualInstanceName") String sapVirtualInstanceName, + @PathParam("applicationInstanceName") String applicationInstanceName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") StopRequest body, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -164,15 +199,16 @@ Mono> listNext( } /** - * Gets the SAP Application Server Instance. + * Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 SAP Application Server Instance along with {@link Response} on successful completion of {@link Mono}. + * @return the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource + * along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -221,16 +257,17 @@ private Mono> getWithResponseAsync( } /** - * Gets the SAP Application Server Instance. + * Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 SAP Application Server Instance along with {@link Response} on successful completion of {@link Mono}. + * @return the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource + * along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -276,15 +313,16 @@ private Mono> getWithResponseAsync( } /** - * Gets the SAP Application Server Instance. + * Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 SAP Application Server Instance on successful completion of {@link Mono}. + * @return the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -294,54 +332,56 @@ private Mono getAsync( } /** - * Gets the SAP Application Server Instance. + * Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 SAP Application Server Instance. + * @return the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource + * along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SapApplicationServerInstanceInner get( - String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName) { - return getAsync(resourceGroupName, sapVirtualInstanceName, applicationInstanceName).block(); + public Response getWithResponse( + String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName, Context context) { + return getWithResponseAsync(resourceGroupName, sapVirtualInstanceName, applicationInstanceName, context) + .block(); } /** - * Gets the SAP Application Server Instance. + * Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. - * @param context The context to associate with this operation. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 SAP Application Server Instance along with {@link Response}. + * @return the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName, Context context) { - return getWithResponseAsync(resourceGroupName, sapVirtualInstanceName, applicationInstanceName, context) - .block(); + public SapApplicationServerInstanceInner get( + String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName) { + return getWithResponse(resourceGroupName, sapVirtualInstanceName, applicationInstanceName, Context.NONE) + .getValue(); } /** - * Puts the SAP Application Server Instance. <br><br>This will be used by service only. PUT by end user - * will return a Bad Request error. + * Puts the SAP Application Server Instance resource. <br><br>This will be used by service only. PUT by + * end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. - * @param body The SAP Application Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance resource. + * @param body The SAP Application Server Instance resource request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return define the SAP Application Server Instance along with {@link Response} on successful completion of {@link - * Mono}. + * @return define the SAP Application Server Instance resource along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -397,19 +437,19 @@ private Mono>> createWithResponseAsync( } /** - * Puts the SAP Application Server Instance. <br><br>This will be used by service only. PUT by end user - * will return a Bad Request error. + * Puts the SAP Application Server Instance resource. <br><br>This will be used by service only. PUT by + * end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. - * @param body The SAP Application Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance resource. + * @param body The SAP Application Server Instance resource request body. * @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 define the SAP Application Server Instance along with {@link Response} on successful completion of {@link - * Mono}. + * @return define the SAP Application Server Instance resource along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -463,17 +503,17 @@ private Mono>> createWithResponseAsync( } /** - * Puts the SAP Application Server Instance. <br><br>This will be used by service only. PUT by end user - * will return a Bad Request error. + * Puts the SAP Application Server Instance resource. <br><br>This will be used by service only. PUT by + * end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. - * @param body The SAP Application Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance resource. + * @param body The SAP Application Server Instance resource request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 define the SAP Application Server Instance. + * @return the {@link PollerFlux} for polling of define the SAP Application Server Instance resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, SapApplicationServerInstanceInner> @@ -495,18 +535,46 @@ private Mono>> createWithResponseAsync( } /** - * Puts the SAP Application Server Instance. <br><br>This will be used by service only. PUT by end user - * will return a Bad Request error. + * Puts the SAP Application Server Instance resource. <br><br>This will be used by service only. PUT by + * end user will return a Bad Request error. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 define the SAP Application Server Instance resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SapApplicationServerInstanceInner> + beginCreateAsync(String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName) { + final SapApplicationServerInstanceInner body = null; + Mono>> mono = + createWithResponseAsync(resourceGroupName, sapVirtualInstanceName, applicationInstanceName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + SapApplicationServerInstanceInner.class, + SapApplicationServerInstanceInner.class, + this.client.getContext()); + } + + /** + * Puts the SAP Application Server Instance resource. <br><br>This will be used by service only. PUT by + * end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. - * @param body The SAP Application Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance resource. + * @param body The SAP Application Server Instance resource request body. * @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 define the SAP Application Server Instance. + * @return the {@link PollerFlux} for polling of define the SAP Application Server Instance resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, SapApplicationServerInstanceInner> @@ -530,41 +598,39 @@ private Mono>> createWithResponseAsync( } /** - * Puts the SAP Application Server Instance. <br><br>This will be used by service only. PUT by end user - * will return a Bad Request error. + * Puts the SAP Application Server Instance resource. <br><br>This will be used by service only. PUT by + * end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. - * @param body The SAP Application Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 define the SAP Application Server Instance. + * @return the {@link SyncPoller} for polling of define the SAP Application Server Instance resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SapApplicationServerInstanceInner> beginCreate( - String resourceGroupName, - String sapVirtualInstanceName, - String applicationInstanceName, - SapApplicationServerInstanceInner body) { - return beginCreateAsync(resourceGroupName, sapVirtualInstanceName, applicationInstanceName, body) + String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName) { + final SapApplicationServerInstanceInner body = null; + return this + .beginCreateAsync(resourceGroupName, sapVirtualInstanceName, applicationInstanceName, body) .getSyncPoller(); } /** - * Puts the SAP Application Server Instance. <br><br>This will be used by service only. PUT by end user - * will return a Bad Request error. + * Puts the SAP Application Server Instance resource. <br><br>This will be used by service only. PUT by + * end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. - * @param body The SAP Application Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance resource. + * @param body The SAP Application Server Instance resource request body. * @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 define the SAP Application Server Instance. + * @return the {@link SyncPoller} for polling of define the SAP Application Server Instance resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SapApplicationServerInstanceInner> beginCreate( @@ -573,22 +639,23 @@ public SyncPoller, SapApplicationS String applicationInstanceName, SapApplicationServerInstanceInner body, Context context) { - return beginCreateAsync(resourceGroupName, sapVirtualInstanceName, applicationInstanceName, body, context) + return this + .beginCreateAsync(resourceGroupName, sapVirtualInstanceName, applicationInstanceName, body, context) .getSyncPoller(); } /** - * Puts the SAP Application Server Instance. <br><br>This will be used by service only. PUT by end user - * will return a Bad Request error. + * Puts the SAP Application Server Instance resource. <br><br>This will be used by service only. PUT by + * end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. - * @param body The SAP Application Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance resource. + * @param body The SAP Application Server Instance resource request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return define the SAP Application Server Instance on successful completion of {@link Mono}. + * @return define the SAP Application Server Instance resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -602,16 +669,16 @@ private Mono createAsync( } /** - * Puts the SAP Application Server Instance. <br><br>This will be used by service only. PUT by end user - * will return a Bad Request error. + * Puts the SAP Application Server Instance resource. <br><br>This will be used by service only. PUT by + * end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 define the SAP Application Server Instance on successful completion of {@link Mono}. + * @return define the SAP Application Server Instance resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -623,18 +690,18 @@ private Mono createAsync( } /** - * Puts the SAP Application Server Instance. <br><br>This will be used by service only. PUT by end user - * will return a Bad Request error. + * Puts the SAP Application Server Instance resource. <br><br>This will be used by service only. PUT by + * end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. - * @param body The SAP Application Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance resource. + * @param body The SAP Application Server Instance resource request body. * @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 define the SAP Application Server Instance on successful completion of {@link Mono}. + * @return define the SAP Application Server Instance resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -649,38 +716,16 @@ private Mono createAsync( } /** - * Puts the SAP Application Server Instance. <br><br>This will be used by service only. PUT by end user - * will return a Bad Request error. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. - * @param body The SAP Application Server instance request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return define the SAP Application Server Instance. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SapApplicationServerInstanceInner create( - String resourceGroupName, - String sapVirtualInstanceName, - String applicationInstanceName, - SapApplicationServerInstanceInner body) { - return createAsync(resourceGroupName, sapVirtualInstanceName, applicationInstanceName, body).block(); - } - - /** - * Puts the SAP Application Server Instance. <br><br>This will be used by service only. PUT by end user - * will return a Bad Request error. + * Puts the SAP Application Server Instance resource. <br><br>This will be used by service only. PUT by + * end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 define the SAP Application Server Instance. + * @return define the SAP Application Server Instance resource. */ @ServiceMethod(returns = ReturnType.SINGLE) public SapApplicationServerInstanceInner create( @@ -690,18 +735,18 @@ public SapApplicationServerInstanceInner create( } /** - * Puts the SAP Application Server Instance. <br><br>This will be used by service only. PUT by end user - * will return a Bad Request error. + * Puts the SAP Application Server Instance resource. <br><br>This will be used by service only. PUT by + * end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. - * @param body The SAP Application Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance resource. + * @param body The SAP Application Server Instance resource request body. * @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 define the SAP Application Server Instance. + * @return define the SAP Application Server Instance resource. */ @ServiceMethod(returns = ReturnType.SINGLE) public SapApplicationServerInstanceInner create( @@ -714,17 +759,17 @@ public SapApplicationServerInstanceInner create( } /** - * Puts the SAP Application Server Instance. + * Puts the SAP Application Server Instance resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. - * @param body The SAP Application Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance resource. + * @param body The SAP Application Server Instance resource request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return define the SAP Application Server Instance along with {@link Response} on successful completion of {@link - * Mono}. + * @return define the SAP Application Server Instance resource along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -780,18 +825,18 @@ private Mono>> updateWithResponseAsync( } /** - * Puts the SAP Application Server Instance. + * Puts the SAP Application Server Instance resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. - * @param body The SAP Application Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance resource. + * @param body The SAP Application Server Instance resource request body. * @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 define the SAP Application Server Instance along with {@link Response} on successful completion of {@link - * Mono}. + * @return define the SAP Application Server Instance resource along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -845,16 +890,16 @@ private Mono>> updateWithResponseAsync( } /** - * Puts the SAP Application Server Instance. + * Puts the SAP Application Server Instance resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. - * @param body The SAP Application Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance resource. + * @param body The SAP Application Server Instance resource request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 define the SAP Application Server Instance. + * @return the {@link PollerFlux} for polling of define the SAP Application Server Instance resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, SapApplicationServerInstanceInner> @@ -876,17 +921,44 @@ private Mono>> updateWithResponseAsync( } /** - * Puts the SAP Application Server Instance. + * Puts the SAP Application Server Instance resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 define the SAP Application Server Instance resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SapApplicationServerInstanceInner> + beginUpdateAsync(String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName) { + final UpdateSapApplicationInstanceRequest body = null; + Mono>> mono = + updateWithResponseAsync(resourceGroupName, sapVirtualInstanceName, applicationInstanceName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + SapApplicationServerInstanceInner.class, + SapApplicationServerInstanceInner.class, + this.client.getContext()); + } + + /** + * Puts the SAP Application Server Instance resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. - * @param body The SAP Application Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance resource. + * @param body The SAP Application Server Instance resource request body. * @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 define the SAP Application Server Instance. + * @return the {@link PollerFlux} for polling of define the SAP Application Server Instance resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, SapApplicationServerInstanceInner> @@ -910,39 +982,37 @@ private Mono>> updateWithResponseAsync( } /** - * Puts the SAP Application Server Instance. + * Puts the SAP Application Server Instance resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. - * @param body The SAP Application Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 define the SAP Application Server Instance. + * @return the {@link SyncPoller} for polling of define the SAP Application Server Instance resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SapApplicationServerInstanceInner> beginUpdate( - String resourceGroupName, - String sapVirtualInstanceName, - String applicationInstanceName, - UpdateSapApplicationInstanceRequest body) { - return beginUpdateAsync(resourceGroupName, sapVirtualInstanceName, applicationInstanceName, body) + String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName) { + final UpdateSapApplicationInstanceRequest body = null; + return this + .beginUpdateAsync(resourceGroupName, sapVirtualInstanceName, applicationInstanceName, body) .getSyncPoller(); } /** - * Puts the SAP Application Server Instance. + * Puts the SAP Application Server Instance resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. - * @param body The SAP Application Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance resource. + * @param body The SAP Application Server Instance resource request body. * @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 define the SAP Application Server Instance. + * @return the {@link SyncPoller} for polling of define the SAP Application Server Instance resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SapApplicationServerInstanceInner> beginUpdate( @@ -951,21 +1021,22 @@ public SyncPoller, SapApplicationS String applicationInstanceName, UpdateSapApplicationInstanceRequest body, Context context) { - return beginUpdateAsync(resourceGroupName, sapVirtualInstanceName, applicationInstanceName, body, context) + return this + .beginUpdateAsync(resourceGroupName, sapVirtualInstanceName, applicationInstanceName, body, context) .getSyncPoller(); } /** - * Puts the SAP Application Server Instance. + * Puts the SAP Application Server Instance resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. - * @param body The SAP Application Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance resource. + * @param body The SAP Application Server Instance resource request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return define the SAP Application Server Instance on successful completion of {@link Mono}. + * @return define the SAP Application Server Instance resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -979,15 +1050,15 @@ private Mono updateAsync( } /** - * Puts the SAP Application Server Instance. + * Puts the SAP Application Server Instance resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 define the SAP Application Server Instance on successful completion of {@link Mono}. + * @return define the SAP Application Server Instance resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -999,17 +1070,17 @@ private Mono updateAsync( } /** - * Puts the SAP Application Server Instance. + * Puts the SAP Application Server Instance resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. - * @param body The SAP Application Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance resource. + * @param body The SAP Application Server Instance resource request body. * @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 define the SAP Application Server Instance on successful completion of {@link Mono}. + * @return define the SAP Application Server Instance resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1024,36 +1095,15 @@ private Mono updateAsync( } /** - * Puts the SAP Application Server Instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. - * @param body The SAP Application Server instance request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return define the SAP Application Server Instance. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SapApplicationServerInstanceInner update( - String resourceGroupName, - String sapVirtualInstanceName, - String applicationInstanceName, - UpdateSapApplicationInstanceRequest body) { - return updateAsync(resourceGroupName, sapVirtualInstanceName, applicationInstanceName, body).block(); - } - - /** - * Puts the SAP Application Server Instance. + * Puts the SAP Application Server Instance resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 define the SAP Application Server Instance. + * @return define the SAP Application Server Instance resource. */ @ServiceMethod(returns = ReturnType.SINGLE) public SapApplicationServerInstanceInner update( @@ -1063,17 +1113,17 @@ public SapApplicationServerInstanceInner update( } /** - * Puts the SAP Application Server Instance. + * Puts the SAP Application Server Instance resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. - * @param body The SAP Application Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance resource. + * @param body The SAP Application Server Instance resource request body. * @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 define the SAP Application Server Instance. + * @return define the SAP Application Server Instance resource. */ @ServiceMethod(returns = ReturnType.SINGLE) public SapApplicationServerInstanceInner update( @@ -1086,12 +1136,12 @@ public SapApplicationServerInstanceInner update( } /** - * Deletes the SAP Application Server Instance. <br><br>This operation will be used by service only. - * Delete by end user will return a Bad Request error. + * Deletes the SAP Application Server Instance resource. <br><br>This operation will be used by service + * only. Delete by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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. @@ -1145,12 +1195,12 @@ private Mono>> deleteWithResponseAsync( } /** - * Deletes the SAP Application Server Instance. <br><br>This operation will be used by service only. - * Delete by end user will return a Bad Request error. + * Deletes the SAP Application Server Instance resource. <br><br>This operation will be used by service + * only. Delete by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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. @@ -1202,12 +1252,12 @@ private Mono>> deleteWithResponseAsync( } /** - * Deletes the SAP Application Server Instance. <br><br>This operation will be used by service only. - * Delete by end user will return a Bad Request error. + * Deletes the SAP Application Server Instance resource. <br><br>This operation will be used by service + * only. Delete by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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. @@ -1229,12 +1279,12 @@ private PollerFlux, OperationStatusResult } /** - * Deletes the SAP Application Server Instance. <br><br>This operation will be used by service only. - * Delete by end user will return a Bad Request error. + * Deletes the SAP Application Server Instance resource. <br><br>This operation will be used by service + * only. Delete by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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. @@ -1258,12 +1308,12 @@ private PollerFlux, OperationStatusResult } /** - * Deletes the SAP Application Server Instance. <br><br>This operation will be used by service only. - * Delete by end user will return a Bad Request error. + * Deletes the SAP Application Server Instance resource. <br><br>This operation will be used by service + * only. Delete by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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. @@ -1272,16 +1322,18 @@ private PollerFlux, OperationStatusResult @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationStatusResultInner> beginDelete( String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName) { - return beginDeleteAsync(resourceGroupName, sapVirtualInstanceName, applicationInstanceName).getSyncPoller(); + return this + .beginDeleteAsync(resourceGroupName, sapVirtualInstanceName, applicationInstanceName) + .getSyncPoller(); } /** - * Deletes the SAP Application Server Instance. <br><br>This operation will be used by service only. - * Delete by end user will return a Bad Request error. + * Deletes the SAP Application Server Instance resource. <br><br>This operation will be used by service + * only. Delete by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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. @@ -1291,17 +1343,18 @@ public SyncPoller, OperationStatusResultI @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationStatusResultInner> beginDelete( String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName, Context context) { - return beginDeleteAsync(resourceGroupName, sapVirtualInstanceName, applicationInstanceName, context) + return this + .beginDeleteAsync(resourceGroupName, sapVirtualInstanceName, applicationInstanceName, context) .getSyncPoller(); } /** - * Deletes the SAP Application Server Instance. <br><br>This operation will be used by service only. - * Delete by end user will return a Bad Request error. + * Deletes the SAP Application Server Instance resource. <br><br>This operation will be used by service + * only. Delete by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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. @@ -1316,12 +1369,12 @@ private Mono deleteAsync( } /** - * Deletes the SAP Application Server Instance. <br><br>This operation will be used by service only. - * Delete by end user will return a Bad Request error. + * Deletes the SAP Application Server Instance resource. <br><br>This operation will be used by service + * only. Delete by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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. @@ -1337,12 +1390,12 @@ private Mono deleteAsync( } /** - * Deletes the SAP Application Server Instance. <br><br>This operation will be used by service only. - * Delete by end user will return a Bad Request error. + * Deletes the SAP Application Server Instance resource. <br><br>This operation will be used by service + * only. Delete by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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. @@ -1355,12 +1408,12 @@ public OperationStatusResultInner delete( } /** - * Deletes the SAP Application Server Instance. <br><br>This operation will be used by service only. - * Delete by end user will return a Bad Request error. + * Deletes the SAP Application Server Instance resource. <br><br>This operation will be used by service + * only. Delete by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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. @@ -1374,15 +1427,15 @@ public OperationStatusResultInner delete( } /** - * Lists the SAP Application server Instances in an SVI. + * Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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 defines the collection of SAP Application Server Instances along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return defines the collection of SAP Application Server Instance resources along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -1434,16 +1487,16 @@ private Mono> listSinglePageAsy } /** - * Lists the SAP Application server Instances in an SVI. + * Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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 defines the collection of SAP Application Server Instances along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return defines the collection of SAP Application Server Instance resources along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -1492,14 +1545,15 @@ private Mono> listSinglePageAsy } /** - * Lists the SAP Application server Instances in an SVI. + * Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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 defines the collection of SAP Application Server Instances as paginated response with {@link PagedFlux}. + * @return defines the collection of SAP Application Server Instance resources as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -1510,15 +1564,16 @@ private PagedFlux listAsync( } /** - * Lists the SAP Application server Instances in an SVI. + * Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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 defines the collection of SAP Application Server Instances as paginated response with {@link PagedFlux}. + * @return defines the collection of SAP Application Server Instance resources as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -1529,14 +1584,14 @@ private PagedFlux listAsync( } /** - * Lists the SAP Application server Instances in an SVI. + * Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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 defines the collection of SAP Application Server Instances as paginated response with {@link + * @return defines the collection of SAP Application Server Instance resources as paginated response with {@link * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) @@ -1546,15 +1601,15 @@ public PagedIterable list( } /** - * Lists the SAP Application server Instances in an SVI. + * Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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 defines the collection of SAP Application Server Instances as paginated response with {@link + * @return defines the collection of SAP Application Server Instance resources as paginated response with {@link * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) @@ -1563,15 +1618,665 @@ public PagedIterable list( return new PagedIterable<>(listAsync(resourceGroupName, sapVirtualInstanceName, context)); } + /** + * Starts the SAP Application Server Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 current status of an async operation along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> startInstanceWithResponseAsync( + String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName) { + 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 (sapVirtualInstanceName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter sapVirtualInstanceName is required and cannot be null.")); + } + if (applicationInstanceName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter applicationInstanceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .startInstance( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + sapVirtualInstanceName, + applicationInstanceName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Starts the SAP Application Server Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 current status of an async operation along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> startInstanceWithResponseAsync( + String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName, 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 (sapVirtualInstanceName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter sapVirtualInstanceName is required and cannot be null.")); + } + if (applicationInstanceName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter applicationInstanceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .startInstance( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + sapVirtualInstanceName, + applicationInstanceName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Starts the SAP Application Server Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OperationStatusResultInner> beginStartInstanceAsync( + String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName) { + Mono>> mono = + startInstanceWithResponseAsync(resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + OperationStatusResultInner.class, + OperationStatusResultInner.class, + this.client.getContext()); + } + + /** + * Starts the SAP Application Server Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OperationStatusResultInner> beginStartInstanceAsync( + String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + startInstanceWithResponseAsync(resourceGroupName, sapVirtualInstanceName, applicationInstanceName, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + OperationStatusResultInner.class, + OperationStatusResultInner.class, + context); + } + + /** + * Starts the SAP Application Server Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OperationStatusResultInner> beginStartInstance( + String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName) { + return this + .beginStartInstanceAsync(resourceGroupName, sapVirtualInstanceName, applicationInstanceName) + .getSyncPoller(); + } + + /** + * Starts the SAP Application Server Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OperationStatusResultInner> beginStartInstance( + String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName, Context context) { + return this + .beginStartInstanceAsync(resourceGroupName, sapVirtualInstanceName, applicationInstanceName, context) + .getSyncPoller(); + } + + /** + * Starts the SAP Application Server Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono startInstanceAsync( + String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName) { + return beginStartInstanceAsync(resourceGroupName, sapVirtualInstanceName, applicationInstanceName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Starts the SAP Application Server Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono startInstanceAsync( + String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName, Context context) { + return beginStartInstanceAsync(resourceGroupName, sapVirtualInstanceName, applicationInstanceName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Starts the SAP Application Server Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationStatusResultInner startInstance( + String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName) { + return startInstanceAsync(resourceGroupName, sapVirtualInstanceName, applicationInstanceName).block(); + } + + /** + * Starts the SAP Application Server Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationStatusResultInner startInstance( + String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName, Context context) { + return startInstanceAsync(resourceGroupName, sapVirtualInstanceName, applicationInstanceName, context).block(); + } + + /** + * Stops the SAP Application Server Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance resource. + * @param body SAP Application server instance stop request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> stopInstanceWithResponseAsync( + String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName, StopRequest body) { + 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 (sapVirtualInstanceName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter sapVirtualInstanceName is required and cannot be null.")); + } + if (applicationInstanceName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter applicationInstanceName is required and cannot be null.")); + } + if (body != null) { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .stopInstance( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + sapVirtualInstanceName, + applicationInstanceName, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Stops the SAP Application Server Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance resource. + * @param body SAP Application server instance stop request body. + * @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 current status of an async operation along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> stopInstanceWithResponseAsync( + String resourceGroupName, + String sapVirtualInstanceName, + String applicationInstanceName, + StopRequest body, + 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 (sapVirtualInstanceName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter sapVirtualInstanceName is required and cannot be null.")); + } + if (applicationInstanceName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter applicationInstanceName is required and cannot be null.")); + } + if (body != null) { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .stopInstance( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + sapVirtualInstanceName, + applicationInstanceName, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Stops the SAP Application Server Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance resource. + * @param body SAP Application server instance stop request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OperationStatusResultInner> beginStopInstanceAsync( + String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName, StopRequest body) { + Mono>> mono = + stopInstanceWithResponseAsync(resourceGroupName, sapVirtualInstanceName, applicationInstanceName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + OperationStatusResultInner.class, + OperationStatusResultInner.class, + this.client.getContext()); + } + + /** + * Stops the SAP Application Server Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OperationStatusResultInner> beginStopInstanceAsync( + String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName) { + final StopRequest body = null; + Mono>> mono = + stopInstanceWithResponseAsync(resourceGroupName, sapVirtualInstanceName, applicationInstanceName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + OperationStatusResultInner.class, + OperationStatusResultInner.class, + this.client.getContext()); + } + + /** + * Stops the SAP Application Server Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance resource. + * @param body SAP Application server instance stop request body. + * @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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OperationStatusResultInner> beginStopInstanceAsync( + String resourceGroupName, + String sapVirtualInstanceName, + String applicationInstanceName, + StopRequest body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + stopInstanceWithResponseAsync( + resourceGroupName, sapVirtualInstanceName, applicationInstanceName, body, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + OperationStatusResultInner.class, + OperationStatusResultInner.class, + context); + } + + /** + * Stops the SAP Application Server Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OperationStatusResultInner> beginStopInstance( + String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName) { + final StopRequest body = null; + return this + .beginStopInstanceAsync(resourceGroupName, sapVirtualInstanceName, applicationInstanceName, body) + .getSyncPoller(); + } + + /** + * Stops the SAP Application Server Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance resource. + * @param body SAP Application server instance stop request body. + * @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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OperationStatusResultInner> beginStopInstance( + String resourceGroupName, + String sapVirtualInstanceName, + String applicationInstanceName, + StopRequest body, + Context context) { + return this + .beginStopInstanceAsync(resourceGroupName, sapVirtualInstanceName, applicationInstanceName, body, context) + .getSyncPoller(); + } + + /** + * Stops the SAP Application Server Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance resource. + * @param body SAP Application server instance stop request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono stopInstanceAsync( + String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName, StopRequest body) { + return beginStopInstanceAsync(resourceGroupName, sapVirtualInstanceName, applicationInstanceName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Stops the SAP Application Server Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono stopInstanceAsync( + String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName) { + final StopRequest body = null; + return beginStopInstanceAsync(resourceGroupName, sapVirtualInstanceName, applicationInstanceName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Stops the SAP Application Server Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance resource. + * @param body SAP Application server instance stop request body. + * @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 current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono stopInstanceAsync( + String resourceGroupName, + String sapVirtualInstanceName, + String applicationInstanceName, + StopRequest body, + Context context) { + return beginStopInstanceAsync(resourceGroupName, sapVirtualInstanceName, applicationInstanceName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Stops the SAP Application Server Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationStatusResultInner stopInstance( + String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName) { + final StopRequest body = null; + return stopInstanceAsync(resourceGroupName, sapVirtualInstanceName, applicationInstanceName, body).block(); + } + + /** + * Stops the SAP Application Server Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance resource. + * @param body SAP Application server instance stop request body. + * @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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationStatusResultInner stopInstance( + String resourceGroupName, + String sapVirtualInstanceName, + String applicationInstanceName, + StopRequest body, + Context context) { + return stopInstanceAsync(resourceGroupName, sapVirtualInstanceName, applicationInstanceName, body, context) + .block(); + } + /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the collection of SAP Application Server Instances along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return defines the collection of SAP Application Server Instance resources along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1602,13 +2307,14 @@ private Mono> listNextSinglePag /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the collection of SAP Application Server Instances along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return defines the collection of SAP Application Server Instance resources along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync( diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapApplicationServerInstancesImpl.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapApplicationServerInstancesImpl.java index 742907d46ba0e..53a4fe12a6c27 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapApplicationServerInstancesImpl.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapApplicationServerInstancesImpl.java @@ -15,6 +15,7 @@ import com.azure.resourcemanager.workloads.models.OperationStatusResult; import com.azure.resourcemanager.workloads.models.SapApplicationServerInstance; import com.azure.resourcemanager.workloads.models.SapApplicationServerInstances; +import com.azure.resourcemanager.workloads.models.StopRequest; public final class SapApplicationServerInstancesImpl implements SapApplicationServerInstances { private static final ClientLogger LOGGER = new ClientLogger(SapApplicationServerInstancesImpl.class); @@ -30,17 +31,6 @@ public SapApplicationServerInstancesImpl( this.serviceManager = serviceManager; } - public SapApplicationServerInstance get( - String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName) { - SapApplicationServerInstanceInner inner = - this.serviceClient().get(resourceGroupName, sapVirtualInstanceName, applicationInstanceName); - if (inner != null) { - return new SapApplicationServerInstanceImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName, Context context) { Response inner = @@ -58,6 +48,17 @@ public Response getWithResponse( } } + public SapApplicationServerInstance get( + String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName) { + SapApplicationServerInstanceInner inner = + this.serviceClient().get(resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + if (inner != null) { + return new SapApplicationServerInstanceImpl(inner, this.manager()); + } else { + return null; + } + } + public OperationStatusResult delete( String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName) { OperationStatusResultInner inner = @@ -93,6 +94,58 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new SapApplicationServerInstanceImpl(inner1, this.manager())); } + public OperationStatusResult startInstance( + String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName) { + OperationStatusResultInner inner = + this.serviceClient().startInstance(resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + if (inner != null) { + return new OperationStatusResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public OperationStatusResult startInstance( + String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName, Context context) { + OperationStatusResultInner inner = + this + .serviceClient() + .startInstance(resourceGroupName, sapVirtualInstanceName, applicationInstanceName, context); + if (inner != null) { + return new OperationStatusResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public OperationStatusResult stopInstance( + String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName) { + OperationStatusResultInner inner = + this.serviceClient().stopInstance(resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + if (inner != null) { + return new OperationStatusResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public OperationStatusResult stopInstance( + String resourceGroupName, + String sapVirtualInstanceName, + String applicationInstanceName, + StopRequest body, + Context context) { + OperationStatusResultInner inner = + this + .serviceClient() + .stopInstance(resourceGroupName, sapVirtualInstanceName, applicationInstanceName, body, context); + if (inner != null) { + return new OperationStatusResultImpl(inner, this.manager()); + } else { + return null; + } + } + public SapApplicationServerInstance getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapCentralInstancesClientImpl.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapCentralInstancesClientImpl.java index d41cfcc1d0cc7..3d5b15f941e1a 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapCentralInstancesClientImpl.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapCentralInstancesClientImpl.java @@ -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; @@ -36,6 +37,7 @@ import com.azure.resourcemanager.workloads.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.workloads.fluent.models.SapCentralServerInstanceInner; import com.azure.resourcemanager.workloads.models.SapCentralInstanceList; +import com.azure.resourcemanager.workloads.models.StopRequest; import com.azure.resourcemanager.workloads.models.UpdateSapCentralInstanceRequest; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -66,7 +68,7 @@ public final class SapCentralInstancesClientImpl implements SapCentralInstancesC */ @Host("{$host}") @ServiceInterface(name = "WorkloadsClientSapCe") - private interface SapCentralInstancesService { + public interface SapCentralInstancesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads" @@ -148,6 +150,39 @@ Mono> list( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads" + + "/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName}/start") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> startInstance( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("sapVirtualInstanceName") String sapVirtualInstanceName, + @PathParam("centralInstanceName") String centralInstanceName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads" + + "/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName}/stop") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> stopInstance( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("sapVirtualInstanceName") String sapVirtualInstanceName, + @PathParam("centralInstanceName") String centralInstanceName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") StopRequest body, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -160,16 +195,17 @@ Mono> listNext( } /** - * Gets the SAP Central Instance. + * Gets the SAP Central Services Instance resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the SAP Central Instance along with {@link Response} on successful completion of {@link Mono}. + * @return the SAP Central Services Instance resource along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -217,17 +253,18 @@ private Mono> getWithResponseAsync( } /** - * Gets the SAP Central Instance. + * Gets the SAP Central Services Instance resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. * @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 SAP Central Instance along with {@link Response} on successful completion of {@link Mono}. + * @return the SAP Central Services Instance resource along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -272,16 +309,16 @@ private Mono> getWithResponseAsync( } /** - * Gets the SAP Central Instance. + * Gets the SAP Central Services Instance resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the SAP Central Instance on successful completion of {@link Mono}. + * @return the SAP Central Services Instance resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -291,56 +328,56 @@ private Mono getAsync( } /** - * Gets the SAP Central Instance. + * Gets the SAP Central Services Instance resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @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 SAP Central Instance. + * @return the SAP Central Services Instance resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SapCentralServerInstanceInner get( - String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName) { - return getAsync(resourceGroupName, sapVirtualInstanceName, centralInstanceName).block(); + public Response getWithResponse( + String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName, Context context) { + return getWithResponseAsync(resourceGroupName, sapVirtualInstanceName, centralInstanceName, context).block(); } /** - * Gets the SAP Central Instance. + * Gets the SAP Central Services Instance resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. - * @param context The context to associate with this operation. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the SAP Central Instance along with {@link Response}. + * @return the SAP Central Services Instance resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName, Context context) { - return getWithResponseAsync(resourceGroupName, sapVirtualInstanceName, centralInstanceName, context).block(); + public SapCentralServerInstanceInner get( + String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName) { + return getWithResponse(resourceGroupName, sapVirtualInstanceName, centralInstanceName, Context.NONE).getValue(); } /** - * Puts the SAP Central Instance. <br><br>This will be used by service only. PUT by end user will return - * a Bad Request error. + * Creates the SAP Central Services Instance resource. <br><br>This will be used by service only. PUT + * operation on this resource by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. - * @param body The SAP Central Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @param body The SAP Central Services Instance request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return define the SAP Central Server Instance along with {@link Response} on successful completion of {@link - * Mono}. + * @return define the SAP Central Services Instance resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -395,20 +432,20 @@ private Mono>> createWithResponseAsync( } /** - * Puts the SAP Central Instance. <br><br>This will be used by service only. PUT by end user will return - * a Bad Request error. + * Creates the SAP Central Services Instance resource. <br><br>This will be used by service only. PUT + * operation on this resource by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. - * @param body The SAP Central Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @param body The SAP Central Services Instance request body. * @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 define the SAP Central Server Instance along with {@link Response} on successful completion of {@link - * Mono}. + * @return define the SAP Central Services Instance resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -461,18 +498,18 @@ private Mono>> createWithResponseAsync( } /** - * Puts the SAP Central Instance. <br><br>This will be used by service only. PUT by end user will return - * a Bad Request error. + * Creates the SAP Central Services Instance resource. <br><br>This will be used by service only. PUT + * operation on this resource by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. - * @param body The SAP Central Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @param body The SAP Central Services Instance request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 define the SAP Central Server Instance. + * @return the {@link PollerFlux} for polling of define the SAP Central Services Instance resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, SapCentralServerInstanceInner> beginCreateAsync( @@ -493,19 +530,48 @@ private PollerFlux, SapCentralServerIn } /** - * Puts the SAP Central Instance. <br><br>This will be used by service only. PUT by end user will return - * a Bad Request error. + * Creates the SAP Central Services Instance resource. <br><br>This will be used by service only. PUT + * operation on this resource by end user will return a Bad Request error. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 define the SAP Central Services Instance resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SapCentralServerInstanceInner> beginCreateAsync( + String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName) { + final SapCentralServerInstanceInner body = null; + Mono>> mono = + createWithResponseAsync(resourceGroupName, sapVirtualInstanceName, centralInstanceName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + SapCentralServerInstanceInner.class, + SapCentralServerInstanceInner.class, + this.client.getContext()); + } + + /** + * Creates the SAP Central Services Instance resource. <br><br>This will be used by service only. PUT + * operation on this resource by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. - * @param body The SAP Central Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @param body The SAP Central Services Instance request body. * @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 define the SAP Central Server Instance. + * @return the {@link PollerFlux} for polling of define the SAP Central Services Instance resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, SapCentralServerInstanceInner> beginCreateAsync( @@ -528,42 +594,41 @@ private PollerFlux, SapCentralServerIn } /** - * Puts the SAP Central Instance. <br><br>This will be used by service only. PUT by end user will return - * a Bad Request error. + * Creates the SAP Central Services Instance resource. <br><br>This will be used by service only. PUT + * operation on this resource by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. - * @param body The SAP Central Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 define the SAP Central Server Instance. + * @return the {@link SyncPoller} for polling of define the SAP Central Services Instance resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SapCentralServerInstanceInner> beginCreate( - String resourceGroupName, - String sapVirtualInstanceName, - String centralInstanceName, - SapCentralServerInstanceInner body) { - return beginCreateAsync(resourceGroupName, sapVirtualInstanceName, centralInstanceName, body).getSyncPoller(); + String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName) { + final SapCentralServerInstanceInner body = null; + return this + .beginCreateAsync(resourceGroupName, sapVirtualInstanceName, centralInstanceName, body) + .getSyncPoller(); } /** - * Puts the SAP Central Instance. <br><br>This will be used by service only. PUT by end user will return - * a Bad Request error. + * Creates the SAP Central Services Instance resource. <br><br>This will be used by service only. PUT + * operation on this resource by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. - * @param body The SAP Central Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @param body The SAP Central Services Instance request body. * @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 define the SAP Central Server Instance. + * @return the {@link SyncPoller} for polling of define the SAP Central Services Instance resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SapCentralServerInstanceInner> beginCreate( @@ -572,23 +637,24 @@ public SyncPoller, SapCentralServerIns String centralInstanceName, SapCentralServerInstanceInner body, Context context) { - return beginCreateAsync(resourceGroupName, sapVirtualInstanceName, centralInstanceName, body, context) + return this + .beginCreateAsync(resourceGroupName, sapVirtualInstanceName, centralInstanceName, body, context) .getSyncPoller(); } /** - * Puts the SAP Central Instance. <br><br>This will be used by service only. PUT by end user will return - * a Bad Request error. + * Creates the SAP Central Services Instance resource. <br><br>This will be used by service only. PUT + * operation on this resource by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. - * @param body The SAP Central Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @param body The SAP Central Services Instance request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return define the SAP Central Server Instance on successful completion of {@link Mono}. + * @return define the SAP Central Services Instance resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -602,17 +668,17 @@ private Mono createAsync( } /** - * Puts the SAP Central Instance. <br><br>This will be used by service only. PUT by end user will return - * a Bad Request error. + * Creates the SAP Central Services Instance resource. <br><br>This will be used by service only. PUT + * operation on this resource by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return define the SAP Central Server Instance on successful completion of {@link Mono}. + * @return define the SAP Central Services Instance resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -624,19 +690,19 @@ private Mono createAsync( } /** - * Puts the SAP Central Instance. <br><br>This will be used by service only. PUT by end user will return - * a Bad Request error. + * Creates the SAP Central Services Instance resource. <br><br>This will be used by service only. PUT + * operation on this resource by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. - * @param body The SAP Central Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @param body The SAP Central Services Instance request body. * @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 define the SAP Central Server Instance on successful completion of {@link Mono}. + * @return define the SAP Central Services Instance resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -651,40 +717,17 @@ private Mono createAsync( } /** - * Puts the SAP Central Instance. <br><br>This will be used by service only. PUT by end user will return - * a Bad Request error. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. - * @param body The SAP Central Server instance request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return define the SAP Central Server Instance. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SapCentralServerInstanceInner create( - String resourceGroupName, - String sapVirtualInstanceName, - String centralInstanceName, - SapCentralServerInstanceInner body) { - return createAsync(resourceGroupName, sapVirtualInstanceName, centralInstanceName, body).block(); - } - - /** - * Puts the SAP Central Instance. <br><br>This will be used by service only. PUT by end user will return - * a Bad Request error. + * Creates the SAP Central Services Instance resource. <br><br>This will be used by service only. PUT + * operation on this resource by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return define the SAP Central Server Instance. + * @return define the SAP Central Services Instance resource. */ @ServiceMethod(returns = ReturnType.SINGLE) public SapCentralServerInstanceInner create( @@ -694,19 +737,19 @@ public SapCentralServerInstanceInner create( } /** - * Puts the SAP Central Instance. <br><br>This will be used by service only. PUT by end user will return - * a Bad Request error. + * Creates the SAP Central Services Instance resource. <br><br>This will be used by service only. PUT + * operation on this resource by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. - * @param body The SAP Central Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @param body The SAP Central Services Instance request body. * @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 define the SAP Central Server Instance. + * @return define the SAP Central Services Instance resource. */ @ServiceMethod(returns = ReturnType.SINGLE) public SapCentralServerInstanceInner create( @@ -719,18 +762,19 @@ public SapCentralServerInstanceInner create( } /** - * Updates the SAP Central Instance. <br><br>This can be used to update tags. + * Updates the SAP Central Services Instance resource. <br><br>This can be used to update tags on the + * resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. - * @param body The SAP Central Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @param body The SAP Central Services Instance resource request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return define the SAP Central Server Instance along with {@link Response} on successful completion of {@link - * Mono}. + * @return define the SAP Central Services Instance resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -785,19 +829,20 @@ private Mono>> updateWithResponseAsync( } /** - * Updates the SAP Central Instance. <br><br>This can be used to update tags. + * Updates the SAP Central Services Instance resource. <br><br>This can be used to update tags on the + * resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. - * @param body The SAP Central Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @param body The SAP Central Services Instance resource request body. * @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 define the SAP Central Server Instance along with {@link Response} on successful completion of {@link - * Mono}. + * @return define the SAP Central Services Instance resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -850,17 +895,18 @@ private Mono>> updateWithResponseAsync( } /** - * Updates the SAP Central Instance. <br><br>This can be used to update tags. + * Updates the SAP Central Services Instance resource. <br><br>This can be used to update tags on the + * resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. - * @param body The SAP Central Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @param body The SAP Central Services Instance resource request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 define the SAP Central Server Instance. + * @return the {@link PollerFlux} for polling of define the SAP Central Services Instance resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, SapCentralServerInstanceInner> beginUpdateAsync( @@ -881,18 +927,48 @@ private PollerFlux, SapCentralServerIn } /** - * Updates the SAP Central Instance. <br><br>This can be used to update tags. + * Updates the SAP Central Services Instance resource. <br><br>This can be used to update tags on the + * resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 define the SAP Central Services Instance resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SapCentralServerInstanceInner> beginUpdateAsync( + String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName) { + final UpdateSapCentralInstanceRequest body = null; + Mono>> mono = + updateWithResponseAsync(resourceGroupName, sapVirtualInstanceName, centralInstanceName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + SapCentralServerInstanceInner.class, + SapCentralServerInstanceInner.class, + this.client.getContext()); + } + + /** + * Updates the SAP Central Services Instance resource. <br><br>This can be used to update tags on the + * resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. - * @param body The SAP Central Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @param body The SAP Central Services Instance resource request body. * @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 define the SAP Central Server Instance. + * @return the {@link PollerFlux} for polling of define the SAP Central Services Instance resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, SapCentralServerInstanceInner> beginUpdateAsync( @@ -915,40 +991,41 @@ private PollerFlux, SapCentralServerIn } /** - * Updates the SAP Central Instance. <br><br>This can be used to update tags. + * Updates the SAP Central Services Instance resource. <br><br>This can be used to update tags on the + * resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. - * @param body The SAP Central Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 define the SAP Central Server Instance. + * @return the {@link SyncPoller} for polling of define the SAP Central Services Instance resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SapCentralServerInstanceInner> beginUpdate( - String resourceGroupName, - String sapVirtualInstanceName, - String centralInstanceName, - UpdateSapCentralInstanceRequest body) { - return beginUpdateAsync(resourceGroupName, sapVirtualInstanceName, centralInstanceName, body).getSyncPoller(); + String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName) { + final UpdateSapCentralInstanceRequest body = null; + return this + .beginUpdateAsync(resourceGroupName, sapVirtualInstanceName, centralInstanceName, body) + .getSyncPoller(); } /** - * Updates the SAP Central Instance. <br><br>This can be used to update tags. + * Updates the SAP Central Services Instance resource. <br><br>This can be used to update tags on the + * resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. - * @param body The SAP Central Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @param body The SAP Central Services Instance resource request body. * @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 define the SAP Central Server Instance. + * @return the {@link SyncPoller} for polling of define the SAP Central Services Instance resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SapCentralServerInstanceInner> beginUpdate( @@ -957,22 +1034,24 @@ public SyncPoller, SapCentralServerIns String centralInstanceName, UpdateSapCentralInstanceRequest body, Context context) { - return beginUpdateAsync(resourceGroupName, sapVirtualInstanceName, centralInstanceName, body, context) + return this + .beginUpdateAsync(resourceGroupName, sapVirtualInstanceName, centralInstanceName, body, context) .getSyncPoller(); } /** - * Updates the SAP Central Instance. <br><br>This can be used to update tags. + * Updates the SAP Central Services Instance resource. <br><br>This can be used to update tags on the + * resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. - * @param body The SAP Central Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @param body The SAP Central Services Instance resource request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return define the SAP Central Server Instance on successful completion of {@link Mono}. + * @return define the SAP Central Services Instance resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -986,16 +1065,17 @@ private Mono updateAsync( } /** - * Updates the SAP Central Instance. <br><br>This can be used to update tags. + * Updates the SAP Central Services Instance resource. <br><br>This can be used to update tags on the + * resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return define the SAP Central Server Instance on successful completion of {@link Mono}. + * @return define the SAP Central Services Instance resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1007,18 +1087,19 @@ private Mono updateAsync( } /** - * Updates the SAP Central Instance. <br><br>This can be used to update tags. + * Updates the SAP Central Services Instance resource. <br><br>This can be used to update tags on the + * resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. - * @param body The SAP Central Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @param body The SAP Central Services Instance resource request body. * @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 define the SAP Central Server Instance on successful completion of {@link Mono}. + * @return define the SAP Central Services Instance resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1033,38 +1114,17 @@ private Mono updateAsync( } /** - * Updates the SAP Central Instance. <br><br>This can be used to update tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. - * @param body The SAP Central Server instance request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return define the SAP Central Server Instance. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SapCentralServerInstanceInner update( - String resourceGroupName, - String sapVirtualInstanceName, - String centralInstanceName, - UpdateSapCentralInstanceRequest body) { - return updateAsync(resourceGroupName, sapVirtualInstanceName, centralInstanceName, body).block(); - } - - /** - * Updates the SAP Central Instance. <br><br>This can be used to update tags. + * Updates the SAP Central Services Instance resource. <br><br>This can be used to update tags on the + * resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return define the SAP Central Server Instance. + * @return define the SAP Central Services Instance resource. */ @ServiceMethod(returns = ReturnType.SINGLE) public SapCentralServerInstanceInner update( @@ -1074,18 +1134,19 @@ public SapCentralServerInstanceInner update( } /** - * Updates the SAP Central Instance. <br><br>This can be used to update tags. + * Updates the SAP Central Services Instance resource. <br><br>This can be used to update tags on the + * resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. - * @param body The SAP Central Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @param body The SAP Central Services Instance resource request body. * @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 define the SAP Central Server Instance. + * @return define the SAP Central Services Instance resource. */ @ServiceMethod(returns = ReturnType.SINGLE) public SapCentralServerInstanceInner update( @@ -1098,13 +1159,14 @@ public SapCentralServerInstanceInner update( } /** - * Deletes the SAP Central Instance. <br><br>This will be used by service only. Delete by end user will - * return a Bad Request error. + * Deletes the SAP Central Services Instance resource. <br><br>This will be used by service only. Delete + * operation on this resource by end user will return a Bad Request error. You can delete the parent resource, which + * is the Virtual Instance for SAP solutions resource, using the delete operation on it. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1157,13 +1219,14 @@ private Mono>> deleteWithResponseAsync( } /** - * Deletes the SAP Central Instance. <br><br>This will be used by service only. Delete by end user will - * return a Bad Request error. + * Deletes the SAP Central Services Instance resource. <br><br>This will be used by service only. Delete + * operation on this resource by end user will return a Bad Request error. You can delete the parent resource, which + * is the Virtual Instance for SAP solutions resource, using the delete operation on it. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. * @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. @@ -1214,13 +1277,14 @@ private Mono>> deleteWithResponseAsync( } /** - * Deletes the SAP Central Instance. <br><br>This will be used by service only. Delete by end user will - * return a Bad Request error. + * Deletes the SAP Central Services Instance resource. <br><br>This will be used by service only. Delete + * operation on this resource by end user will return a Bad Request error. You can delete the parent resource, which + * is the Virtual Instance for SAP solutions resource, using the delete operation on it. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1242,13 +1306,14 @@ private PollerFlux, OperationStatusResult } /** - * Deletes the SAP Central Instance. <br><br>This will be used by service only. Delete by end user will - * return a Bad Request error. + * Deletes the SAP Central Services Instance resource. <br><br>This will be used by service only. Delete + * operation on this resource by end user will return a Bad Request error. You can delete the parent resource, which + * is the Virtual Instance for SAP solutions resource, using the delete operation on it. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. * @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. @@ -1272,13 +1337,14 @@ private PollerFlux, OperationStatusResult } /** - * Deletes the SAP Central Instance. <br><br>This will be used by service only. Delete by end user will - * return a Bad Request error. + * Deletes the SAP Central Services Instance resource. <br><br>This will be used by service only. Delete + * operation on this resource by end user will return a Bad Request error. You can delete the parent resource, which + * is the Virtual Instance for SAP solutions resource, using the delete operation on it. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1287,17 +1353,18 @@ private PollerFlux, OperationStatusResult @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationStatusResultInner> beginDelete( String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName) { - return beginDeleteAsync(resourceGroupName, sapVirtualInstanceName, centralInstanceName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, sapVirtualInstanceName, centralInstanceName).getSyncPoller(); } /** - * Deletes the SAP Central Instance. <br><br>This will be used by service only. Delete by end user will - * return a Bad Request error. + * Deletes the SAP Central Services Instance resource. <br><br>This will be used by service only. Delete + * operation on this resource by end user will return a Bad Request error. You can delete the parent resource, which + * is the Virtual Instance for SAP solutions resource, using the delete operation on it. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. * @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. @@ -1307,18 +1374,20 @@ public SyncPoller, OperationStatusResultI @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationStatusResultInner> beginDelete( String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName, Context context) { - return beginDeleteAsync(resourceGroupName, sapVirtualInstanceName, centralInstanceName, context) + return this + .beginDeleteAsync(resourceGroupName, sapVirtualInstanceName, centralInstanceName, context) .getSyncPoller(); } /** - * Deletes the SAP Central Instance. <br><br>This will be used by service only. Delete by end user will - * return a Bad Request error. + * Deletes the SAP Central Services Instance resource. <br><br>This will be used by service only. Delete + * operation on this resource by end user will return a Bad Request error. You can delete the parent resource, which + * is the Virtual Instance for SAP solutions resource, using the delete operation on it. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1333,13 +1402,14 @@ private Mono deleteAsync( } /** - * Deletes the SAP Central Instance. <br><br>This will be used by service only. Delete by end user will - * return a Bad Request error. + * Deletes the SAP Central Services Instance resource. <br><br>This will be used by service only. Delete + * operation on this resource by end user will return a Bad Request error. You can delete the parent resource, which + * is the Virtual Instance for SAP solutions resource, using the delete operation on it. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. * @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. @@ -1355,13 +1425,14 @@ private Mono deleteAsync( } /** - * Deletes the SAP Central Instance. <br><br>This will be used by service only. Delete by end user will - * return a Bad Request error. + * Deletes the SAP Central Services Instance resource. <br><br>This will be used by service only. Delete + * operation on this resource by end user will return a Bad Request error. You can delete the parent resource, which + * is the Virtual Instance for SAP solutions resource, using the delete operation on it. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1374,13 +1445,14 @@ public OperationStatusResultInner delete( } /** - * Deletes the SAP Central Instance. <br><br>This will be used by service only. Delete by end user will - * return a Bad Request error. + * Deletes the SAP Central Services Instance resource. <br><br>This will be used by service only. Delete + * operation on this resource by end user will return a Bad Request error. You can delete the parent resource, which + * is the Virtual Instance for SAP solutions resource, using the delete operation on it. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. * @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. @@ -1394,15 +1466,15 @@ public OperationStatusResultInner delete( } /** - * Lists the SAP Central Instances in an SVI. + * Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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 defines the collection of SAP Central Instances along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return defines the collection of SAP Central Services Instance resources along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -1454,16 +1526,16 @@ private Mono> listSinglePageAsync( } /** - * Lists the SAP Central Instances in an SVI. + * Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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 defines the collection of SAP Central Instances along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return defines the collection of SAP Central Services Instance resources along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -1512,14 +1584,15 @@ private Mono> listSinglePageAsync( } /** - * Lists the SAP Central Instances in an SVI. + * Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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 defines the collection of SAP Central Instances as paginated response with {@link PagedFlux}. + * @return defines the collection of SAP Central Services Instance resources as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -1530,15 +1603,16 @@ private PagedFlux listAsync( } /** - * Lists the SAP Central Instances in an SVI. + * Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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 defines the collection of SAP Central Instances as paginated response with {@link PagedFlux}. + * @return defines the collection of SAP Central Services Instance resources as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -1549,14 +1623,15 @@ private PagedFlux listAsync( } /** - * Lists the SAP Central Instances in an SVI. + * Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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 defines the collection of SAP Central Instances as paginated response with {@link PagedIterable}. + * @return defines the collection of SAP Central Services Instance resources as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String sapVirtualInstanceName) { @@ -1564,15 +1639,16 @@ public PagedIterable list(String resourceGroupNam } /** - * Lists the SAP Central Instances in an SVI. + * Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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 defines the collection of SAP Central Instances as paginated response with {@link PagedIterable}. + * @return defines the collection of SAP Central Services Instance resources as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -1580,15 +1656,682 @@ public PagedIterable list( return new PagedIterable<>(listAsync(resourceGroupName, sapVirtualInstanceName, context)); } + /** + * Starts the SAP Central Services Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> startInstanceWithResponseAsync( + String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName) { + 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 (sapVirtualInstanceName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter sapVirtualInstanceName is required and cannot be null.")); + } + if (centralInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter centralInstanceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .startInstance( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + sapVirtualInstanceName, + centralInstanceName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Starts the SAP Central Services Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @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 current status of an async operation along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> startInstanceWithResponseAsync( + String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName, 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 (sapVirtualInstanceName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter sapVirtualInstanceName is required and cannot be null.")); + } + if (centralInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter centralInstanceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .startInstance( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + sapVirtualInstanceName, + centralInstanceName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Starts the SAP Central Services Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OperationStatusResultInner> beginStartInstanceAsync( + String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName) { + Mono>> mono = + startInstanceWithResponseAsync(resourceGroupName, sapVirtualInstanceName, centralInstanceName); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + OperationStatusResultInner.class, + OperationStatusResultInner.class, + this.client.getContext()); + } + + /** + * Starts the SAP Central Services Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OperationStatusResultInner> beginStartInstanceAsync( + String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + startInstanceWithResponseAsync(resourceGroupName, sapVirtualInstanceName, centralInstanceName, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + OperationStatusResultInner.class, + OperationStatusResultInner.class, + context); + } + + /** + * Starts the SAP Central Services Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OperationStatusResultInner> beginStartInstance( + String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName) { + return this + .beginStartInstanceAsync(resourceGroupName, sapVirtualInstanceName, centralInstanceName) + .getSyncPoller(); + } + + /** + * Starts the SAP Central Services Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OperationStatusResultInner> beginStartInstance( + String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName, Context context) { + return this + .beginStartInstanceAsync(resourceGroupName, sapVirtualInstanceName, centralInstanceName, context) + .getSyncPoller(); + } + + /** + * Starts the SAP Central Services Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono startInstanceAsync( + String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName) { + return beginStartInstanceAsync(resourceGroupName, sapVirtualInstanceName, centralInstanceName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Starts the SAP Central Services Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @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 current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono startInstanceAsync( + String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName, Context context) { + return beginStartInstanceAsync(resourceGroupName, sapVirtualInstanceName, centralInstanceName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Starts the SAP Central Services Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationStatusResultInner startInstance( + String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName) { + return startInstanceAsync(resourceGroupName, sapVirtualInstanceName, centralInstanceName).block(); + } + + /** + * Starts the SAP Central Services Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationStatusResultInner startInstance( + String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName, Context context) { + return startInstanceAsync(resourceGroupName, sapVirtualInstanceName, centralInstanceName, context).block(); + } + + /** + * Stops the SAP Central Services Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @param body SAP Central Services instance stop request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> stopInstanceWithResponseAsync( + String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName, StopRequest body) { + 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 (sapVirtualInstanceName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter sapVirtualInstanceName is required and cannot be null.")); + } + if (centralInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter centralInstanceName is required and cannot be null.")); + } + if (body != null) { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .stopInstance( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + sapVirtualInstanceName, + centralInstanceName, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Stops the SAP Central Services Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @param body SAP Central Services instance stop request body. + * @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 current status of an async operation along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> stopInstanceWithResponseAsync( + String resourceGroupName, + String sapVirtualInstanceName, + String centralInstanceName, + StopRequest body, + 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 (sapVirtualInstanceName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter sapVirtualInstanceName is required and cannot be null.")); + } + if (centralInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter centralInstanceName is required and cannot be null.")); + } + if (body != null) { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .stopInstance( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + sapVirtualInstanceName, + centralInstanceName, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Stops the SAP Central Services Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @param body SAP Central Services instance stop request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OperationStatusResultInner> beginStopInstanceAsync( + String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName, StopRequest body) { + Mono>> mono = + stopInstanceWithResponseAsync(resourceGroupName, sapVirtualInstanceName, centralInstanceName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + OperationStatusResultInner.class, + OperationStatusResultInner.class, + this.client.getContext()); + } + + /** + * Stops the SAP Central Services Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OperationStatusResultInner> beginStopInstanceAsync( + String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName) { + final StopRequest body = null; + Mono>> mono = + stopInstanceWithResponseAsync(resourceGroupName, sapVirtualInstanceName, centralInstanceName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + OperationStatusResultInner.class, + OperationStatusResultInner.class, + this.client.getContext()); + } + + /** + * Stops the SAP Central Services Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @param body SAP Central Services instance stop request body. + * @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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OperationStatusResultInner> beginStopInstanceAsync( + String resourceGroupName, + String sapVirtualInstanceName, + String centralInstanceName, + StopRequest body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + stopInstanceWithResponseAsync( + resourceGroupName, sapVirtualInstanceName, centralInstanceName, body, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + OperationStatusResultInner.class, + OperationStatusResultInner.class, + context); + } + + /** + * Stops the SAP Central Services Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OperationStatusResultInner> beginStopInstance( + String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName) { + final StopRequest body = null; + return this + .beginStopInstanceAsync(resourceGroupName, sapVirtualInstanceName, centralInstanceName, body) + .getSyncPoller(); + } + + /** + * Stops the SAP Central Services Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @param body SAP Central Services instance stop request body. + * @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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OperationStatusResultInner> beginStopInstance( + String resourceGroupName, + String sapVirtualInstanceName, + String centralInstanceName, + StopRequest body, + Context context) { + return this + .beginStopInstanceAsync(resourceGroupName, sapVirtualInstanceName, centralInstanceName, body, context) + .getSyncPoller(); + } + + /** + * Stops the SAP Central Services Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @param body SAP Central Services instance stop request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono stopInstanceAsync( + String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName, StopRequest body) { + return beginStopInstanceAsync(resourceGroupName, sapVirtualInstanceName, centralInstanceName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Stops the SAP Central Services Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono stopInstanceAsync( + String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName) { + final StopRequest body = null; + return beginStopInstanceAsync(resourceGroupName, sapVirtualInstanceName, centralInstanceName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Stops the SAP Central Services Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @param body SAP Central Services instance stop request body. + * @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 current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono stopInstanceAsync( + String resourceGroupName, + String sapVirtualInstanceName, + String centralInstanceName, + StopRequest body, + Context context) { + return beginStopInstanceAsync(resourceGroupName, sapVirtualInstanceName, centralInstanceName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Stops the SAP Central Services Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationStatusResultInner stopInstance( + String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName) { + final StopRequest body = null; + return stopInstanceAsync(resourceGroupName, sapVirtualInstanceName, centralInstanceName, body).block(); + } + + /** + * Stops the SAP Central Services Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @param body SAP Central Services instance stop request body. + * @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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationStatusResultInner stopInstance( + String resourceGroupName, + String sapVirtualInstanceName, + String centralInstanceName, + StopRequest body, + Context context) { + return stopInstanceAsync(resourceGroupName, sapVirtualInstanceName, centralInstanceName, body, context).block(); + } + /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the collection of SAP Central Instances along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return defines the collection of SAP Central Services Instance resources along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1619,13 +2362,14 @@ private Mono> listNextSinglePageAsy /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the collection of SAP Central Instances along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return defines the collection of SAP Central Services Instance resources along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync( diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapCentralInstancesImpl.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapCentralInstancesImpl.java index bf4d47434bc9f..16e7931212f56 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapCentralInstancesImpl.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapCentralInstancesImpl.java @@ -15,6 +15,7 @@ import com.azure.resourcemanager.workloads.models.OperationStatusResult; import com.azure.resourcemanager.workloads.models.SapCentralInstances; import com.azure.resourcemanager.workloads.models.SapCentralServerInstance; +import com.azure.resourcemanager.workloads.models.StopRequest; public final class SapCentralInstancesImpl implements SapCentralInstances { private static final ClientLogger LOGGER = new ClientLogger(SapCentralInstancesImpl.class); @@ -29,17 +30,6 @@ public SapCentralInstancesImpl( this.serviceManager = serviceManager; } - public SapCentralServerInstance get( - String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName) { - SapCentralServerInstanceInner inner = - this.serviceClient().get(resourceGroupName, sapVirtualInstanceName, centralInstanceName); - if (inner != null) { - return new SapCentralServerInstanceImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName, Context context) { Response inner = @@ -57,6 +47,17 @@ public Response getWithResponse( } } + public SapCentralServerInstance get( + String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName) { + SapCentralServerInstanceInner inner = + this.serviceClient().get(resourceGroupName, sapVirtualInstanceName, centralInstanceName); + if (inner != null) { + return new SapCentralServerInstanceImpl(inner, this.manager()); + } else { + return null; + } + } + public OperationStatusResult delete( String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName) { OperationStatusResultInner inner = @@ -92,6 +93,56 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new SapCentralServerInstanceImpl(inner1, this.manager())); } + public OperationStatusResult startInstance( + String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName) { + OperationStatusResultInner inner = + this.serviceClient().startInstance(resourceGroupName, sapVirtualInstanceName, centralInstanceName); + if (inner != null) { + return new OperationStatusResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public OperationStatusResult startInstance( + String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName, Context context) { + OperationStatusResultInner inner = + this.serviceClient().startInstance(resourceGroupName, sapVirtualInstanceName, centralInstanceName, context); + if (inner != null) { + return new OperationStatusResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public OperationStatusResult stopInstance( + String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName) { + OperationStatusResultInner inner = + this.serviceClient().stopInstance(resourceGroupName, sapVirtualInstanceName, centralInstanceName); + if (inner != null) { + return new OperationStatusResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public OperationStatusResult stopInstance( + String resourceGroupName, + String sapVirtualInstanceName, + String centralInstanceName, + StopRequest body, + Context context) { + OperationStatusResultInner inner = + this + .serviceClient() + .stopInstance(resourceGroupName, sapVirtualInstanceName, centralInstanceName, body, context); + if (inner != null) { + return new OperationStatusResultImpl(inner, this.manager()); + } else { + return null; + } + } + public SapCentralServerInstance getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapCentralServerInstanceImpl.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapCentralServerInstanceImpl.java index f887b4cdd5bd7..0d1e8721f30e6 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapCentralServerInstanceImpl.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapCentralServerInstanceImpl.java @@ -12,12 +12,15 @@ import com.azure.resourcemanager.workloads.models.EnqueueReplicationServerProperties; import com.azure.resourcemanager.workloads.models.EnqueueServerProperties; import com.azure.resourcemanager.workloads.models.GatewayServerProperties; +import com.azure.resourcemanager.workloads.models.LoadBalancerDetails; import com.azure.resourcemanager.workloads.models.MessageServerProperties; +import com.azure.resourcemanager.workloads.models.OperationStatusResult; import com.azure.resourcemanager.workloads.models.SapCentralServerInstance; import com.azure.resourcemanager.workloads.models.SapHealthState; import com.azure.resourcemanager.workloads.models.SapVirtualInstanceError; import com.azure.resourcemanager.workloads.models.SapVirtualInstanceProvisioningState; import com.azure.resourcemanager.workloads.models.SapVirtualInstanceStatus; +import com.azure.resourcemanager.workloads.models.StopRequest; import com.azure.resourcemanager.workloads.models.UpdateSapCentralInstanceRequest; import java.util.Collections; import java.util.List; @@ -90,6 +93,10 @@ public String kernelPatch() { return this.innerModel().kernelPatch(); } + public LoadBalancerDetails loadBalancerDetails() { + return this.innerModel().loadBalancerDetails(); + } + public List vmDetails() { List inner = this.innerModel().vmDetails(); if (inner != null) { @@ -228,6 +235,30 @@ public SapCentralServerInstance refresh(Context context) { return this; } + public OperationStatusResult startInstance() { + return serviceManager + .sapCentralInstances() + .startInstance(resourceGroupName, sapVirtualInstanceName, centralInstanceName); + } + + public OperationStatusResult startInstance(Context context) { + return serviceManager + .sapCentralInstances() + .startInstance(resourceGroupName, sapVirtualInstanceName, centralInstanceName, context); + } + + public OperationStatusResult stopInstance() { + return serviceManager + .sapCentralInstances() + .stopInstance(resourceGroupName, sapVirtualInstanceName, centralInstanceName); + } + + public OperationStatusResult stopInstance(StopRequest body, Context context) { + return serviceManager + .sapCentralInstances() + .stopInstance(resourceGroupName, sapVirtualInstanceName, centralInstanceName, body, context); + } + public SapCentralServerInstanceImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapDatabaseInstanceImpl.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapDatabaseInstanceImpl.java index 1e6e36fe9a13c..915f1132476e0 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapDatabaseInstanceImpl.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapDatabaseInstanceImpl.java @@ -9,10 +9,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.workloads.fluent.models.SapDatabaseInstanceInner; import com.azure.resourcemanager.workloads.models.DatabaseVmDetails; +import com.azure.resourcemanager.workloads.models.LoadBalancerDetails; +import com.azure.resourcemanager.workloads.models.OperationStatusResult; import com.azure.resourcemanager.workloads.models.SapDatabaseInstance; import com.azure.resourcemanager.workloads.models.SapVirtualInstanceError; import com.azure.resourcemanager.workloads.models.SapVirtualInstanceProvisioningState; import com.azure.resourcemanager.workloads.models.SapVirtualInstanceStatus; +import com.azure.resourcemanager.workloads.models.StopRequest; import com.azure.resourcemanager.workloads.models.UpdateSapDatabaseInstanceRequest; import java.util.Collections; import java.util.List; @@ -69,6 +72,10 @@ public String ipAddress() { return this.innerModel().ipAddress(); } + public LoadBalancerDetails loadBalancerDetails() { + return this.innerModel().loadBalancerDetails(); + } + public List vmDetails() { List inner = this.innerModel().vmDetails(); if (inner != null) { @@ -202,6 +209,30 @@ public SapDatabaseInstance refresh(Context context) { return this; } + public OperationStatusResult startInstance() { + return serviceManager + .sapDatabaseInstances() + .startInstance(resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + } + + public OperationStatusResult startInstance(Context context) { + return serviceManager + .sapDatabaseInstances() + .startInstance(resourceGroupName, sapVirtualInstanceName, databaseInstanceName, context); + } + + public OperationStatusResult stopInstance() { + return serviceManager + .sapDatabaseInstances() + .stopInstance(resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + } + + public OperationStatusResult stopInstance(StopRequest body, Context context) { + return serviceManager + .sapDatabaseInstances() + .stopInstance(resourceGroupName, sapVirtualInstanceName, databaseInstanceName, body, context); + } + public SapDatabaseInstanceImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapDatabaseInstancesClientImpl.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapDatabaseInstancesClientImpl.java index e43f52de2a422..9d677c3c1e68e 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapDatabaseInstancesClientImpl.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapDatabaseInstancesClientImpl.java @@ -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; @@ -36,6 +37,7 @@ import com.azure.resourcemanager.workloads.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.workloads.fluent.models.SapDatabaseInstanceInner; import com.azure.resourcemanager.workloads.models.SapDatabaseInstanceList; +import com.azure.resourcemanager.workloads.models.StopRequest; import com.azure.resourcemanager.workloads.models.UpdateSapDatabaseInstanceRequest; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -67,7 +69,7 @@ public final class SapDatabaseInstancesClientImpl implements SapDatabaseInstance */ @Host("{$host}") @ServiceInterface(name = "WorkloadsClientSapDa") - private interface SapDatabaseInstancesService { + public interface SapDatabaseInstancesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads" @@ -149,6 +151,39 @@ Mono> list( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads" + + "/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName}/start") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> startInstance( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("sapVirtualInstanceName") String sapVirtualInstanceName, + @PathParam("databaseInstanceName") String databaseInstanceName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads" + + "/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName}/stop") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> stopInstance( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("sapVirtualInstanceName") String sapVirtualInstanceName, + @PathParam("databaseInstanceName") String databaseInstanceName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") StopRequest body, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -161,15 +196,16 @@ Mono> listNext( } /** - * Gets the SAP Database Instance. + * Gets the SAP Database Instance resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the SAP Database Instance along with {@link Response} on successful completion of {@link Mono}. + * @return the SAP Database Instance resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -217,16 +253,17 @@ private Mono> getWithResponseAsync( } /** - * Gets the SAP Database Instance. + * Gets the SAP Database Instance resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. * @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 SAP Database Instance along with {@link Response} on successful completion of {@link Mono}. + * @return the SAP Database Instance resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -271,15 +308,16 @@ private Mono> getWithResponseAsync( } /** - * Gets the SAP Database Instance. + * Gets the SAP Database Instance resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the SAP Database Instance on successful completion of {@link Mono}. + * @return the SAP Database Instance resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -289,52 +327,56 @@ private Mono getAsync( } /** - * Gets the SAP Database Instance. + * Gets the SAP Database Instance resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @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 SAP Database Instance. + * @return the SAP Database Instance resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SapDatabaseInstanceInner get( - String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName) { - return getAsync(resourceGroupName, sapVirtualInstanceName, databaseInstanceName).block(); + public Response getWithResponse( + String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName, Context context) { + return getWithResponseAsync(resourceGroupName, sapVirtualInstanceName, databaseInstanceName, context).block(); } /** - * Gets the SAP Database Instance. + * Gets the SAP Database Instance resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. - * @param context The context to associate with this operation. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the SAP Database Instance along with {@link Response}. + * @return the SAP Database Instance resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName, Context context) { - return getWithResponseAsync(resourceGroupName, sapVirtualInstanceName, databaseInstanceName, context).block(); + public SapDatabaseInstanceInner get( + String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName) { + return getWithResponse(resourceGroupName, sapVirtualInstanceName, databaseInstanceName, Context.NONE) + .getValue(); } /** - * Puts the SAP Database Instance. <br><br>This will be used by service only. PUT by end user will - * return a Bad Request error. + * Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource. + * <br><br>This will be used by service only. PUT by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. - * @param body The SAP Database Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @param body Request body of Database resource of a SAP system. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return define the SAP Database Instance along with {@link Response} on successful completion of {@link Mono}. + * @return define the Database resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -389,18 +431,19 @@ private Mono>> createWithResponseAsync( } /** - * Puts the SAP Database Instance. <br><br>This will be used by service only. PUT by end user will - * return a Bad Request error. + * Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource. + * <br><br>This will be used by service only. PUT by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. - * @param body The SAP Database Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @param body Request body of Database resource of a SAP system. * @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 define the SAP Database Instance along with {@link Response} on successful completion of {@link Mono}. + * @return define the Database resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -453,17 +496,18 @@ private Mono>> createWithResponseAsync( } /** - * Puts the SAP Database Instance. <br><br>This will be used by service only. PUT by end user will - * return a Bad Request error. + * Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource. + * <br><br>This will be used by service only. PUT by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. - * @param body The SAP Database Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @param body Request body of Database resource of a SAP system. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 define the SAP Database Instance. + * @return the {@link PollerFlux} for polling of define the Database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, SapDatabaseInstanceInner> beginCreateAsync( @@ -484,18 +528,48 @@ private PollerFlux, SapDatabaseInstanceInne } /** - * Puts the SAP Database Instance. <br><br>This will be used by service only. PUT by end user will - * return a Bad Request error. + * Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource. + * <br><br>This will be used by service only. PUT by end user will return a Bad Request error. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 define the Database resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SapDatabaseInstanceInner> beginCreateAsync( + String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName) { + final SapDatabaseInstanceInner body = null; + Mono>> mono = + createWithResponseAsync(resourceGroupName, sapVirtualInstanceName, databaseInstanceName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + SapDatabaseInstanceInner.class, + SapDatabaseInstanceInner.class, + this.client.getContext()); + } + + /** + * Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource. + * <br><br>This will be used by service only. PUT by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. - * @param body The SAP Database Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @param body Request body of Database resource of a SAP system. * @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 define the SAP Database Instance. + * @return the {@link PollerFlux} for polling of define the Database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, SapDatabaseInstanceInner> beginCreateAsync( @@ -518,40 +592,41 @@ private PollerFlux, SapDatabaseInstanceInne } /** - * Puts the SAP Database Instance. <br><br>This will be used by service only. PUT by end user will - * return a Bad Request error. + * Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource. + * <br><br>This will be used by service only. PUT by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. - * @param body The SAP Database Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 define the SAP Database Instance. + * @return the {@link SyncPoller} for polling of define the Database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SapDatabaseInstanceInner> beginCreate( - String resourceGroupName, - String sapVirtualInstanceName, - String databaseInstanceName, - SapDatabaseInstanceInner body) { - return beginCreateAsync(resourceGroupName, sapVirtualInstanceName, databaseInstanceName, body).getSyncPoller(); + String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName) { + final SapDatabaseInstanceInner body = null; + return this + .beginCreateAsync(resourceGroupName, sapVirtualInstanceName, databaseInstanceName, body) + .getSyncPoller(); } /** - * Puts the SAP Database Instance. <br><br>This will be used by service only. PUT by end user will - * return a Bad Request error. + * Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource. + * <br><br>This will be used by service only. PUT by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. - * @param body The SAP Database Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @param body Request body of Database resource of a SAP system. * @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 define the SAP Database Instance. + * @return the {@link SyncPoller} for polling of define the Database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SapDatabaseInstanceInner> beginCreate( @@ -560,22 +635,24 @@ public SyncPoller, SapDatabaseInstanceInner String databaseInstanceName, SapDatabaseInstanceInner body, Context context) { - return beginCreateAsync(resourceGroupName, sapVirtualInstanceName, databaseInstanceName, body, context) + return this + .beginCreateAsync(resourceGroupName, sapVirtualInstanceName, databaseInstanceName, body, context) .getSyncPoller(); } /** - * Puts the SAP Database Instance. <br><br>This will be used by service only. PUT by end user will - * return a Bad Request error. + * Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource. + * <br><br>This will be used by service only. PUT by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. - * @param body The SAP Database Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @param body Request body of Database resource of a SAP system. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return define the SAP Database Instance on successful completion of {@link Mono}. + * @return define the Database resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -589,16 +666,17 @@ private Mono createAsync( } /** - * Puts the SAP Database Instance. <br><br>This will be used by service only. PUT by end user will - * return a Bad Request error. + * Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource. + * <br><br>This will be used by service only. PUT by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return define the SAP Database Instance on successful completion of {@link Mono}. + * @return define the Database resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -610,18 +688,19 @@ private Mono createAsync( } /** - * Puts the SAP Database Instance. <br><br>This will be used by service only. PUT by end user will - * return a Bad Request error. + * Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource. + * <br><br>This will be used by service only. PUT by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. - * @param body The SAP Database Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @param body Request body of Database resource of a SAP system. * @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 define the SAP Database Instance on successful completion of {@link Mono}. + * @return define the Database resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -636,38 +715,17 @@ private Mono createAsync( } /** - * Puts the SAP Database Instance. <br><br>This will be used by service only. PUT by end user will - * return a Bad Request error. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. - * @param body The SAP Database Server instance request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return define the SAP Database Instance. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SapDatabaseInstanceInner create( - String resourceGroupName, - String sapVirtualInstanceName, - String databaseInstanceName, - SapDatabaseInstanceInner body) { - return createAsync(resourceGroupName, sapVirtualInstanceName, databaseInstanceName, body).block(); - } - - /** - * Puts the SAP Database Instance. <br><br>This will be used by service only. PUT by end user will - * return a Bad Request error. + * Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource. + * <br><br>This will be used by service only. PUT by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return define the SAP Database Instance. + * @return define the Database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) public SapDatabaseInstanceInner create( @@ -677,18 +735,19 @@ public SapDatabaseInstanceInner create( } /** - * Puts the SAP Database Instance. <br><br>This will be used by service only. PUT by end user will - * return a Bad Request error. + * Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource. + * <br><br>This will be used by service only. PUT by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. - * @param body The SAP Database Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @param body Request body of Database resource of a SAP system. * @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 define the SAP Database Instance. + * @return define the Database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) public SapDatabaseInstanceInner create( @@ -701,16 +760,17 @@ public SapDatabaseInstanceInner create( } /** - * Puts the SAP Database Instance. + * Updates the Database resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. - * @param body The SAP Database Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @param body Database resource update request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return define the SAP Database Instance along with {@link Response} on successful completion of {@link Mono}. + * @return define the Database resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -765,17 +825,18 @@ private Mono>> updateWithResponseAsync( } /** - * Puts the SAP Database Instance. + * Updates the Database resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. - * @param body The SAP Database Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @param body Database resource update request body. * @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 define the SAP Database Instance along with {@link Response} on successful completion of {@link Mono}. + * @return define the Database resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -828,16 +889,17 @@ private Mono>> updateWithResponseAsync( } /** - * Puts the SAP Database Instance. + * Updates the Database resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. - * @param body The SAP Database Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @param body Database resource update request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 define the SAP Database Instance. + * @return the {@link PollerFlux} for polling of define the Database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, SapDatabaseInstanceInner> beginUpdateAsync( @@ -858,17 +920,46 @@ private PollerFlux, SapDatabaseInstanceInne } /** - * Puts the SAP Database Instance. + * Updates the Database resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 define the Database resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SapDatabaseInstanceInner> beginUpdateAsync( + String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName) { + final UpdateSapDatabaseInstanceRequest body = null; + Mono>> mono = + updateWithResponseAsync(resourceGroupName, sapVirtualInstanceName, databaseInstanceName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + SapDatabaseInstanceInner.class, + SapDatabaseInstanceInner.class, + this.client.getContext()); + } + + /** + * Updates the Database resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. - * @param body The SAP Database Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @param body Database resource update request body. * @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 define the SAP Database Instance. + * @return the {@link PollerFlux} for polling of define the Database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, SapDatabaseInstanceInner> beginUpdateAsync( @@ -891,38 +982,39 @@ private PollerFlux, SapDatabaseInstanceInne } /** - * Puts the SAP Database Instance. + * Updates the Database resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. - * @param body The SAP Database Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 define the SAP Database Instance. + * @return the {@link SyncPoller} for polling of define the Database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SapDatabaseInstanceInner> beginUpdate( - String resourceGroupName, - String sapVirtualInstanceName, - String databaseInstanceName, - UpdateSapDatabaseInstanceRequest body) { - return beginUpdateAsync(resourceGroupName, sapVirtualInstanceName, databaseInstanceName, body).getSyncPoller(); + String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName) { + final UpdateSapDatabaseInstanceRequest body = null; + return this + .beginUpdateAsync(resourceGroupName, sapVirtualInstanceName, databaseInstanceName, body) + .getSyncPoller(); } /** - * Puts the SAP Database Instance. + * Updates the Database resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. - * @param body The SAP Database Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @param body Database resource update request body. * @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 define the SAP Database Instance. + * @return the {@link SyncPoller} for polling of define the Database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SapDatabaseInstanceInner> beginUpdate( @@ -931,21 +1023,23 @@ public SyncPoller, SapDatabaseInstanceInner String databaseInstanceName, UpdateSapDatabaseInstanceRequest body, Context context) { - return beginUpdateAsync(resourceGroupName, sapVirtualInstanceName, databaseInstanceName, body, context) + return this + .beginUpdateAsync(resourceGroupName, sapVirtualInstanceName, databaseInstanceName, body, context) .getSyncPoller(); } /** - * Puts the SAP Database Instance. + * Updates the Database resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. - * @param body The SAP Database Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @param body Database resource update request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return define the SAP Database Instance on successful completion of {@link Mono}. + * @return define the Database resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -959,15 +1053,16 @@ private Mono updateAsync( } /** - * Puts the SAP Database Instance. + * Updates the Database resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return define the SAP Database Instance on successful completion of {@link Mono}. + * @return define the Database resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -979,17 +1074,18 @@ private Mono updateAsync( } /** - * Puts the SAP Database Instance. + * Updates the Database resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. - * @param body The SAP Database Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @param body Database resource update request body. * @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 define the SAP Database Instance on successful completion of {@link Mono}. + * @return define the Database resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1004,36 +1100,16 @@ private Mono updateAsync( } /** - * Puts the SAP Database Instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. - * @param body The SAP Database Server instance request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return define the SAP Database Instance. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SapDatabaseInstanceInner update( - String resourceGroupName, - String sapVirtualInstanceName, - String databaseInstanceName, - UpdateSapDatabaseInstanceRequest body) { - return updateAsync(resourceGroupName, sapVirtualInstanceName, databaseInstanceName, body).block(); - } - - /** - * Puts the SAP Database Instance. + * Updates the Database resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return define the SAP Database Instance. + * @return define the Database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) public SapDatabaseInstanceInner update( @@ -1043,17 +1119,18 @@ public SapDatabaseInstanceInner update( } /** - * Puts the SAP Database Instance. + * Updates the Database resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. - * @param body The SAP Database Server instance request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @param body Database resource update request body. * @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 define the SAP Database Instance. + * @return define the Database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) public SapDatabaseInstanceInner update( @@ -1066,12 +1143,13 @@ public SapDatabaseInstanceInner update( } /** - * Deletes the SAP Database Instance. <br><br>This will be used by service only. Delete by end user will - * return a Bad Request error. + * Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource. + * <br><br>This will be used by service only. Delete by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1124,12 +1202,13 @@ private Mono>> deleteWithResponseAsync( } /** - * Deletes the SAP Database Instance. <br><br>This will be used by service only. Delete by end user will - * return a Bad Request error. + * Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource. + * <br><br>This will be used by service only. Delete by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. * @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. @@ -1180,12 +1259,13 @@ private Mono>> deleteWithResponseAsync( } /** - * Deletes the SAP Database Instance. <br><br>This will be used by service only. Delete by end user will - * return a Bad Request error. + * Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource. + * <br><br>This will be used by service only. Delete by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1207,12 +1287,13 @@ private PollerFlux, OperationStatusResult } /** - * Deletes the SAP Database Instance. <br><br>This will be used by service only. Delete by end user will - * return a Bad Request error. + * Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource. + * <br><br>This will be used by service only. Delete by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. * @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. @@ -1236,12 +1317,13 @@ private PollerFlux, OperationStatusResult } /** - * Deletes the SAP Database Instance. <br><br>This will be used by service only. Delete by end user will - * return a Bad Request error. + * Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource. + * <br><br>This will be used by service only. Delete by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1250,16 +1332,17 @@ private PollerFlux, OperationStatusResult @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationStatusResultInner> beginDelete( String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName) { - return beginDeleteAsync(resourceGroupName, sapVirtualInstanceName, databaseInstanceName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, sapVirtualInstanceName, databaseInstanceName).getSyncPoller(); } /** - * Deletes the SAP Database Instance. <br><br>This will be used by service only. Delete by end user will - * return a Bad Request error. + * Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource. + * <br><br>This will be used by service only. Delete by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. * @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. @@ -1269,17 +1352,19 @@ public SyncPoller, OperationStatusResultI @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationStatusResultInner> beginDelete( String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName, Context context) { - return beginDeleteAsync(resourceGroupName, sapVirtualInstanceName, databaseInstanceName, context) + return this + .beginDeleteAsync(resourceGroupName, sapVirtualInstanceName, databaseInstanceName, context) .getSyncPoller(); } /** - * Deletes the SAP Database Instance. <br><br>This will be used by service only. Delete by end user will - * return a Bad Request error. + * Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource. + * <br><br>This will be used by service only. Delete by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1294,12 +1379,13 @@ private Mono deleteAsync( } /** - * Deletes the SAP Database Instance. <br><br>This will be used by service only. Delete by end user will - * return a Bad Request error. + * Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource. + * <br><br>This will be used by service only. Delete by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. * @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. @@ -1315,12 +1401,13 @@ private Mono deleteAsync( } /** - * Deletes the SAP Database Instance. <br><br>This will be used by service only. Delete by end user will - * return a Bad Request error. + * Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource. + * <br><br>This will be used by service only. Delete by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1333,12 +1420,13 @@ public OperationStatusResultInner delete( } /** - * Deletes the SAP Database Instance. <br><br>This will be used by service only. Delete by end user will - * return a Bad Request error. + * Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource. + * <br><br>This will be used by service only. Delete by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. * @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. @@ -1352,10 +1440,10 @@ public OperationStatusResultInner delete( } /** - * Lists the SAP Database Instances in an SVI. + * Lists the Database resources associated with a Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -1412,10 +1500,10 @@ private Mono> listSinglePageAsync( } /** - * Lists the SAP Database Instances in an SVI. + * Lists the Database resources associated with a Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -1470,10 +1558,10 @@ private Mono> listSinglePageAsync( } /** - * Lists the SAP Database Instances in an SVI. + * Lists the Database resources associated with a Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -1487,10 +1575,10 @@ private PagedFlux listAsync(String resourceGroupName, } /** - * Lists the SAP Database Instances in an SVI. + * Lists the Database resources associated with a Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -1506,10 +1594,10 @@ private PagedFlux listAsync( } /** - * Lists the SAP Database Instances in an SVI. + * Lists the Database resources associated with a Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -1521,10 +1609,10 @@ public PagedIterable list(String resourceGroupName, St } /** - * Lists the SAP Database Instances in an SVI. + * Lists the Database resources associated with a Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -1537,10 +1625,678 @@ public PagedIterable list( return new PagedIterable<>(listAsync(resourceGroupName, sapVirtualInstanceName, context)); } + /** + * Starts the database instance of the SAP system. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> startInstanceWithResponseAsync( + String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName) { + 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 (sapVirtualInstanceName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter sapVirtualInstanceName is required and cannot be null.")); + } + if (databaseInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter databaseInstanceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .startInstance( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + sapVirtualInstanceName, + databaseInstanceName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Starts the database instance of the SAP system. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @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 current status of an async operation along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> startInstanceWithResponseAsync( + String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName, 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 (sapVirtualInstanceName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter sapVirtualInstanceName is required and cannot be null.")); + } + if (databaseInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter databaseInstanceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .startInstance( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + sapVirtualInstanceName, + databaseInstanceName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Starts the database instance of the SAP system. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OperationStatusResultInner> beginStartInstanceAsync( + String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName) { + Mono>> mono = + startInstanceWithResponseAsync(resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + OperationStatusResultInner.class, + OperationStatusResultInner.class, + this.client.getContext()); + } + + /** + * Starts the database instance of the SAP system. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OperationStatusResultInner> beginStartInstanceAsync( + String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + startInstanceWithResponseAsync(resourceGroupName, sapVirtualInstanceName, databaseInstanceName, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + OperationStatusResultInner.class, + OperationStatusResultInner.class, + context); + } + + /** + * Starts the database instance of the SAP system. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OperationStatusResultInner> beginStartInstance( + String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName) { + return this + .beginStartInstanceAsync(resourceGroupName, sapVirtualInstanceName, databaseInstanceName) + .getSyncPoller(); + } + + /** + * Starts the database instance of the SAP system. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OperationStatusResultInner> beginStartInstance( + String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName, Context context) { + return this + .beginStartInstanceAsync(resourceGroupName, sapVirtualInstanceName, databaseInstanceName, context) + .getSyncPoller(); + } + + /** + * Starts the database instance of the SAP system. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono startInstanceAsync( + String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName) { + return beginStartInstanceAsync(resourceGroupName, sapVirtualInstanceName, databaseInstanceName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Starts the database instance of the SAP system. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @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 current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono startInstanceAsync( + String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName, Context context) { + return beginStartInstanceAsync(resourceGroupName, sapVirtualInstanceName, databaseInstanceName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Starts the database instance of the SAP system. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationStatusResultInner startInstance( + String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName) { + return startInstanceAsync(resourceGroupName, sapVirtualInstanceName, databaseInstanceName).block(); + } + + /** + * Starts the database instance of the SAP system. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationStatusResultInner startInstance( + String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName, Context context) { + return startInstanceAsync(resourceGroupName, sapVirtualInstanceName, databaseInstanceName, context).block(); + } + + /** + * Stops the database instance of the SAP system. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @param body Stop request for the database instance of the SAP system. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> stopInstanceWithResponseAsync( + String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName, StopRequest body) { + 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 (sapVirtualInstanceName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter sapVirtualInstanceName is required and cannot be null.")); + } + if (databaseInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter databaseInstanceName is required and cannot be null.")); + } + if (body != null) { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .stopInstance( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + sapVirtualInstanceName, + databaseInstanceName, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Stops the database instance of the SAP system. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @param body Stop request for the database instance of the SAP system. + * @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 current status of an async operation along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> stopInstanceWithResponseAsync( + String resourceGroupName, + String sapVirtualInstanceName, + String databaseInstanceName, + StopRequest body, + 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 (sapVirtualInstanceName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter sapVirtualInstanceName is required and cannot be null.")); + } + if (databaseInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter databaseInstanceName is required and cannot be null.")); + } + if (body != null) { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .stopInstance( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + sapVirtualInstanceName, + databaseInstanceName, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Stops the database instance of the SAP system. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @param body Stop request for the database instance of the SAP system. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OperationStatusResultInner> beginStopInstanceAsync( + String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName, StopRequest body) { + Mono>> mono = + stopInstanceWithResponseAsync(resourceGroupName, sapVirtualInstanceName, databaseInstanceName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + OperationStatusResultInner.class, + OperationStatusResultInner.class, + this.client.getContext()); + } + + /** + * Stops the database instance of the SAP system. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OperationStatusResultInner> beginStopInstanceAsync( + String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName) { + final StopRequest body = null; + Mono>> mono = + stopInstanceWithResponseAsync(resourceGroupName, sapVirtualInstanceName, databaseInstanceName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + OperationStatusResultInner.class, + OperationStatusResultInner.class, + this.client.getContext()); + } + + /** + * Stops the database instance of the SAP system. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @param body Stop request for the database instance of the SAP system. + * @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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OperationStatusResultInner> beginStopInstanceAsync( + String resourceGroupName, + String sapVirtualInstanceName, + String databaseInstanceName, + StopRequest body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + stopInstanceWithResponseAsync( + resourceGroupName, sapVirtualInstanceName, databaseInstanceName, body, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + OperationStatusResultInner.class, + OperationStatusResultInner.class, + context); + } + + /** + * Stops the database instance of the SAP system. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OperationStatusResultInner> beginStopInstance( + String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName) { + final StopRequest body = null; + return this + .beginStopInstanceAsync(resourceGroupName, sapVirtualInstanceName, databaseInstanceName, body) + .getSyncPoller(); + } + + /** + * Stops the database instance of the SAP system. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @param body Stop request for the database instance of the SAP system. + * @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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OperationStatusResultInner> beginStopInstance( + String resourceGroupName, + String sapVirtualInstanceName, + String databaseInstanceName, + StopRequest body, + Context context) { + return this + .beginStopInstanceAsync(resourceGroupName, sapVirtualInstanceName, databaseInstanceName, body, context) + .getSyncPoller(); + } + + /** + * Stops the database instance of the SAP system. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @param body Stop request for the database instance of the SAP system. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono stopInstanceAsync( + String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName, StopRequest body) { + return beginStopInstanceAsync(resourceGroupName, sapVirtualInstanceName, databaseInstanceName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Stops the database instance of the SAP system. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono stopInstanceAsync( + String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName) { + final StopRequest body = null; + return beginStopInstanceAsync(resourceGroupName, sapVirtualInstanceName, databaseInstanceName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Stops the database instance of the SAP system. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @param body Stop request for the database instance of the SAP system. + * @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 current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono stopInstanceAsync( + String resourceGroupName, + String sapVirtualInstanceName, + String databaseInstanceName, + StopRequest body, + Context context) { + return beginStopInstanceAsync(resourceGroupName, sapVirtualInstanceName, databaseInstanceName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Stops the database instance of the SAP system. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationStatusResultInner stopInstance( + String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName) { + final StopRequest body = null; + return stopInstanceAsync(resourceGroupName, sapVirtualInstanceName, databaseInstanceName, body).block(); + } + + /** + * Stops the database instance of the SAP system. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @param body Stop request for the database instance of the SAP system. + * @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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationStatusResultInner stopInstance( + String resourceGroupName, + String sapVirtualInstanceName, + String databaseInstanceName, + StopRequest body, + Context context) { + return stopInstanceAsync(resourceGroupName, sapVirtualInstanceName, databaseInstanceName, body, context) + .block(); + } + /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1576,7 +2332,8 @@ private Mono> listNextSinglePageAsync(St /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapDatabaseInstancesImpl.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapDatabaseInstancesImpl.java index fa2f569287307..c5e0a04bff988 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapDatabaseInstancesImpl.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapDatabaseInstancesImpl.java @@ -15,6 +15,7 @@ import com.azure.resourcemanager.workloads.models.OperationStatusResult; import com.azure.resourcemanager.workloads.models.SapDatabaseInstance; import com.azure.resourcemanager.workloads.models.SapDatabaseInstances; +import com.azure.resourcemanager.workloads.models.StopRequest; public final class SapDatabaseInstancesImpl implements SapDatabaseInstances { private static final ClientLogger LOGGER = new ClientLogger(SapDatabaseInstancesImpl.class); @@ -29,17 +30,6 @@ public SapDatabaseInstancesImpl( this.serviceManager = serviceManager; } - public SapDatabaseInstance get( - String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName) { - SapDatabaseInstanceInner inner = - this.serviceClient().get(resourceGroupName, sapVirtualInstanceName, databaseInstanceName); - if (inner != null) { - return new SapDatabaseInstanceImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName, Context context) { Response inner = @@ -57,6 +47,17 @@ public Response getWithResponse( } } + public SapDatabaseInstance get( + String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName) { + SapDatabaseInstanceInner inner = + this.serviceClient().get(resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + if (inner != null) { + return new SapDatabaseInstanceImpl(inner, this.manager()); + } else { + return null; + } + } + public OperationStatusResult delete( String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName) { OperationStatusResultInner inner = @@ -92,6 +93,58 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new SapDatabaseInstanceImpl(inner1, this.manager())); } + public OperationStatusResult startInstance( + String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName) { + OperationStatusResultInner inner = + this.serviceClient().startInstance(resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + if (inner != null) { + return new OperationStatusResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public OperationStatusResult startInstance( + String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName, Context context) { + OperationStatusResultInner inner = + this + .serviceClient() + .startInstance(resourceGroupName, sapVirtualInstanceName, databaseInstanceName, context); + if (inner != null) { + return new OperationStatusResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public OperationStatusResult stopInstance( + String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName) { + OperationStatusResultInner inner = + this.serviceClient().stopInstance(resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + if (inner != null) { + return new OperationStatusResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public OperationStatusResult stopInstance( + String resourceGroupName, + String sapVirtualInstanceName, + String databaseInstanceName, + StopRequest body, + Context context) { + OperationStatusResultInner inner = + this + .serviceClient() + .stopInstance(resourceGroupName, sapVirtualInstanceName, databaseInstanceName, body, context); + if (inner != null) { + return new OperationStatusResultImpl(inner, this.manager()); + } else { + return null; + } + } + public SapDatabaseInstance getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapDiskConfigurationsResultImpl.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapDiskConfigurationsResultImpl.java index 259de58effd1b..884dca8e351bc 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapDiskConfigurationsResultImpl.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapDiskConfigurationsResultImpl.java @@ -8,7 +8,7 @@ import com.azure.resourcemanager.workloads.models.SapDiskConfiguration; import com.azure.resourcemanager.workloads.models.SapDiskConfigurationsResult; import java.util.Collections; -import java.util.List; +import java.util.Map; public final class SapDiskConfigurationsResultImpl implements SapDiskConfigurationsResult { private SapDiskConfigurationsResultInner innerObject; @@ -22,12 +22,12 @@ public final class SapDiskConfigurationsResultImpl implements SapDiskConfigurati this.serviceManager = serviceManager; } - public List diskConfigurations() { - List inner = this.innerModel().diskConfigurations(); + public Map volumeConfigurations() { + Map inner = this.innerModel().volumeConfigurations(); if (inner != null) { - return Collections.unmodifiableList(inner); + return Collections.unmodifiableMap(inner); } else { - return Collections.emptyList(); + return Collections.emptyMap(); } } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapLandscapeMonitorImpl.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapLandscapeMonitorImpl.java new file mode 100644 index 0000000000000..57700d26ec0e5 --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapLandscapeMonitorImpl.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.workloads.fluent.models.SapLandscapeMonitorInner; +import com.azure.resourcemanager.workloads.models.SapLandscapeMonitor; +import com.azure.resourcemanager.workloads.models.SapLandscapeMonitorMetricThresholds; +import com.azure.resourcemanager.workloads.models.SapLandscapeMonitorPropertiesGrouping; +import com.azure.resourcemanager.workloads.models.SapLandscapeMonitorProvisioningState; +import java.util.Collections; +import java.util.List; + +public final class SapLandscapeMonitorImpl implements SapLandscapeMonitor { + private SapLandscapeMonitorInner innerObject; + + private final com.azure.resourcemanager.workloads.WorkloadsManager serviceManager; + + SapLandscapeMonitorImpl( + SapLandscapeMonitorInner innerObject, com.azure.resourcemanager.workloads.WorkloadsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public SapLandscapeMonitorProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public SapLandscapeMonitorPropertiesGrouping grouping() { + return this.innerModel().grouping(); + } + + public List topMetricsThresholds() { + List inner = this.innerModel().topMetricsThresholds(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public SapLandscapeMonitorInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.workloads.WorkloadsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapLandscapeMonitorListResultImpl.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapLandscapeMonitorListResultImpl.java new file mode 100644 index 0000000000000..1323633a206a7 --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapLandscapeMonitorListResultImpl.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.implementation; + +import com.azure.resourcemanager.workloads.fluent.models.SapLandscapeMonitorInner; +import com.azure.resourcemanager.workloads.fluent.models.SapLandscapeMonitorListResultInner; +import com.azure.resourcemanager.workloads.models.SapLandscapeMonitor; +import com.azure.resourcemanager.workloads.models.SapLandscapeMonitorListResult; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class SapLandscapeMonitorListResultImpl implements SapLandscapeMonitorListResult { + private SapLandscapeMonitorListResultInner innerObject; + + private final com.azure.resourcemanager.workloads.WorkloadsManager serviceManager; + + SapLandscapeMonitorListResultImpl( + SapLandscapeMonitorListResultInner innerObject, + com.azure.resourcemanager.workloads.WorkloadsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List value() { + List inner = this.innerModel().value(); + if (inner != null) { + return Collections + .unmodifiableList( + inner + .stream() + .map(inner1 -> new SapLandscapeMonitorImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public String nextLink() { + return this.innerModel().nextLink(); + } + + public SapLandscapeMonitorListResultInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.workloads.WorkloadsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/WordpressInstancesClientImpl.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapLandscapeMonitorsClientImpl.java similarity index 54% rename from sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/WordpressInstancesClientImpl.java rename to sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapLandscapeMonitorsClientImpl.java index 795fe812bda4d..84543cc9d0df5 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/WordpressInstancesClientImpl.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapLandscapeMonitorsClientImpl.java @@ -12,6 +12,7 @@ import com.azure.core.annotation.Headers; import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; import com.azure.core.annotation.PathParam; import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; @@ -19,137 +20,138 @@ import com.azure.core.annotation.ServiceInterface; import com.azure.core.annotation.ServiceMethod; import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; 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.workloads.fluent.WordpressInstancesClient; -import com.azure.resourcemanager.workloads.fluent.models.WordpressInstanceResourceInner; -import com.azure.resourcemanager.workloads.models.WordpressInstanceResourceList; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; +import com.azure.resourcemanager.workloads.fluent.SapLandscapeMonitorsClient; +import com.azure.resourcemanager.workloads.fluent.models.SapLandscapeMonitorInner; +import com.azure.resourcemanager.workloads.fluent.models.SapLandscapeMonitorListResultInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in WordpressInstancesClient. */ -public final class WordpressInstancesClientImpl implements WordpressInstancesClient { +/** An instance of this class provides access to all the operations defined in SapLandscapeMonitorsClient. */ +public final class SapLandscapeMonitorsClientImpl implements SapLandscapeMonitorsClient { /** The proxy service used to perform REST calls. */ - private final WordpressInstancesService service; + private final SapLandscapeMonitorsService service; /** The service client containing this operation class. */ private final WorkloadsClientImpl client; /** - * Initializes an instance of WordpressInstancesClientImpl. + * Initializes an instance of SapLandscapeMonitorsClientImpl. * * @param client the instance of the service client containing this operation class. */ - WordpressInstancesClientImpl(WorkloadsClientImpl client) { + SapLandscapeMonitorsClientImpl(WorkloadsClientImpl client) { this.service = - RestProxy.create(WordpressInstancesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + RestProxy + .create(SapLandscapeMonitorsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for WorkloadsClientWordpressInstances to be used by the proxy service to - * perform REST calls. + * The interface defining all the services for WorkloadsClientSapLandscapeMonitors to be used by the proxy service + * to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "WorkloadsClientWordp") - private interface WordpressInstancesService { + @ServiceInterface(name = "WorkloadsClientSapLa") + public interface SapLandscapeMonitorsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads" - + "/phpWorkloads/{phpWorkloadName}/wordpressInstances") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/monitors" + + "/{monitorName}/sapLandscapeMonitor/default") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( + Mono> get( @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("phpWorkloadName") String phpWorkloadName, + @PathParam("monitorName") String monitorName, @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads" - + "/phpWorkloads/{phpWorkloadName}/wordpressInstances/default") - @ExpectedResponses({200}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/monitors" + + "/{monitorName}/sapLandscapeMonitor/default") + @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( + Mono> create( @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("phpWorkloadName") String phpWorkloadName, + @PathParam("monitorName") String monitorName, + @BodyParam("application/json") SapLandscapeMonitorInner sapLandscapeMonitorParameter, @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads" - + "/phpWorkloads/{phpWorkloadName}/wordpressInstances/default") - @ExpectedResponses({200, 201}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/monitors" + + "/{monitorName}/sapLandscapeMonitor/default") + @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( + Mono> delete( @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("phpWorkloadName") String phpWorkloadName, - @BodyParam("application/json") WordpressInstanceResourceInner wordpressInstanceResource, + @PathParam("monitorName") String monitorName, @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads" - + "/phpWorkloads/{phpWorkloadName}/wordpressInstances/default") - @ExpectedResponses({200, 204}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/monitors" + + "/{monitorName}/sapLandscapeMonitor/default") + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( + Mono> update( @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("phpWorkloadName") String phpWorkloadName, + @PathParam("monitorName") String monitorName, + @BodyParam("application/json") SapLandscapeMonitorInner sapLandscapeMonitorParameter, @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/monitors" + + "/{monitorName}/sapLandscapeMonitor") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, + Mono> list( @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("monitorName") String monitorName, @HeaderParam("Accept") String accept, Context context); } /** - * Lists WordPress instance resources under a phpWorkload resource. + * Gets configuration values for Single Pane Of Glass for SAP monitor. + * + *

Gets configuration values for Single Pane Of Glass for SAP monitor for the specified subscription, resource + * group, and resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. + * @param monitorName Name of the SAP monitor 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 wordPress instance resource list along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return configuration values for Single Pane Of Glass for SAP monitor for the specified subscription, resource + * group, and resource name along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String phpWorkloadName) { + private Mono> getWithResponseAsync( + String resourceGroupName, String monitorName) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -166,50 +168,43 @@ private Mono> listSinglePageAsync( return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (phpWorkloadName == null) { - return Mono - .error(new IllegalArgumentException("Parameter phpWorkloadName is required and cannot be null.")); + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service - .list( + .get( this.client.getEndpoint(), - this.client.getSubscriptionId(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, - phpWorkloadName, + monitorName, accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists WordPress instance resources under a phpWorkload resource. + * Gets configuration values for Single Pane Of Glass for SAP monitor. + * + *

Gets configuration values for Single Pane Of Glass for SAP monitor for the specified subscription, resource + * group, and resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. + * @param monitorName Name of the SAP monitor 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 wordPress instance resource list along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return configuration values for Single Pane Of Glass for SAP monitor for the specified subscription, resource + * group, and resource name along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String phpWorkloadName, Context context) { + private Mono> getWithResponseAsync( + String resourceGroupName, String monitorName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -226,113 +221,99 @@ private Mono> listSinglePageAsync( return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (phpWorkloadName == null) { - return Mono - .error(new IllegalArgumentException("Parameter phpWorkloadName is required and cannot be null.")); + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( + .get( this.client.getEndpoint(), - this.client.getSubscriptionId(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, - phpWorkloadName, + monitorName, accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + context); } /** - * Lists WordPress instance resources under a phpWorkload resource. + * Gets configuration values for Single Pane Of Glass for SAP monitor. + * + *

Gets configuration values for Single Pane Of Glass for SAP monitor for the specified subscription, resource + * group, and resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. + * @param monitorName Name of the SAP monitor 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 wordPress instance resource list as paginated response with {@link PagedFlux}. + * @return configuration values for Single Pane Of Glass for SAP monitor for the specified subscription, resource + * group, and resource name on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String phpWorkloadName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, phpWorkloadName), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String monitorName) { + return getWithResponseAsync(resourceGroupName, monitorName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Lists WordPress instance resources under a phpWorkload resource. + * Gets configuration values for Single Pane Of Glass for SAP monitor. + * + *

Gets configuration values for Single Pane Of Glass for SAP monitor for the specified subscription, resource + * group, and resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. + * @param monitorName Name of the SAP monitor 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 wordPress instance resource list as paginated response with {@link PagedFlux}. + * @return configuration values for Single Pane Of Glass for SAP monitor for the specified subscription, resource + * group, and resource name along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String phpWorkloadName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, phpWorkloadName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String monitorName, Context context) { + return getWithResponseAsync(resourceGroupName, monitorName, context).block(); } /** - * Lists WordPress instance resources under a phpWorkload resource. + * Gets configuration values for Single Pane Of Glass for SAP monitor. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload 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 wordPress instance resource list as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String phpWorkloadName) { - return new PagedIterable<>(listAsync(resourceGroupName, phpWorkloadName)); - } - - /** - * Lists WordPress instance resources under a phpWorkload resource. + *

Gets configuration values for Single Pane Of Glass for SAP monitor for the specified subscription, resource + * group, and resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param context The context to associate with this operation. + * @param monitorName Name of the SAP monitor 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 wordPress instance resource list as paginated response with {@link PagedIterable}. + * @return configuration values for Single Pane Of Glass for SAP monitor for the specified subscription, resource + * group, and resource name. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String phpWorkloadName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, phpWorkloadName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public SapLandscapeMonitorInner get(String resourceGroupName, String monitorName) { + return getWithResponse(resourceGroupName, monitorName, Context.NONE).getValue(); } /** - * Gets the WordPress instance resource. + * Creates a SAP Landscape Monitor Dashboard. + * + *

Creates a SAP Landscape Monitor Dashboard for the specified subscription, resource group, and resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. + * @param monitorName Name of the SAP monitor resource. + * @param sapLandscapeMonitorParameter Request body representing a configuration for Sap Landscape Monitor + * Dashboard. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the WordPress instance resource along with {@link Response} on successful completion of {@link Mono}. + * @return configuration associated with SAP Landscape Monitor Dashboard along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String phpWorkloadName) { + private Mono> createWithResponseAsync( + String resourceGroupName, String monitorName, SapLandscapeMonitorInner sapLandscapeMonitorParameter) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -349,40 +330,56 @@ private Mono> getWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (phpWorkloadName == null) { + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (sapLandscapeMonitorParameter == null) { return Mono - .error(new IllegalArgumentException("Parameter phpWorkloadName is required and cannot be null.")); + .error( + new IllegalArgumentException( + "Parameter sapLandscapeMonitorParameter is required and cannot be null.")); + } else { + sapLandscapeMonitorParameter.validate(); } final String accept = "application/json"; return FluxUtil .withContext( context -> service - .get( + .create( this.client.getEndpoint(), - this.client.getSubscriptionId(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, - phpWorkloadName, + monitorName, + sapLandscapeMonitorParameter, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets the WordPress instance resource. + * Creates a SAP Landscape Monitor Dashboard. + * + *

Creates a SAP Landscape Monitor Dashboard for the specified subscription, resource group, and resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. + * @param monitorName Name of the SAP monitor resource. + * @param sapLandscapeMonitorParameter Request body representing a configuration for Sap Landscape Monitor + * Dashboard. * @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 WordPress instance resource along with {@link Response} on successful completion of {@link Mono}. + * @return configuration associated with SAP Landscape Monitor Dashboard along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String phpWorkloadName, Context context) { + private Mono> createWithResponseAsync( + String resourceGroupName, + String monitorName, + SapLandscapeMonitorInner sapLandscapeMonitorParameter, + Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -399,85 +396,112 @@ private Mono> getWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (phpWorkloadName == null) { + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (sapLandscapeMonitorParameter == null) { return Mono - .error(new IllegalArgumentException("Parameter phpWorkloadName is required and cannot be null.")); + .error( + new IllegalArgumentException( + "Parameter sapLandscapeMonitorParameter is required and cannot be null.")); + } else { + sapLandscapeMonitorParameter.validate(); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .get( + .create( this.client.getEndpoint(), - this.client.getSubscriptionId(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, - phpWorkloadName, + monitorName, + sapLandscapeMonitorParameter, accept, context); } /** - * Gets the WordPress instance resource. + * Creates a SAP Landscape Monitor Dashboard. + * + *

Creates a SAP Landscape Monitor Dashboard for the specified subscription, resource group, and resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. + * @param monitorName Name of the SAP monitor resource. + * @param sapLandscapeMonitorParameter Request body representing a configuration for Sap Landscape Monitor + * Dashboard. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the WordPress instance resource on successful completion of {@link Mono}. + * @return configuration associated with SAP Landscape Monitor Dashboard on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String phpWorkloadName) { - return getWithResponseAsync(resourceGroupName, phpWorkloadName) + private Mono createAsync( + String resourceGroupName, String monitorName, SapLandscapeMonitorInner sapLandscapeMonitorParameter) { + return createWithResponseAsync(resourceGroupName, monitorName, sapLandscapeMonitorParameter) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets the WordPress instance resource. + * Creates a SAP Landscape Monitor Dashboard. + * + *

Creates a SAP Landscape Monitor Dashboard for the specified subscription, resource group, and resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. + * @param monitorName Name of the SAP monitor resource. + * @param sapLandscapeMonitorParameter Request body representing a configuration for Sap Landscape Monitor + * Dashboard. + * @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 WordPress instance resource. + * @return configuration associated with SAP Landscape Monitor Dashboard along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WordpressInstanceResourceInner get(String resourceGroupName, String phpWorkloadName) { - return getAsync(resourceGroupName, phpWorkloadName).block(); + public Response createWithResponse( + String resourceGroupName, + String monitorName, + SapLandscapeMonitorInner sapLandscapeMonitorParameter, + Context context) { + return createWithResponseAsync(resourceGroupName, monitorName, sapLandscapeMonitorParameter, context).block(); } /** - * Gets the WordPress instance resource. + * Creates a SAP Landscape Monitor Dashboard. + * + *

Creates a SAP Landscape Monitor Dashboard for the specified subscription, resource group, and resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param context The context to associate with this operation. + * @param monitorName Name of the SAP monitor resource. + * @param sapLandscapeMonitorParameter Request body representing a configuration for Sap Landscape Monitor + * Dashboard. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the WordPress instance resource along with {@link Response}. + * @return configuration associated with SAP Landscape Monitor Dashboard. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String phpWorkloadName, Context context) { - return getWithResponseAsync(resourceGroupName, phpWorkloadName, context).block(); + public SapLandscapeMonitorInner create( + String resourceGroupName, String monitorName, SapLandscapeMonitorInner sapLandscapeMonitorParameter) { + return createWithResponse(resourceGroupName, monitorName, sapLandscapeMonitorParameter, Context.NONE) + .getValue(); } /** - * Create or updated WordPress instance resource. + * Deletes a SAP Landscape Monitor Dashboard. + * + *

Deletes a SAP Landscape Monitor Dashboard with the specified subscription, resource group, and SAP monitor + * name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param wordpressInstanceResource Resource create or update request payload. + * @param monitorName Name of the SAP monitor 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 wordPress instance 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>> createOrUpdateWithResponseAsync( - String resourceGroupName, String phpWorkloadName, WordpressInstanceResourceInner wordpressInstanceResource) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String monitorName) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -494,53 +518,42 @@ private Mono>> createOrUpdateWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (phpWorkloadName == null) { - return Mono - .error(new IllegalArgumentException("Parameter phpWorkloadName is required and cannot be null.")); - } - if (wordpressInstanceResource == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter wordpressInstanceResource is required and cannot be null.")); - } else { - wordpressInstanceResource.validate(); + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service - .createOrUpdate( + .delete( this.client.getEndpoint(), - this.client.getSubscriptionId(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, - phpWorkloadName, - wordpressInstanceResource, + monitorName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or updated WordPress instance resource. + * Deletes a SAP Landscape Monitor Dashboard. + * + *

Deletes a SAP Landscape Monitor Dashboard with the specified subscription, resource group, and SAP monitor + * name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param wordpressInstanceResource Resource create or update request payload. + * @param monitorName Name of the SAP monitor 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 wordPress instance 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>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String phpWorkloadName, - WordpressInstanceResourceInner wordpressInstanceResource, - Context context) { + private Mono> deleteWithResponseAsync( + String resourceGroupName, String monitorName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -557,224 +570,289 @@ private Mono>> createOrUpdateWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (phpWorkloadName == null) { - return Mono - .error(new IllegalArgumentException("Parameter phpWorkloadName is required and cannot be null.")); - } - if (wordpressInstanceResource == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter wordpressInstanceResource is required and cannot be null.")); - } else { - wordpressInstanceResource.validate(); + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .createOrUpdate( + .delete( this.client.getEndpoint(), - this.client.getSubscriptionId(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, - phpWorkloadName, - wordpressInstanceResource, + monitorName, accept, context); } /** - * Create or updated WordPress instance resource. + * Deletes a SAP Landscape Monitor Dashboard. + * + *

Deletes a SAP Landscape Monitor Dashboard with the specified subscription, resource group, and SAP monitor + * name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param wordpressInstanceResource Resource create or update request payload. + * @param monitorName Name of the SAP monitor 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 wordPress instance resource. + * @return A {@link Mono} that completes when a successful response is received. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WordpressInstanceResourceInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String phpWorkloadName, - WordpressInstanceResourceInner wordpressInstanceResource) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, phpWorkloadName, wordpressInstanceResource); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WordpressInstanceResourceInner.class, - WordpressInstanceResourceInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String monitorName) { + return deleteWithResponseAsync(resourceGroupName, monitorName).flatMap(ignored -> Mono.empty()); } /** - * Create or updated WordPress instance resource. + * Deletes a SAP Landscape Monitor Dashboard. + * + *

Deletes a SAP Landscape Monitor Dashboard with the specified subscription, resource group, and SAP monitor + * name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param wordpressInstanceResource Resource create or update request payload. + * @param monitorName Name of the SAP monitor 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 wordPress instance resource. + * @return the {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WordpressInstanceResourceInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String phpWorkloadName, - WordpressInstanceResourceInner wordpressInstanceResource, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, phpWorkloadName, wordpressInstanceResource, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WordpressInstanceResourceInner.class, - WordpressInstanceResourceInner.class, - context); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String resourceGroupName, String monitorName, Context context) { + return deleteWithResponseAsync(resourceGroupName, monitorName, context).block(); } /** - * Create or updated WordPress instance resource. + * Deletes a SAP Landscape Monitor Dashboard. + * + *

Deletes a SAP Landscape Monitor Dashboard with the specified subscription, resource group, and SAP monitor + * name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param wordpressInstanceResource Resource create or update request payload. + * @param monitorName Name of the SAP monitor 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 wordPress instance resource. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WordpressInstanceResourceInner> beginCreateOrUpdate( - String resourceGroupName, String phpWorkloadName, WordpressInstanceResourceInner wordpressInstanceResource) { - return beginCreateOrUpdateAsync(resourceGroupName, phpWorkloadName, wordpressInstanceResource).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String monitorName) { + deleteWithResponse(resourceGroupName, monitorName, Context.NONE); } /** - * Create or updated WordPress instance resource. + * Patches the SAP Landscape Monitor Dashboard. + * + *

Patches the SAP Landscape Monitor Dashboard for the specified subscription, resource group, and SAP monitor + * name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param wordpressInstanceResource Resource create or update request payload. - * @param context The context to associate with this operation. + * @param monitorName Name of the SAP monitor resource. + * @param sapLandscapeMonitorParameter Request body representing a configuration for Sap Landscape Monitor + * Dashboard. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 wordPress instance resource. + * @return configuration associated with SAP Landscape Monitor Dashboard along with {@link Response} on successful + * completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WordpressInstanceResourceInner> beginCreateOrUpdate( - String resourceGroupName, - String phpWorkloadName, - WordpressInstanceResourceInner wordpressInstanceResource, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, phpWorkloadName, wordpressInstanceResource, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, String monitorName, SapLandscapeMonitorInner sapLandscapeMonitorParameter) { + 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 (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (sapLandscapeMonitorParameter == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter sapLandscapeMonitorParameter is required and cannot be null.")); + } else { + sapLandscapeMonitorParameter.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + monitorName, + sapLandscapeMonitorParameter, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or updated WordPress instance resource. + * Patches the SAP Landscape Monitor Dashboard. + * + *

Patches the SAP Landscape Monitor Dashboard for the specified subscription, resource group, and SAP monitor + * name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param wordpressInstanceResource Resource create or update request payload. + * @param monitorName Name of the SAP monitor resource. + * @param sapLandscapeMonitorParameter Request body representing a configuration for Sap Landscape Monitor + * Dashboard. + * @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 wordPress instance resource on successful completion of {@link Mono}. + * @return configuration associated with SAP Landscape Monitor Dashboard along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String phpWorkloadName, WordpressInstanceResourceInner wordpressInstanceResource) { - return beginCreateOrUpdateAsync(resourceGroupName, phpWorkloadName, wordpressInstanceResource) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono> updateWithResponseAsync( + String resourceGroupName, + String monitorName, + SapLandscapeMonitorInner sapLandscapeMonitorParameter, + 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 (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (sapLandscapeMonitorParameter == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter sapLandscapeMonitorParameter is required and cannot be null.")); + } else { + sapLandscapeMonitorParameter.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + monitorName, + sapLandscapeMonitorParameter, + accept, + context); } /** - * Create or updated WordPress instance resource. + * Patches the SAP Landscape Monitor Dashboard. + * + *

Patches the SAP Landscape Monitor Dashboard for the specified subscription, resource group, and SAP monitor + * name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param wordpressInstanceResource Resource create or update request payload. - * @param context The context to associate with this operation. + * @param monitorName Name of the SAP monitor resource. + * @param sapLandscapeMonitorParameter Request body representing a configuration for Sap Landscape Monitor + * Dashboard. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return wordPress instance resource on successful completion of {@link Mono}. + * @return configuration associated with SAP Landscape Monitor Dashboard on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String phpWorkloadName, - WordpressInstanceResourceInner wordpressInstanceResource, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, phpWorkloadName, wordpressInstanceResource, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono updateAsync( + String resourceGroupName, String monitorName, SapLandscapeMonitorInner sapLandscapeMonitorParameter) { + return updateWithResponseAsync(resourceGroupName, monitorName, sapLandscapeMonitorParameter) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Create or updated WordPress instance resource. + * Patches the SAP Landscape Monitor Dashboard. + * + *

Patches the SAP Landscape Monitor Dashboard for the specified subscription, resource group, and SAP monitor + * name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param wordpressInstanceResource Resource create or update request payload. + * @param monitorName Name of the SAP monitor resource. + * @param sapLandscapeMonitorParameter Request body representing a configuration for Sap Landscape Monitor + * Dashboard. + * @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 wordPress instance resource. + * @return configuration associated with SAP Landscape Monitor Dashboard along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WordpressInstanceResourceInner createOrUpdate( - String resourceGroupName, String phpWorkloadName, WordpressInstanceResourceInner wordpressInstanceResource) { - return createOrUpdateAsync(resourceGroupName, phpWorkloadName, wordpressInstanceResource).block(); + public Response updateWithResponse( + String resourceGroupName, + String monitorName, + SapLandscapeMonitorInner sapLandscapeMonitorParameter, + Context context) { + return updateWithResponseAsync(resourceGroupName, monitorName, sapLandscapeMonitorParameter, context).block(); } /** - * Create or updated WordPress instance resource. + * Patches the SAP Landscape Monitor Dashboard. + * + *

Patches the SAP Landscape Monitor Dashboard for the specified subscription, resource group, and SAP monitor + * name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param wordpressInstanceResource Resource create or update request payload. - * @param context The context to associate with this operation. + * @param monitorName Name of the SAP monitor resource. + * @param sapLandscapeMonitorParameter Request body representing a configuration for Sap Landscape Monitor + * Dashboard. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return wordPress instance resource. + * @return configuration associated with SAP Landscape Monitor Dashboard. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WordpressInstanceResourceInner createOrUpdate( - String resourceGroupName, - String phpWorkloadName, - WordpressInstanceResourceInner wordpressInstanceResource, - Context context) { - return createOrUpdateAsync(resourceGroupName, phpWorkloadName, wordpressInstanceResource, context).block(); + public SapLandscapeMonitorInner update( + String resourceGroupName, String monitorName, SapLandscapeMonitorInner sapLandscapeMonitorParameter) { + return updateWithResponse(resourceGroupName, monitorName, sapLandscapeMonitorParameter, Context.NONE) + .getValue(); } /** - * Delete WordPress instance resource. + * Gets configuration values for Single Pane Of Glass for SAP monitor. + * + *

Gets configuration values for Single Pane Of Glass for SAP monitor for the specified subscription, resource + * group, and resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. + * @param monitorName Name of the SAP monitor 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 configuration values for Single Pane Of Glass for SAP monitor for the specified subscription, resource + * group, and resource name along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String phpWorkloadName) { + private Mono> listWithResponseAsync( + String resourceGroupName, String monitorName) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -791,40 +869,43 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (phpWorkloadName == null) { - return Mono - .error(new IllegalArgumentException("Parameter phpWorkloadName is required and cannot be null.")); + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service - .delete( + .list( this.client.getEndpoint(), - this.client.getSubscriptionId(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, - phpWorkloadName, + monitorName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete WordPress instance resource. + * Gets configuration values for Single Pane Of Glass for SAP monitor. + * + *

Gets configuration values for Single Pane Of Glass for SAP monitor for the specified subscription, resource + * group, and resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. + * @param monitorName Name of the SAP monitor 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 configuration values for Single Pane Of Glass for SAP monitor for the specified subscription, resource + * group, and resource name along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String phpWorkloadName, Context context) { + private Mono> listWithResponseAsync( + String resourceGroupName, String monitorName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -841,139 +922,78 @@ private Mono> deleteWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (phpWorkloadName == null) { - return Mono - .error(new IllegalArgumentException("Parameter phpWorkloadName is required and cannot be null.")); + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .delete( + .list( this.client.getEndpoint(), - this.client.getSubscriptionId(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, - phpWorkloadName, + monitorName, accept, context); } /** - * Delete WordPress instance resource. + * Gets configuration values for Single Pane Of Glass for SAP monitor. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload 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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String phpWorkloadName) { - return deleteWithResponseAsync(resourceGroupName, phpWorkloadName).flatMap(ignored -> Mono.empty()); - } - - /** - * Delete WordPress instance resource. + *

Gets configuration values for Single Pane Of Glass for SAP monitor for the specified subscription, resource + * group, and resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. + * @param monitorName Name of the SAP monitor 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 configuration values for Single Pane Of Glass for SAP monitor for the specified subscription, resource + * group, and resource name on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String phpWorkloadName) { - deleteAsync(resourceGroupName, phpWorkloadName).block(); + private Mono listAsync(String resourceGroupName, String monitorName) { + return listWithResponseAsync(resourceGroupName, monitorName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Delete WordPress instance resource. + * Gets configuration values for Single Pane Of Glass for SAP monitor. + * + *

Gets configuration values for Single Pane Of Glass for SAP monitor for the specified subscription, resource + * group, and resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. + * @param monitorName Name of the SAP monitor 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}. + * @return configuration values for Single Pane Of Glass for SAP monitor for the specified subscription, resource + * group, and resource name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String phpWorkloadName, Context context) { - return deleteWithResponseAsync(resourceGroupName, phpWorkloadName, context).block(); + public Response listWithResponse( + String resourceGroupName, String monitorName, Context context) { + return listWithResponseAsync(resourceGroupName, monitorName, context).block(); } /** - * Get the next page of items. + * Gets configuration values for Single Pane Of Glass for SAP monitor. * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return wordPress instance resource list along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(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.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. + *

Gets configuration values for Single Pane Of Glass for SAP monitor for the specified subscription, resource + * group, and resource name. * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor 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 wordPress instance resource list along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return configuration values for Single Pane Of Glass for SAP monitor for the specified subscription, resource + * group, and resource name. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync( - 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 - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + public SapLandscapeMonitorListResultInner list(String resourceGroupName, String monitorName) { + return listWithResponse(resourceGroupName, monitorName, Context.NONE).getValue(); } } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapLandscapeMonitorsImpl.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapLandscapeMonitorsImpl.java new file mode 100644 index 0000000000000..40ceb01505181 --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapLandscapeMonitorsImpl.java @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.workloads.fluent.SapLandscapeMonitorsClient; +import com.azure.resourcemanager.workloads.fluent.models.SapLandscapeMonitorInner; +import com.azure.resourcemanager.workloads.fluent.models.SapLandscapeMonitorListResultInner; +import com.azure.resourcemanager.workloads.models.SapLandscapeMonitor; +import com.azure.resourcemanager.workloads.models.SapLandscapeMonitorListResult; +import com.azure.resourcemanager.workloads.models.SapLandscapeMonitors; + +public final class SapLandscapeMonitorsImpl implements SapLandscapeMonitors { + private static final ClientLogger LOGGER = new ClientLogger(SapLandscapeMonitorsImpl.class); + + private final SapLandscapeMonitorsClient innerClient; + + private final com.azure.resourcemanager.workloads.WorkloadsManager serviceManager; + + public SapLandscapeMonitorsImpl( + SapLandscapeMonitorsClient innerClient, com.azure.resourcemanager.workloads.WorkloadsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse( + String resourceGroupName, String monitorName, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, monitorName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SapLandscapeMonitorImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SapLandscapeMonitor get(String resourceGroupName, String monitorName) { + SapLandscapeMonitorInner inner = this.serviceClient().get(resourceGroupName, monitorName); + if (inner != null) { + return new SapLandscapeMonitorImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response createWithResponse( + String resourceGroupName, + String monitorName, + SapLandscapeMonitorInner sapLandscapeMonitorParameter, + Context context) { + Response inner = + this + .serviceClient() + .createWithResponse(resourceGroupName, monitorName, sapLandscapeMonitorParameter, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SapLandscapeMonitorImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SapLandscapeMonitor create( + String resourceGroupName, String monitorName, SapLandscapeMonitorInner sapLandscapeMonitorParameter) { + SapLandscapeMonitorInner inner = + this.serviceClient().create(resourceGroupName, monitorName, sapLandscapeMonitorParameter); + if (inner != null) { + return new SapLandscapeMonitorImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response deleteByResourceGroupWithResponse( + String resourceGroupName, String monitorName, Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, monitorName, context); + } + + public void deleteByResourceGroup(String resourceGroupName, String monitorName) { + this.serviceClient().delete(resourceGroupName, monitorName); + } + + public Response updateWithResponse( + String resourceGroupName, + String monitorName, + SapLandscapeMonitorInner sapLandscapeMonitorParameter, + Context context) { + Response inner = + this + .serviceClient() + .updateWithResponse(resourceGroupName, monitorName, sapLandscapeMonitorParameter, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SapLandscapeMonitorImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SapLandscapeMonitor update( + String resourceGroupName, String monitorName, SapLandscapeMonitorInner sapLandscapeMonitorParameter) { + SapLandscapeMonitorInner inner = + this.serviceClient().update(resourceGroupName, monitorName, sapLandscapeMonitorParameter); + if (inner != null) { + return new SapLandscapeMonitorImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listWithResponse( + String resourceGroupName, String monitorName, Context context) { + Response inner = + this.serviceClient().listWithResponse(resourceGroupName, monitorName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SapLandscapeMonitorListResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SapLandscapeMonitorListResult list(String resourceGroupName, String monitorName) { + SapLandscapeMonitorListResultInner inner = this.serviceClient().list(resourceGroupName, monitorName); + if (inner != null) { + return new SapLandscapeMonitorListResultImpl(inner, this.manager()); + } else { + return null; + } + } + + private SapLandscapeMonitorsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.workloads.WorkloadsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapVirtualInstanceImpl.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapVirtualInstanceImpl.java index 738e6903068ab..81c4fe96c069b 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapVirtualInstanceImpl.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapVirtualInstanceImpl.java @@ -216,10 +216,6 @@ public OperationStatusResult start(Context context) { return serviceManager.sapVirtualInstances().start(resourceGroupName, sapVirtualInstanceName, context); } - public OperationStatusResult stop(StopRequest body) { - return serviceManager.sapVirtualInstances().stop(resourceGroupName, sapVirtualInstanceName, body); - } - public OperationStatusResult stop() { return serviceManager.sapVirtualInstances().stop(resourceGroupName, sapVirtualInstanceName); } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapVirtualInstancesClientImpl.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapVirtualInstancesClientImpl.java index 6df70251c9546..e260d64e29cb1 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapVirtualInstancesClientImpl.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapVirtualInstancesClientImpl.java @@ -68,7 +68,7 @@ public final class SapVirtualInstancesClientImpl implements SapVirtualInstancesC */ @Host("{$host}") @ServiceInterface(name = "WorkloadsClientSapVi") - private interface SapVirtualInstancesService { + public interface SapVirtualInstancesService { @Headers({"Content-Type: application/json"}) @Put( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads" @@ -209,15 +209,16 @@ Mono> listBySubscriptionNext( } /** - * Creates an Virtual Instance for SAP. + * Creates a Virtual Instance for SAP solutions (VIS) resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param body The Virtual Instance for SAP request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param body Virtual Instance for SAP solutions resource request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return define the Virtual Instance for SAP along with {@link Response} on successful completion of {@link Mono}. + * @return define the Virtual Instance for SAP solutions resource along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -264,16 +265,17 @@ private Mono>> createWithResponseAsync( } /** - * Creates an Virtual Instance for SAP. + * Creates a Virtual Instance for SAP solutions (VIS) resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param body The Virtual Instance for SAP request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param body Virtual Instance for SAP solutions resource request body. * @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 define the Virtual Instance for SAP along with {@link Response} on successful completion of {@link Mono}. + * @return define the Virtual Instance for SAP solutions resource along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -317,15 +319,15 @@ private Mono>> createWithResponseAsync( } /** - * Creates an Virtual Instance for SAP. + * Creates a Virtual Instance for SAP solutions (VIS) resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param body The Virtual Instance for SAP request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param body Virtual Instance for SAP solutions resource request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 define the Virtual Instance for SAP. + * @return the {@link PollerFlux} for polling of define the Virtual Instance for SAP solutions resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, SapVirtualInstanceInner> beginCreateAsync( @@ -343,16 +345,42 @@ private PollerFlux, SapVirtualInstanceInner> } /** - * Creates an Virtual Instance for SAP. + * Creates a Virtual Instance for SAP solutions (VIS) resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param body The Virtual Instance for SAP request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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 define the Virtual Instance for SAP solutions resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SapVirtualInstanceInner> beginCreateAsync( + String resourceGroupName, String sapVirtualInstanceName) { + final SapVirtualInstanceInner body = null; + Mono>> mono = + createWithResponseAsync(resourceGroupName, sapVirtualInstanceName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + SapVirtualInstanceInner.class, + SapVirtualInstanceInner.class, + this.client.getContext()); + } + + /** + * Creates a Virtual Instance for SAP solutions (VIS) resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param body Virtual Instance for SAP solutions resource request body. * @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 define the Virtual Instance for SAP. + * @return the {@link PollerFlux} for polling of define the Virtual Instance for SAP solutions resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, SapVirtualInstanceInner> beginCreateAsync( @@ -371,50 +399,50 @@ private PollerFlux, SapVirtualInstanceInner> } /** - * Creates an Virtual Instance for SAP. + * Creates a Virtual Instance for SAP solutions (VIS) resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param body The Virtual Instance for SAP request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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 define the Virtual Instance for SAP. + * @return the {@link SyncPoller} for polling of define the Virtual Instance for SAP solutions resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SapVirtualInstanceInner> beginCreate( - String resourceGroupName, String sapVirtualInstanceName, SapVirtualInstanceInner body) { - return beginCreateAsync(resourceGroupName, sapVirtualInstanceName, body).getSyncPoller(); + String resourceGroupName, String sapVirtualInstanceName) { + final SapVirtualInstanceInner body = null; + return this.beginCreateAsync(resourceGroupName, sapVirtualInstanceName, body).getSyncPoller(); } /** - * Creates an Virtual Instance for SAP. + * Creates a Virtual Instance for SAP solutions (VIS) resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param body The Virtual Instance for SAP request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param body Virtual Instance for SAP solutions resource request body. * @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 define the Virtual Instance for SAP. + * @return the {@link SyncPoller} for polling of define the Virtual Instance for SAP solutions resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SapVirtualInstanceInner> beginCreate( String resourceGroupName, String sapVirtualInstanceName, SapVirtualInstanceInner body, Context context) { - return beginCreateAsync(resourceGroupName, sapVirtualInstanceName, body, context).getSyncPoller(); + return this.beginCreateAsync(resourceGroupName, sapVirtualInstanceName, body, context).getSyncPoller(); } /** - * Creates an Virtual Instance for SAP. + * Creates a Virtual Instance for SAP solutions (VIS) resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param body The Virtual Instance for SAP request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param body Virtual Instance for SAP solutions resource request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return define the Virtual Instance for SAP on successful completion of {@link Mono}. + * @return define the Virtual Instance for SAP solutions resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -425,14 +453,14 @@ private Mono createAsync( } /** - * Creates an Virtual Instance for SAP. + * Creates a Virtual Instance for SAP solutions (VIS) resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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 define the Virtual Instance for SAP on successful completion of {@link Mono}. + * @return define the Virtual Instance for SAP solutions resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync(String resourceGroupName, String sapVirtualInstanceName) { @@ -443,16 +471,16 @@ private Mono createAsync(String resourceGroupName, Stri } /** - * Creates an Virtual Instance for SAP. + * Creates a Virtual Instance for SAP solutions (VIS) resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param body The Virtual Instance for SAP request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param body Virtual Instance for SAP solutions resource request body. * @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 define the Virtual Instance for SAP on successful completion of {@link Mono}. + * @return define the Virtual Instance for SAP solutions resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -463,31 +491,14 @@ private Mono createAsync( } /** - * Creates an Virtual Instance for SAP. + * Creates a Virtual Instance for SAP solutions (VIS) resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param body The Virtual Instance for SAP request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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 define the Virtual Instance for SAP. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SapVirtualInstanceInner create( - String resourceGroupName, String sapVirtualInstanceName, SapVirtualInstanceInner body) { - return createAsync(resourceGroupName, sapVirtualInstanceName, body).block(); - } - - /** - * Creates an Virtual Instance for SAP. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return define the Virtual Instance for SAP. + * @return define the Virtual Instance for SAP solutions resource. */ @ServiceMethod(returns = ReturnType.SINGLE) public SapVirtualInstanceInner create(String resourceGroupName, String sapVirtualInstanceName) { @@ -496,16 +507,16 @@ public SapVirtualInstanceInner create(String resourceGroupName, String sapVirtua } /** - * Creates an Virtual Instance for SAP. + * Creates a Virtual Instance for SAP solutions (VIS) resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param body The Virtual Instance for SAP request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param body Virtual Instance for SAP solutions resource request body. * @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 define the Virtual Instance for SAP. + * @return define the Virtual Instance for SAP solutions resource. */ @ServiceMethod(returns = ReturnType.SINGLE) public SapVirtualInstanceInner create( @@ -514,14 +525,15 @@ public SapVirtualInstanceInner create( } /** - * Gets an Virtual Instance for SAP. + * Gets a Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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 an Virtual Instance for SAP along with {@link Response} on successful completion of {@link Mono}. + * @return a Virtual Instance for SAP solutions resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -564,15 +576,16 @@ private Mono> getByResourceGroupWithResponseAs } /** - * Gets an Virtual Instance for SAP. + * Gets a Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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 an Virtual Instance for SAP along with {@link Response} on successful completion of {@link Mono}. + * @return a Virtual Instance for SAP solutions resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -612,14 +625,14 @@ private Mono> getByResourceGroupWithResponseAs } /** - * Gets an Virtual Instance for SAP. + * Gets a Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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 an Virtual Instance for SAP on successful completion of {@link Mono}. + * @return a Virtual Instance for SAP solutions resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync( @@ -629,47 +642,48 @@ private Mono getByResourceGroupAsync( } /** - * Gets an Virtual Instance for SAP. + * Gets a Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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 an Virtual Instance for SAP. + * @return a Virtual Instance for SAP solutions resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SapVirtualInstanceInner getByResourceGroup(String resourceGroupName, String sapVirtualInstanceName) { - return getByResourceGroupAsync(resourceGroupName, sapVirtualInstanceName).block(); + public Response getByResourceGroupWithResponse( + String resourceGroupName, String sapVirtualInstanceName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, sapVirtualInstanceName, context).block(); } /** - * Gets an Virtual Instance for SAP. + * Gets a Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param context The context to associate with this operation. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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 an Virtual Instance for SAP along with {@link Response}. + * @return a Virtual Instance for SAP solutions resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String sapVirtualInstanceName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, sapVirtualInstanceName, context).block(); + public SapVirtualInstanceInner getByResourceGroup(String resourceGroupName, String sapVirtualInstanceName) { + return getByResourceGroupWithResponse(resourceGroupName, sapVirtualInstanceName, Context.NONE).getValue(); } /** - * Updates an Virtual Instance for SAP. + * Updates a Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param body The Update Virtual Instance for SAP request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param body Request body to update a Virtual Instance for SAP solutions 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 define the Virtual Instance for SAP along with {@link Response} on successful completion of {@link Mono}. + * @return define the Virtual Instance for SAP solutions resource along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -716,16 +730,17 @@ private Mono> updateWithResponseAsync( } /** - * Updates an Virtual Instance for SAP. + * Updates a Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param body The Update Virtual Instance for SAP request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param body Request body to update a Virtual Instance for SAP solutions 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 define the Virtual Instance for SAP along with {@link Response} on successful completion of {@link Mono}. + * @return define the Virtual Instance for SAP solutions resource along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -772,32 +787,14 @@ private Mono> updateWithResponseAsync( } /** - * Updates an Virtual Instance for SAP. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param body The Update Virtual Instance for SAP request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return define the Virtual Instance for SAP on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String sapVirtualInstanceName, UpdateSapVirtualInstanceRequest body) { - return updateWithResponseAsync(resourceGroupName, sapVirtualInstanceName, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Updates an Virtual Instance for SAP. + * Updates a Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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 define the Virtual Instance for SAP on successful completion of {@link Mono}. + * @return define the Virtual Instance for SAP solutions resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String sapVirtualInstanceName) { @@ -807,47 +804,48 @@ private Mono updateAsync(String resourceGroupName, Stri } /** - * Updates an Virtual Instance for SAP. + * Updates a Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param body Request body to update a Virtual Instance for SAP solutions 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 define the Virtual Instance for SAP. + * @return define the Virtual Instance for SAP solutions resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SapVirtualInstanceInner update(String resourceGroupName, String sapVirtualInstanceName) { - final UpdateSapVirtualInstanceRequest body = null; - return updateAsync(resourceGroupName, sapVirtualInstanceName, body).block(); + public Response updateWithResponse( + String resourceGroupName, + String sapVirtualInstanceName, + UpdateSapVirtualInstanceRequest body, + Context context) { + return updateWithResponseAsync(resourceGroupName, sapVirtualInstanceName, body, context).block(); } /** - * Updates an Virtual Instance for SAP. + * Updates a Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param body The Update Virtual Instance for SAP request body. - * @param context The context to associate with this operation. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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 define the Virtual Instance for SAP along with {@link Response}. + * @return define the Virtual Instance for SAP solutions resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String sapVirtualInstanceName, - UpdateSapVirtualInstanceRequest body, - Context context) { - return updateWithResponseAsync(resourceGroupName, sapVirtualInstanceName, body, context).block(); + public SapVirtualInstanceInner update(String resourceGroupName, String sapVirtualInstanceName) { + final UpdateSapVirtualInstanceRequest body = null; + return updateWithResponse(resourceGroupName, sapVirtualInstanceName, body, Context.NONE).getValue(); } /** - * Deletes an Virtual Instance for SAP. + * Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central + * Services Instance, Application Server Instances and Database Instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -895,10 +893,11 @@ private Mono>> deleteWithResponseAsync( } /** - * Deletes an Virtual Instance for SAP. + * Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central + * Services Instance, Application Server Instances and Database Instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -944,10 +943,11 @@ private Mono>> deleteWithResponseAsync( } /** - * Deletes an Virtual Instance for SAP. + * Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central + * Services Instance, Application Server Instances and Database Instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -968,10 +968,11 @@ private PollerFlux, OperationStatusResult } /** - * Deletes an Virtual Instance for SAP. + * Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central + * Services Instance, Application Server Instances and Database Instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -995,10 +996,11 @@ private PollerFlux, OperationStatusResult } /** - * Deletes an Virtual Instance for SAP. + * Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central + * Services Instance, Application Server Instances and Database Instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -1007,14 +1009,15 @@ private PollerFlux, OperationStatusResult @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationStatusResultInner> beginDelete( String resourceGroupName, String sapVirtualInstanceName) { - return beginDeleteAsync(resourceGroupName, sapVirtualInstanceName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, sapVirtualInstanceName).getSyncPoller(); } /** - * Deletes an Virtual Instance for SAP. + * Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central + * Services Instance, Application Server Instances and Database Instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -1024,14 +1027,15 @@ public SyncPoller, OperationStatusResultI @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationStatusResultInner> beginDelete( String resourceGroupName, String sapVirtualInstanceName, Context context) { - return beginDeleteAsync(resourceGroupName, sapVirtualInstanceName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, sapVirtualInstanceName, context).getSyncPoller(); } /** - * Deletes an Virtual Instance for SAP. + * Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central + * Services Instance, Application Server Instances and Database Instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -1045,10 +1049,11 @@ private Mono deleteAsync(String resourceGroupName, S } /** - * Deletes an Virtual Instance for SAP. + * Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central + * Services Instance, Application Server Instances and Database Instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -1064,10 +1069,11 @@ private Mono deleteAsync( } /** - * Deletes an Virtual Instance for SAP. + * Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central + * Services Instance, Application Server Instances and Database Instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -1079,10 +1085,11 @@ public OperationStatusResultInner delete(String resourceGroupName, String sapVir } /** - * Deletes an Virtual Instance for SAP. + * Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central + * Services Instance, Application Server Instances and Database Instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -1095,14 +1102,14 @@ public OperationStatusResultInner delete(String resourceGroupName, String sapVir } /** - * Gets all Virtual Instances for SAP in a resource group. + * Gets all Virtual Instances for SAP solutions resources in a Resource Group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Virtual Instances for SAP in a resource group along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return all Virtual Instances for SAP solutions resources in a Resource Group along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { @@ -1147,15 +1154,15 @@ private Mono> listByResourceGroupSinglePa } /** - * Gets all Virtual Instances for SAP in a resource group. + * Gets all Virtual Instances for SAP solutions resources in a Resource Group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Virtual Instances for SAP in a resource group along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return all Virtual Instances for SAP solutions resources in a Resource Group along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -1198,13 +1205,14 @@ private Mono> listByResourceGroupSinglePa } /** - * Gets all Virtual Instances for SAP in a resource group. + * Gets all Virtual Instances for SAP solutions resources in a Resource Group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Virtual Instances for SAP in a resource group as paginated response with {@link PagedFlux}. + * @return all Virtual Instances for SAP solutions resources in a Resource Group as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -1214,14 +1222,15 @@ private PagedFlux listByResourceGroupAsync(String resou } /** - * Gets all Virtual Instances for SAP in a resource group. + * Gets all Virtual Instances for SAP solutions resources in a Resource Group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Virtual Instances for SAP in a resource group as paginated response with {@link PagedFlux}. + * @return all Virtual Instances for SAP solutions resources in a Resource Group as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { @@ -1231,13 +1240,14 @@ private PagedFlux listByResourceGroupAsync(String resou } /** - * Gets all Virtual Instances for SAP in a resource group. + * Gets all Virtual Instances for SAP solutions resources in a Resource Group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Virtual Instances for SAP in a resource group as paginated response with {@link PagedIterable}. + * @return all Virtual Instances for SAP solutions resources in a Resource Group as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -1245,14 +1255,15 @@ public PagedIterable listByResourceGroup(String resourc } /** - * Gets all Virtual Instances for SAP in a resource group. + * Gets all Virtual Instances for SAP solutions resources in a Resource Group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Virtual Instances for SAP in a resource group as paginated response with {@link PagedIterable}. + * @return all Virtual Instances for SAP solutions resources in a Resource Group as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { @@ -1260,12 +1271,12 @@ public PagedIterable listByResourceGroup(String resourc } /** - * Gets all Virtual Instances for SAP in the subscription. + * Gets all Virtual Instances for SAP solutions resources in a Subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Virtual Instances for SAP in the subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return all Virtual Instances for SAP solutions resources in a Subscription along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -1305,14 +1316,14 @@ private Mono> listSinglePageAsync() { } /** - * Gets all Virtual Instances for SAP in the subscription. + * Gets all Virtual Instances for SAP solutions resources in a Subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Virtual Instances for SAP in the subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return all Virtual Instances for SAP solutions resources in a Subscription along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -1349,11 +1360,12 @@ private Mono> listSinglePageAsync(Context } /** - * Gets all Virtual Instances for SAP in the subscription. + * Gets all Virtual Instances for SAP solutions resources in a Subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Virtual Instances for SAP in the subscription as paginated response with {@link PagedFlux}. + * @return all Virtual Instances for SAP solutions resources in a Subscription as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -1362,13 +1374,14 @@ private PagedFlux listAsync() { } /** - * Gets all Virtual Instances for SAP in the subscription. + * Gets all Virtual Instances for SAP solutions resources in a Subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Virtual Instances for SAP in the subscription as paginated response with {@link PagedFlux}. + * @return all Virtual Instances for SAP solutions resources in a Subscription as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -1377,11 +1390,12 @@ private PagedFlux listAsync(Context context) { } /** - * Gets all Virtual Instances for SAP in the subscription. + * Gets all Virtual Instances for SAP solutions resources in a Subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Virtual Instances for SAP in the subscription as paginated response with {@link PagedIterable}. + * @return all Virtual Instances for SAP solutions resources in a Subscription as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -1389,13 +1403,14 @@ public PagedIterable list() { } /** - * Gets all Virtual Instances for SAP in the subscription. + * Gets all Virtual Instances for SAP solutions resources in a Subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Virtual Instances for SAP in the subscription as paginated response with {@link PagedIterable}. + * @return all Virtual Instances for SAP solutions resources in a Subscription as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -1403,10 +1418,10 @@ public PagedIterable list(Context context) { } /** - * Starts the SAP System. + * Starts the SAP application, that is the Central Services instance and Application server instances. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -1454,10 +1469,10 @@ private Mono>> startWithResponseAsync( } /** - * Starts the SAP System. + * Starts the SAP application, that is the Central Services instance and Application server instances. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -1503,10 +1518,10 @@ private Mono>> startWithResponseAsync( } /** - * Starts the SAP System. + * Starts the SAP application, that is the Central Services instance and Application server instances. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -1527,10 +1542,10 @@ private PollerFlux, OperationStatusResult } /** - * Starts the SAP System. + * Starts the SAP application, that is the Central Services instance and Application server instances. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -1554,10 +1569,10 @@ private PollerFlux, OperationStatusResult } /** - * Starts the SAP System. + * Starts the SAP application, that is the Central Services instance and Application server instances. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -1566,14 +1581,14 @@ private PollerFlux, OperationStatusResult @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationStatusResultInner> beginStart( String resourceGroupName, String sapVirtualInstanceName) { - return beginStartAsync(resourceGroupName, sapVirtualInstanceName).getSyncPoller(); + return this.beginStartAsync(resourceGroupName, sapVirtualInstanceName).getSyncPoller(); } /** - * Starts the SAP System. + * Starts the SAP application, that is the Central Services instance and Application server instances. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -1583,14 +1598,14 @@ public SyncPoller, OperationStatusResultI @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationStatusResultInner> beginStart( String resourceGroupName, String sapVirtualInstanceName, Context context) { - return beginStartAsync(resourceGroupName, sapVirtualInstanceName, context).getSyncPoller(); + return this.beginStartAsync(resourceGroupName, sapVirtualInstanceName, context).getSyncPoller(); } /** - * Starts the SAP System. + * Starts the SAP application, that is the Central Services instance and Application server instances. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -1604,10 +1619,10 @@ private Mono startAsync(String resourceGroupName, St } /** - * Starts the SAP System. + * Starts the SAP application, that is the Central Services instance and Application server instances. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -1623,10 +1638,10 @@ private Mono startAsync( } /** - * Starts the SAP System. + * Starts the SAP application, that is the Central Services instance and Application server instances. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -1638,10 +1653,10 @@ public OperationStatusResultInner start(String resourceGroupName, String sapVirt } /** - * Starts the SAP System. + * Starts the SAP application, that is the Central Services instance and Application server instances. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -1654,11 +1669,11 @@ public OperationStatusResultInner start(String resourceGroupName, String sapVirt } /** - * Stops the SAP System. + * Stops the SAP Application, that is the Application server instances and Central Services instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param body The Virtual Instances for SAP stop request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param body The Virtual Instance for SAP solutions resource stop request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1710,11 +1725,11 @@ private Mono>> stopWithResponseAsync( } /** - * Stops the SAP System. + * Stops the SAP Application, that is the Application server instances and Central Services instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param body The Virtual Instances for SAP stop request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param body The Virtual Instance for SAP solutions resource stop request body. * @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. @@ -1764,11 +1779,11 @@ private Mono>> stopWithResponseAsync( } /** - * Stops the SAP System. + * Stops the SAP Application, that is the Application server instances and Central Services instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param body The Virtual Instances for SAP stop request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param body The Virtual Instance for SAP solutions resource stop request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1789,11 +1804,36 @@ private PollerFlux, OperationStatusResult } /** - * Stops the SAP System. + * Stops the SAP Application, that is the Application server instances and Central Services instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param body The Virtual Instances for SAP stop request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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 current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OperationStatusResultInner> beginStopAsync( + String resourceGroupName, String sapVirtualInstanceName) { + final StopRequest body = null; + Mono>> mono = stopWithResponseAsync(resourceGroupName, sapVirtualInstanceName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + OperationStatusResultInner.class, + OperationStatusResultInner.class, + this.client.getContext()); + } + + /** + * Stops the SAP Application, that is the Application server instances and Central Services instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param body The Virtual Instance for SAP solutions resource stop request body. * @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. @@ -1817,11 +1857,10 @@ private PollerFlux, OperationStatusResult } /** - * Stops the SAP System. + * Stops the SAP Application, that is the Application server instances and Central Services instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param body The Virtual Instances for SAP stop request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -1829,16 +1868,17 @@ private PollerFlux, OperationStatusResult */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationStatusResultInner> beginStop( - String resourceGroupName, String sapVirtualInstanceName, StopRequest body) { - return beginStopAsync(resourceGroupName, sapVirtualInstanceName, body).getSyncPoller(); + String resourceGroupName, String sapVirtualInstanceName) { + final StopRequest body = null; + return this.beginStopAsync(resourceGroupName, sapVirtualInstanceName, body).getSyncPoller(); } /** - * Stops the SAP System. + * Stops the SAP Application, that is the Application server instances and Central Services instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param body The Virtual Instances for SAP stop request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param body The Virtual Instance for SAP solutions resource stop request body. * @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. @@ -1848,15 +1888,15 @@ public SyncPoller, OperationStatusResultI @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationStatusResultInner> beginStop( String resourceGroupName, String sapVirtualInstanceName, StopRequest body, Context context) { - return beginStopAsync(resourceGroupName, sapVirtualInstanceName, body, context).getSyncPoller(); + return this.beginStopAsync(resourceGroupName, sapVirtualInstanceName, body, context).getSyncPoller(); } /** - * Stops the SAP System. + * Stops the SAP Application, that is the Application server instances and Central Services instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param body The Virtual Instances for SAP stop request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param body The Virtual Instance for SAP solutions resource stop request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1871,10 +1911,10 @@ private Mono stopAsync( } /** - * Stops the SAP System. + * Stops the SAP Application, that is the Application server instances and Central Services instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -1889,11 +1929,11 @@ private Mono stopAsync(String resourceGroupName, Str } /** - * Stops the SAP System. + * Stops the SAP Application, that is the Application server instances and Central Services instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param body The Virtual Instances for SAP stop request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param body The Virtual Instance for SAP solutions resource stop request body. * @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. @@ -1909,26 +1949,10 @@ private Mono stopAsync( } /** - * Stops the SAP System. + * Stops the SAP Application, that is the Application server instances and Central Services instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param body The Virtual Instances for SAP stop request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner stop(String resourceGroupName, String sapVirtualInstanceName, StopRequest body) { - return stopAsync(resourceGroupName, sapVirtualInstanceName, body).block(); - } - - /** - * Stops the SAP System. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -1941,11 +1965,11 @@ public OperationStatusResultInner stop(String resourceGroupName, String sapVirtu } /** - * Stops the SAP System. + * Stops the SAP Application, that is the Application server instances and Central Services instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param body The Virtual Instances for SAP stop request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param body The Virtual Instance for SAP solutions resource stop request body. * @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. @@ -1961,12 +1985,13 @@ public OperationStatusResultInner stop( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the collection of Virtual Instance for SAP along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return defines the collection of Virtual Instance for SAP solutions resources along with {@link PagedResponse} + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { @@ -1998,13 +2023,14 @@ private Mono> listByResourceGroupNextSing /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the collection of Virtual Instance for SAP along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return defines the collection of Virtual Instance for SAP solutions resources along with {@link PagedResponse} + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync( @@ -2036,12 +2062,13 @@ private Mono> listByResourceGroupNextSing /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the collection of Virtual Instance for SAP along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return defines the collection of Virtual Instance for SAP solutions resources along with {@link PagedResponse} + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { @@ -2073,13 +2100,14 @@ private Mono> listBySubscriptionNextSingl /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the collection of Virtual Instance for SAP along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return defines the collection of Virtual Instance for SAP solutions resources along with {@link PagedResponse} + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync( diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapVirtualInstancesImpl.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapVirtualInstancesImpl.java index 5e4aad740b961..03a0962bfaf95 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapVirtualInstancesImpl.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SapVirtualInstancesImpl.java @@ -30,16 +30,6 @@ public SapVirtualInstancesImpl( this.serviceManager = serviceManager; } - public SapVirtualInstance getByResourceGroup(String resourceGroupName, String sapVirtualInstanceName) { - SapVirtualInstanceInner inner = - this.serviceClient().getByResourceGroup(resourceGroupName, sapVirtualInstanceName); - if (inner != null) { - return new SapVirtualInstanceImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getByResourceGroupWithResponse( String resourceGroupName, String sapVirtualInstanceName, Context context) { Response inner = @@ -55,6 +45,16 @@ public Response getByResourceGroupWithResponse( } } + public SapVirtualInstance getByResourceGroup(String resourceGroupName, String sapVirtualInstanceName) { + SapVirtualInstanceInner inner = + this.serviceClient().getByResourceGroup(resourceGroupName, sapVirtualInstanceName); + if (inner != null) { + return new SapVirtualInstanceImpl(inner, this.manager()); + } else { + return null; + } + } + public OperationStatusResult deleteByResourceGroup(String resourceGroupName, String sapVirtualInstanceName) { OperationStatusResultInner inner = this.serviceClient().delete(resourceGroupName, sapVirtualInstanceName); if (inner != null) { @@ -114,15 +114,6 @@ public OperationStatusResult start(String resourceGroupName, String sapVirtualIn } } - public OperationStatusResult stop(String resourceGroupName, String sapVirtualInstanceName, StopRequest body) { - OperationStatusResultInner inner = this.serviceClient().stop(resourceGroupName, sapVirtualInstanceName, body); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } - } - public OperationStatusResult stop(String resourceGroupName, String sapVirtualInstanceName) { OperationStatusResultInner inner = this.serviceClient().stop(resourceGroupName, sapVirtualInstanceName); if (inner != null) { diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SkuDefinitionImpl.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SkuDefinitionImpl.java deleted file mode 100644 index 29baee5f32442..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SkuDefinitionImpl.java +++ /dev/null @@ -1,107 +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.workloads.implementation; - -import com.azure.resourcemanager.workloads.fluent.models.SkuDefinitionInner; -import com.azure.resourcemanager.workloads.models.SkuCapability; -import com.azure.resourcemanager.workloads.models.SkuCost; -import com.azure.resourcemanager.workloads.models.SkuDefinition; -import com.azure.resourcemanager.workloads.models.SkuLocationAndZones; -import com.azure.resourcemanager.workloads.models.SkuRestriction; -import java.util.Collections; -import java.util.List; - -public final class SkuDefinitionImpl implements SkuDefinition { - private SkuDefinitionInner innerObject; - - private final com.azure.resourcemanager.workloads.WorkloadsManager serviceManager; - - SkuDefinitionImpl( - SkuDefinitionInner innerObject, com.azure.resourcemanager.workloads.WorkloadsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String name() { - return this.innerModel().name(); - } - - public String resourceType() { - return this.innerModel().resourceType(); - } - - public String tier() { - return this.innerModel().tier(); - } - - public String size() { - return this.innerModel().size(); - } - - public String family() { - return this.innerModel().family(); - } - - public String kind() { - return this.innerModel().kind(); - } - - public List locations() { - List inner = this.innerModel().locations(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List locationInfo() { - List inner = this.innerModel().locationInfo(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public Object capacity() { - return this.innerModel().capacity(); - } - - public List costs() { - List inner = this.innerModel().costs(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List capabilities() { - List inner = this.innerModel().capabilities(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List restrictions() { - List inner = this.innerModel().restrictions(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public SkuDefinitionInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.workloads.WorkloadsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SkusClientImpl.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SkusClientImpl.java deleted file mode 100644 index ab2ca866f85e8..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SkusClientImpl.java +++ /dev/null @@ -1,294 +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.workloads.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -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.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.workloads.fluent.SkusClient; -import com.azure.resourcemanager.workloads.fluent.models.SkuDefinitionInner; -import com.azure.resourcemanager.workloads.models.SkusListResult; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in SkusClient. */ -public final class SkusClientImpl implements SkusClient { - /** The proxy service used to perform REST calls. */ - private final SkusService service; - - /** The service client containing this operation class. */ - private final WorkloadsClientImpl client; - - /** - * Initializes an instance of SkusClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - SkusClientImpl(WorkloadsClientImpl client) { - this.service = RestProxy.create(SkusService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for WorkloadsClientSkus to be used by the proxy service to perform REST - * calls. - */ - @Host("{$host}") - @ServiceInterface(name = "WorkloadsClientSkus") - private interface SkusService { - @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Workloads/skus") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{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); - } - - /** - * Lists all the available SKUs under this PR. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of SKUs supported by an Azure Resource Provider along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists all the available SKUs under this PR. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of SKUs supported by an Azure Resource Provider along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Lists all the available SKUs under this PR. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of SKUs supported by an Azure Resource Provider as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists all the available SKUs under this PR. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of SKUs supported by an Azure Resource Provider as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all the available SKUs under this PR. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of SKUs supported by an Azure Resource Provider as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Lists all the available SKUs under this PR. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of SKUs supported by an Azure Resource Provider as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of SKUs supported by an Azure Resource Provider along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(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.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of SKUs supported by an Azure Resource Provider along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(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 - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SkusImpl.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SkusImpl.java deleted file mode 100644 index fcf776689912c..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/SkusImpl.java +++ /dev/null @@ -1,44 +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.workloads.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.workloads.fluent.SkusClient; -import com.azure.resourcemanager.workloads.fluent.models.SkuDefinitionInner; -import com.azure.resourcemanager.workloads.models.SkuDefinition; -import com.azure.resourcemanager.workloads.models.Skus; - -public final class SkusImpl implements Skus { - private static final ClientLogger LOGGER = new ClientLogger(SkusImpl.class); - - private final SkusClient innerClient; - - private final com.azure.resourcemanager.workloads.WorkloadsManager serviceManager; - - public SkusImpl(SkusClient innerClient, com.azure.resourcemanager.workloads.WorkloadsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new SkuDefinitionImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new SkuDefinitionImpl(inner1, this.manager())); - } - - private SkusClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.workloads.WorkloadsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/WordpressInstanceResourceImpl.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/WordpressInstanceResourceImpl.java deleted file mode 100644 index 88d0d05fa340f..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/WordpressInstanceResourceImpl.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.workloads.implementation; - -import com.azure.resourcemanager.workloads.fluent.models.WordpressInstanceResourceInner; -import com.azure.resourcemanager.workloads.models.ApplicationProvisioningState; -import com.azure.resourcemanager.workloads.models.WordpressInstanceResource; -import com.azure.resourcemanager.workloads.models.WordpressVersions; - -public final class WordpressInstanceResourceImpl implements WordpressInstanceResource { - private WordpressInstanceResourceInner innerObject; - - private final com.azure.resourcemanager.workloads.WorkloadsManager serviceManager; - - WordpressInstanceResourceImpl( - WordpressInstanceResourceInner innerObject, - com.azure.resourcemanager.workloads.WorkloadsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public WordpressVersions version() { - return this.innerModel().version(); - } - - public String databaseName() { - return this.innerModel().databaseName(); - } - - public String databaseUser() { - return this.innerModel().databaseUser(); - } - - public String siteUrl() { - return this.innerModel().siteUrl(); - } - - public ApplicationProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public WordpressInstanceResourceInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.workloads.WorkloadsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/WordpressInstancesImpl.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/WordpressInstancesImpl.java deleted file mode 100644 index 5ffb101b156f8..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/WordpressInstancesImpl.java +++ /dev/null @@ -1,107 +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.workloads.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.workloads.fluent.WordpressInstancesClient; -import com.azure.resourcemanager.workloads.fluent.models.WordpressInstanceResourceInner; -import com.azure.resourcemanager.workloads.models.WordpressInstanceResource; -import com.azure.resourcemanager.workloads.models.WordpressInstances; - -public final class WordpressInstancesImpl implements WordpressInstances { - private static final ClientLogger LOGGER = new ClientLogger(WordpressInstancesImpl.class); - - private final WordpressInstancesClient innerClient; - - private final com.azure.resourcemanager.workloads.WorkloadsManager serviceManager; - - public WordpressInstancesImpl( - WordpressInstancesClient innerClient, com.azure.resourcemanager.workloads.WorkloadsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String phpWorkloadName) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, phpWorkloadName); - return Utils.mapPage(inner, inner1 -> new WordpressInstanceResourceImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, String phpWorkloadName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, phpWorkloadName, context); - return Utils.mapPage(inner, inner1 -> new WordpressInstanceResourceImpl(inner1, this.manager())); - } - - public WordpressInstanceResource get(String resourceGroupName, String phpWorkloadName) { - WordpressInstanceResourceInner inner = this.serviceClient().get(resourceGroupName, phpWorkloadName); - if (inner != null) { - return new WordpressInstanceResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String phpWorkloadName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, phpWorkloadName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new WordpressInstanceResourceImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public WordpressInstanceResource createOrUpdate( - String resourceGroupName, String phpWorkloadName, WordpressInstanceResourceInner wordpressInstanceResource) { - WordpressInstanceResourceInner inner = - this.serviceClient().createOrUpdate(resourceGroupName, phpWorkloadName, wordpressInstanceResource); - if (inner != null) { - return new WordpressInstanceResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public WordpressInstanceResource createOrUpdate( - String resourceGroupName, - String phpWorkloadName, - WordpressInstanceResourceInner wordpressInstanceResource, - Context context) { - WordpressInstanceResourceInner inner = - this.serviceClient().createOrUpdate(resourceGroupName, phpWorkloadName, wordpressInstanceResource, context); - if (inner != null) { - return new WordpressInstanceResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public void deleteByResourceGroup(String resourceGroupName, String phpWorkloadName) { - this.serviceClient().delete(resourceGroupName, phpWorkloadName); - } - - public Response deleteWithResponse(String resourceGroupName, String phpWorkloadName, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, phpWorkloadName, context); - } - - private WordpressInstancesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.workloads.WorkloadsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/WorkloadsClientBuilder.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/WorkloadsClientBuilder.java index 1c08f50a28994..6db732ae69d52 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/WorkloadsClientBuilder.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/WorkloadsClientBuilder.java @@ -119,24 +119,26 @@ public WorkloadsClientBuilder serializerAdapter(SerializerAdapter serializerAdap * @return an instance of WorkloadsClientImpl. */ public WorkloadsClientImpl buildClient() { - if (endpoint == null) { - this.endpoint = "https://management.azure.com"; - } - if (environment == null) { - this.environment = AzureEnvironment.AZURE; - } - if (pipeline == null) { - this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - } - if (defaultPollInterval == null) { - this.defaultPollInterval = Duration.ofSeconds(30); - } - if (serializerAdapter == null) { - this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); - } + String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; + AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; + HttpPipeline localPipeline = + (pipeline != null) + ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval = + (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = + (serializerAdapter != null) + ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); WorkloadsClientImpl client = new WorkloadsClientImpl( - pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint); + localPipeline, + localSerializerAdapter, + localDefaultPollInterval, + localEnvironment, + subscriptionId, + localEndpoint); return client; } } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/WorkloadsClientImpl.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/WorkloadsClientImpl.java index 1f739537aae9b..6aa49986b9cfd 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/WorkloadsClientImpl.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/implementation/WorkloadsClientImpl.java @@ -24,15 +24,13 @@ import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.workloads.fluent.MonitorsClient; import com.azure.resourcemanager.workloads.fluent.OperationsClient; -import com.azure.resourcemanager.workloads.fluent.PhpWorkloadsClient; import com.azure.resourcemanager.workloads.fluent.ProviderInstancesClient; import com.azure.resourcemanager.workloads.fluent.ResourceProvidersClient; import com.azure.resourcemanager.workloads.fluent.SapApplicationServerInstancesClient; import com.azure.resourcemanager.workloads.fluent.SapCentralInstancesClient; import com.azure.resourcemanager.workloads.fluent.SapDatabaseInstancesClient; +import com.azure.resourcemanager.workloads.fluent.SapLandscapeMonitorsClient; import com.azure.resourcemanager.workloads.fluent.SapVirtualInstancesClient; -import com.azure.resourcemanager.workloads.fluent.SkusClient; -import com.azure.resourcemanager.workloads.fluent.WordpressInstancesClient; import com.azure.resourcemanager.workloads.fluent.WorkloadsClient; import java.io.IOException; import java.lang.reflect.Type; @@ -118,30 +116,6 @@ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } - /** The PhpWorkloadsClient object to access its operations. */ - private final PhpWorkloadsClient phpWorkloads; - - /** - * Gets the PhpWorkloadsClient object to access its operations. - * - * @return the PhpWorkloadsClient object. - */ - public PhpWorkloadsClient getPhpWorkloads() { - return this.phpWorkloads; - } - - /** The WordpressInstancesClient object to access its operations. */ - private final WordpressInstancesClient wordpressInstances; - - /** - * Gets the WordpressInstancesClient object to access its operations. - * - * @return the WordpressInstancesClient object. - */ - public WordpressInstancesClient getWordpressInstances() { - return this.wordpressInstances; - } - /** The ResourceProvidersClient object to access its operations. */ private final ResourceProvidersClient resourceProviders; @@ -202,18 +176,6 @@ public SapApplicationServerInstancesClient getSapApplicationServerInstances() { return this.sapApplicationServerInstances; } - /** 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 MonitorsClient object to access its operations. */ private final MonitorsClient monitors; @@ -238,16 +200,28 @@ public ProviderInstancesClient getProviderInstances() { return this.providerInstances; } - /** The SkusClient object to access its operations. */ - private final SkusClient skus; + /** The SapLandscapeMonitorsClient object to access its operations. */ + private final SapLandscapeMonitorsClient sapLandscapeMonitors; /** - * Gets the SkusClient object to access its operations. + * Gets the SapLandscapeMonitorsClient object to access its operations. * - * @return the SkusClient object. + * @return the SapLandscapeMonitorsClient object. */ - public SkusClient getSkus() { - return this.skus; + public SapLandscapeMonitorsClient getSapLandscapeMonitors() { + return this.sapLandscapeMonitors; + } + + /** 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; } /** @@ -272,18 +246,16 @@ public SkusClient getSkus() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2021-12-01-preview"; - this.phpWorkloads = new PhpWorkloadsClientImpl(this); - this.wordpressInstances = new WordpressInstancesClientImpl(this); + this.apiVersion = "2022-11-01-preview"; this.resourceProviders = new ResourceProvidersClientImpl(this); this.sapVirtualInstances = new SapVirtualInstancesClientImpl(this); this.sapCentralInstances = new SapCentralInstancesClientImpl(this); this.sapDatabaseInstances = new SapDatabaseInstancesClientImpl(this); this.sapApplicationServerInstances = new SapApplicationServerInstancesClientImpl(this); - this.operations = new OperationsClientImpl(this); this.monitors = new MonitorsClientImpl(this); this.providerInstances = new ProviderInstancesClientImpl(this); - this.skus = new SkusClientImpl(this); + this.sapLandscapeMonitors = new SapLandscapeMonitorsClientImpl(this); + this.operations = new OperationsClientImpl(this); } /** diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ActionType.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ActionType.java index d0660a2e0a2c1..80ea8ea5afb89 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ActionType.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ActionType.java @@ -8,11 +8,20 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ActionType. */ +/** Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ public final class ActionType extends ExpandableStringEnum { /** Static value Internal for ActionType. */ public static final ActionType INTERNAL = fromString("Internal"); + /** + * Creates a new instance of ActionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ActionType() { + } + /** * Creates or finds a ActionType from its string representation. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ApplicationProvisioningState.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ApplicationProvisioningState.java deleted file mode 100644 index 89e8261e63fd3..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ApplicationProvisioningState.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.workloads.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ApplicationProvisioningState. */ -public final class ApplicationProvisioningState extends ExpandableStringEnum { - /** Static value NotSpecified for ApplicationProvisioningState. */ - public static final ApplicationProvisioningState NOT_SPECIFIED = fromString("NotSpecified"); - - /** Static value Accepted for ApplicationProvisioningState. */ - public static final ApplicationProvisioningState ACCEPTED = fromString("Accepted"); - - /** Static value Created for ApplicationProvisioningState. */ - public static final ApplicationProvisioningState CREATED = fromString("Created"); - - /** Static value Succeeded for ApplicationProvisioningState. */ - public static final ApplicationProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** Static value Failed for ApplicationProvisioningState. */ - public static final ApplicationProvisioningState FAILED = fromString("Failed"); - - /** Static value Canceled for ApplicationProvisioningState. */ - public static final ApplicationProvisioningState CANCELED = fromString("Canceled"); - - /** Static value Installing for ApplicationProvisioningState. */ - public static final ApplicationProvisioningState INSTALLING = fromString("Installing"); - - /** - * Creates or finds a ApplicationProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ApplicationProvisioningState. - */ - @JsonCreator - public static ApplicationProvisioningState fromString(String name) { - return fromString(name, ApplicationProvisioningState.class); - } - - /** - * Gets known ApplicationProvisioningState values. - * - * @return known ApplicationProvisioningState values. - */ - public static Collection values() { - return values(ApplicationProvisioningState.class); - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ApplicationServerConfiguration.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ApplicationServerConfiguration.java index a18dc7b7b446c..fb143f9ba9602 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ApplicationServerConfiguration.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ApplicationServerConfiguration.java @@ -29,6 +29,10 @@ public final class ApplicationServerConfiguration { @JsonProperty(value = "instanceCount", required = true) private long instanceCount; + /** Creates an instance of ApplicationServerConfiguration class. */ + public ApplicationServerConfiguration() { + } + /** * Get the subnetId property: The subnet id. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ApplicationServerFullResourceNames.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ApplicationServerFullResourceNames.java new file mode 100644 index 0000000000000..27baeca86697b --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ApplicationServerFullResourceNames.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The full resource names object for application layer resources. The number of entries in this list should be equal to + * the number VMs to be created for application layer. + */ +@Fluent +public final class ApplicationServerFullResourceNames { + /* + * The list of virtual machine naming details. + */ + @JsonProperty(value = "virtualMachines") + private List virtualMachines; + + /* + * The full name for availability set. In case name is not provided, it will be defaulted to {SID}-App-AvSet. + */ + @JsonProperty(value = "availabilitySetName") + private String availabilitySetName; + + /** Creates an instance of ApplicationServerFullResourceNames class. */ + public ApplicationServerFullResourceNames() { + } + + /** + * Get the virtualMachines property: The list of virtual machine naming details. + * + * @return the virtualMachines value. + */ + public List virtualMachines() { + return this.virtualMachines; + } + + /** + * Set the virtualMachines property: The list of virtual machine naming details. + * + * @param virtualMachines the virtualMachines value to set. + * @return the ApplicationServerFullResourceNames object itself. + */ + public ApplicationServerFullResourceNames withVirtualMachines(List virtualMachines) { + this.virtualMachines = virtualMachines; + return this; + } + + /** + * Get the availabilitySetName property: The full name for availability set. In case name is not provided, it will + * be defaulted to {SID}-App-AvSet. + * + * @return the availabilitySetName value. + */ + public String availabilitySetName() { + return this.availabilitySetName; + } + + /** + * Set the availabilitySetName property: The full name for availability set. In case name is not provided, it will + * be defaulted to {SID}-App-AvSet. + * + * @param availabilitySetName the availabilitySetName value to set. + * @return the ApplicationServerFullResourceNames object itself. + */ + public ApplicationServerFullResourceNames withAvailabilitySetName(String availabilitySetName) { + this.availabilitySetName = availabilitySetName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (virtualMachines() != null) { + virtualMachines().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ApplicationServerVirtualMachineType.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ApplicationServerVirtualMachineType.java new file mode 100644 index 0000000000000..67e0edf047bd6 --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ApplicationServerVirtualMachineType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines the type of application server VM. */ +public final class ApplicationServerVirtualMachineType + extends ExpandableStringEnum { + /** Static value Active for ApplicationServerVirtualMachineType. */ + public static final ApplicationServerVirtualMachineType ACTIVE = fromString("Active"); + + /** Static value Standby for ApplicationServerVirtualMachineType. */ + public static final ApplicationServerVirtualMachineType STANDBY = fromString("Standby"); + + /** Static value Unknown for ApplicationServerVirtualMachineType. */ + public static final ApplicationServerVirtualMachineType UNKNOWN = fromString("Unknown"); + + /** + * Creates a new instance of ApplicationServerVirtualMachineType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ApplicationServerVirtualMachineType() { + } + + /** + * Creates or finds a ApplicationServerVirtualMachineType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ApplicationServerVirtualMachineType. + */ + @JsonCreator + public static ApplicationServerVirtualMachineType fromString(String name) { + return fromString(name, ApplicationServerVirtualMachineType.class); + } + + /** + * Gets known ApplicationServerVirtualMachineType values. + * + * @return known ApplicationServerVirtualMachineType values. + */ + public static Collection values() { + return values(ApplicationServerVirtualMachineType.class); + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ApplicationServerVmDetails.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ApplicationServerVmDetails.java new file mode 100644 index 0000000000000..f91351c187dad --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ApplicationServerVmDetails.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The Application Server VM Details. */ +@Immutable +public final class ApplicationServerVmDetails { + /* + * Defines the type of application server VM. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private ApplicationServerVirtualMachineType type; + + /* + * The virtualMachineId property. + */ + @JsonProperty(value = "virtualMachineId", access = JsonProperty.Access.WRITE_ONLY) + private String virtualMachineId; + + /* + * Storage details of all the Storage Accounts attached to the App Virtual Machine. For e.g. NFS on AFS Shared + * Storage. + */ + @JsonProperty(value = "storageDetails", access = JsonProperty.Access.WRITE_ONLY) + private List storageDetails; + + /** Creates an instance of ApplicationServerVmDetails class. */ + public ApplicationServerVmDetails() { + } + + /** + * Get the type property: Defines the type of application server VM. + * + * @return the type value. + */ + public ApplicationServerVirtualMachineType type() { + return this.type; + } + + /** + * Get the virtualMachineId property: The virtualMachineId property. + * + * @return the virtualMachineId value. + */ + public String virtualMachineId() { + return this.virtualMachineId; + } + + /** + * Get the storageDetails property: Storage details of all the Storage Accounts attached to the App Virtual Machine. + * For e.g. NFS on AFS Shared Storage. + * + * @return the storageDetails value. + */ + public List storageDetails() { + return this.storageDetails; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (storageDetails() != null) { + storageDetails().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/AzureFrontDoorEnabled.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/AzureFrontDoorEnabled.java deleted file mode 100644 index b6cfc8ee211cb..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/AzureFrontDoorEnabled.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.workloads.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for AzureFrontDoorEnabled. */ -public final class AzureFrontDoorEnabled extends ExpandableStringEnum { - /** Static value Enabled for AzureFrontDoorEnabled. */ - public static final AzureFrontDoorEnabled ENABLED = fromString("Enabled"); - - /** Static value Disabled for AzureFrontDoorEnabled. */ - public static final AzureFrontDoorEnabled DISABLED = fromString("Disabled"); - - /** - * Creates or finds a AzureFrontDoorEnabled from its string representation. - * - * @param name a name to look for. - * @return the corresponding AzureFrontDoorEnabled. - */ - @JsonCreator - public static AzureFrontDoorEnabled fromString(String name) { - return fromString(name, AzureFrontDoorEnabled.class); - } - - /** - * Gets known AzureFrontDoorEnabled values. - * - * @return known AzureFrontDoorEnabled values. - */ - public static Collection values() { - return values(AzureFrontDoorEnabled.class); - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/BackupProfile.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/BackupProfile.java deleted file mode 100644 index 11465862d463b..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/BackupProfile.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.workloads.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Backup profile. */ -@Fluent -public final class BackupProfile { - /* - * Whether to enable Azure backup for the workload - */ - @JsonProperty(value = "backupEnabled", required = true) - private EnableBackup backupEnabled; - - /* - * Backup vault resource Id - */ - @JsonProperty(value = "vaultResourceId", access = JsonProperty.Access.WRITE_ONLY) - private String vaultResourceId; - - /** - * Get the backupEnabled property: Whether to enable Azure backup for the workload. - * - * @return the backupEnabled value. - */ - public EnableBackup backupEnabled() { - return this.backupEnabled; - } - - /** - * Set the backupEnabled property: Whether to enable Azure backup for the workload. - * - * @param backupEnabled the backupEnabled value to set. - * @return the BackupProfile object itself. - */ - public BackupProfile withBackupEnabled(EnableBackup backupEnabled) { - this.backupEnabled = backupEnabled; - return this; - } - - /** - * Get the vaultResourceId property: Backup vault resource Id. - * - * @return the vaultResourceId value. - */ - public String vaultResourceId() { - return this.vaultResourceId; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (backupEnabled() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property backupEnabled in model BackupProfile")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BackupProfile.class); -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/CacheProfile.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/CacheProfile.java deleted file mode 100644 index 5b27b7b8766ff..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/CacheProfile.java +++ /dev/null @@ -1,152 +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.workloads.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Cache profile. */ -@Fluent -public final class CacheProfile { - /* - * Cache name - */ - @JsonProperty(value = "name") - private String name; - - /* - * Cache SKU name - */ - @JsonProperty(value = "skuName", required = true) - private String skuName; - - /* - * Cache family - */ - @JsonProperty(value = "family", required = true) - private RedisCacheFamily family; - - /* - * Cache capacity - */ - @JsonProperty(value = "capacity", required = true) - private long capacity; - - /* - * Cache resource Id - */ - @JsonProperty(value = "cacheResourceId", access = JsonProperty.Access.WRITE_ONLY) - private String cacheResourceId; - - /** - * Get the name property: Cache name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Cache name. - * - * @param name the name value to set. - * @return the CacheProfile object itself. - */ - public CacheProfile withName(String name) { - this.name = name; - return this; - } - - /** - * Get the skuName property: Cache SKU name. - * - * @return the skuName value. - */ - public String skuName() { - return this.skuName; - } - - /** - * Set the skuName property: Cache SKU name. - * - * @param skuName the skuName value to set. - * @return the CacheProfile object itself. - */ - public CacheProfile withSkuName(String skuName) { - this.skuName = skuName; - return this; - } - - /** - * Get the family property: Cache family. - * - * @return the family value. - */ - public RedisCacheFamily family() { - return this.family; - } - - /** - * Set the family property: Cache family. - * - * @param family the family value to set. - * @return the CacheProfile object itself. - */ - public CacheProfile withFamily(RedisCacheFamily family) { - this.family = family; - return this; - } - - /** - * Get the capacity property: Cache capacity. - * - * @return the capacity value. - */ - public long capacity() { - return this.capacity; - } - - /** - * Set the capacity property: Cache capacity. - * - * @param capacity the capacity value to set. - * @return the CacheProfile object itself. - */ - public CacheProfile withCapacity(long capacity) { - this.capacity = capacity; - return this; - } - - /** - * Get the cacheResourceId property: Cache resource Id. - * - * @return the cacheResourceId value. - */ - public String cacheResourceId() { - return this.cacheResourceId; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (skuName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property skuName in model CacheProfile")); - } - if (family() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property family in model CacheProfile")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CacheProfile.class); -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/CentralServerConfiguration.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/CentralServerConfiguration.java index 77cc7e198a685..dfa832f234e25 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/CentralServerConfiguration.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/CentralServerConfiguration.java @@ -29,6 +29,10 @@ public final class CentralServerConfiguration { @JsonProperty(value = "instanceCount", required = true) private long instanceCount; + /** Creates an instance of CentralServerConfiguration class. */ + public CentralServerConfiguration() { + } + /** * Get the subnetId property: The subnet id. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/CentralServerFullResourceNames.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/CentralServerFullResourceNames.java new file mode 100644 index 0000000000000..5f01523fc0d05 --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/CentralServerFullResourceNames.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The full resource names object for central server layer resources. */ +@Fluent +public final class CentralServerFullResourceNames { + /* + * The list of names for all ASCS virtual machines to be deployed. The number of entries in this list should be + * equal to the number VMs to be created for ASCS layer. At maximum, there can be two virtual machines at this + * layer: ASCS and ERS. + */ + @JsonProperty(value = "virtualMachines") + private List virtualMachines; + + /* + * The full name for availability set. In case name is not provided, it will be defaulted to {SID}-ASCS-AvSet. + */ + @JsonProperty(value = "availabilitySetName") + private String availabilitySetName; + + /* + * The resource names object for load balancer and related resources. + */ + @JsonProperty(value = "loadBalancer") + private LoadBalancerResourceNames loadBalancer; + + /** Creates an instance of CentralServerFullResourceNames class. */ + public CentralServerFullResourceNames() { + } + + /** + * Get the virtualMachines property: The list of names for all ASCS virtual machines to be deployed. The number of + * entries in this list should be equal to the number VMs to be created for ASCS layer. At maximum, there can be two + * virtual machines at this layer: ASCS and ERS. + * + * @return the virtualMachines value. + */ + public List virtualMachines() { + return this.virtualMachines; + } + + /** + * Set the virtualMachines property: The list of names for all ASCS virtual machines to be deployed. The number of + * entries in this list should be equal to the number VMs to be created for ASCS layer. At maximum, there can be two + * virtual machines at this layer: ASCS and ERS. + * + * @param virtualMachines the virtualMachines value to set. + * @return the CentralServerFullResourceNames object itself. + */ + public CentralServerFullResourceNames withVirtualMachines(List virtualMachines) { + this.virtualMachines = virtualMachines; + return this; + } + + /** + * Get the availabilitySetName property: The full name for availability set. In case name is not provided, it will + * be defaulted to {SID}-ASCS-AvSet. + * + * @return the availabilitySetName value. + */ + public String availabilitySetName() { + return this.availabilitySetName; + } + + /** + * Set the availabilitySetName property: The full name for availability set. In case name is not provided, it will + * be defaulted to {SID}-ASCS-AvSet. + * + * @param availabilitySetName the availabilitySetName value to set. + * @return the CentralServerFullResourceNames object itself. + */ + public CentralServerFullResourceNames withAvailabilitySetName(String availabilitySetName) { + this.availabilitySetName = availabilitySetName; + return this; + } + + /** + * Get the loadBalancer property: The resource names object for load balancer and related resources. + * + * @return the loadBalancer value. + */ + public LoadBalancerResourceNames loadBalancer() { + return this.loadBalancer; + } + + /** + * Set the loadBalancer property: The resource names object for load balancer and related resources. + * + * @param loadBalancer the loadBalancer value to set. + * @return the CentralServerFullResourceNames object itself. + */ + public CentralServerFullResourceNames withLoadBalancer(LoadBalancerResourceNames loadBalancer) { + this.loadBalancer = loadBalancer; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (virtualMachines() != null) { + virtualMachines().forEach(e -> e.validate()); + } + if (loadBalancer() != null) { + loadBalancer().validate(); + } + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/CentralServerVirtualMachineType.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/CentralServerVirtualMachineType.java index d0d9670805c57..9c0379a58a1ec 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/CentralServerVirtualMachineType.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/CentralServerVirtualMachineType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for CentralServerVirtualMachineType. */ +/** Defines the type of central server VM. */ public final class CentralServerVirtualMachineType extends ExpandableStringEnum { /** Static value Primary for CentralServerVirtualMachineType. */ public static final CentralServerVirtualMachineType PRIMARY = fromString("Primary"); @@ -31,6 +31,15 @@ public final class CentralServerVirtualMachineType extends ExpandableStringEnum< /** Static value Standby for CentralServerVirtualMachineType. */ public static final CentralServerVirtualMachineType STANDBY = fromString("Standby"); + /** + * Creates a new instance of CentralServerVirtualMachineType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CentralServerVirtualMachineType() { + } + /** * Creates or finds a CentralServerVirtualMachineType from its string representation. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/CentralServerVmDetails.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/CentralServerVmDetails.java index 35c83c1dd6d81..e00c49d83e25b 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/CentralServerVmDetails.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/CentralServerVmDetails.java @@ -6,8 +6,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; -/** The Central Server VM Details. */ +/** The SAP Central Services Instance VM details. */ @Immutable public final class CentralServerVmDetails { /* @@ -22,6 +23,17 @@ public final class CentralServerVmDetails { @JsonProperty(value = "virtualMachineId", access = JsonProperty.Access.WRITE_ONLY) private String virtualMachineId; + /* + * Storage details of all the Storage Accounts attached to the ASCS Virtual Machine. For e.g. NFS on AFS Shared + * Storage. + */ + @JsonProperty(value = "storageDetails", access = JsonProperty.Access.WRITE_ONLY) + private List storageDetails; + + /** Creates an instance of CentralServerVmDetails class. */ + public CentralServerVmDetails() { + } + /** * Get the type property: Defines the type of central server VM. * @@ -40,11 +52,24 @@ public String virtualMachineId() { return this.virtualMachineId; } + /** + * Get the storageDetails property: Storage details of all the Storage Accounts attached to the ASCS Virtual + * Machine. For e.g. NFS on AFS Shared Storage. + * + * @return the storageDetails value. + */ + public List storageDetails() { + return this.storageDetails; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (storageDetails() != null) { + storageDetails().forEach(e -> e.validate()); + } } } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ConfigurationType.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ConfigurationType.java new file mode 100644 index 0000000000000..d6ca0ec0d81be --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ConfigurationType.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The type of file share config. */ +public final class ConfigurationType extends ExpandableStringEnum { + /** Static value Skip for ConfigurationType. */ + public static final ConfigurationType SKIP = fromString("Skip"); + + /** Static value CreateAndMount for ConfigurationType. */ + public static final ConfigurationType CREATE_AND_MOUNT = fromString("CreateAndMount"); + + /** Static value Mount for ConfigurationType. */ + public static final ConfigurationType MOUNT = fromString("Mount"); + + /** + * Creates a new instance of ConfigurationType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ConfigurationType() { + } + + /** + * Creates or finds a ConfigurationType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ConfigurationType. + */ + @JsonCreator + public static ConfigurationType fromString(String name) { + return fromString(name, ConfigurationType.class); + } + + /** + * Gets known ConfigurationType values. + * + * @return known ConfigurationType values. + */ + public static Collection values() { + return values(ConfigurationType.class); + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/CreateAndMountFileShareConfiguration.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/CreateAndMountFileShareConfiguration.java new file mode 100644 index 0000000000000..badaa73a4dc3f --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/CreateAndMountFileShareConfiguration.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Gets or sets the file share configuration for file share created with the VIS case. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "configurationType") +@JsonTypeName("CreateAndMount") +@Fluent +public final class CreateAndMountFileShareConfiguration extends FileShareConfiguration { + /* + * The name of file share resource group. The app rg is used in case of missing input. + */ + @JsonProperty(value = "resourceGroup") + private String resourceGroup; + + /* + * The name of file share storage account name . A custom name is used in case of missing input. + */ + @JsonProperty(value = "storageAccountName") + private String storageAccountName; + + /** Creates an instance of CreateAndMountFileShareConfiguration class. */ + public CreateAndMountFileShareConfiguration() { + } + + /** + * Get the resourceGroup property: The name of file share resource group. The app rg is used in case of missing + * input. + * + * @return the resourceGroup value. + */ + public String resourceGroup() { + return this.resourceGroup; + } + + /** + * Set the resourceGroup property: The name of file share resource group. The app rg is used in case of missing + * input. + * + * @param resourceGroup the resourceGroup value to set. + * @return the CreateAndMountFileShareConfiguration object itself. + */ + public CreateAndMountFileShareConfiguration withResourceGroup(String resourceGroup) { + this.resourceGroup = resourceGroup; + return this; + } + + /** + * Get the storageAccountName property: The name of file share storage account name . A custom name is used in case + * of missing input. + * + * @return the storageAccountName value. + */ + public String storageAccountName() { + return this.storageAccountName; + } + + /** + * Set the storageAccountName property: The name of file share storage account name . A custom name is used in case + * of missing input. + * + * @param storageAccountName the storageAccountName value to set. + * @return the CreateAndMountFileShareConfiguration object itself. + */ + public CreateAndMountFileShareConfiguration withStorageAccountName(String storageAccountName) { + this.storageAccountName = storageAccountName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DB2ProviderInstanceProperties.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DB2ProviderInstanceProperties.java index 53972ac4fedd2..699a2d830497c 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DB2ProviderInstanceProperties.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DB2ProviderInstanceProperties.java @@ -56,6 +56,22 @@ public final class DB2ProviderInstanceProperties extends ProviderSpecificPropert @JsonProperty(value = "sapSid") private String sapSid; + /* + * Gets or sets certificate preference if secure communication is enabled. + */ + @JsonProperty(value = "sslPreference") + private SslPreference sslPreference; + + /* + * Gets or sets the blob URI to SSL certificate for the DB2 Database. + */ + @JsonProperty(value = "sslCertificateUri") + private String sslCertificateUri; + + /** Creates an instance of DB2ProviderInstanceProperties class. */ + public DB2ProviderInstanceProperties() { + } + /** * Get the hostname property: Gets or sets the target virtual machine name. * @@ -196,6 +212,46 @@ public DB2ProviderInstanceProperties withSapSid(String sapSid) { return this; } + /** + * Get the sslPreference property: Gets or sets certificate preference if secure communication is enabled. + * + * @return the sslPreference value. + */ + public SslPreference sslPreference() { + return this.sslPreference; + } + + /** + * Set the sslPreference property: Gets or sets certificate preference if secure communication is enabled. + * + * @param sslPreference the sslPreference value to set. + * @return the DB2ProviderInstanceProperties object itself. + */ + public DB2ProviderInstanceProperties withSslPreference(SslPreference sslPreference) { + this.sslPreference = sslPreference; + return this; + } + + /** + * Get the sslCertificateUri property: Gets or sets the blob URI to SSL certificate for the DB2 Database. + * + * @return the sslCertificateUri value. + */ + public String sslCertificateUri() { + return this.sslCertificateUri; + } + + /** + * Set the sslCertificateUri property: Gets or sets the blob URI to SSL certificate for the DB2 Database. + * + * @param sslCertificateUri the sslCertificateUri value to set. + * @return the DB2ProviderInstanceProperties object itself. + */ + public DB2ProviderInstanceProperties withSslCertificateUri(String sslCertificateUri) { + this.sslCertificateUri = sslCertificateUri; + return this; + } + /** * Validates the instance. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DatabaseConfiguration.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DatabaseConfiguration.java index 09b99f23406db..f3b2faca3890d 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DatabaseConfiguration.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DatabaseConfiguration.java @@ -35,6 +35,16 @@ public final class DatabaseConfiguration { @JsonProperty(value = "instanceCount", required = true) private long instanceCount; + /* + * Gets or sets the disk configuration. + */ + @JsonProperty(value = "diskConfiguration") + private DiskConfiguration diskConfiguration; + + /** Creates an instance of DatabaseConfiguration class. */ + public DatabaseConfiguration() { + } + /** * Get the databaseType property: The database type. * @@ -116,6 +126,26 @@ public DatabaseConfiguration withInstanceCount(long instanceCount) { return this; } + /** + * Get the diskConfiguration property: Gets or sets the disk configuration. + * + * @return the diskConfiguration value. + */ + public DiskConfiguration diskConfiguration() { + return this.diskConfiguration; + } + + /** + * Set the diskConfiguration property: Gets or sets the disk configuration. + * + * @param diskConfiguration the diskConfiguration value to set. + * @return the DatabaseConfiguration object itself. + */ + public DatabaseConfiguration withDiskConfiguration(DiskConfiguration diskConfiguration) { + this.diskConfiguration = diskConfiguration; + return this; + } + /** * Validates the instance. * @@ -135,6 +165,9 @@ public void validate() { } else { virtualMachineConfiguration().validate(); } + if (diskConfiguration() != null) { + diskConfiguration().validate(); + } } private static final ClientLogger LOGGER = new ClientLogger(DatabaseConfiguration.class); diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DatabaseProfile.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DatabaseProfile.java deleted file mode 100644 index 9d31808e889d1..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DatabaseProfile.java +++ /dev/null @@ -1,339 +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.workloads.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Workload database profile. */ -@Fluent -public final class DatabaseProfile { - /* - * Database type - */ - @JsonProperty(value = "type", required = true) - private DatabaseType type; - - /* - * Database server name - */ - @JsonProperty(value = "serverName") - private String serverName; - - /* - * Database version - */ - @JsonProperty(value = "version") - private String version; - - /* - * The name of the server SKU, e.g. Standard_D32s_v4 - */ - @JsonProperty(value = "sku", required = true) - private String sku; - - /* - * Tier of the server SKU - */ - @JsonProperty(value = "tier", required = true) - private DatabaseTier tier; - - /* - * Whether to enable HA for the server - */ - @JsonProperty(value = "haEnabled") - private HAEnabled haEnabled; - - /* - * SKU name for database storage - */ - @JsonProperty(value = "storageSku") - private String storageSku; - - /* - * Database storage size in GB - */ - @JsonProperty(value = "storageInGB") - private Long storageInGB; - - /* - * Storage IOPS for the server - */ - @JsonProperty(value = "storageIops") - private Long storageIops; - - /* - * Backup retention days for the server - */ - @JsonProperty(value = "backupRetentionDays") - private Integer backupRetentionDays; - - /* - * Whether to enable SSL enforcement on the database - */ - @JsonProperty(value = "sslEnforcementEnabled") - private EnableSslEnforcement sslEnforcementEnabled; - - /* - * Azure Database Server resource Id - */ - @JsonProperty(value = "serverResourceId", access = JsonProperty.Access.WRITE_ONLY) - private String serverResourceId; - - /** - * Get the type property: Database type. - * - * @return the type value. - */ - public DatabaseType type() { - return this.type; - } - - /** - * Set the type property: Database type. - * - * @param type the type value to set. - * @return the DatabaseProfile object itself. - */ - public DatabaseProfile withType(DatabaseType type) { - this.type = type; - return this; - } - - /** - * Get the serverName property: Database server name. - * - * @return the serverName value. - */ - public String serverName() { - return this.serverName; - } - - /** - * Set the serverName property: Database server name. - * - * @param serverName the serverName value to set. - * @return the DatabaseProfile object itself. - */ - public DatabaseProfile withServerName(String serverName) { - this.serverName = serverName; - return this; - } - - /** - * Get the version property: Database version. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: Database version. - * - * @param version the version value to set. - * @return the DatabaseProfile object itself. - */ - public DatabaseProfile withVersion(String version) { - this.version = version; - return this; - } - - /** - * Get the sku property: The name of the server SKU, e.g. Standard_D32s_v4. - * - * @return the sku value. - */ - public String sku() { - return this.sku; - } - - /** - * Set the sku property: The name of the server SKU, e.g. Standard_D32s_v4. - * - * @param sku the sku value to set. - * @return the DatabaseProfile object itself. - */ - public DatabaseProfile withSku(String sku) { - this.sku = sku; - return this; - } - - /** - * Get the tier property: Tier of the server SKU. - * - * @return the tier value. - */ - public DatabaseTier tier() { - return this.tier; - } - - /** - * Set the tier property: Tier of the server SKU. - * - * @param tier the tier value to set. - * @return the DatabaseProfile object itself. - */ - public DatabaseProfile withTier(DatabaseTier tier) { - this.tier = tier; - return this; - } - - /** - * Get the haEnabled property: Whether to enable HA for the server. - * - * @return the haEnabled value. - */ - public HAEnabled haEnabled() { - return this.haEnabled; - } - - /** - * Set the haEnabled property: Whether to enable HA for the server. - * - * @param haEnabled the haEnabled value to set. - * @return the DatabaseProfile object itself. - */ - public DatabaseProfile withHaEnabled(HAEnabled haEnabled) { - this.haEnabled = haEnabled; - return this; - } - - /** - * Get the storageSku property: SKU name for database storage. - * - * @return the storageSku value. - */ - public String storageSku() { - return this.storageSku; - } - - /** - * Set the storageSku property: SKU name for database storage. - * - * @param storageSku the storageSku value to set. - * @return the DatabaseProfile object itself. - */ - public DatabaseProfile withStorageSku(String storageSku) { - this.storageSku = storageSku; - return this; - } - - /** - * Get the storageInGB property: Database storage size in GB. - * - * @return the storageInGB value. - */ - public Long storageInGB() { - return this.storageInGB; - } - - /** - * Set the storageInGB property: Database storage size in GB. - * - * @param storageInGB the storageInGB value to set. - * @return the DatabaseProfile object itself. - */ - public DatabaseProfile withStorageInGB(Long storageInGB) { - this.storageInGB = storageInGB; - return this; - } - - /** - * Get the storageIops property: Storage IOPS for the server. - * - * @return the storageIops value. - */ - public Long storageIops() { - return this.storageIops; - } - - /** - * Set the storageIops property: Storage IOPS for the server. - * - * @param storageIops the storageIops value to set. - * @return the DatabaseProfile object itself. - */ - public DatabaseProfile withStorageIops(Long storageIops) { - this.storageIops = storageIops; - return this; - } - - /** - * Get the backupRetentionDays property: Backup retention days for the server. - * - * @return the backupRetentionDays value. - */ - public Integer backupRetentionDays() { - return this.backupRetentionDays; - } - - /** - * Set the backupRetentionDays property: Backup retention days for the server. - * - * @param backupRetentionDays the backupRetentionDays value to set. - * @return the DatabaseProfile object itself. - */ - public DatabaseProfile withBackupRetentionDays(Integer backupRetentionDays) { - this.backupRetentionDays = backupRetentionDays; - return this; - } - - /** - * Get the sslEnforcementEnabled property: Whether to enable SSL enforcement on the database. - * - * @return the sslEnforcementEnabled value. - */ - public EnableSslEnforcement sslEnforcementEnabled() { - return this.sslEnforcementEnabled; - } - - /** - * Set the sslEnforcementEnabled property: Whether to enable SSL enforcement on the database. - * - * @param sslEnforcementEnabled the sslEnforcementEnabled value to set. - * @return the DatabaseProfile object itself. - */ - public DatabaseProfile withSslEnforcementEnabled(EnableSslEnforcement sslEnforcementEnabled) { - this.sslEnforcementEnabled = sslEnforcementEnabled; - return this; - } - - /** - * Get the serverResourceId property: Azure Database Server resource Id. - * - * @return the serverResourceId value. - */ - public String serverResourceId() { - return this.serverResourceId; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (type() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property type in model DatabaseProfile")); - } - if (sku() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property sku in model DatabaseProfile")); - } - if (tier() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property tier in model DatabaseProfile")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DatabaseProfile.class); -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DatabaseServerFullResourceNames.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DatabaseServerFullResourceNames.java new file mode 100644 index 0000000000000..9b19f8d657f2d --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DatabaseServerFullResourceNames.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The full resource names object for database layer resources. The number of entries in this list should be equal to + * the number VMs to be created for database layer. + */ +@Fluent +public final class DatabaseServerFullResourceNames { + /* + * The list of virtual machine naming details. + */ + @JsonProperty(value = "virtualMachines") + private List virtualMachines; + + /* + * The full name for availability set. In case name is not provided, it will be defaulted to {SID}-DB-AvSet. + */ + @JsonProperty(value = "availabilitySetName") + private String availabilitySetName; + + /* + * The resource names object for load balancer and related resources. + */ + @JsonProperty(value = "loadBalancer") + private LoadBalancerResourceNames loadBalancer; + + /** Creates an instance of DatabaseServerFullResourceNames class. */ + public DatabaseServerFullResourceNames() { + } + + /** + * Get the virtualMachines property: The list of virtual machine naming details. + * + * @return the virtualMachines value. + */ + public List virtualMachines() { + return this.virtualMachines; + } + + /** + * Set the virtualMachines property: The list of virtual machine naming details. + * + * @param virtualMachines the virtualMachines value to set. + * @return the DatabaseServerFullResourceNames object itself. + */ + public DatabaseServerFullResourceNames withVirtualMachines(List virtualMachines) { + this.virtualMachines = virtualMachines; + return this; + } + + /** + * Get the availabilitySetName property: The full name for availability set. In case name is not provided, it will + * be defaulted to {SID}-DB-AvSet. + * + * @return the availabilitySetName value. + */ + public String availabilitySetName() { + return this.availabilitySetName; + } + + /** + * Set the availabilitySetName property: The full name for availability set. In case name is not provided, it will + * be defaulted to {SID}-DB-AvSet. + * + * @param availabilitySetName the availabilitySetName value to set. + * @return the DatabaseServerFullResourceNames object itself. + */ + public DatabaseServerFullResourceNames withAvailabilitySetName(String availabilitySetName) { + this.availabilitySetName = availabilitySetName; + return this; + } + + /** + * Get the loadBalancer property: The resource names object for load balancer and related resources. + * + * @return the loadBalancer value. + */ + public LoadBalancerResourceNames loadBalancer() { + return this.loadBalancer; + } + + /** + * Set the loadBalancer property: The resource names object for load balancer and related resources. + * + * @param loadBalancer the loadBalancer value to set. + * @return the DatabaseServerFullResourceNames object itself. + */ + public DatabaseServerFullResourceNames withLoadBalancer(LoadBalancerResourceNames loadBalancer) { + this.loadBalancer = loadBalancer; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (virtualMachines() != null) { + virtualMachines().forEach(e -> e.validate()); + } + if (loadBalancer() != null) { + loadBalancer().validate(); + } + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DatabaseTier.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DatabaseTier.java deleted file mode 100644 index fe930d44fafda..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DatabaseTier.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.workloads.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for DatabaseTier. */ -public enum DatabaseTier { - /** Enum value Burstable. */ - BURSTABLE("Burstable"), - - /** Enum value GeneralPurpose. */ - GENERAL_PURPOSE("GeneralPurpose"), - - /** Enum value MemoryOptimized. */ - MEMORY_OPTIMIZED("MemoryOptimized"); - - /** The actual serialized value for a DatabaseTier instance. */ - private final String value; - - DatabaseTier(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a DatabaseTier instance. - * - * @param value the serialized value to parse. - * @return the parsed DatabaseTier object, or null if unable to parse. - */ - @JsonCreator - public static DatabaseTier fromString(String value) { - DatabaseTier[] items = DatabaseTier.values(); - for (DatabaseTier item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DatabaseType.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DatabaseType.java deleted file mode 100644 index a8386626c9310..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DatabaseType.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.workloads.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for DatabaseType. */ -public final class DatabaseType extends ExpandableStringEnum { - /** Static value MySql for DatabaseType. */ - public static final DatabaseType MY_SQL = fromString("MySql"); - - /** - * Creates or finds a DatabaseType from its string representation. - * - * @param name a name to look for. - * @return the corresponding DatabaseType. - */ - @JsonCreator - public static DatabaseType fromString(String name) { - return fromString(name, DatabaseType.class); - } - - /** - * Gets known DatabaseType values. - * - * @return known DatabaseType values. - */ - public static Collection values() { - return values(DatabaseType.class); - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DatabaseVmDetails.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DatabaseVmDetails.java index 0c564446bf30a..0002109d1ccd0 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DatabaseVmDetails.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DatabaseVmDetails.java @@ -6,8 +6,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; -/** The Database VM Details. */ +/** Database VM details. */ @Immutable public final class DatabaseVmDetails { /* @@ -22,6 +23,17 @@ public final class DatabaseVmDetails { @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private SapVirtualInstanceStatus status; + /* + * Storage details of all the Storage Accounts attached to the Database Virtual Machine. For e.g. NFS on AFS Shared + * Storage. + */ + @JsonProperty(value = "storageDetails", access = JsonProperty.Access.WRITE_ONLY) + private List storageDetails; + + /** Creates an instance of DatabaseVmDetails class. */ + public DatabaseVmDetails() { + } + /** * Get the virtualMachineId property: The virtualMachineId property. * @@ -40,11 +52,24 @@ public SapVirtualInstanceStatus status() { return this.status; } + /** + * Get the storageDetails property: Storage details of all the Storage Accounts attached to the Database Virtual + * Machine. For e.g. NFS on AFS Shared Storage. + * + * @return the storageDetails value. + */ + public List storageDetails() { + return this.storageDetails; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (storageDetails() != null) { + storageDetails().forEach(e -> e.validate()); + } } } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DeployerVmPackages.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DeployerVmPackages.java index b127c7f06b25c..97737982788dc 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DeployerVmPackages.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DeployerVmPackages.java @@ -22,6 +22,10 @@ public final class DeployerVmPackages { @JsonProperty(value = "storageAccountId") private String storageAccountId; + /** Creates an instance of DeployerVmPackages class. */ + public DeployerVmPackages() { + } + /** * Get the url property: The URL to the deployer VM packages file. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DeploymentConfiguration.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DeploymentConfiguration.java index 67ae81b39f71f..ee75617f5df43 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DeploymentConfiguration.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DeploymentConfiguration.java @@ -32,6 +32,10 @@ public final class DeploymentConfiguration extends SapConfiguration { @JsonProperty(value = "softwareConfiguration") private SoftwareConfiguration softwareConfiguration; + /** Creates an instance of DeploymentConfiguration class. */ + public DeploymentConfiguration() { + } + /** * Get the appLocation property: The geo-location where the SAP system is to be created. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DeploymentWithOSConfiguration.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DeploymentWithOSConfiguration.java index 1d519037b8f41..a2099837a6d61 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DeploymentWithOSConfiguration.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DeploymentWithOSConfiguration.java @@ -38,6 +38,10 @@ public final class DeploymentWithOSConfiguration extends SapConfiguration { @JsonProperty(value = "osSapConfiguration") private OsSapConfiguration osSapConfiguration; + /** Creates an instance of DeploymentWithOSConfiguration class. */ + public DeploymentWithOSConfiguration() { + } + /** * Get the appLocation property: The geo-location where the SAP system is to be created. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DiscoveryConfiguration.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DiscoveryConfiguration.java index 6f0a241032317..5214a804c485f 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DiscoveryConfiguration.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DiscoveryConfiguration.java @@ -20,12 +20,25 @@ public final class DiscoveryConfiguration extends SapConfiguration { @JsonProperty(value = "centralServerVmId") private String centralServerVmId; + /* + * The custom storage account name for the storage account created by the service in the managed resource group + * created as part of VIS deployment.

Refer to the storage account naming rules + * [here](https://learn.microsoft.com/azure/azure-resource-manager/management/resource-name-rules#microsoftstorage).

If + * not provided, the service will create the storage account with a random name. + */ + @JsonProperty(value = "managedRgStorageAccountName") + private String managedRgStorageAccountName; + /* * The geo-location where the SAP system exists. */ @JsonProperty(value = "appLocation", access = JsonProperty.Access.WRITE_ONLY) private String appLocation; + /** Creates an instance of DiscoveryConfiguration class. */ + public DiscoveryConfiguration() { + } + /** * Get the centralServerVmId property: The virtual machine ID of the Central Server. * @@ -46,6 +59,34 @@ public DiscoveryConfiguration withCentralServerVmId(String centralServerVmId) { return this; } + /** + * Get the managedRgStorageAccountName property: The custom storage account name for the storage account created by + * the service in the managed resource group created as part of VIS deployment.<br><br>Refer to the + * storage account naming rules + * [here](https://learn.microsoft.com/azure/azure-resource-manager/management/resource-name-rules#microsoftstorage).<br><br>If + * not provided, the service will create the storage account with a random name. + * + * @return the managedRgStorageAccountName value. + */ + public String managedRgStorageAccountName() { + return this.managedRgStorageAccountName; + } + + /** + * Set the managedRgStorageAccountName property: The custom storage account name for the storage account created by + * the service in the managed resource group created as part of VIS deployment.<br><br>Refer to the + * storage account naming rules + * [here](https://learn.microsoft.com/azure/azure-resource-manager/management/resource-name-rules#microsoftstorage).<br><br>If + * not provided, the service will create the storage account with a random name. + * + * @param managedRgStorageAccountName the managedRgStorageAccountName value to set. + * @return the DiscoveryConfiguration object itself. + */ + public DiscoveryConfiguration withManagedRgStorageAccountName(String managedRgStorageAccountName) { + this.managedRgStorageAccountName = managedRgStorageAccountName; + return this; + } + /** * Get the appLocation property: The geo-location where the SAP system exists. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DiskConfiguration.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DiskConfiguration.java new file mode 100644 index 0000000000000..8497c9e0908a0 --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DiskConfiguration.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The Disk Configuration Details. */ +@Fluent +public final class DiskConfiguration { + /* + * The disk configuration for the db volume. For HANA, Required volumes are: ['hana/data', 'hana/log', + * hana/shared', 'usr/sap', 'os'], Optional volume : ['backup']. + */ + @JsonProperty(value = "diskVolumeConfigurations") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map diskVolumeConfigurations; + + /** Creates an instance of DiskConfiguration class. */ + public DiskConfiguration() { + } + + /** + * Get the diskVolumeConfigurations property: The disk configuration for the db volume. For HANA, Required volumes + * are: ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os'], Optional volume : ['backup']. + * + * @return the diskVolumeConfigurations value. + */ + public Map diskVolumeConfigurations() { + return this.diskVolumeConfigurations; + } + + /** + * Set the diskVolumeConfigurations property: The disk configuration for the db volume. For HANA, Required volumes + * are: ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os'], Optional volume : ['backup']. + * + * @param diskVolumeConfigurations the diskVolumeConfigurations value to set. + * @return the DiskConfiguration object itself. + */ + public DiskConfiguration withDiskVolumeConfigurations( + Map diskVolumeConfigurations) { + this.diskVolumeConfigurations = diskVolumeConfigurations; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (diskVolumeConfigurations() != null) { + diskVolumeConfigurations() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DiskDetails.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DiskDetails.java new file mode 100644 index 0000000000000..0437fdc5f9a53 --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DiskDetails.java @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The supported disk size details for a disk type. */ +@Fluent +public final class DiskDetails { + /* + * The disk sku. + */ + @JsonProperty(value = "sku") + private DiskSku sku; + + /* + * The disk size in GB. + */ + @JsonProperty(value = "sizeGB") + private Long sizeGB; + + /* + * The minimum supported disk count. + */ + @JsonProperty(value = "minimumSupportedDiskCount") + private Long minimumSupportedDiskCount; + + /* + * The maximum supported disk count. + */ + @JsonProperty(value = "maximumSupportedDiskCount") + private Long maximumSupportedDiskCount; + + /* + * The disk Iops. + */ + @JsonProperty(value = "iopsReadWrite") + private Long iopsReadWrite; + + /* + * The disk provisioned throughput in MBps. + */ + @JsonProperty(value = "mbpsReadWrite") + private Long mbpsReadWrite; + + /* + * The disk tier, e.g. P10, E10. + */ + @JsonProperty(value = "diskTier") + private String diskTier; + + /** Creates an instance of DiskDetails class. */ + public DiskDetails() { + } + + /** + * Get the sku property: The disk sku. + * + * @return the sku value. + */ + public DiskSku sku() { + return this.sku; + } + + /** + * Set the sku property: The disk sku. + * + * @param sku the sku value to set. + * @return the DiskDetails object itself. + */ + public DiskDetails withSku(DiskSku sku) { + this.sku = sku; + return this; + } + + /** + * Get the sizeGB property: The disk size in GB. + * + * @return the sizeGB value. + */ + public Long sizeGB() { + return this.sizeGB; + } + + /** + * Set the sizeGB property: The disk size in GB. + * + * @param sizeGB the sizeGB value to set. + * @return the DiskDetails object itself. + */ + public DiskDetails withSizeGB(Long sizeGB) { + this.sizeGB = sizeGB; + return this; + } + + /** + * Get the minimumSupportedDiskCount property: The minimum supported disk count. + * + * @return the minimumSupportedDiskCount value. + */ + public Long minimumSupportedDiskCount() { + return this.minimumSupportedDiskCount; + } + + /** + * Set the minimumSupportedDiskCount property: The minimum supported disk count. + * + * @param minimumSupportedDiskCount the minimumSupportedDiskCount value to set. + * @return the DiskDetails object itself. + */ + public DiskDetails withMinimumSupportedDiskCount(Long minimumSupportedDiskCount) { + this.minimumSupportedDiskCount = minimumSupportedDiskCount; + return this; + } + + /** + * Get the maximumSupportedDiskCount property: The maximum supported disk count. + * + * @return the maximumSupportedDiskCount value. + */ + public Long maximumSupportedDiskCount() { + return this.maximumSupportedDiskCount; + } + + /** + * Set the maximumSupportedDiskCount property: The maximum supported disk count. + * + * @param maximumSupportedDiskCount the maximumSupportedDiskCount value to set. + * @return the DiskDetails object itself. + */ + public DiskDetails withMaximumSupportedDiskCount(Long maximumSupportedDiskCount) { + this.maximumSupportedDiskCount = maximumSupportedDiskCount; + return this; + } + + /** + * Get the iopsReadWrite property: The disk Iops. + * + * @return the iopsReadWrite value. + */ + public Long iopsReadWrite() { + return this.iopsReadWrite; + } + + /** + * Set the iopsReadWrite property: The disk Iops. + * + * @param iopsReadWrite the iopsReadWrite value to set. + * @return the DiskDetails object itself. + */ + public DiskDetails withIopsReadWrite(Long iopsReadWrite) { + this.iopsReadWrite = iopsReadWrite; + return this; + } + + /** + * Get the mbpsReadWrite property: The disk provisioned throughput in MBps. + * + * @return the mbpsReadWrite value. + */ + public Long mbpsReadWrite() { + return this.mbpsReadWrite; + } + + /** + * Set the mbpsReadWrite property: The disk provisioned throughput in MBps. + * + * @param mbpsReadWrite the mbpsReadWrite value to set. + * @return the DiskDetails object itself. + */ + public DiskDetails withMbpsReadWrite(Long mbpsReadWrite) { + this.mbpsReadWrite = mbpsReadWrite; + return this; + } + + /** + * Get the diskTier property: The disk tier, e.g. P10, E10. + * + * @return the diskTier value. + */ + public String diskTier() { + return this.diskTier; + } + + /** + * Set the diskTier property: The disk tier, e.g. P10, E10. + * + * @param diskTier the diskTier value to set. + * @return the DiskDetails object itself. + */ + public DiskDetails withDiskTier(String diskTier) { + this.diskTier = diskTier; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sku() != null) { + sku().validate(); + } + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DiskInfo.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DiskInfo.java deleted file mode 100644 index 930f99c8f8d28..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DiskInfo.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.workloads.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Disk resource creation details. */ -@Fluent -public final class DiskInfo { - /* - * Storage type - */ - @JsonProperty(value = "storageType", required = true) - private DiskStorageType storageType; - - /* - * Disk size in GB - */ - @JsonProperty(value = "sizeInGB") - private Long sizeInGB; - - /** - * Get the storageType property: Storage type. - * - * @return the storageType value. - */ - public DiskStorageType storageType() { - return this.storageType; - } - - /** - * Set the storageType property: Storage type. - * - * @param storageType the storageType value to set. - * @return the DiskInfo object itself. - */ - public DiskInfo withStorageType(DiskStorageType storageType) { - this.storageType = storageType; - return this; - } - - /** - * Get the sizeInGB property: Disk size in GB. - * - * @return the sizeInGB value. - */ - public Long sizeInGB() { - return this.sizeInGB; - } - - /** - * Set the sizeInGB property: Disk size in GB. - * - * @param sizeInGB the sizeInGB value to set. - * @return the DiskInfo object itself. - */ - public DiskInfo withSizeInGB(Long sizeInGB) { - this.sizeInGB = sizeInGB; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (storageType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property storageType in model DiskInfo")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DiskInfo.class); -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DiskSku.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DiskSku.java new file mode 100644 index 0000000000000..73010186d104c --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DiskSku.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The disk sku. */ +@Fluent +public final class DiskSku { + /* + * Defines the disk sku name. + */ + @JsonProperty(value = "name") + private DiskSkuName name; + + /** Creates an instance of DiskSku class. */ + public DiskSku() { + } + + /** + * Get the name property: Defines the disk sku name. + * + * @return the name value. + */ + public DiskSkuName name() { + return this.name; + } + + /** + * Set the name property: Defines the disk sku name. + * + * @param name the name value to set. + * @return the DiskSku object itself. + */ + public DiskSku withName(DiskSkuName name) { + this.name = name; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DiskSkuName.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DiskSkuName.java new file mode 100644 index 0000000000000..a62ab7ed891d0 --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DiskSkuName.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines the disk sku name. */ +public final class DiskSkuName extends ExpandableStringEnum { + /** Static value Standard_LRS for DiskSkuName. */ + public static final DiskSkuName STANDARD_LRS = fromString("Standard_LRS"); + + /** Static value Premium_LRS for DiskSkuName. */ + public static final DiskSkuName PREMIUM_LRS = fromString("Premium_LRS"); + + /** Static value StandardSSD_LRS for DiskSkuName. */ + public static final DiskSkuName STANDARD_SSD_LRS = fromString("StandardSSD_LRS"); + + /** Static value UltraSSD_LRS for DiskSkuName. */ + public static final DiskSkuName ULTRA_SSD_LRS = fromString("UltraSSD_LRS"); + + /** Static value Premium_ZRS for DiskSkuName. */ + public static final DiskSkuName PREMIUM_ZRS = fromString("Premium_ZRS"); + + /** Static value StandardSSD_ZRS for DiskSkuName. */ + public static final DiskSkuName STANDARD_SSD_ZRS = fromString("StandardSSD_ZRS"); + + /** Static value PremiumV2_LRS for DiskSkuName. */ + public static final DiskSkuName PREMIUM_V2_LRS = fromString("PremiumV2_LRS"); + + /** + * Creates a new instance of DiskSkuName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DiskSkuName() { + } + + /** + * Creates or finds a DiskSkuName from its string representation. + * + * @param name a name to look for. + * @return the corresponding DiskSkuName. + */ + @JsonCreator + public static DiskSkuName fromString(String name) { + return fromString(name, DiskSkuName.class); + } + + /** + * Gets known DiskSkuName values. + * + * @return known DiskSkuName values. + */ + public static Collection values() { + return values(DiskSkuName.class); + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DiskStorageType.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DiskStorageType.java deleted file mode 100644 index cf45e09d9ef5e..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DiskStorageType.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.workloads.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for DiskStorageType. */ -public enum DiskStorageType { - /** Enum value Premium_LRS. */ - PREMIUM_LRS("Premium_LRS"), - - /** Enum value Standard_LRS. */ - STANDARD_LRS("Standard_LRS"), - - /** Enum value StandardSSD_LRS. */ - STANDARD_SSD_LRS("StandardSSD_LRS"); - - /** The actual serialized value for a DiskStorageType instance. */ - private final String value; - - DiskStorageType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a DiskStorageType instance. - * - * @param value the serialized value to parse. - * @return the parsed DiskStorageType object, or null if unable to parse. - */ - @JsonCreator - public static DiskStorageType fromString(String value) { - DiskStorageType[] items = DiskStorageType.values(); - for (DiskStorageType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DiskVolumeConfiguration.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DiskVolumeConfiguration.java new file mode 100644 index 0000000000000..d31ec2ad12eb8 --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/DiskVolumeConfiguration.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The disk configuration required for the selected volume. */ +@Fluent +public final class DiskVolumeConfiguration { + /* + * The total number of disks required for the concerned volume. + */ + @JsonProperty(value = "count") + private Long count; + + /* + * The disk size in GB. + */ + @JsonProperty(value = "sizeGB") + private Long sizeGB; + + /* + * The disk SKU details. + */ + @JsonProperty(value = "sku") + private DiskSku sku; + + /** Creates an instance of DiskVolumeConfiguration class. */ + public DiskVolumeConfiguration() { + } + + /** + * Get the count property: The total number of disks required for the concerned volume. + * + * @return the count value. + */ + public Long count() { + return this.count; + } + + /** + * Set the count property: The total number of disks required for the concerned volume. + * + * @param count the count value to set. + * @return the DiskVolumeConfiguration object itself. + */ + public DiskVolumeConfiguration withCount(Long count) { + this.count = count; + return this; + } + + /** + * Get the sizeGB property: The disk size in GB. + * + * @return the sizeGB value. + */ + public Long sizeGB() { + return this.sizeGB; + } + + /** + * Set the sizeGB property: The disk size in GB. + * + * @param sizeGB the sizeGB value to set. + * @return the DiskVolumeConfiguration object itself. + */ + public DiskVolumeConfiguration withSizeGB(Long sizeGB) { + this.sizeGB = sizeGB; + return this; + } + + /** + * Get the sku property: The disk SKU details. + * + * @return the sku value. + */ + public DiskSku sku() { + return this.sku; + } + + /** + * Set the sku property: The disk SKU details. + * + * @param sku the sku value to set. + * @return the DiskVolumeConfiguration object itself. + */ + public DiskVolumeConfiguration withSku(DiskSku sku) { + this.sku = sku; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sku() != null) { + sku().validate(); + } + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/EnableBackup.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/EnableBackup.java deleted file mode 100644 index ae49157d9bf7e..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/EnableBackup.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.workloads.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for EnableBackup. */ -public final class EnableBackup extends ExpandableStringEnum { - /** Static value Enabled for EnableBackup. */ - public static final EnableBackup ENABLED = fromString("Enabled"); - - /** Static value Disabled for EnableBackup. */ - public static final EnableBackup DISABLED = fromString("Disabled"); - - /** - * Creates or finds a EnableBackup from its string representation. - * - * @param name a name to look for. - * @return the corresponding EnableBackup. - */ - @JsonCreator - public static EnableBackup fromString(String name) { - return fromString(name, EnableBackup.class); - } - - /** - * Gets known EnableBackup values. - * - * @return known EnableBackup values. - */ - public static Collection values() { - return values(EnableBackup.class); - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/EnableSslEnforcement.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/EnableSslEnforcement.java deleted file mode 100644 index 34d6bf7b47e7d..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/EnableSslEnforcement.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.workloads.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for EnableSslEnforcement. */ -public final class EnableSslEnforcement extends ExpandableStringEnum { - /** Static value Enabled for EnableSslEnforcement. */ - public static final EnableSslEnforcement ENABLED = fromString("Enabled"); - - /** Static value Disabled for EnableSslEnforcement. */ - public static final EnableSslEnforcement DISABLED = fromString("Disabled"); - - /** - * Creates or finds a EnableSslEnforcement from its string representation. - * - * @param name a name to look for. - * @return the corresponding EnableSslEnforcement. - */ - @JsonCreator - public static EnableSslEnforcement fromString(String name) { - return fromString(name, EnableSslEnforcement.class); - } - - /** - * Gets known EnableSslEnforcement values. - * - * @return known EnableSslEnforcement values. - */ - public static Collection values() { - return values(EnableSslEnforcement.class); - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/EnqueueReplicationServerProperties.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/EnqueueReplicationServerProperties.java index 29a163518ca55..3721846aac497 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/EnqueueReplicationServerProperties.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/EnqueueReplicationServerProperties.java @@ -7,7 +7,7 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Defines the SAP ERS Server properties. */ +/** Defines the SAP Enqueue Replication Server (ERS) properties. */ @Immutable public final class EnqueueReplicationServerProperties { /* @@ -17,41 +17,45 @@ public final class EnqueueReplicationServerProperties { private EnqueueReplicationServerType ersVersion; /* - * The ERS server instance id. + * ERS Instance Number. */ @JsonProperty(value = "instanceNo", access = JsonProperty.Access.WRITE_ONLY) private String instanceNo; /* - * The ERS server SAP host name. + * ERS SAP Hostname. */ @JsonProperty(value = "hostname", access = JsonProperty.Access.WRITE_ONLY) private String hostname; /* - * The ERS server SAP kernel version. + * ERS SAP Kernel Version. */ @JsonProperty(value = "kernelVersion", access = JsonProperty.Access.WRITE_ONLY) private String kernelVersion; /* - * The ERS server SAP kernel patch. + * ERS SAP Kernel Patch level. */ @JsonProperty(value = "kernelPatch", access = JsonProperty.Access.WRITE_ONLY) private String kernelPatch; /* - * The ERS server SAP IP Address. + * ERS SAP IP Address. */ @JsonProperty(value = "ipAddress", access = JsonProperty.Access.WRITE_ONLY) private String ipAddress; /* - * Defines the SAP Instance health. + * Defines the health of SAP Instances. */ @JsonProperty(value = "health", access = JsonProperty.Access.WRITE_ONLY) private SapHealthState health; + /** Creates an instance of EnqueueReplicationServerProperties class. */ + public EnqueueReplicationServerProperties() { + } + /** * Get the ersVersion property: Defines the type of Enqueue Replication Server. * @@ -62,7 +66,7 @@ public EnqueueReplicationServerType ersVersion() { } /** - * Get the instanceNo property: The ERS server instance id. + * Get the instanceNo property: ERS Instance Number. * * @return the instanceNo value. */ @@ -71,7 +75,7 @@ public String instanceNo() { } /** - * Get the hostname property: The ERS server SAP host name. + * Get the hostname property: ERS SAP Hostname. * * @return the hostname value. */ @@ -80,7 +84,7 @@ public String hostname() { } /** - * Get the kernelVersion property: The ERS server SAP kernel version. + * Get the kernelVersion property: ERS SAP Kernel Version. * * @return the kernelVersion value. */ @@ -89,7 +93,7 @@ public String kernelVersion() { } /** - * Get the kernelPatch property: The ERS server SAP kernel patch. + * Get the kernelPatch property: ERS SAP Kernel Patch level. * * @return the kernelPatch value. */ @@ -98,7 +102,7 @@ public String kernelPatch() { } /** - * Get the ipAddress property: The ERS server SAP IP Address. + * Get the ipAddress property: ERS SAP IP Address. * * @return the ipAddress value. */ @@ -107,7 +111,7 @@ public String ipAddress() { } /** - * Get the health property: Defines the SAP Instance health. + * Get the health property: Defines the health of SAP Instances. * * @return the health value. */ diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/EnqueueReplicationServerType.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/EnqueueReplicationServerType.java index 1bf293654a8ac..001aa57afd7ef 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/EnqueueReplicationServerType.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/EnqueueReplicationServerType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for EnqueueReplicationServerType. */ +/** Defines the type of Enqueue Replication Server. */ public final class EnqueueReplicationServerType extends ExpandableStringEnum { /** Static value EnqueueReplicator1 for EnqueueReplicationServerType. */ public static final EnqueueReplicationServerType ENQUEUE_REPLICATOR1 = fromString("EnqueueReplicator1"); @@ -16,6 +16,15 @@ public final class EnqueueReplicationServerType extends ExpandableStringEnum details; /* - * Object containing more specific information than the current object - * about the error. + * Object containing more specific information than the current object about the error. */ @JsonProperty(value = "innerError", access = JsonProperty.Access.WRITE_ONLY) private ErrorInnerError innerError; + /** Creates an instance of Error class. */ + public Error() { + } + /** * Get the code property: Server-defined set of error codes. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ErrorDefinition.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ErrorDefinition.java index f2efbbe321382..6299bf231468f 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ErrorDefinition.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ErrorDefinition.java @@ -12,8 +12,7 @@ @Immutable public final class ErrorDefinition { /* - * Service specific error code which serves as the substatus for the HTTP - * error code. + * Service specific error code which serves as the substatus for the HTTP error code. */ @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) private String code; @@ -30,6 +29,10 @@ public final class ErrorDefinition { @JsonProperty(value = "details", access = JsonProperty.Access.WRITE_ONLY) private List details; + /** Creates an instance of ErrorDefinition class. */ + public ErrorDefinition() { + } + /** * Get the code property: Service specific error code which serves as the substatus for the HTTP error code. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ErrorInnerError.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ErrorInnerError.java index 9cf5260c3e425..093b832c63c24 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ErrorInnerError.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ErrorInnerError.java @@ -16,6 +16,10 @@ public final class ErrorInnerError { @JsonProperty(value = "innerError") private Error innerError; + /** Creates an instance of ErrorInnerError class. */ + public ErrorInnerError() { + } + /** * Get the innerError property: Standard error object. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ExternalInstallationSoftwareConfiguration.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ExternalInstallationSoftwareConfiguration.java new file mode 100644 index 0000000000000..25e66f6989e32 --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ExternalInstallationSoftwareConfiguration.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The SAP Software configuration Input when the software is installed externally outside the service. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "softwareInstallationType") +@JsonTypeName("External") +@Fluent +public final class ExternalInstallationSoftwareConfiguration extends SoftwareConfiguration { + /* + * The resource ID of the virtual machine containing the central server instance. + */ + @JsonProperty(value = "centralServerVmId") + private String centralServerVmId; + + /** Creates an instance of ExternalInstallationSoftwareConfiguration class. */ + public ExternalInstallationSoftwareConfiguration() { + } + + /** + * Get the centralServerVmId property: The resource ID of the virtual machine containing the central server + * instance. + * + * @return the centralServerVmId value. + */ + public String centralServerVmId() { + return this.centralServerVmId; + } + + /** + * Set the centralServerVmId property: The resource ID of the virtual machine containing the central server + * instance. + * + * @param centralServerVmId the centralServerVmId value to set. + * @return the ExternalInstallationSoftwareConfiguration object itself. + */ + public ExternalInstallationSoftwareConfiguration withCentralServerVmId(String centralServerVmId) { + this.centralServerVmId = centralServerVmId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/FileShareConfiguration.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/FileShareConfiguration.java new file mode 100644 index 0000000000000..9a95f7fca0219 --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/FileShareConfiguration.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * File Share configuration details, populated with information on storage configuration mounted on the VIS. The + * createAndMount option is selected in case of missing input. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "configurationType", + defaultImpl = FileShareConfiguration.class) +@JsonTypeName("FileShareConfiguration") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "Skip", value = SkipFileShareConfiguration.class), + @JsonSubTypes.Type(name = "CreateAndMount", value = CreateAndMountFileShareConfiguration.class), + @JsonSubTypes.Type(name = "Mount", value = MountFileShareConfiguration.class) +}) +@Immutable +public class FileShareConfiguration { + /** Creates an instance of FileShareConfiguration class. */ + public FileShareConfiguration() { + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/FileShareStorageType.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/FileShareStorageType.java deleted file mode 100644 index 4ca91717dcc14..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/FileShareStorageType.java +++ /dev/null @@ -1,44 +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.workloads.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for FileShareStorageType. */ -public final class FileShareStorageType extends ExpandableStringEnum { - /** Static value Standard_LRS for FileShareStorageType. */ - public static final FileShareStorageType STANDARD_LRS = fromString("Standard_LRS"); - - /** Static value Standard_GRS for FileShareStorageType. */ - public static final FileShareStorageType STANDARD_GRS = fromString("Standard_GRS"); - - /** Static value Standard_ZRS for FileShareStorageType. */ - public static final FileShareStorageType STANDARD_ZRS = fromString("Standard_ZRS"); - - /** Static value Premium_LRS for FileShareStorageType. */ - public static final FileShareStorageType PREMIUM_LRS = fromString("Premium_LRS"); - - /** - * Creates or finds a FileShareStorageType from its string representation. - * - * @param name a name to look for. - * @return the corresponding FileShareStorageType. - */ - @JsonCreator - public static FileShareStorageType fromString(String name) { - return fromString(name, FileShareStorageType.class); - } - - /** - * Gets known FileShareStorageType values. - * - * @return known FileShareStorageType values. - */ - public static Collection values() { - return values(FileShareStorageType.class); - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/FileShareType.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/FileShareType.java deleted file mode 100644 index e11552a512df7..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/FileShareType.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.workloads.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for FileShareType. */ -public final class FileShareType extends ExpandableStringEnum { - /** Static value NfsOnController for FileShareType. */ - public static final FileShareType NFS_ON_CONTROLLER = fromString("NfsOnController"); - - /** Static value AzureFiles for FileShareType. */ - public static final FileShareType AZURE_FILES = fromString("AzureFiles"); - - /** - * Creates or finds a FileShareType from its string representation. - * - * @param name a name to look for. - * @return the corresponding FileShareType. - */ - @JsonCreator - public static FileShareType fromString(String name) { - return fromString(name, FileShareType.class); - } - - /** - * Gets known FileShareType values. - * - * @return known FileShareType values. - */ - public static Collection values() { - return values(FileShareType.class); - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/FileshareProfile.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/FileshareProfile.java deleted file mode 100644 index e9dd919f71df8..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/FileshareProfile.java +++ /dev/null @@ -1,141 +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.workloads.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** File share profile. */ -@Fluent -public final class FileshareProfile { - /* - * Share type - */ - @JsonProperty(value = "shareType", required = true) - private FileShareType shareType; - - /* - * File share backing storage type - */ - @JsonProperty(value = "storageType", required = true) - private FileShareStorageType storageType; - - /* - * File share size in GB - */ - @JsonProperty(value = "shareSizeInGB") - private Long shareSizeInGB; - - /* - * File share storage resource id - */ - @JsonProperty(value = "storageResourceId", access = JsonProperty.Access.WRITE_ONLY) - private String storageResourceId; - - /* - * File share name - */ - @JsonProperty(value = "shareName", access = JsonProperty.Access.WRITE_ONLY) - private String shareName; - - /** - * Get the shareType property: Share type. - * - * @return the shareType value. - */ - public FileShareType shareType() { - return this.shareType; - } - - /** - * Set the shareType property: Share type. - * - * @param shareType the shareType value to set. - * @return the FileshareProfile object itself. - */ - public FileshareProfile withShareType(FileShareType shareType) { - this.shareType = shareType; - return this; - } - - /** - * Get the storageType property: File share backing storage type. - * - * @return the storageType value. - */ - public FileShareStorageType storageType() { - return this.storageType; - } - - /** - * Set the storageType property: File share backing storage type. - * - * @param storageType the storageType value to set. - * @return the FileshareProfile object itself. - */ - public FileshareProfile withStorageType(FileShareStorageType storageType) { - this.storageType = storageType; - return this; - } - - /** - * Get the shareSizeInGB property: File share size in GB. - * - * @return the shareSizeInGB value. - */ - public Long shareSizeInGB() { - return this.shareSizeInGB; - } - - /** - * Set the shareSizeInGB property: File share size in GB. - * - * @param shareSizeInGB the shareSizeInGB value to set. - * @return the FileshareProfile object itself. - */ - public FileshareProfile withShareSizeInGB(Long shareSizeInGB) { - this.shareSizeInGB = shareSizeInGB; - return this; - } - - /** - * Get the storageResourceId property: File share storage resource id. - * - * @return the storageResourceId value. - */ - public String storageResourceId() { - return this.storageResourceId; - } - - /** - * Get the shareName property: File share name. - * - * @return the shareName value. - */ - public String shareName() { - return this.shareName; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (shareType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property shareType in model FileshareProfile")); - } - if (storageType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property storageType in model FileshareProfile")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(FileshareProfile.class); -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/GatewayServerProperties.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/GatewayServerProperties.java index eaa20a5d717ac..fc55202f3ed5d 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/GatewayServerProperties.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/GatewayServerProperties.java @@ -11,19 +11,23 @@ @Immutable public final class GatewayServerProperties { /* - * The gateway Port. + * Gateway Port. */ @JsonProperty(value = "port", access = JsonProperty.Access.WRITE_ONLY) private Long port; /* - * Defines the SAP Instance health. + * Defines the health of SAP Instances. */ @JsonProperty(value = "health", access = JsonProperty.Access.WRITE_ONLY) private SapHealthState health; + /** Creates an instance of GatewayServerProperties class. */ + public GatewayServerProperties() { + } + /** - * Get the port property: The gateway Port. + * Get the port property: Gateway Port. * * @return the port value. */ @@ -32,7 +36,7 @@ public Long port() { } /** - * Get the health property: Defines the SAP Instance health. + * Get the health property: Defines the health of SAP Instances. * * @return the health value. */ diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/HAEnabled.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/HAEnabled.java deleted file mode 100644 index b31f156c418a9..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/HAEnabled.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.workloads.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for HAEnabled. */ -public final class HAEnabled extends ExpandableStringEnum { - /** Static value Enabled for HAEnabled. */ - public static final HAEnabled ENABLED = fromString("Enabled"); - - /** Static value Disabled for HAEnabled. */ - public static final HAEnabled DISABLED = fromString("Disabled"); - - /** - * Creates or finds a HAEnabled from its string representation. - * - * @param name a name to look for. - * @return the corresponding HAEnabled. - */ - @JsonCreator - public static HAEnabled fromString(String name) { - return fromString(name, HAEnabled.class); - } - - /** - * Gets known HAEnabled values. - * - * @return known HAEnabled values. - */ - public static Collection values() { - return values(HAEnabled.class); - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/HanaDbProviderInstanceProperties.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/HanaDbProviderInstanceProperties.java index 8815a4c7022de..1c5c6547498de 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/HanaDbProviderInstanceProperties.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/HanaDbProviderInstanceProperties.java @@ -59,8 +59,8 @@ public final class HanaDbProviderInstanceProperties extends ProviderSpecificProp /* * Gets or sets the blob URI to SSL certificate for the DB. */ - @JsonProperty(value = "dbSslCertificateUri") - private String dbSslCertificateUri; + @JsonProperty(value = "sslCertificateUri") + private String sslCertificateUri; /* * Gets or sets the hostname(s) in the SSL certificate. @@ -68,6 +68,22 @@ public final class HanaDbProviderInstanceProperties extends ProviderSpecificProp @JsonProperty(value = "sslHostNameInCertificate") private String sslHostnameInCertificate; + /* + * Gets or sets certificate preference if secure communication is enabled. + */ + @JsonProperty(value = "sslPreference") + private SslPreference sslPreference; + + /* + * Gets or sets the SAP System Identifier. + */ + @JsonProperty(value = "sapSid") + private String sapSid; + + /** Creates an instance of HanaDbProviderInstanceProperties class. */ + public HanaDbProviderInstanceProperties() { + } + /** * Get the hostname property: Gets or sets the target virtual machine size. * @@ -209,22 +225,22 @@ public HanaDbProviderInstanceProperties withDbPasswordUri(String dbPasswordUri) } /** - * Get the dbSslCertificateUri property: Gets or sets the blob URI to SSL certificate for the DB. + * Get the sslCertificateUri property: Gets or sets the blob URI to SSL certificate for the DB. * - * @return the dbSslCertificateUri value. + * @return the sslCertificateUri value. */ - public String dbSslCertificateUri() { - return this.dbSslCertificateUri; + public String sslCertificateUri() { + return this.sslCertificateUri; } /** - * Set the dbSslCertificateUri property: Gets or sets the blob URI to SSL certificate for the DB. + * Set the sslCertificateUri property: Gets or sets the blob URI to SSL certificate for the DB. * - * @param dbSslCertificateUri the dbSslCertificateUri value to set. + * @param sslCertificateUri the sslCertificateUri value to set. * @return the HanaDbProviderInstanceProperties object itself. */ - public HanaDbProviderInstanceProperties withDbSslCertificateUri(String dbSslCertificateUri) { - this.dbSslCertificateUri = dbSslCertificateUri; + public HanaDbProviderInstanceProperties withSslCertificateUri(String sslCertificateUri) { + this.sslCertificateUri = sslCertificateUri; return this; } @@ -248,6 +264,46 @@ public HanaDbProviderInstanceProperties withSslHostnameInCertificate(String sslH return this; } + /** + * Get the sslPreference property: Gets or sets certificate preference if secure communication is enabled. + * + * @return the sslPreference value. + */ + public SslPreference sslPreference() { + return this.sslPreference; + } + + /** + * Set the sslPreference property: Gets or sets certificate preference if secure communication is enabled. + * + * @param sslPreference the sslPreference value to set. + * @return the HanaDbProviderInstanceProperties object itself. + */ + public HanaDbProviderInstanceProperties withSslPreference(SslPreference sslPreference) { + this.sslPreference = sslPreference; + return this; + } + + /** + * Get the sapSid property: Gets or sets the SAP System Identifier. + * + * @return the sapSid value. + */ + public String sapSid() { + return this.sapSid; + } + + /** + * Set the sapSid property: Gets or sets the SAP System Identifier. + * + * @param sapSid the sapSid value to set. + * @return the HanaDbProviderInstanceProperties object itself. + */ + public HanaDbProviderInstanceProperties withSapSid(String sapSid) { + this.sapSid = sapSid; + return this; + } + /** * Validates the instance. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/HighAvailabilityConfiguration.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/HighAvailabilityConfiguration.java index 6250f7598fd59..f17d0353e0691 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/HighAvailabilityConfiguration.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/HighAvailabilityConfiguration.java @@ -17,6 +17,10 @@ public final class HighAvailabilityConfiguration { @JsonProperty(value = "highAvailabilityType", required = true) private SapHighAvailabilityType highAvailabilityType; + /** Creates an instance of HighAvailabilityConfiguration class. */ + public HighAvailabilityConfiguration() { + } + /** * Get the highAvailabilityType property: The high availability type. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/HighAvailabilitySoftwareConfiguration.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/HighAvailabilitySoftwareConfiguration.java index 9cdbb61ed4b95..5a5483ea03f71 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/HighAvailabilitySoftwareConfiguration.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/HighAvailabilitySoftwareConfiguration.java @@ -18,12 +18,16 @@ public final class HighAvailabilitySoftwareConfiguration { private String fencingClientId; /* - * The fencing client id secret/password. The secret should never expire. - * This will be used pacemaker to start/stop the cluster VMs. + * The fencing client id secret/password. The secret should never expire. This will be used pacemaker to start/stop + * the cluster VMs. */ @JsonProperty(value = "fencingClientPassword", required = true) private String fencingClientPassword; + /** Creates an instance of HighAvailabilitySoftwareConfiguration class. */ + public HighAvailabilitySoftwareConfiguration() { + } + /** * Get the fencingClientId property: The fencing client id. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ImageReference.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ImageReference.java index fd3708883ddad..de09d4559afb2 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ImageReference.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ImageReference.java @@ -22,8 +22,7 @@ public final class ImageReference { private String publisher; /* - * Specifies the offer of the platform image or marketplace image used to - * create the virtual machine. + * Specifies the offer of the platform image or marketplace image used to create the virtual machine. */ @JsonProperty(value = "offer") private String offer; @@ -35,32 +34,32 @@ public final class ImageReference { private String sku; /* - * Specifies the version of the platform image or marketplace image used to - * create the virtual machine. The allowed formats are Major.Minor.Build or - * 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' - * to use the latest version of an image available at deploy time. Even if - * you use 'latest', the VM image will not automatically update after - * deploy time even if a new version becomes available. + * Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed + * formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use + * the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not + * automatically update after deploy time even if a new version becomes available. */ @JsonProperty(value = "version") private String version; /* - * Specifies in decimal numbers, the version of platform image or - * marketplace image used to create the virtual machine. This readonly - * field differs from 'version', only if the value specified in 'version' - * field is 'latest'. + * Specifies in decimal numbers, the version of platform image or marketplace image used to create the virtual + * machine. This readonly field differs from 'version', only if the value specified in 'version' field is 'latest'. */ @JsonProperty(value = "exactVersion", access = JsonProperty.Access.WRITE_ONLY) private String exactVersion; /* - * Specified the shared gallery image unique id for vm deployment. This can - * be fetched from shared gallery image GET call. + * Specified the shared gallery image unique id for vm deployment. This can be fetched from shared gallery image + * GET call. */ @JsonProperty(value = "sharedGalleryImageId") private String sharedGalleryImageId; + /** Creates an instance of ImageReference class. */ + public ImageReference() { + } + /** * Get the publisher property: The image publisher. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/InfrastructureConfiguration.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/InfrastructureConfiguration.java index e2b70e4efc13e..7c6fcc33bf01b 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/InfrastructureConfiguration.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/InfrastructureConfiguration.java @@ -25,12 +25,15 @@ @Fluent public class InfrastructureConfiguration { /* - * The application resource group where SAP system resources will be - * deployed. + * The application resource group where SAP system resources will be deployed. */ @JsonProperty(value = "appResourceGroup", required = true) private String appResourceGroup; + /** Creates an instance of InfrastructureConfiguration class. */ + public InfrastructureConfiguration() { + } + /** * Get the appResourceGroup property: The application resource group where SAP system resources will be deployed. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/LinuxConfiguration.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/LinuxConfiguration.java index 34af30c292891..f18b6343665db 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/LinuxConfiguration.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/LinuxConfiguration.java @@ -25,8 +25,8 @@ public final class LinuxConfiguration extends OSConfiguration { private Boolean disablePasswordAuthentication; /* - * Specifies the ssh key configuration for a Linux OS. (This property is - * deprecated, please use 'sshKeyPair' instead) + * Specifies the ssh key configuration for a Linux OS. (This property is deprecated, please use 'sshKeyPair' + * instead) */ @JsonProperty(value = "ssh") private SshConfiguration ssh; @@ -37,6 +37,10 @@ public final class LinuxConfiguration extends OSConfiguration { @JsonProperty(value = "sshKeyPair") private SshKeyPair sshKeyPair; + /** Creates an instance of LinuxConfiguration class. */ + public LinuxConfiguration() { + } + /** * Get the disablePasswordAuthentication property: Specifies whether password authentication should be disabled. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/LoadBalancerDetails.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/LoadBalancerDetails.java new file mode 100644 index 0000000000000..c14130b4d2504 --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/LoadBalancerDetails.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The Load Balancer details such as Load Balancer ID. */ +@Immutable +public final class LoadBalancerDetails { + /* + * The id property. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** Creates an instance of LoadBalancerDetails class. */ + public LoadBalancerDetails() { + } + + /** + * Get the id property: The id property. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/LoadBalancerResourceNames.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/LoadBalancerResourceNames.java new file mode 100644 index 0000000000000..a39c03014aa25 --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/LoadBalancerResourceNames.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The resource names object for load balancer and related resources. */ +@Fluent +public final class LoadBalancerResourceNames { + /* + * The full resource name for load balancer. If this value is not provided, load balancer will be name as + * {ASCS/DB}-loadBalancer. + */ + @JsonProperty(value = "loadBalancerName") + private String loadBalancerName; + + /* + * The list of frontend IP configuration names. If provided as input, size of this list should be 2 for cs layer + * and should be 1 for database layer. + */ + @JsonProperty(value = "frontendIpConfigurationNames") + private List frontendIpConfigurationNames; + + /* + * The list of backend pool names. Currently, ACSS deploys only one backend pool and hence, size of this list + * should be 1 + */ + @JsonProperty(value = "backendPoolNames") + private List backendPoolNames; + + /* + * The list of health probe names. If provided as input, size of this list should be 2 for cs layer and should be 1 + * for database layer. + */ + @JsonProperty(value = "healthProbeNames") + private List healthProbeNames; + + /** Creates an instance of LoadBalancerResourceNames class. */ + public LoadBalancerResourceNames() { + } + + /** + * Get the loadBalancerName property: The full resource name for load balancer. If this value is not provided, load + * balancer will be name as {ASCS/DB}-loadBalancer. + * + * @return the loadBalancerName value. + */ + public String loadBalancerName() { + return this.loadBalancerName; + } + + /** + * Set the loadBalancerName property: The full resource name for load balancer. If this value is not provided, load + * balancer will be name as {ASCS/DB}-loadBalancer. + * + * @param loadBalancerName the loadBalancerName value to set. + * @return the LoadBalancerResourceNames object itself. + */ + public LoadBalancerResourceNames withLoadBalancerName(String loadBalancerName) { + this.loadBalancerName = loadBalancerName; + return this; + } + + /** + * Get the frontendIpConfigurationNames property: The list of frontend IP configuration names. If provided as input, + * size of this list should be 2 for cs layer and should be 1 for database layer. + * + * @return the frontendIpConfigurationNames value. + */ + public List frontendIpConfigurationNames() { + return this.frontendIpConfigurationNames; + } + + /** + * Set the frontendIpConfigurationNames property: The list of frontend IP configuration names. If provided as input, + * size of this list should be 2 for cs layer and should be 1 for database layer. + * + * @param frontendIpConfigurationNames the frontendIpConfigurationNames value to set. + * @return the LoadBalancerResourceNames object itself. + */ + public LoadBalancerResourceNames withFrontendIpConfigurationNames(List frontendIpConfigurationNames) { + this.frontendIpConfigurationNames = frontendIpConfigurationNames; + return this; + } + + /** + * Get the backendPoolNames property: The list of backend pool names. Currently, ACSS deploys only one backend pool + * and hence, size of this list should be 1. + * + * @return the backendPoolNames value. + */ + public List backendPoolNames() { + return this.backendPoolNames; + } + + /** + * Set the backendPoolNames property: The list of backend pool names. Currently, ACSS deploys only one backend pool + * and hence, size of this list should be 1. + * + * @param backendPoolNames the backendPoolNames value to set. + * @return the LoadBalancerResourceNames object itself. + */ + public LoadBalancerResourceNames withBackendPoolNames(List backendPoolNames) { + this.backendPoolNames = backendPoolNames; + return this; + } + + /** + * Get the healthProbeNames property: The list of health probe names. If provided as input, size of this list should + * be 2 for cs layer and should be 1 for database layer. + * + * @return the healthProbeNames value. + */ + public List healthProbeNames() { + return this.healthProbeNames; + } + + /** + * Set the healthProbeNames property: The list of health probe names. If provided as input, size of this list should + * be 2 for cs layer and should be 1 for database layer. + * + * @param healthProbeNames the healthProbeNames value to set. + * @return the LoadBalancerResourceNames object itself. + */ + public LoadBalancerResourceNames withHealthProbeNames(List healthProbeNames) { + this.healthProbeNames = healthProbeNames; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/LoadBalancerType.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/LoadBalancerType.java deleted file mode 100644 index 5c4c012a34d27..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/LoadBalancerType.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.workloads.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for LoadBalancerType. */ -public final class LoadBalancerType extends ExpandableStringEnum { - /** Static value ApplicationGateway for LoadBalancerType. */ - public static final LoadBalancerType APPLICATION_GATEWAY = fromString("ApplicationGateway"); - - /** Static value LoadBalancer for LoadBalancerType. */ - public static final LoadBalancerType LOAD_BALANCER = fromString("LoadBalancer"); - - /** - * Creates or finds a LoadBalancerType from its string representation. - * - * @param name a name to look for. - * @return the corresponding LoadBalancerType. - */ - @JsonCreator - public static LoadBalancerType fromString(String name) { - return fromString(name, LoadBalancerType.class); - } - - /** - * Gets known LoadBalancerType values. - * - * @return known LoadBalancerType values. - */ - public static Collection values() { - return values(LoadBalancerType.class); - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/LocationType.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/LocationType.java deleted file mode 100644 index e16107c8bf1cd..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/LocationType.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.workloads.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for LocationType. */ -public final class LocationType extends ExpandableStringEnum { - /** Static value Region for LocationType. */ - public static final LocationType REGION = fromString("Region"); - - /** Static value EdgeZone for LocationType. */ - public static final LocationType EDGE_ZONE = fromString("EdgeZone"); - - /** - * Creates or finds a LocationType from its string representation. - * - * @param name a name to look for. - * @return the corresponding LocationType. - */ - @JsonCreator - public static LocationType fromString(String name) { - return fromString(name, LocationType.class); - } - - /** - * Gets known LocationType values. - * - * @return known LocationType values. - */ - public static Collection values() { - return values(LocationType.class); - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ManagedRGConfiguration.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ManagedRGConfiguration.java index 4cc347a8781fc..af21758da2fe8 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ManagedRGConfiguration.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ManagedRGConfiguration.java @@ -16,6 +16,10 @@ public final class ManagedRGConfiguration { @JsonProperty(value = "name") private String name; + /** Creates an instance of ManagedRGConfiguration class. */ + public ManagedRGConfiguration() { + } + /** * Get the name property: Managed resource group name. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ManagedServiceIdentityType.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ManagedServiceIdentityType.java index 1b5b2d1a29035..f64180a50b971 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ManagedServiceIdentityType.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ManagedServiceIdentityType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ManagedServiceIdentityType. */ +/** Type of managed service identity (only None, UserAssigned types are allowed). */ public final class ManagedServiceIdentityType extends ExpandableStringEnum { /** Static value None for ManagedServiceIdentityType. */ public static final ManagedServiceIdentityType NONE = fromString("None"); @@ -16,6 +16,15 @@ public final class ManagedServiceIdentityType extends ExpandableStringEnumGets a list of SAP monitors in the specified subscription. The operations returns various properties of each + * SAP monitor. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -21,8 +23,10 @@ public interface Monitors { PagedIterable list(); /** - * Gets a list of SAP monitors in the specified subscription. The operations returns various properties of each SAP - * monitor. + * Gets a list of SAP monitors in the specified subscription. + * + *

Gets a list of SAP monitors in the specified subscription. The operations returns various properties of each + * SAP monitor. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -33,7 +37,9 @@ public interface Monitors { PagedIterable list(Context context); /** - * Gets a list of SAP monitors in the specified resource group. + * Gets a list of SAP monitors + * + *

Gets a list of SAP monitors in the specified resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -44,7 +50,9 @@ public interface Monitors { PagedIterable listByResourceGroup(String resourceGroupName); /** - * Gets a list of SAP monitors in the specified resource group. + * Gets a list of SAP monitors + * + *

Gets a list of SAP monitors in the specified resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. @@ -56,33 +64,39 @@ public interface Monitors { PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Gets properties of a SAP monitor for the specified subscription, resource group, and resource name. + * Gets properties of a SAP monitor. + * + *

Gets properties of a SAP monitor for the specified subscription, resource group, and resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor 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 properties of a SAP monitor for the specified subscription, resource group, and resource name. + * @return properties of a SAP monitor for the specified subscription, resource group, and resource name along with + * {@link Response}. */ - Monitor getByResourceGroup(String resourceGroupName, String monitorName); + Response getByResourceGroupWithResponse(String resourceGroupName, String monitorName, Context context); /** - * Gets properties of a SAP monitor for the specified subscription, resource group, and resource name. + * Gets properties of a SAP monitor. + * + *

Gets properties of a SAP monitor for the specified subscription, resource group, and resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor 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 properties of a SAP monitor for the specified subscription, resource group, and resource name along with - * {@link Response}. + * @return properties of a SAP monitor for the specified subscription, resource group, and resource name. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String monitorName, Context context); + Monitor getByResourceGroup(String resourceGroupName, String monitorName); /** - * Deletes a SAP monitor with the specified subscription, resource group, and SAP monitor name. + * Deletes a SAP monitor. + * + *

Deletes a SAP monitor with the specified subscription, resource group, and SAP monitor name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -94,7 +108,9 @@ public interface Monitors { OperationStatusResult deleteByResourceGroup(String resourceGroupName, String monitorName); /** - * Deletes a SAP monitor with the specified subscription, resource group, and SAP monitor name. + * Deletes a SAP monitor. + * + *

Deletes a SAP monitor with the specified subscription, resource group, and SAP monitor name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -107,7 +123,9 @@ public interface Monitors { OperationStatusResult delete(String resourceGroupName, String monitorName, Context context); /** - * Gets properties of a SAP monitor for the specified subscription, resource group, and resource name. + * Gets properties of a SAP monitor. + * + *

Gets properties of a SAP monitor for the specified subscription, resource group, and resource name. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -119,7 +137,9 @@ public interface Monitors { Monitor getById(String id); /** - * Gets properties of a SAP monitor for the specified subscription, resource group, and resource name. + * Gets properties of a SAP monitor. + * + *

Gets properties of a SAP monitor for the specified subscription, resource group, and resource name. * * @param id the resource ID. * @param context The context to associate with this operation. @@ -132,7 +152,9 @@ public interface Monitors { Response getByIdWithResponse(String id, Context context); /** - * Deletes a SAP monitor with the specified subscription, resource group, and SAP monitor name. + * Deletes a SAP monitor. + * + *

Deletes a SAP monitor with the specified subscription, resource group, and SAP monitor name. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -143,7 +165,9 @@ public interface Monitors { OperationStatusResult deleteById(String id); /** - * Deletes a SAP monitor with the specified subscription, resource group, and SAP monitor name. + * Deletes a SAP monitor. + * + *

Deletes a SAP monitor with the specified subscription, resource group, and SAP monitor name. * * @param id the resource ID. * @param context The context to associate with this operation. diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/MountFileShareConfiguration.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/MountFileShareConfiguration.java new file mode 100644 index 0000000000000..807a366dd4a5a --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/MountFileShareConfiguration.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Gets or sets the file share configuration for externally mounted cases. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "configurationType") +@JsonTypeName("Mount") +@Fluent +public final class MountFileShareConfiguration extends FileShareConfiguration { + /* + * The fileshare resource ID + */ + @JsonProperty(value = "id", required = true) + private String id; + + /* + * The private endpoint resource ID + */ + @JsonProperty(value = "privateEndpointId", required = true) + private String privateEndpointId; + + /** Creates an instance of MountFileShareConfiguration class. */ + public MountFileShareConfiguration() { + } + + /** + * Get the id property: The fileshare resource ID. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: The fileshare resource ID. + * + * @param id the id value to set. + * @return the MountFileShareConfiguration object itself. + */ + public MountFileShareConfiguration withId(String id) { + this.id = id; + return this; + } + + /** + * Get the privateEndpointId property: The private endpoint resource ID. + * + * @return the privateEndpointId value. + */ + public String privateEndpointId() { + return this.privateEndpointId; + } + + /** + * Set the privateEndpointId property: The private endpoint resource ID. + * + * @param privateEndpointId the privateEndpointId value to set. + * @return the MountFileShareConfiguration object itself. + */ + public MountFileShareConfiguration withPrivateEndpointId(String privateEndpointId) { + this.privateEndpointId = privateEndpointId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (id() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property id in model MountFileShareConfiguration")); + } + if (privateEndpointId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property privateEndpointId in model MountFileShareConfiguration")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MountFileShareConfiguration.class); +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/MsSqlServerProviderInstanceProperties.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/MsSqlServerProviderInstanceProperties.java index 25e7d2fb2ab41..e85182ad8e760 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/MsSqlServerProviderInstanceProperties.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/MsSqlServerProviderInstanceProperties.java @@ -50,6 +50,22 @@ public final class MsSqlServerProviderInstanceProperties extends ProviderSpecifi @JsonProperty(value = "sapSid") private String sapSid; + /* + * Gets or sets certificate preference if secure communication is enabled. + */ + @JsonProperty(value = "sslPreference") + private SslPreference sslPreference; + + /* + * Gets or sets the blob URI to SSL certificate for the SQL Database. + */ + @JsonProperty(value = "sslCertificateUri") + private String sslCertificateUri; + + /** Creates an instance of MsSqlServerProviderInstanceProperties class. */ + public MsSqlServerProviderInstanceProperties() { + } + /** * Get the hostname property: Gets or sets the SQL server host name. * @@ -170,6 +186,46 @@ public MsSqlServerProviderInstanceProperties withSapSid(String sapSid) { return this; } + /** + * Get the sslPreference property: Gets or sets certificate preference if secure communication is enabled. + * + * @return the sslPreference value. + */ + public SslPreference sslPreference() { + return this.sslPreference; + } + + /** + * Set the sslPreference property: Gets or sets certificate preference if secure communication is enabled. + * + * @param sslPreference the sslPreference value to set. + * @return the MsSqlServerProviderInstanceProperties object itself. + */ + public MsSqlServerProviderInstanceProperties withSslPreference(SslPreference sslPreference) { + this.sslPreference = sslPreference; + return this; + } + + /** + * Get the sslCertificateUri property: Gets or sets the blob URI to SSL certificate for the SQL Database. + * + * @return the sslCertificateUri value. + */ + public String sslCertificateUri() { + return this.sslCertificateUri; + } + + /** + * Set the sslCertificateUri property: Gets or sets the blob URI to SSL certificate for the SQL Database. + * + * @param sslCertificateUri the sslCertificateUri value to set. + * @return the MsSqlServerProviderInstanceProperties object itself. + */ + public MsSqlServerProviderInstanceProperties withSslCertificateUri(String sslCertificateUri) { + this.sslCertificateUri = sslCertificateUri; + return this; + } + /** * Validates the instance. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/NamingPatternType.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/NamingPatternType.java new file mode 100644 index 0000000000000..2a9dcae0a88e1 --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/NamingPatternType.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The pattern type to be used for resource naming. */ +public final class NamingPatternType extends ExpandableStringEnum { + /** Static value FullResourceName for NamingPatternType. */ + public static final NamingPatternType FULL_RESOURCE_NAME = fromString("FullResourceName"); + + /** + * Creates a new instance of NamingPatternType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NamingPatternType() { + } + + /** + * Creates or finds a NamingPatternType from its string representation. + * + * @param name a name to look for. + * @return the corresponding NamingPatternType. + */ + @JsonCreator + public static NamingPatternType fromString(String name) { + return fromString(name, NamingPatternType.class); + } + + /** + * Gets known NamingPatternType values. + * + * @return known NamingPatternType values. + */ + public static Collection values() { + return values(NamingPatternType.class); + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/NetworkConfiguration.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/NetworkConfiguration.java index 15e93b704aa9c..05f239b6ca424 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/NetworkConfiguration.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/NetworkConfiguration.java @@ -7,19 +7,23 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Defines the network configuration for SAP infrastructure. */ +/** Defines the network configuration type for SAP system infrastructure that is being deployed. */ @Fluent public final class NetworkConfiguration { /* - * Specifies whether a secondary IP address should be added to the network - * interface on all VMs + * Specifies whether a secondary IP address should be added to the network interface on all VMs of the SAP system + * being deployed */ @JsonProperty(value = "isSecondaryIpEnabled") private Boolean isSecondaryIpEnabled; + /** Creates an instance of NetworkConfiguration class. */ + public NetworkConfiguration() { + } + /** * Get the isSecondaryIpEnabled property: Specifies whether a secondary IP address should be added to the network - * interface on all VMs. + * interface on all VMs of the SAP system being deployed. * * @return the isSecondaryIpEnabled value. */ @@ -29,7 +33,7 @@ public Boolean isSecondaryIpEnabled() { /** * Set the isSecondaryIpEnabled property: Specifies whether a secondary IP address should be added to the network - * interface on all VMs. + * interface on all VMs of the SAP system being deployed. * * @param isSecondaryIpEnabled the isSecondaryIpEnabled value to set. * @return the NetworkConfiguration object itself. diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/NetworkInterfaceResourceNames.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/NetworkInterfaceResourceNames.java new file mode 100644 index 0000000000000..9fc3d74b1cafa --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/NetworkInterfaceResourceNames.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The resource names object for network interface and related resources. */ +@Fluent +public final class NetworkInterfaceResourceNames { + /* + * The full name for network interface. If name is not provided, service uses a default name based on the + * deployment type. For SingleServer, default name is {SID}-Nic. In case of HA-AvZone systems, default name will be + * {SID}-{App/ASCS/DB}-Zone{A/B}-Nic with an incrementor at the end in case of more than 1 instance per layer. For + * distributed and HA-AvSet systems, default name will be {SID}-{App/ASCS/DB}-Nic with an incrementor at the end in + * case of more than 1 instance per layer. + */ + @JsonProperty(value = "networkInterfaceName") + private String networkInterfaceName; + + /** Creates an instance of NetworkInterfaceResourceNames class. */ + public NetworkInterfaceResourceNames() { + } + + /** + * Get the networkInterfaceName property: The full name for network interface. If name is not provided, service uses + * a default name based on the deployment type. For SingleServer, default name is {SID}-Nic. In case of HA-AvZone + * systems, default name will be {SID}-{App/ASCS/DB}-Zone{A/B}-Nic with an incrementor at the end in case of more + * than 1 instance per layer. For distributed and HA-AvSet systems, default name will be {SID}-{App/ASCS/DB}-Nic + * with an incrementor at the end in case of more than 1 instance per layer. + * + * @return the networkInterfaceName value. + */ + public String networkInterfaceName() { + return this.networkInterfaceName; + } + + /** + * Set the networkInterfaceName property: The full name for network interface. If name is not provided, service uses + * a default name based on the deployment type. For SingleServer, default name is {SID}-Nic. In case of HA-AvZone + * systems, default name will be {SID}-{App/ASCS/DB}-Zone{A/B}-Nic with an incrementor at the end in case of more + * than 1 instance per layer. For distributed and HA-AvSet systems, default name will be {SID}-{App/ASCS/DB}-Nic + * with an incrementor at the end in case of more than 1 instance per layer. + * + * @param networkInterfaceName the networkInterfaceName value to set. + * @return the NetworkInterfaceResourceNames object itself. + */ + public NetworkInterfaceResourceNames withNetworkInterfaceName(String networkInterfaceName) { + this.networkInterfaceName = networkInterfaceName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/NetworkProfile.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/NetworkProfile.java deleted file mode 100644 index f99e5a21c59a1..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/NetworkProfile.java +++ /dev/null @@ -1,234 +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.workloads.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Network profile. */ -@Fluent -public final class NetworkProfile { - /* - * Load balancer type - */ - @JsonProperty(value = "loadBalancerType", required = true) - private LoadBalancerType loadBalancerType; - - /* - * Load balancer SKU - */ - @JsonProperty(value = "loadBalancerSku") - private String loadBalancerSku; - - /* - * Load balancer tier - */ - @JsonProperty(value = "loadBalancerTier") - private String loadBalancerTier; - - /* - * Capacity, applicable only for Application Gateway - */ - @JsonProperty(value = "capacity") - private Integer capacity; - - /* - * Whether to enable Azure front door - */ - @JsonProperty(value = "azureFrontDoorEnabled") - private AzureFrontDoorEnabled azureFrontDoorEnabled; - - /* - * Virtual network resource Id - */ - @JsonProperty(value = "vNetResourceId", access = JsonProperty.Access.WRITE_ONLY) - private String vNetResourceId; - - /* - * Azure Loadbalancer or ApplicationGateway resource Id - */ - @JsonProperty(value = "loadBalancerResourceId", access = JsonProperty.Access.WRITE_ONLY) - private String loadBalancerResourceId; - - /* - * Azure front door resource id - */ - @JsonProperty(value = "azureFrontDoorResourceId", access = JsonProperty.Access.WRITE_ONLY) - private String azureFrontDoorResourceId; - - /* - * Loadbalancer front-end IP address resource Id - */ - @JsonProperty(value = "frontEndPublicIpResourceId", access = JsonProperty.Access.WRITE_ONLY) - private String frontEndPublicIpResourceId; - - /* - * List of outbound public IP resource IDs - */ - @JsonProperty(value = "outboundPublicIpResourceIds", access = JsonProperty.Access.WRITE_ONLY) - private List outboundPublicIpResourceIds; - - /** - * Get the loadBalancerType property: Load balancer type. - * - * @return the loadBalancerType value. - */ - public LoadBalancerType loadBalancerType() { - return this.loadBalancerType; - } - - /** - * Set the loadBalancerType property: Load balancer type. - * - * @param loadBalancerType the loadBalancerType value to set. - * @return the NetworkProfile object itself. - */ - public NetworkProfile withLoadBalancerType(LoadBalancerType loadBalancerType) { - this.loadBalancerType = loadBalancerType; - return this; - } - - /** - * Get the loadBalancerSku property: Load balancer SKU. - * - * @return the loadBalancerSku value. - */ - public String loadBalancerSku() { - return this.loadBalancerSku; - } - - /** - * Set the loadBalancerSku property: Load balancer SKU. - * - * @param loadBalancerSku the loadBalancerSku value to set. - * @return the NetworkProfile object itself. - */ - public NetworkProfile withLoadBalancerSku(String loadBalancerSku) { - this.loadBalancerSku = loadBalancerSku; - return this; - } - - /** - * Get the loadBalancerTier property: Load balancer tier. - * - * @return the loadBalancerTier value. - */ - public String loadBalancerTier() { - return this.loadBalancerTier; - } - - /** - * Set the loadBalancerTier property: Load balancer tier. - * - * @param loadBalancerTier the loadBalancerTier value to set. - * @return the NetworkProfile object itself. - */ - public NetworkProfile withLoadBalancerTier(String loadBalancerTier) { - this.loadBalancerTier = loadBalancerTier; - return this; - } - - /** - * Get the capacity property: Capacity, applicable only for Application Gateway. - * - * @return the capacity value. - */ - public Integer capacity() { - return this.capacity; - } - - /** - * Set the capacity property: Capacity, applicable only for Application Gateway. - * - * @param capacity the capacity value to set. - * @return the NetworkProfile object itself. - */ - public NetworkProfile withCapacity(Integer capacity) { - this.capacity = capacity; - return this; - } - - /** - * Get the azureFrontDoorEnabled property: Whether to enable Azure front door. - * - * @return the azureFrontDoorEnabled value. - */ - public AzureFrontDoorEnabled azureFrontDoorEnabled() { - return this.azureFrontDoorEnabled; - } - - /** - * Set the azureFrontDoorEnabled property: Whether to enable Azure front door. - * - * @param azureFrontDoorEnabled the azureFrontDoorEnabled value to set. - * @return the NetworkProfile object itself. - */ - public NetworkProfile withAzureFrontDoorEnabled(AzureFrontDoorEnabled azureFrontDoorEnabled) { - this.azureFrontDoorEnabled = azureFrontDoorEnabled; - return this; - } - - /** - * Get the vNetResourceId property: Virtual network resource Id. - * - * @return the vNetResourceId value. - */ - public String vNetResourceId() { - return this.vNetResourceId; - } - - /** - * Get the loadBalancerResourceId property: Azure Loadbalancer or ApplicationGateway resource Id. - * - * @return the loadBalancerResourceId value. - */ - public String loadBalancerResourceId() { - return this.loadBalancerResourceId; - } - - /** - * Get the azureFrontDoorResourceId property: Azure front door resource id. - * - * @return the azureFrontDoorResourceId value. - */ - public String azureFrontDoorResourceId() { - return this.azureFrontDoorResourceId; - } - - /** - * Get the frontEndPublicIpResourceId property: Loadbalancer front-end IP address resource Id. - * - * @return the frontEndPublicIpResourceId value. - */ - public String frontEndPublicIpResourceId() { - return this.frontEndPublicIpResourceId; - } - - /** - * Get the outboundPublicIpResourceIds property: List of outbound public IP resource IDs. - * - * @return the outboundPublicIpResourceIds value. - */ - public List outboundPublicIpResourceIds() { - return this.outboundPublicIpResourceIds; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (loadBalancerType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property loadBalancerType in model NetworkProfile")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NetworkProfile.class); -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/NodeProfile.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/NodeProfile.java deleted file mode 100644 index d386a6eb33d9e..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/NodeProfile.java +++ /dev/null @@ -1,191 +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.workloads.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** VM or VMSS node profile. */ -@Fluent -public class NodeProfile { - /* - * VM or VMSS name - */ - @JsonProperty(value = "name") - private String name; - - /* - * VM SKU for node(s) - */ - @JsonProperty(value = "nodeSku", required = true) - private String nodeSku; - - /* - * OS image used for creating the nodes - */ - @JsonProperty(value = "osImage", required = true) - private OsImageProfile osImage; - - /* - * OS disk details - */ - @JsonProperty(value = "osDisk", required = true) - private DiskInfo osDisk; - - /* - * Data disks details. This property is not in use right now - */ - @JsonProperty(value = "dataDisks") - private List dataDisks; - - /* - * VM/VMSS resource ARM Ids - */ - @JsonProperty(value = "nodeResourceIds", access = JsonProperty.Access.WRITE_ONLY) - private List nodeResourceIds; - - /** - * Get the name property: VM or VMSS name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: VM or VMSS name. - * - * @param name the name value to set. - * @return the NodeProfile object itself. - */ - public NodeProfile withName(String name) { - this.name = name; - return this; - } - - /** - * Get the nodeSku property: VM SKU for node(s). - * - * @return the nodeSku value. - */ - public String nodeSku() { - return this.nodeSku; - } - - /** - * Set the nodeSku property: VM SKU for node(s). - * - * @param nodeSku the nodeSku value to set. - * @return the NodeProfile object itself. - */ - public NodeProfile withNodeSku(String nodeSku) { - this.nodeSku = nodeSku; - return this; - } - - /** - * Get the osImage property: OS image used for creating the nodes. - * - * @return the osImage value. - */ - public OsImageProfile osImage() { - return this.osImage; - } - - /** - * Set the osImage property: OS image used for creating the nodes. - * - * @param osImage the osImage value to set. - * @return the NodeProfile object itself. - */ - public NodeProfile withOsImage(OsImageProfile osImage) { - this.osImage = osImage; - return this; - } - - /** - * Get the osDisk property: OS disk details. - * - * @return the osDisk value. - */ - public DiskInfo osDisk() { - return this.osDisk; - } - - /** - * Set the osDisk property: OS disk details. - * - * @param osDisk the osDisk value to set. - * @return the NodeProfile object itself. - */ - public NodeProfile withOsDisk(DiskInfo osDisk) { - this.osDisk = osDisk; - return this; - } - - /** - * Get the dataDisks property: Data disks details. This property is not in use right now. - * - * @return the dataDisks value. - */ - public List dataDisks() { - return this.dataDisks; - } - - /** - * Set the dataDisks property: Data disks details. This property is not in use right now. - * - * @param dataDisks the dataDisks value to set. - * @return the NodeProfile object itself. - */ - public NodeProfile withDataDisks(List dataDisks) { - this.dataDisks = dataDisks; - return this; - } - - /** - * Get the nodeResourceIds property: VM/VMSS resource ARM Ids. - * - * @return the nodeResourceIds value. - */ - public List nodeResourceIds() { - return this.nodeResourceIds; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (nodeSku() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property nodeSku in model NodeProfile")); - } - if (osImage() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property osImage in model NodeProfile")); - } else { - osImage().validate(); - } - if (osDisk() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property osDisk in model NodeProfile")); - } else { - osDisk().validate(); - } - if (dataDisks() != null) { - dataDisks().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NodeProfile.class); -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OSConfiguration.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OSConfiguration.java index 33d4e4de0669d..7da749b3255ef 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OSConfiguration.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OSConfiguration.java @@ -22,6 +22,10 @@ }) @Immutable public class OSConfiguration { + /** Creates an instance of OSConfiguration class. */ + public OSConfiguration() { + } + /** * Validates the instance. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OSImageOffer.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OSImageOffer.java deleted file mode 100644 index 672da63d540a5..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OSImageOffer.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.workloads.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for OSImageOffer. */ -public final class OSImageOffer extends ExpandableStringEnum { - /** Static value UbuntuServer for OSImageOffer. */ - public static final OSImageOffer UBUNTU_SERVER = fromString("UbuntuServer"); - - /** - * Creates or finds a OSImageOffer from its string representation. - * - * @param name a name to look for. - * @return the corresponding OSImageOffer. - */ - @JsonCreator - public static OSImageOffer fromString(String name) { - return fromString(name, OSImageOffer.class); - } - - /** - * Gets known OSImageOffer values. - * - * @return known OSImageOffer values. - */ - public static Collection values() { - return values(OSImageOffer.class); - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OSImagePublisher.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OSImagePublisher.java deleted file mode 100644 index 95155d656ab6b..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OSImagePublisher.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.workloads.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for OSImagePublisher. */ -public final class OSImagePublisher extends ExpandableStringEnum { - /** Static value Canonical for OSImagePublisher. */ - public static final OSImagePublisher CANONICAL = fromString("Canonical"); - - /** - * Creates or finds a OSImagePublisher from its string representation. - * - * @param name a name to look for. - * @return the corresponding OSImagePublisher. - */ - @JsonCreator - public static OSImagePublisher fromString(String name) { - return fromString(name, OSImagePublisher.class); - } - - /** - * Gets known OSImagePublisher values. - * - * @return known OSImagePublisher values. - */ - public static Collection values() { - return values(OSImagePublisher.class); - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OSImageSku.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OSImageSku.java deleted file mode 100644 index f7d44922376e5..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OSImageSku.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.workloads.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for OSImageSku. */ -public final class OSImageSku extends ExpandableStringEnum { - /** Static value 18.04-LTS for OSImageSku. */ - public static final OSImageSku ONE_EIGHT_ZERO_FOUR_LTS = fromString("18.04-LTS"); - - /** Static value 16.04-LTS for OSImageSku. */ - public static final OSImageSku ONE_SIX_ZERO_FOUR_LTS = fromString("16.04-LTS"); - - /** - * Creates or finds a OSImageSku from its string representation. - * - * @param name a name to look for. - * @return the corresponding OSImageSku. - */ - @JsonCreator - public static OSImageSku fromString(String name) { - return fromString(name, OSImageSku.class); - } - - /** - * Gets known OSImageSku values. - * - * @return known OSImageSku values. - */ - public static Collection values() { - return values(OSImageSku.class); - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OSImageVersion.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OSImageVersion.java deleted file mode 100644 index 88b7d89945aa1..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OSImageVersion.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.workloads.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for OSImageVersion. */ -public final class OSImageVersion extends ExpandableStringEnum { - /** Static value latest for OSImageVersion. */ - public static final OSImageVersion LATEST = fromString("latest"); - - /** - * Creates or finds a OSImageVersion from its string representation. - * - * @param name a name to look for. - * @return the corresponding OSImageVersion. - */ - @JsonCreator - public static OSImageVersion fromString(String name) { - return fromString(name, OSImageVersion.class); - } - - /** - * Gets known OSImageVersion values. - * - * @return known OSImageVersion values. - */ - public static Collection values() { - return values(OSImageVersion.class); - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OSProfile.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OSProfile.java index 4eb60010cc78d..5c74e706c5590 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OSProfile.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OSProfile.java @@ -14,35 +14,27 @@ @Fluent public final class OSProfile { /* - * Specifies the name of the administrator account.

This property - * cannot be updated after the VM is created.

**Windows-only - * restriction:** Cannot end in "."

**Disallowed values:** - * "administrator", "admin", "user", "user1", "test", "user2", "test1", - * "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", - * "aspnet", "backup", "console", "david", "guest", "john", "owner", - * "root", "server", "sql", "support", "support_388945a0", "sys", "test2", - * "test3", "user4", "user5".

**Minimum-length (Linux):** 1 - * character

**Max-length (Linux):** 64 characters

- * **Max-length (Windows):** 20 characters. + * Specifies the name of the administrator account.

This property cannot be updated after the VM is + * created.

**Windows-only restriction:** Cannot end in "."

**Disallowed values:** + * "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", + * "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", + * "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".

**Minimum-length + * (Linux):** 1 character

**Max-length (Linux):** 64 characters

**Max-length (Windows):** 20 + * characters. */ @JsonProperty(value = "adminUsername") private String adminUsername; /* - * Specifies the password of the administrator account.

- * **Minimum-length (Windows):** 8 characters

**Minimum-length - * (Linux):** 6 characters

**Max-length (Windows):** 123 - * characters

**Max-length (Linux):** 72 characters

- * **Complexity requirements:** 3 out of 4 conditions below need to be - * fulfilled
Has lower characters
Has upper characters
Has a - * digit
Has a special character (Regex match [\W_])

- * **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - * "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - * "iloveyou!"

For resetting the password, see [How to reset the - * Remote Desktop service or its login password in a Windows - * VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp) - *

For resetting root password, see [Manage users, SSH, and check - * or repair disks on Azure Linux VMs using the VMAccess + * Specifies the password of the administrator account.

**Minimum-length (Windows):** 8 characters + *

**Minimum-length (Linux):** 6 characters

**Max-length (Windows):** 123 characters

+ * **Max-length (Linux):** 72 characters

**Complexity requirements:** 3 out of 4 conditions below need to + * be fulfilled
Has lower characters
Has upper characters
Has a digit
Has a special character + * (Regex match [\W_])

**Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + * "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!"

For resetting the + * password, see [How to reset the Remote Desktop service or its login password in a Windows + * VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp)

For resetting root + * password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess * Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection) */ @JsonProperty(value = "adminPassword") @@ -54,6 +46,10 @@ public final class OSProfile { @JsonProperty(value = "osConfiguration") private OSConfiguration osConfiguration; + /** Creates an instance of OSProfile class. */ + public OSProfile() { + } + /** * Get the adminUsername property: Specifies the name of the administrator account. <br><br> This * property cannot be updated after the VM is created. <br><br> **Windows-only restriction:** Cannot end diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OSType.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OSType.java index c35f7fc1ae848..fd1e0d06a2398 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OSType.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OSType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for OSType. */ +/** The OS Type. */ public final class OSType extends ExpandableStringEnum { /** Static value Linux for OSType. */ public static final OSType LINUX = fromString("Linux"); @@ -16,6 +16,15 @@ public final class OSType extends ExpandableStringEnum { /** Static value Windows for OSType. */ public static final OSType WINDOWS = fromString("Windows"); + /** + * Creates a new instance of OSType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OSType() { + } + /** * Creates or finds a OSType from its string representation. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OperationDisplay.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OperationDisplay.java index 2ae9e4f48b3ff..f992b63316600 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OperationDisplay.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OperationDisplay.java @@ -11,34 +11,36 @@ @Immutable public final class OperationDisplay { /* - * The localized friendly form of the resource provider name, e.g. - * "Microsoft Monitoring Insights" or "Microsoft Compute". + * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft + * Compute". */ @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY) private String provider; /* - * The localized friendly name of the resource type related to this - * operation. E.g. "Virtual Machines" or "Job Schedule Collections". + * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job + * Schedule Collections". */ @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY) private String resource; /* - * The concise, localized friendly name for the operation; suitable for - * dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual - * Machine". + * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual + * Machine", "Restart Virtual Machine". */ @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) private String operation; /* - * The short, localized friendly description of the operation; suitable for - * tool tips and detailed views. + * The short, localized friendly description of the operation; suitable for tool tips and detailed views. */ @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) private String description; + /** Creates an instance of OperationDisplay class. */ + public OperationDisplay() { + } + /** * Get the provider property: The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring * Insights" or "Microsoft Compute". diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OperationListResult.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OperationListResult.java index ac6331db36e35..ad7a9d06f902e 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OperationListResult.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OperationListResult.java @@ -27,6 +27,10 @@ public final class OperationListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of OperationListResult class. */ + public OperationListResult() { + } + /** * Get the value property: List of operations supported by the resource provider. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OperationsDefinitionDisplay.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OperationsDefinitionDisplay.java index 26dafcd71ec13..f3ad05574b660 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OperationsDefinitionDisplay.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OperationsDefinitionDisplay.java @@ -9,6 +9,10 @@ /** Display information of the operation. */ @Fluent public final class OperationsDefinitionDisplay extends OperationsDisplayDefinition { + /** Creates an instance of OperationsDefinitionDisplay class. */ + public OperationsDefinitionDisplay() { + } + /** {@inheritDoc} */ @Override public OperationsDefinitionDisplay withProvider(String provider) { diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OperationsDisplayDefinition.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OperationsDisplayDefinition.java index 72a550efd0034..ae32f1ea63c61 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OperationsDisplayDefinition.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OperationsDisplayDefinition.java @@ -35,6 +35,10 @@ public class OperationsDisplayDefinition { @JsonProperty(value = "description", required = true) private String description; + /** Creates an instance of OperationsDisplayDefinition class. */ + public OperationsDisplayDefinition() { + } + /** * Get the provider property: Defines the workload provider. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/Origin.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/Origin.java index 06d061e425965..8c56cb9af7c3e 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/Origin.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/Origin.java @@ -8,7 +8,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for Origin. */ +/** + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value + * is "user,system". + */ public final class Origin extends ExpandableStringEnum { /** Static value user for Origin. */ public static final Origin USER = fromString("user"); @@ -19,6 +22,15 @@ public final class Origin extends ExpandableStringEnum { /** Static value user,system for Origin. */ public static final Origin USER_SYSTEM = fromString("user,system"); + /** + * Creates a new instance of Origin value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Origin() { + } + /** * Creates or finds a Origin from its string representation. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OsImageProfile.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OsImageProfile.java deleted file mode 100644 index 0a4a5449f7bba..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OsImageProfile.java +++ /dev/null @@ -1,124 +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.workloads.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** OS image profile. */ -@Fluent -public final class OsImageProfile { - /* - * OS image publisher - */ - @JsonProperty(value = "publisher") - private OSImagePublisher publisher; - - /* - * OS image offer - */ - @JsonProperty(value = "offer") - private OSImageOffer offer; - - /* - * OS image sku - */ - @JsonProperty(value = "sku") - private OSImageSku sku; - - /* - * OS image version - */ - @JsonProperty(value = "version") - private OSImageVersion version; - - /** - * Get the publisher property: OS image publisher. - * - * @return the publisher value. - */ - public OSImagePublisher publisher() { - return this.publisher; - } - - /** - * Set the publisher property: OS image publisher. - * - * @param publisher the publisher value to set. - * @return the OsImageProfile object itself. - */ - public OsImageProfile withPublisher(OSImagePublisher publisher) { - this.publisher = publisher; - return this; - } - - /** - * Get the offer property: OS image offer. - * - * @return the offer value. - */ - public OSImageOffer offer() { - return this.offer; - } - - /** - * Set the offer property: OS image offer. - * - * @param offer the offer value to set. - * @return the OsImageProfile object itself. - */ - public OsImageProfile withOffer(OSImageOffer offer) { - this.offer = offer; - return this; - } - - /** - * Get the sku property: OS image sku. - * - * @return the sku value. - */ - public OSImageSku sku() { - return this.sku; - } - - /** - * Set the sku property: OS image sku. - * - * @param sku the sku value to set. - * @return the OsImageProfile object itself. - */ - public OsImageProfile withSku(OSImageSku sku) { - this.sku = sku; - return this; - } - - /** - * Get the version property: OS image version. - * - * @return the version value. - */ - public OSImageVersion version() { - return this.version; - } - - /** - * Set the version property: OS image version. - * - * @param version the version value to set. - * @return the OsImageProfile object itself. - */ - public OsImageProfile withVersion(OSImageVersion version) { - this.version = version; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OsSapConfiguration.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OsSapConfiguration.java index 0b9c869b92fd5..d542739f6994e 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OsSapConfiguration.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/OsSapConfiguration.java @@ -22,6 +22,10 @@ public final class OsSapConfiguration { @JsonProperty(value = "sapFqdn") private String sapFqdn; + /** Creates an instance of OsSapConfiguration class. */ + public OsSapConfiguration() { + } + /** * Get the deployerVmPackages property: The url and storage account ID where deployer VM packages are uploaded. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/PatchResourceRequestBody.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/PatchResourceRequestBody.java deleted file mode 100644 index 77f1c9831018a..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/PatchResourceRequestBody.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.workloads.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Resource patch request body. */ -@Fluent -public final class PatchResourceRequestBody { - /* - * Resource tags - */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map tags; - - /* - * The identity property. - */ - @JsonProperty(value = "identity") - private PatchResourceRequestBodyIdentity identity; - - /** - * 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 PatchResourceRequestBody object itself. - */ - public PatchResourceRequestBody withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the identity property: The identity property. - * - * @return the identity value. - */ - public PatchResourceRequestBodyIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The identity property. - * - * @param identity the identity value to set. - * @return the PatchResourceRequestBody object itself. - */ - public PatchResourceRequestBody withIdentity(PatchResourceRequestBodyIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/PatchResourceRequestBodyIdentity.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/PatchResourceRequestBodyIdentity.java deleted file mode 100644 index 31c4a7f6eff32..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/PatchResourceRequestBodyIdentity.java +++ /dev/null @@ -1,37 +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.workloads.models; - -import com.azure.core.annotation.Fluent; -import java.util.Map; - -/** The PatchResourceRequestBodyIdentity model. */ -@Fluent -public class PatchResourceRequestBodyIdentity extends UserAssignedServiceIdentity { - /** {@inheritDoc} */ - @Override - public PatchResourceRequestBodyIdentity withType(ManagedServiceIdentityType type) { - super.withType(type); - return this; - } - - /** {@inheritDoc} */ - @Override - public PatchResourceRequestBodyIdentity withUserAssignedIdentities( - Map userAssignedIdentities) { - super.withUserAssignedIdentities(userAssignedIdentities); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/PhpProfile.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/PhpProfile.java deleted file mode 100644 index 58d19fe6bd254..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/PhpProfile.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.workloads.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** PHP profile. */ -@Fluent -public final class PhpProfile { - /* - * PHP version - */ - @JsonProperty(value = "version", required = true) - private PhpVersion version; - - /** - * Get the version property: PHP version. - * - * @return the version value. - */ - public PhpVersion version() { - return this.version; - } - - /** - * Set the version property: PHP version. - * - * @param version the version value to set. - * @return the PhpProfile object itself. - */ - public PhpProfile withVersion(PhpVersion version) { - this.version = version; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (version() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property version in model PhpProfile")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(PhpProfile.class); -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/PhpVersion.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/PhpVersion.java deleted file mode 100644 index 900ae79d81459..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/PhpVersion.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.workloads.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for PhpVersion. */ -public final class PhpVersion extends ExpandableStringEnum { - /** Static value 7.2 for PhpVersion. */ - public static final PhpVersion SEVEN_TWO = fromString("7.2"); - - /** Static value 7.3 for PhpVersion. */ - public static final PhpVersion SEVEN_THREE = fromString("7.3"); - - /** Static value 7.4 for PhpVersion. */ - public static final PhpVersion SEVEN_FOUR = fromString("7.4"); - - /** - * Creates or finds a PhpVersion from its string representation. - * - * @param name a name to look for. - * @return the corresponding PhpVersion. - */ - @JsonCreator - public static PhpVersion fromString(String name) { - return fromString(name, PhpVersion.class); - } - - /** - * Gets known PhpVersion values. - * - * @return known PhpVersion values. - */ - public static Collection values() { - return values(PhpVersion.class); - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/PhpWorkloadProvisioningState.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/PhpWorkloadProvisioningState.java deleted file mode 100644 index 6b5604ddb8e2a..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/PhpWorkloadProvisioningState.java +++ /dev/null @@ -1,56 +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.workloads.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for PhpWorkloadProvisioningState. */ -public final class PhpWorkloadProvisioningState extends ExpandableStringEnum { - /** Static value NotSpecified for PhpWorkloadProvisioningState. */ - public static final PhpWorkloadProvisioningState NOT_SPECIFIED = fromString("NotSpecified"); - - /** Static value Accepted for PhpWorkloadProvisioningState. */ - public static final PhpWorkloadProvisioningState ACCEPTED = fromString("Accepted"); - - /** Static value Created for PhpWorkloadProvisioningState. */ - public static final PhpWorkloadProvisioningState CREATED = fromString("Created"); - - /** Static value Succeeded for PhpWorkloadProvisioningState. */ - public static final PhpWorkloadProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** Static value Failed for PhpWorkloadProvisioningState. */ - public static final PhpWorkloadProvisioningState FAILED = fromString("Failed"); - - /** Static value Canceled for PhpWorkloadProvisioningState. */ - public static final PhpWorkloadProvisioningState CANCELED = fromString("Canceled"); - - /** Static value Provisioning for PhpWorkloadProvisioningState. */ - public static final PhpWorkloadProvisioningState PROVISIONING = fromString("Provisioning"); - - /** Static value Deleting for PhpWorkloadProvisioningState. */ - public static final PhpWorkloadProvisioningState DELETING = fromString("Deleting"); - - /** - * Creates or finds a PhpWorkloadProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding PhpWorkloadProvisioningState. - */ - @JsonCreator - public static PhpWorkloadProvisioningState fromString(String name) { - return fromString(name, PhpWorkloadProvisioningState.class); - } - - /** - * Gets known PhpWorkloadProvisioningState values. - * - * @return known PhpWorkloadProvisioningState values. - */ - public static Collection values() { - return values(PhpWorkloadProvisioningState.class); - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/PhpWorkloadResource.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/PhpWorkloadResource.java deleted file mode 100644 index 03679cfa77206..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/PhpWorkloadResource.java +++ /dev/null @@ -1,507 +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.workloads.models; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.workloads.fluent.models.PhpWorkloadResourceInner; -import java.util.Map; - -/** An immutable client-side representation of PhpWorkloadResource. */ -public interface PhpWorkloadResource { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the kind property: Indicates which kind of php workload this resource represent e.g WordPress. - * - * @return the kind value. - */ - WorkloadKind kind(); - - /** - * Gets the sku property: Php workloads SKU. - * - * @return the sku value. - */ - Sku sku(); - - /** - * Gets the identity property: Identity for the resource. Currently not supported. - * - * @return the identity value. - */ - PhpWorkloadResourceIdentity identity(); - - /** - * Gets the appLocation property: The infra resources for PHP workload will be created in this location. - * - * @return the appLocation value. - */ - String appLocation(); - - /** - * Gets the managedResourceGroupConfiguration property: Managed resource group configuration of the workload. - * - * @return the managedResourceGroupConfiguration value. - */ - ManagedRGConfiguration managedResourceGroupConfiguration(); - - /** - * Gets the adminUserProfile property: Admin user profile used for VM and VMSS. - * - * @return the adminUserProfile value. - */ - UserProfile adminUserProfile(); - - /** - * Gets the webNodesProfile property: VMSS web nodes profile. - * - * @return the webNodesProfile value. - */ - VmssNodesProfile webNodesProfile(); - - /** - * Gets the controllerProfile property: Controller VM profile. - * - * @return the controllerProfile value. - */ - NodeProfile controllerProfile(); - - /** - * Gets the networkProfile property: Network profile. - * - * @return the networkProfile value. - */ - NetworkProfile networkProfile(); - - /** - * Gets the databaseProfile property: Database profile. - * - * @return the databaseProfile value. - */ - DatabaseProfile databaseProfile(); - - /** - * Gets the siteProfile property: Site profile. - * - * @return the siteProfile value. - */ - SiteProfile siteProfile(); - - /** - * Gets the fileshareProfile property: File share profile. - * - * @return the fileshareProfile value. - */ - FileshareProfile fileshareProfile(); - - /** - * Gets the phpProfile property: PHP profile. - * - * @return the phpProfile value. - */ - PhpProfile phpProfile(); - - /** - * Gets the searchProfile property: Search profile. - * - * @return the searchProfile value. - */ - SearchProfile searchProfile(); - - /** - * Gets the cacheProfile property: Cache profile. - * - * @return the cacheProfile value. - */ - CacheProfile cacheProfile(); - - /** - * Gets the backupProfile property: Backup profile. - * - * @return the backupProfile value. - */ - BackupProfile backupProfile(); - - /** - * Gets the provisioningState property: Php workload resource provisioning state. - * - * @return the provisioningState value. - */ - PhpWorkloadProvisioningState provisioningState(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.workloads.fluent.models.PhpWorkloadResourceInner object. - * - * @return the inner object. - */ - PhpWorkloadResourceInner innerModel(); - - /** The entirety of the PhpWorkloadResource definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithKind, - DefinitionStages.WithCreate { - } - /** The PhpWorkloadResource definition stages. */ - interface DefinitionStages { - /** The first stage of the PhpWorkloadResource definition. */ - interface Blank extends WithLocation { - } - /** The stage of the PhpWorkloadResource definition allowing to specify location. */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(String location); - } - /** The stage of the PhpWorkloadResource definition allowing to specify parent resource. */ - interface WithResourceGroup { - /** - * Specifies resourceGroupName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @return the next definition stage. - */ - WithKind withExistingResourceGroup(String resourceGroupName); - } - /** The stage of the PhpWorkloadResource definition allowing to specify kind. */ - interface WithKind { - /** - * Specifies the kind property: Indicates which kind of php workload this resource represent e.g WordPress. - * - * @param kind Indicates which kind of php workload this resource represent e.g WordPress. - * @return the next definition stage. - */ - WithCreate withKind(WorkloadKind kind); - } - /** - * The stage of the PhpWorkloadResource definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithSku, - DefinitionStages.WithIdentity, - DefinitionStages.WithAppLocation, - DefinitionStages.WithManagedResourceGroupConfiguration, - DefinitionStages.WithAdminUserProfile, - DefinitionStages.WithWebNodesProfile, - DefinitionStages.WithControllerProfile, - DefinitionStages.WithNetworkProfile, - DefinitionStages.WithDatabaseProfile, - DefinitionStages.WithSiteProfile, - DefinitionStages.WithFileshareProfile, - DefinitionStages.WithPhpProfile, - DefinitionStages.WithSearchProfile, - DefinitionStages.WithCacheProfile, - DefinitionStages.WithBackupProfile { - /** - * Executes the create request. - * - * @return the created resource. - */ - PhpWorkloadResource create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - PhpWorkloadResource create(Context context); - } - /** The stage of the PhpWorkloadResource definition allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - /** The stage of the PhpWorkloadResource definition allowing to specify sku. */ - interface WithSku { - /** - * Specifies the sku property: Php workloads SKU. - * - * @param sku Php workloads SKU. - * @return the next definition stage. - */ - WithCreate withSku(Sku sku); - } - /** The stage of the PhpWorkloadResource definition allowing to specify identity. */ - interface WithIdentity { - /** - * Specifies the identity property: Identity for the resource. Currently not supported. - * - * @param identity Identity for the resource. Currently not supported. - * @return the next definition stage. - */ - WithCreate withIdentity(PhpWorkloadResourceIdentity identity); - } - /** The stage of the PhpWorkloadResource definition allowing to specify appLocation. */ - interface WithAppLocation { - /** - * Specifies the appLocation property: The infra resources for PHP workload will be created in this - * location. - * - * @param appLocation The infra resources for PHP workload will be created in this location. - * @return the next definition stage. - */ - WithCreate withAppLocation(String appLocation); - } - /** The stage of the PhpWorkloadResource definition allowing to specify managedResourceGroupConfiguration. */ - interface WithManagedResourceGroupConfiguration { - /** - * Specifies the managedResourceGroupConfiguration property: Managed resource group configuration of the - * workload. - * - * @param managedResourceGroupConfiguration Managed resource group configuration of the workload. - * @return the next definition stage. - */ - WithCreate withManagedResourceGroupConfiguration(ManagedRGConfiguration managedResourceGroupConfiguration); - } - /** The stage of the PhpWorkloadResource definition allowing to specify adminUserProfile. */ - interface WithAdminUserProfile { - /** - * Specifies the adminUserProfile property: Admin user profile used for VM and VMSS. - * - * @param adminUserProfile Admin user profile used for VM and VMSS. - * @return the next definition stage. - */ - WithCreate withAdminUserProfile(UserProfile adminUserProfile); - } - /** The stage of the PhpWorkloadResource definition allowing to specify webNodesProfile. */ - interface WithWebNodesProfile { - /** - * Specifies the webNodesProfile property: VMSS web nodes profile. - * - * @param webNodesProfile VMSS web nodes profile. - * @return the next definition stage. - */ - WithCreate withWebNodesProfile(VmssNodesProfile webNodesProfile); - } - /** The stage of the PhpWorkloadResource definition allowing to specify controllerProfile. */ - interface WithControllerProfile { - /** - * Specifies the controllerProfile property: Controller VM profile. - * - * @param controllerProfile Controller VM profile. - * @return the next definition stage. - */ - WithCreate withControllerProfile(NodeProfile controllerProfile); - } - /** The stage of the PhpWorkloadResource definition allowing to specify networkProfile. */ - interface WithNetworkProfile { - /** - * Specifies the networkProfile property: Network profile. - * - * @param networkProfile Network profile. - * @return the next definition stage. - */ - WithCreate withNetworkProfile(NetworkProfile networkProfile); - } - /** The stage of the PhpWorkloadResource definition allowing to specify databaseProfile. */ - interface WithDatabaseProfile { - /** - * Specifies the databaseProfile property: Database profile. - * - * @param databaseProfile Database profile. - * @return the next definition stage. - */ - WithCreate withDatabaseProfile(DatabaseProfile databaseProfile); - } - /** The stage of the PhpWorkloadResource definition allowing to specify siteProfile. */ - interface WithSiteProfile { - /** - * Specifies the siteProfile property: Site profile. - * - * @param siteProfile Site profile. - * @return the next definition stage. - */ - WithCreate withSiteProfile(SiteProfile siteProfile); - } - /** The stage of the PhpWorkloadResource definition allowing to specify fileshareProfile. */ - interface WithFileshareProfile { - /** - * Specifies the fileshareProfile property: File share profile. - * - * @param fileshareProfile File share profile. - * @return the next definition stage. - */ - WithCreate withFileshareProfile(FileshareProfile fileshareProfile); - } - /** The stage of the PhpWorkloadResource definition allowing to specify phpProfile. */ - interface WithPhpProfile { - /** - * Specifies the phpProfile property: PHP profile. - * - * @param phpProfile PHP profile. - * @return the next definition stage. - */ - WithCreate withPhpProfile(PhpProfile phpProfile); - } - /** The stage of the PhpWorkloadResource definition allowing to specify searchProfile. */ - interface WithSearchProfile { - /** - * Specifies the searchProfile property: Search profile. - * - * @param searchProfile Search profile. - * @return the next definition stage. - */ - WithCreate withSearchProfile(SearchProfile searchProfile); - } - /** The stage of the PhpWorkloadResource definition allowing to specify cacheProfile. */ - interface WithCacheProfile { - /** - * Specifies the cacheProfile property: Cache profile. - * - * @param cacheProfile Cache profile. - * @return the next definition stage. - */ - WithCreate withCacheProfile(CacheProfile cacheProfile); - } - /** The stage of the PhpWorkloadResource definition allowing to specify backupProfile. */ - interface WithBackupProfile { - /** - * Specifies the backupProfile property: Backup profile. - * - * @param backupProfile Backup profile. - * @return the next definition stage. - */ - WithCreate withBackupProfile(BackupProfile backupProfile); - } - } - /** - * Begins update for the PhpWorkloadResource resource. - * - * @return the stage of resource update. - */ - PhpWorkloadResource.Update update(); - - /** The template for PhpWorkloadResource update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity { - /** - * Executes the update request. - * - * @return the updated resource. - */ - PhpWorkloadResource apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - PhpWorkloadResource apply(Context context); - } - /** The PhpWorkloadResource update stages. */ - interface UpdateStages { - /** The stage of the PhpWorkloadResource update allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - /** The stage of the PhpWorkloadResource update allowing to specify identity. */ - interface WithIdentity { - /** - * Specifies the identity property: The identity property.. - * - * @param identity The identity property. - * @return the next definition stage. - */ - Update withIdentity(PatchResourceRequestBodyIdentity identity); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - PhpWorkloadResource refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - PhpWorkloadResource refresh(Context context); -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/PhpWorkloadResourceIdentity.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/PhpWorkloadResourceIdentity.java deleted file mode 100644 index af481a97b20b2..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/PhpWorkloadResourceIdentity.java +++ /dev/null @@ -1,37 +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.workloads.models; - -import com.azure.core.annotation.Fluent; -import java.util.Map; - -/** Identity for the resource. Currently not supported. */ -@Fluent -public class PhpWorkloadResourceIdentity extends UserAssignedServiceIdentity { - /** {@inheritDoc} */ - @Override - public PhpWorkloadResourceIdentity withType(ManagedServiceIdentityType type) { - super.withType(type); - return this; - } - - /** {@inheritDoc} */ - @Override - public PhpWorkloadResourceIdentity withUserAssignedIdentities( - Map userAssignedIdentities) { - super.withUserAssignedIdentities(userAssignedIdentities); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/PhpWorkloadResourceList.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/PhpWorkloadResourceList.java deleted file mode 100644 index 4ce745345202a..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/PhpWorkloadResourceList.java +++ /dev/null @@ -1,77 +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.workloads.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.workloads.fluent.models.PhpWorkloadResourceInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Php workload resource list. */ -@Fluent -public final class PhpWorkloadResourceList { - /* - * List of resources in current page - */ - @JsonProperty(value = "value") - private List value; - - /* - * Link to next page of resources - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * Get the value property: List of resources in current page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: List of resources in current page. - * - * @param value the value value to set. - * @return the PhpWorkloadResourceList object itself. - */ - public PhpWorkloadResourceList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Link to next page of resources. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: Link to next page of resources. - * - * @param nextLink the nextLink value to set. - * @return the PhpWorkloadResourceList object itself. - */ - public PhpWorkloadResourceList 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) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/PhpWorkloads.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/PhpWorkloads.java deleted file mode 100644 index 0f64d6433ca7d..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/PhpWorkloads.java +++ /dev/null @@ -1,170 +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.workloads.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of PhpWorkloads. */ -public interface PhpWorkloads { - /** - * Lists PHP workload resources for a 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 php workload resource list as paginated response with {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * Lists PHP workload resources for a 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 php workload resource list as paginated response with {@link PagedIterable}. - */ - PagedIterable list(Context context); - - /** - * Lists PHP workload resources in a 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 php workload resource list as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Lists PHP workload resources in a 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 php workload resource list as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Gets the PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload 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 PHP workload resource. - */ - PhpWorkloadResource getByResourceGroup(String resourceGroupName, String phpWorkloadName); - - /** - * Gets the PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload 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 PHP workload resource along with {@link Response}. - */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String phpWorkloadName, Context context); - - /** - * Delete PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param deleteInfra Whether to delete infra along with workload 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 delete(String resourceGroupName, String phpWorkloadName, String deleteInfra); - - /** - * Delete PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload 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. - */ - void delete(String resourceGroupName, String phpWorkloadName); - - /** - * Delete PHP workload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param deleteInfra Whether to delete infra along with workload 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 phpWorkloadName, String deleteInfra, Context context); - - /** - * Gets the PHP workload resource. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the PHP workload resource along with {@link Response}. - */ - PhpWorkloadResource getById(String id); - - /** - * Gets the PHP workload resource. - * - * @param id the resource 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 PHP workload resource along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete PHP workload resource. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete PHP workload resource. - * - * @param id the resource ID. - * @param deleteInfra Whether to delete infra along with workload 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 deleteByIdWithResponse(String id, String deleteInfra, Context context); - - /** - * Begins definition for a new PhpWorkloadResource resource. - * - * @param name resource name. - * @return the first stage of the new PhpWorkloadResource definition. - */ - PhpWorkloadResource.DefinitionStages.Blank define(String name); -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/PrometheusHaClusterProviderInstanceProperties.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/PrometheusHaClusterProviderInstanceProperties.java index 6fe9ef53ea6f1..3e62fa3a2a002 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/PrometheusHaClusterProviderInstanceProperties.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/PrometheusHaClusterProviderInstanceProperties.java @@ -38,6 +38,22 @@ public final class PrometheusHaClusterProviderInstanceProperties extends Provide @JsonProperty(value = "clusterName") private String clusterName; + /* + * Gets or sets certificate preference if secure communication is enabled. + */ + @JsonProperty(value = "sslPreference") + private SslPreference sslPreference; + + /* + * Gets or sets the blob URI to SSL certificate for the HA cluster exporter. + */ + @JsonProperty(value = "sslCertificateUri") + private String sslCertificateUri; + + /** Creates an instance of PrometheusHaClusterProviderInstanceProperties class. */ + public PrometheusHaClusterProviderInstanceProperties() { + } + /** * Get the prometheusUrl property: URL of the Node Exporter endpoint. * @@ -118,6 +134,46 @@ public PrometheusHaClusterProviderInstanceProperties withClusterName(String clus return this; } + /** + * Get the sslPreference property: Gets or sets certificate preference if secure communication is enabled. + * + * @return the sslPreference value. + */ + public SslPreference sslPreference() { + return this.sslPreference; + } + + /** + * Set the sslPreference property: Gets or sets certificate preference if secure communication is enabled. + * + * @param sslPreference the sslPreference value to set. + * @return the PrometheusHaClusterProviderInstanceProperties object itself. + */ + public PrometheusHaClusterProviderInstanceProperties withSslPreference(SslPreference sslPreference) { + this.sslPreference = sslPreference; + return this; + } + + /** + * Get the sslCertificateUri property: Gets or sets the blob URI to SSL certificate for the HA cluster exporter. + * + * @return the sslCertificateUri value. + */ + public String sslCertificateUri() { + return this.sslCertificateUri; + } + + /** + * Set the sslCertificateUri property: Gets or sets the blob URI to SSL certificate for the HA cluster exporter. + * + * @param sslCertificateUri the sslCertificateUri value to set. + * @return the PrometheusHaClusterProviderInstanceProperties object itself. + */ + public PrometheusHaClusterProviderInstanceProperties withSslCertificateUri(String sslCertificateUri) { + this.sslCertificateUri = sslCertificateUri; + return this; + } + /** * Validates the instance. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/PrometheusOSProviderInstanceProperties.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/PrometheusOSProviderInstanceProperties.java index 09457144be1aa..b37e78faaf4aa 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/PrometheusOSProviderInstanceProperties.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/PrometheusOSProviderInstanceProperties.java @@ -20,6 +20,28 @@ public final class PrometheusOSProviderInstanceProperties extends ProviderSpecif @JsonProperty(value = "prometheusUrl") private String prometheusUrl; + /* + * Gets or sets certificate preference if secure communication is enabled. + */ + @JsonProperty(value = "sslPreference") + private SslPreference sslPreference; + + /* + * Gets or sets the blob URI to SSL certificate for the prometheus node exporter. + */ + @JsonProperty(value = "sslCertificateUri") + private String sslCertificateUri; + + /* + * Gets or sets the SAP System Identifier + */ + @JsonProperty(value = "sapSid") + private String sapSid; + + /** Creates an instance of PrometheusOSProviderInstanceProperties class. */ + public PrometheusOSProviderInstanceProperties() { + } + /** * Get the prometheusUrl property: URL of the Node Exporter endpoint. * @@ -40,6 +62,68 @@ public PrometheusOSProviderInstanceProperties withPrometheusUrl(String prometheu return this; } + /** + * Get the sslPreference property: Gets or sets certificate preference if secure communication is enabled. + * + * @return the sslPreference value. + */ + public SslPreference sslPreference() { + return this.sslPreference; + } + + /** + * Set the sslPreference property: Gets or sets certificate preference if secure communication is enabled. + * + * @param sslPreference the sslPreference value to set. + * @return the PrometheusOSProviderInstanceProperties object itself. + */ + public PrometheusOSProviderInstanceProperties withSslPreference(SslPreference sslPreference) { + this.sslPreference = sslPreference; + return this; + } + + /** + * Get the sslCertificateUri property: Gets or sets the blob URI to SSL certificate for the prometheus node + * exporter. + * + * @return the sslCertificateUri value. + */ + public String sslCertificateUri() { + return this.sslCertificateUri; + } + + /** + * Set the sslCertificateUri property: Gets or sets the blob URI to SSL certificate for the prometheus node + * exporter. + * + * @param sslCertificateUri the sslCertificateUri value to set. + * @return the PrometheusOSProviderInstanceProperties object itself. + */ + public PrometheusOSProviderInstanceProperties withSslCertificateUri(String sslCertificateUri) { + this.sslCertificateUri = sslCertificateUri; + return this; + } + + /** + * Get the sapSid property: Gets or sets the SAP System Identifier. + * + * @return the sapSid value. + */ + public String sapSid() { + return this.sapSid; + } + + /** + * Set the sapSid property: Gets or sets the SAP System Identifier. + * + * @param sapSid the sapSid value to set. + * @return the PrometheusOSProviderInstanceProperties object itself. + */ + public PrometheusOSProviderInstanceProperties withSapSid(String sapSid) { + this.sapSid = sapSid; + return this; + } + /** * Validates the instance. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ProviderInstanceListResult.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ProviderInstanceListResult.java index 48c24b97f8165..078e131cfaf41 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ProviderInstanceListResult.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ProviderInstanceListResult.java @@ -24,6 +24,10 @@ public final class ProviderInstanceListResult { @JsonProperty(value = "nextLink") private String nextLink; + /** Creates an instance of ProviderInstanceListResult class. */ + public ProviderInstanceListResult() { + } + /** * Get the value property: The list of provider instances. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ProviderInstancePropertiesErrors.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ProviderInstancePropertiesErrors.java index 13ec2ebdbd927..0442e88a4c6b8 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ProviderInstancePropertiesErrors.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ProviderInstancePropertiesErrors.java @@ -9,6 +9,10 @@ /** Defines the provider instance errors. */ @Immutable public final class ProviderInstancePropertiesErrors extends Error { + /** Creates an instance of ProviderInstancePropertiesErrors class. */ + public ProviderInstancePropertiesErrors() { + } + /** * Validates the instance. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ProviderInstances.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ProviderInstances.java index ca34935f32d64..a404b72278253 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ProviderInstances.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ProviderInstances.java @@ -11,8 +11,10 @@ /** Resource collection API of ProviderInstances. */ public interface ProviderInstances { /** - * Gets a list of provider instances in the specified SAP monitor. The operations returns various properties of each - * provider instances. + * Gets a list of provider instances in the specified SAP monitor. + * + *

Gets a list of provider instances in the specified SAP monitor. The operations returns various properties of + * each provider instances. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -25,8 +27,10 @@ public interface ProviderInstances { PagedIterable list(String resourceGroupName, String monitorName); /** - * Gets a list of provider instances in the specified SAP monitor. The operations returns various properties of each - * provider instances. + * Gets a list of provider instances in the specified SAP monitor. + * + *

Gets a list of provider instances in the specified SAP monitor. The operations returns various properties of + * each provider instances. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -40,39 +44,46 @@ public interface ProviderInstances { PagedIterable list(String resourceGroupName, String monitorName, Context context); /** - * Gets properties of a provider instance for the specified subscription, resource group, SAP monitor name, and + * Gets properties of a provider instance. + * + *

Gets properties of a provider instance for the specified subscription, resource group, SAP monitor name, and * resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. * @param providerInstanceName Name of the provider instance. + * @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 properties of a provider instance for the specified subscription, resource group, SAP monitor name, and - * resource name. + * resource name along with {@link Response}. */ - ProviderInstance get(String resourceGroupName, String monitorName, String providerInstanceName); + Response getWithResponse( + String resourceGroupName, String monitorName, String providerInstanceName, Context context); /** - * Gets properties of a provider instance for the specified subscription, resource group, SAP monitor name, and + * Gets properties of a provider instance. + * + *

Gets properties of a provider instance for the specified subscription, resource group, SAP monitor name, and * resource name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. * @param providerInstanceName Name of the provider instance. - * @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 properties of a provider instance for the specified subscription, resource group, SAP monitor name, and - * resource name along with {@link Response}. + * resource name. */ - Response getWithResponse( - String resourceGroupName, String monitorName, String providerInstanceName, Context context); + ProviderInstance get(String resourceGroupName, String monitorName, String providerInstanceName); /** - * Deletes a provider instance for the specified subscription, resource group, SAP monitor name, and resource name. + * Deletes a provider instance. + * + *

Deletes a provider instance for the specified subscription, resource group, SAP monitor name, and resource + * name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -85,7 +96,10 @@ Response getWithResponse( OperationStatusResult delete(String resourceGroupName, String monitorName, String providerInstanceName); /** - * Deletes a provider instance for the specified subscription, resource group, SAP monitor name, and resource name. + * Deletes a provider instance. + * + *

Deletes a provider instance for the specified subscription, resource group, SAP monitor name, and resource + * name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the SAP monitor resource. @@ -100,7 +114,9 @@ OperationStatusResult delete( String resourceGroupName, String monitorName, String providerInstanceName, Context context); /** - * Gets properties of a provider instance for the specified subscription, resource group, SAP monitor name, and + * Gets properties of a provider instance. + * + *

Gets properties of a provider instance for the specified subscription, resource group, SAP monitor name, and * resource name. * * @param id the resource ID. @@ -113,7 +129,9 @@ OperationStatusResult delete( ProviderInstance getById(String id); /** - * Gets properties of a provider instance for the specified subscription, resource group, SAP monitor name, and + * Gets properties of a provider instance. + * + *

Gets properties of a provider instance for the specified subscription, resource group, SAP monitor name, and * resource name. * * @param id the resource ID. @@ -127,7 +145,10 @@ OperationStatusResult delete( Response getByIdWithResponse(String id, Context context); /** - * Deletes a provider instance for the specified subscription, resource group, SAP monitor name, and resource name. + * Deletes a provider instance. + * + *

Deletes a provider instance for the specified subscription, resource group, SAP monitor name, and resource + * name. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -138,7 +159,10 @@ OperationStatusResult delete( OperationStatusResult deleteById(String id); /** - * Deletes a provider instance for the specified subscription, resource group, SAP monitor name, and resource name. + * Deletes a provider instance. + * + *

Deletes a provider instance for the specified subscription, resource group, SAP monitor name, and resource + * name. * * @param id the resource ID. * @param context The context to associate with this operation. diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ProviderSpecificProperties.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ProviderSpecificProperties.java index 9e5492e50740a..cf556c5d49b91 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ProviderSpecificProperties.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ProviderSpecificProperties.java @@ -26,6 +26,10 @@ }) @Immutable public class ProviderSpecificProperties { + /** Creates an instance of ProviderSpecificProperties class. */ + public ProviderSpecificProperties() { + } + /** * Validates the instance. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/RedisCacheFamily.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/RedisCacheFamily.java deleted file mode 100644 index faad2e14f3937..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/RedisCacheFamily.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.workloads.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for RedisCacheFamily. */ -public final class RedisCacheFamily extends ExpandableStringEnum { - /** Static value C for RedisCacheFamily. */ - public static final RedisCacheFamily C = fromString("C"); - - /** Static value P for RedisCacheFamily. */ - public static final RedisCacheFamily P = fromString("P"); - - /** - * Creates or finds a RedisCacheFamily from its string representation. - * - * @param name a name to look for. - * @return the corresponding RedisCacheFamily. - */ - @JsonCreator - public static RedisCacheFamily fromString(String name) { - return fromString(name, RedisCacheFamily.class); - } - - /** - * Gets known RedisCacheFamily values. - * - * @return known RedisCacheFamily values. - */ - public static Collection values() { - return values(RedisCacheFamily.class); - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ResourceProviders.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ResourceProviders.java index c3e6dcd1aca83..a4c64d01c3348 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ResourceProviders.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ResourceProviders.java @@ -10,18 +10,8 @@ /** Resource collection API of ResourceProviders. */ public interface ResourceProviders { /** - * Get SAP sizing recommendations. - * - * @param location The name of Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 sAP sizing recommendations. - */ - SapSizingRecommendationResult sapSizingRecommendations(String location); - - /** - * Get SAP sizing recommendations. + * Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database + * tier. * * @param location The name of Azure region. * @param sapSizingRecommendation SAP Sizing Recommendation Request body. @@ -29,24 +19,27 @@ public interface ResourceProviders { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 sAP sizing recommendations along with {@link Response}. + * @return sAP sizing recommendations by providing input SAPS for application tier and memory required for database + * tier along with {@link Response}. */ Response sapSizingRecommendationsWithResponse( String location, SapSizingRecommendationRequest sapSizingRecommendation, Context context); /** - * Get SAP supported SKUs. + * Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database + * tier. * * @param location The name of Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 sAP supported SKUs. + * @return sAP sizing recommendations by providing input SAPS for application tier and memory required for database + * tier. */ - SapSupportedResourceSkusResult sapSupportedSku(String location); + SapSizingRecommendationResult sapSizingRecommendations(String location); /** - * Get SAP supported SKUs. + * Get a list of SAP supported SKUs for ASCS, Application and Database tier. * * @param location The name of Azure region. * @param sapSupportedSku SAP Supported SKU Request body. @@ -54,24 +47,24 @@ Response sapSizingRecommendationsWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 sAP supported SKUs along with {@link Response}. + * @return a list of SAP supported SKUs for ASCS, Application and Database tier along with {@link Response}. */ Response sapSupportedSkuWithResponse( String location, SapSupportedSkusRequest sapSupportedSku, Context context); /** - * Get SAP Disk Configurations. + * Get a list of SAP supported SKUs for ASCS, Application and Database tier. * * @param location The name of Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 sAP Disk Configurations. + * @return a list of SAP supported SKUs for ASCS, Application and Database tier. */ - SapDiskConfigurationsResult sapDiskConfigurations(String location); + SapSupportedResourceSkusResult sapSupportedSku(String location); /** - * Get SAP Disk Configurations. + * Get the SAP Disk Configuration Layout prod/non-prod SAP System. * * @param location The name of Azure region. * @param sapDiskConfigurations SAP Disk Configurations Request body. @@ -79,24 +72,24 @@ Response sapSupportedSkuWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 sAP Disk Configurations along with {@link Response}. + * @return the SAP Disk Configuration Layout prod/non-prod SAP System along with {@link Response}. */ Response sapDiskConfigurationsWithResponse( String location, SapDiskConfigurationsRequest sapDiskConfigurations, Context context); /** - * Get SAP Availability Zone Details. + * Get the SAP Disk Configuration Layout prod/non-prod SAP System. * * @param location The name of Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 sAP Availability Zone Details. + * @return the SAP Disk Configuration Layout prod/non-prod SAP System. */ - SapAvailabilityZoneDetailsResult sapAvailabilityZoneDetails(String location); + SapDiskConfigurationsResult sapDiskConfigurations(String location); /** - * Get SAP Availability Zone Details. + * Get the recommended SAP Availability Zone Pair Details for your region. * * @param location The name of Azure region. * @param sapAvailabilityZoneDetails SAP Availability Zone Details Request body. @@ -104,8 +97,19 @@ Response sapDiskConfigurationsWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 sAP Availability Zone Details along with {@link Response}. + * @return the recommended SAP Availability Zone Pair Details for your region along with {@link Response}. */ Response sapAvailabilityZoneDetailsWithResponse( String location, SapAvailabilityZoneDetailsRequest sapAvailabilityZoneDetails, Context context); + + /** + * Get the recommended SAP Availability Zone Pair Details for your region. + * + * @param location The name of Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 recommended SAP Availability Zone Pair Details for your region. + */ + SapAvailabilityZoneDetailsResult sapAvailabilityZoneDetails(String location); } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/RoutingPreference.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/RoutingPreference.java index 1f72fa803f753..c5ab1528a1dcd 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/RoutingPreference.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/RoutingPreference.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for RoutingPreference. */ +/** Sets the routing preference of the SAP monitor. By default only RFC1918 traffic is routed to the customer VNET. */ public final class RoutingPreference extends ExpandableStringEnum { /** Static value Default for RoutingPreference. */ public static final RoutingPreference DEFAULT = fromString("Default"); @@ -16,6 +16,15 @@ public final class RoutingPreference extends ExpandableStringEnum vmDetails(); /** * Gets the status property: Defines the SAP Instance status. @@ -132,7 +141,7 @@ public interface SapApplicationServerInstance { SapVirtualInstanceStatus status(); /** - * Gets the health property: Defines the SAP Instance health. + * Gets the health property: Defines the health of SAP Instances. * * @return the health value. */ @@ -216,7 +225,7 @@ interface WithParentResource { * Specifies resourceGroupName, sapVirtualInstanceName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. * @return the next definition stage. */ WithCreate withExistingSapVirtualInstance(String resourceGroupName, String sapVirtualInstanceName); @@ -303,4 +312,45 @@ interface WithTags { * @return the refreshed resource. */ SapApplicationServerInstance refresh(Context context); + + /** + * Starts the SAP Application Server Instance. + * + * @throws com.azure.core.management.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 current status of an async operation. + */ + OperationStatusResult startInstance(); + + /** + * Starts the SAP Application Server Instance. + * + * @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 current status of an async operation. + */ + OperationStatusResult startInstance(Context context); + + /** + * Stops the SAP Application Server Instance. + * + * @throws com.azure.core.management.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 current status of an async operation. + */ + OperationStatusResult stopInstance(); + + /** + * Stops the SAP Application Server Instance. + * + * @param body SAP Application server instance stop request body. + * @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 current status of an async operation. + */ + OperationStatusResult stopInstance(StopRequest body, Context context); } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapApplicationServerInstanceList.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapApplicationServerInstanceList.java index b857f33af17a8..8f4cfdb09011d 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapApplicationServerInstanceList.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapApplicationServerInstanceList.java @@ -9,11 +9,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Defines the collection of SAP Application Server Instances. */ +/** Defines the collection of SAP Application Server Instance resources. */ @Fluent public final class SapApplicationServerInstanceList { /* - * Gets the list of SAP Application Server instances. + * Gets the list of SAP Application Server instance resources. */ @JsonProperty(value = "value") private List value; @@ -24,8 +24,12 @@ public final class SapApplicationServerInstanceList { @JsonProperty(value = "nextLink") private String nextLink; + /** Creates an instance of SapApplicationServerInstanceList class. */ + public SapApplicationServerInstanceList() { + } + /** - * Get the value property: Gets the list of SAP Application Server instances. + * Get the value property: Gets the list of SAP Application Server instance resources. * * @return the value value. */ @@ -34,7 +38,7 @@ public List value() { } /** - * Set the value property: Gets the list of SAP Application Server instances. + * Set the value property: Gets the list of SAP Application Server instance resources. * * @param value the value value to set. * @return the SapApplicationServerInstanceList object itself. diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapApplicationServerInstances.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapApplicationServerInstances.java index 6e44ba72ed88d..567fc3ad79fe0 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapApplicationServerInstances.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapApplicationServerInstances.java @@ -11,41 +11,42 @@ /** Resource collection API of SapApplicationServerInstances. */ public interface SapApplicationServerInstances { /** - * Gets the SAP Application Server Instance. + * Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 SAP Application Server Instance. + * @return the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource + * along with {@link Response}. */ - SapApplicationServerInstance get( - String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName); + Response getWithResponse( + String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName, Context context); /** - * Gets the SAP Application Server Instance. + * Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. - * @param context The context to associate with this operation. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 SAP Application Server Instance along with {@link Response}. + * @return the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. */ - Response getWithResponse( - String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName, Context context); + SapApplicationServerInstance get( + String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName); /** - * Deletes the SAP Application Server Instance. <br><br>This operation will be used by service only. - * Delete by end user will return a Bad Request error. + * Deletes the SAP Application Server Instance resource. <br><br>This operation will be used by service + * only. Delete by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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. @@ -55,12 +56,12 @@ OperationStatusResult delete( String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName); /** - * Deletes the SAP Application Server Instance. <br><br>This operation will be used by service only. - * Delete by end user will return a Bad Request error. + * Deletes the SAP Application Server Instance resource. <br><br>This operation will be used by service + * only. Delete by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param applicationInstanceName The name of SAP Application Server instance. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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. @@ -71,59 +72,124 @@ OperationStatusResult delete( String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName, Context context); /** - * Lists the SAP Application server Instances in an SVI. + * Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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 defines the collection of SAP Application Server Instances as paginated response with {@link + * @return defines the collection of SAP Application Server Instance resources as paginated response with {@link * PagedIterable}. */ PagedIterable list(String resourceGroupName, String sapVirtualInstanceName); /** - * Lists the SAP Application server Instances in an SVI. + * Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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 defines the collection of SAP Application Server Instances as paginated response with {@link + * @return defines the collection of SAP Application Server Instance resources as paginated response with {@link * PagedIterable}. */ PagedIterable list( String resourceGroupName, String sapVirtualInstanceName, Context context); /** - * Gets the SAP Application Server Instance. + * Starts the SAP Application Server Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 current status of an async operation. + */ + OperationStatusResult startInstance( + String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName); + + /** + * Starts the SAP Application Server Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 current status of an async operation. + */ + OperationStatusResult startInstance( + String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName, Context context); + + /** + * Stops the SAP Application Server Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance 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 current status of an async operation. + */ + OperationStatusResult stopInstance( + String resourceGroupName, String sapVirtualInstanceName, String applicationInstanceName); + + /** + * Stops the SAP Application Server Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param applicationInstanceName The name of SAP Application Server instance resource. + * @param body SAP Application server instance stop request body. + * @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 current status of an async operation. + */ + OperationStatusResult stopInstance( + String resourceGroupName, + String sapVirtualInstanceName, + String applicationInstanceName, + StopRequest body, + Context context); + + /** + * Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the SAP Application Server Instance along with {@link Response}. + * @return the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource + * along with {@link Response}. */ SapApplicationServerInstance getById(String id); /** - * Gets the SAP Application Server Instance. + * Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. * * @param id the resource 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 SAP Application Server Instance along with {@link Response}. + * @return the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource + * along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Deletes the SAP Application Server Instance. <br><br>This operation will be used by service only. - * Delete by end user will return a Bad Request error. + * Deletes the SAP Application Server Instance resource. <br><br>This operation will be used by service + * only. Delete by end user will return a Bad Request error. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -134,8 +200,8 @@ PagedIterable list( OperationStatusResult deleteById(String id); /** - * Deletes the SAP Application Server Instance. <br><br>This operation will be used by service only. - * Delete by end user will return a Bad Request error. + * Deletes the SAP Application Server Instance resource. <br><br>This operation will be used by service + * only. Delete by end user will return a Bad Request error. * * @param id the resource ID. * @param context The context to associate with this operation. diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapAvailabilityZoneDetailsRequest.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapAvailabilityZoneDetailsRequest.java index c4a2d78fe5a8a..9ed769550418f 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapAvailabilityZoneDetailsRequest.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapAvailabilityZoneDetailsRequest.java @@ -29,6 +29,10 @@ public final class SapAvailabilityZoneDetailsRequest { @JsonProperty(value = "databaseType", required = true) private SapDatabaseType databaseType; + /** Creates an instance of SapAvailabilityZoneDetailsRequest class. */ + public SapAvailabilityZoneDetailsRequest() { + } + /** * Get the appLocation property: The geo-location where the SAP resources will be created. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapAvailabilityZonePair.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapAvailabilityZonePair.java index 4d27eb2bc81bc..8a0d865ea1c23 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapAvailabilityZonePair.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapAvailabilityZonePair.java @@ -22,6 +22,10 @@ public final class SapAvailabilityZonePair { @JsonProperty(value = "zoneB") private Long zoneB; + /** Creates an instance of SapAvailabilityZonePair class. */ + public SapAvailabilityZonePair() { + } + /** * Get the zoneA property: The zone A. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapCentralInstanceList.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapCentralInstanceList.java index 57743f6f653c6..c24bcecd9b30f 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapCentralInstanceList.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapCentralInstanceList.java @@ -9,11 +9,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Defines the collection of SAP Central Instances. */ +/** Defines the collection of SAP Central Services Instance resources. */ @Fluent public final class SapCentralInstanceList { /* - * Gets the list of SAP central instances. + * Gets the list of SAP central services instance resources. */ @JsonProperty(value = "value") private List value; @@ -24,8 +24,12 @@ public final class SapCentralInstanceList { @JsonProperty(value = "nextLink") private String nextLink; + /** Creates an instance of SapCentralInstanceList class. */ + public SapCentralInstanceList() { + } + /** - * Get the value property: Gets the list of SAP central instances. + * Get the value property: Gets the list of SAP central services instance resources. * * @return the value value. */ @@ -34,7 +38,7 @@ public List value() { } /** - * Set the value property: Gets the list of SAP central instances. + * Set the value property: Gets the list of SAP central services instance resources. * * @param value the value value to set. * @return the SapCentralInstanceList object itself. diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapCentralInstances.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapCentralInstances.java index f0d1dcbb2f143..6f5ec7660b5e0 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapCentralInstances.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapCentralInstances.java @@ -11,43 +11,44 @@ /** Resource collection API of SapCentralInstances. */ public interface SapCentralInstances { /** - * Gets the SAP Central Instance. + * Gets the SAP Central Services Instance resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @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 SAP Central Instance. + * @return the SAP Central Services Instance resource along with {@link Response}. */ - SapCentralServerInstance get(String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName); + Response getWithResponse( + String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName, Context context); /** - * Gets the SAP Central Instance. + * Gets the SAP Central Services Instance resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. - * @param context The context to associate with this operation. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 SAP Central Instance along with {@link Response}. + * @return the SAP Central Services Instance resource. */ - Response getWithResponse( - String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName, Context context); + SapCentralServerInstance get(String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName); /** - * Deletes the SAP Central Instance. <br><br>This will be used by service only. Delete by end user will - * return a Bad Request error. + * Deletes the SAP Central Services Instance resource. <br><br>This will be used by service only. Delete + * operation on this resource by end user will return a Bad Request error. You can delete the parent resource, which + * is the Virtual Instance for SAP solutions resource, using the delete operation on it. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -56,13 +57,14 @@ Response getWithResponse( OperationStatusResult delete(String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName); /** - * Deletes the SAP Central Instance. <br><br>This will be used by service only. Delete by end user will - * return a Bad Request error. + * Deletes the SAP Central Services Instance resource. <br><br>This will be used by service only. Delete + * operation on this resource by end user will return a Bad Request error. You can delete the parent resource, which + * is the Virtual Instance for SAP solutions resource, using the delete operation on it. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to work - * correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. * @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. @@ -73,57 +75,127 @@ OperationStatusResult delete( String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName, Context context); /** - * Lists the SAP Central Instances in an SVI. + * Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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 defines the collection of SAP Central Instances as paginated response with {@link PagedIterable}. + * @return defines the collection of SAP Central Services Instance resources as paginated response with {@link + * PagedIterable}. */ PagedIterable list(String resourceGroupName, String sapVirtualInstanceName); /** - * Lists the SAP Central Instances in an SVI. + * Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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 defines the collection of SAP Central Instances as paginated response with {@link PagedIterable}. + * @return defines the collection of SAP Central Services Instance resources as paginated response with {@link + * PagedIterable}. */ PagedIterable list( String resourceGroupName, String sapVirtualInstanceName, Context context); /** - * Gets the SAP Central Instance. + * Starts the SAP Central Services Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 current status of an async operation. + */ + OperationStatusResult startInstance( + String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName); + + /** + * Starts the SAP Central Services Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @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 current status of an async operation. + */ + OperationStatusResult startInstance( + String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName, Context context); + + /** + * Stops the SAP Central Services Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 current status of an async operation. + */ + OperationStatusResult stopInstance( + String resourceGroupName, String sapVirtualInstanceName, String centralInstanceName); + + /** + * Stops the SAP Central Services Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param centralInstanceName Central Services Instance resource name string modeled as parameter for auto + * generation to work correctly. + * @param body SAP Central Services instance stop request body. + * @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 current status of an async operation. + */ + OperationStatusResult stopInstance( + String resourceGroupName, + String sapVirtualInstanceName, + String centralInstanceName, + StopRequest body, + Context context); + + /** + * Gets the SAP Central Services Instance resource. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the SAP Central Instance along with {@link Response}. + * @return the SAP Central Services Instance resource along with {@link Response}. */ SapCentralServerInstance getById(String id); /** - * Gets the SAP Central Instance. + * Gets the SAP Central Services Instance resource. * * @param id the resource 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 SAP Central Instance along with {@link Response}. + * @return the SAP Central Services Instance resource along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Deletes the SAP Central Instance. <br><br>This will be used by service only. Delete by end user will - * return a Bad Request error. + * Deletes the SAP Central Services Instance resource. <br><br>This will be used by service only. Delete + * operation on this resource by end user will return a Bad Request error. You can delete the parent resource, which + * is the Virtual Instance for SAP solutions resource, using the delete operation on it. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -134,8 +206,9 @@ PagedIterable list( OperationStatusResult deleteById(String id); /** - * Deletes the SAP Central Instance. <br><br>This will be used by service only. Delete by end user will - * return a Bad Request error. + * Deletes the SAP Central Services Instance resource. <br><br>This will be used by service only. Delete + * operation on this resource by end user will return a Bad Request error. You can delete the parent resource, which + * is the Virtual Instance for SAP solutions resource, using the delete operation on it. * * @param id the resource ID. * @param context The context to associate with this operation. diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapCentralServerInstance.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapCentralServerInstance.java index dbc4d014ee622..21953bc460bef 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapCentralServerInstance.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapCentralServerInstance.java @@ -56,28 +56,28 @@ public interface SapCentralServerInstance { SystemData systemData(); /** - * Gets the instanceNo property: The central server instance id. + * Gets the instanceNo property: The central services instance number. * * @return the instanceNo value. */ String instanceNo(); /** - * Gets the subnet property: The central server subnet. + * Gets the subnet property: The central services instance subnet. * * @return the subnet value. */ String subnet(); /** - * Gets the messageServerProperties property: Defines the SAP message server properties. + * Gets the messageServerProperties property: Defines the SAP Message Server properties. * * @return the messageServerProperties value. */ MessageServerProperties messageServerProperties(); /** - * Gets the enqueueServerProperties property: Defines the SAP enqueue server properties. + * Gets the enqueueServerProperties property: Defines the SAP Enqueue Server properties. * * @return the enqueueServerProperties value. */ @@ -91,28 +91,37 @@ public interface SapCentralServerInstance { GatewayServerProperties gatewayServerProperties(); /** - * Gets the enqueueReplicationServerProperties property: Defines the SAP ERS Server properties. + * Gets the enqueueReplicationServerProperties property: Defines the SAP Enqueue Replication Server (ERS) + * properties. * * @return the enqueueReplicationServerProperties value. */ EnqueueReplicationServerProperties enqueueReplicationServerProperties(); /** - * Gets the kernelVersion property: The central server kernel version. + * Gets the kernelVersion property: The central services instance Kernel Version. * * @return the kernelVersion value. */ String kernelVersion(); /** - * Gets the kernelPatch property: The central server kernel patch. + * Gets the kernelPatch property: The central services instance Kernel Patch level. * * @return the kernelPatch value. */ String kernelPatch(); /** - * Gets the vmDetails property: The list of virtual machines. + * Gets the loadBalancerDetails property: The Load Balancer details such as LoadBalancer ID attached to ASCS Virtual + * Machines. + * + * @return the loadBalancerDetails value. + */ + LoadBalancerDetails loadBalancerDetails(); + + /** + * Gets the vmDetails property: The list of virtual machines corresponding to the Central Services instance. * * @return the vmDetails value. */ @@ -126,7 +135,7 @@ public interface SapCentralServerInstance { SapVirtualInstanceStatus status(); /** - * Gets the health property: Defines the SAP Instance health. + * Gets the health property: Defines the health of SAP Instances. * * @return the health value. */ @@ -140,7 +149,7 @@ public interface SapCentralServerInstance { SapVirtualInstanceProvisioningState provisioningState(); /** - * Gets the errors property: Defines the Central Instance errors. + * Gets the errors property: Defines the errors related to SAP Central Services Instance resource. * * @return the errors value. */ @@ -210,7 +219,7 @@ interface WithParentResource { * Specifies resourceGroupName, sapVirtualInstanceName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. * @return the next definition stage. */ WithCreate withExistingSapVirtualInstance(String resourceGroupName, String sapVirtualInstanceName); @@ -253,9 +262,9 @@ interface WithTags { /** The stage of the SapCentralServerInstance definition allowing to specify messageServerProperties. */ interface WithMessageServerProperties { /** - * Specifies the messageServerProperties property: Defines the SAP message server properties.. + * Specifies the messageServerProperties property: Defines the SAP Message Server properties.. * - * @param messageServerProperties Defines the SAP message server properties. + * @param messageServerProperties Defines the SAP Message Server properties. * @return the next definition stage. */ WithCreate withMessageServerProperties(MessageServerProperties messageServerProperties); @@ -263,9 +272,9 @@ interface WithMessageServerProperties { /** The stage of the SapCentralServerInstance definition allowing to specify enqueueServerProperties. */ interface WithEnqueueServerProperties { /** - * Specifies the enqueueServerProperties property: Defines the SAP enqueue server properties.. + * Specifies the enqueueServerProperties property: Defines the SAP Enqueue Server properties.. * - * @param enqueueServerProperties Defines the SAP enqueue server properties. + * @param enqueueServerProperties Defines the SAP Enqueue Server properties. * @return the next definition stage. */ WithCreate withEnqueueServerProperties(EnqueueServerProperties enqueueServerProperties); @@ -285,9 +294,10 @@ interface WithGatewayServerProperties { */ interface WithEnqueueReplicationServerProperties { /** - * Specifies the enqueueReplicationServerProperties property: Defines the SAP ERS Server properties.. + * Specifies the enqueueReplicationServerProperties property: Defines the SAP Enqueue Replication Server + * (ERS) properties.. * - * @param enqueueReplicationServerProperties Defines the SAP ERS Server properties. + * @param enqueueReplicationServerProperties Defines the SAP Enqueue Replication Server (ERS) properties. * @return the next definition stage. */ WithCreate withEnqueueReplicationServerProperties( @@ -345,4 +355,45 @@ interface WithTags { * @return the refreshed resource. */ SapCentralServerInstance refresh(Context context); + + /** + * Starts the SAP Central Services Instance. + * + * @throws com.azure.core.management.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 current status of an async operation. + */ + OperationStatusResult startInstance(); + + /** + * Starts the SAP Central Services Instance. + * + * @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 current status of an async operation. + */ + OperationStatusResult startInstance(Context context); + + /** + * Stops the SAP Central Services Instance. + * + * @throws com.azure.core.management.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 current status of an async operation. + */ + OperationStatusResult stopInstance(); + + /** + * Stops the SAP Central Services Instance. + * + * @param body SAP Central Services instance stop request body. + * @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 current status of an async operation. + */ + OperationStatusResult stopInstance(StopRequest body, Context context); } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapConfiguration.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapConfiguration.java index 377f61b709dd1..ad5977b7ef1b5 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapConfiguration.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapConfiguration.java @@ -23,6 +23,10 @@ }) @Immutable public class SapConfiguration { + /** Creates an instance of SapConfiguration class. */ + public SapConfiguration() { + } + /** * Validates the instance. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapConfigurationType.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapConfigurationType.java index 967e9d40f0b52..ebaa1e77fd87a 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapConfigurationType.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapConfigurationType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for SapConfigurationType. */ +/** The configuration Type. */ public final class SapConfigurationType extends ExpandableStringEnum { /** Static value Deployment for SapConfigurationType. */ public static final SapConfigurationType DEPLOYMENT = fromString("Deployment"); @@ -19,6 +19,15 @@ public final class SapConfigurationType extends ExpandableStringEnum getWithResponse( + String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName, Context context); /** - * Gets the SAP Database Instance. + * Gets the SAP Database Instance resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. - * @param context The context to associate with this operation. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 SAP Database Instance along with {@link Response}. + * @return the SAP Database Instance resource. */ - Response getWithResponse( - String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName, Context context); + SapDatabaseInstance get(String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName); /** - * Deletes the SAP Database Instance. <br><br>This will be used by service only. Delete by end user will - * return a Bad Request error. + * Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource. + * <br><br>This will be used by service only. Delete by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -53,12 +56,13 @@ Response getWithResponse( OperationStatusResult delete(String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName); /** - * Deletes the SAP Database Instance. <br><br>This will be used by service only. Delete by end user will - * return a Bad Request error. + * Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource. + * <br><br>This will be used by service only. Delete by end user will return a Bad Request error. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to work correctly. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. * @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. @@ -69,10 +73,10 @@ OperationStatusResult delete( String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName, Context context); /** - * Lists the SAP Database Instances in an SVI. + * Lists the Database resources associated with a Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -81,10 +85,10 @@ OperationStatusResult delete( PagedIterable list(String resourceGroupName, String sapVirtualInstanceName); /** - * Lists the SAP Database Instances in an SVI. + * Lists the Database resources associated with a Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -94,31 +98,98 @@ OperationStatusResult delete( PagedIterable list(String resourceGroupName, String sapVirtualInstanceName, Context context); /** - * Gets the SAP Database Instance. + * Starts the database instance of the SAP system. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 current status of an async operation. + */ + OperationStatusResult startInstance( + String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName); + + /** + * Starts the database instance of the SAP system. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @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 current status of an async operation. + */ + OperationStatusResult startInstance( + String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName, Context context); + + /** + * Stops the database instance of the SAP system. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 current status of an async operation. + */ + OperationStatusResult stopInstance( + String resourceGroupName, String sapVirtualInstanceName, String databaseInstanceName); + + /** + * Stops the database instance of the SAP system. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param databaseInstanceName Database resource name string modeled as parameter for auto generation to work + * correctly. + * @param body Stop request for the database instance of the SAP system. + * @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 current status of an async operation. + */ + OperationStatusResult stopInstance( + String resourceGroupName, + String sapVirtualInstanceName, + String databaseInstanceName, + StopRequest body, + Context context); + + /** + * Gets the SAP Database Instance resource. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the SAP Database Instance along with {@link Response}. + * @return the SAP Database Instance resource along with {@link Response}. */ SapDatabaseInstance getById(String id); /** - * Gets the SAP Database Instance. + * Gets the SAP Database Instance resource. * * @param id the resource 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 SAP Database Instance along with {@link Response}. + * @return the SAP Database Instance resource along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Deletes the SAP Database Instance. <br><br>This will be used by service only. Delete by end user will - * return a Bad Request error. + * Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource. + * <br><br>This will be used by service only. Delete by end user will return a Bad Request error. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -129,8 +200,8 @@ OperationStatusResult delete( OperationStatusResult deleteById(String id); /** - * Deletes the SAP Database Instance. <br><br>This will be used by service only. Delete by end user will - * return a Bad Request error. + * Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource. + * <br><br>This will be used by service only. Delete by end user will return a Bad Request error. * * @param id the resource ID. * @param context The context to associate with this operation. diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapDatabaseScaleMethod.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapDatabaseScaleMethod.java index e35917e2b9f0c..10f6e507480b1 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapDatabaseScaleMethod.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapDatabaseScaleMethod.java @@ -8,11 +8,20 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for SapDatabaseScaleMethod. */ +/** The database scale method. */ public final class SapDatabaseScaleMethod extends ExpandableStringEnum { /** Static value ScaleUp for SapDatabaseScaleMethod. */ public static final SapDatabaseScaleMethod SCALE_UP = fromString("ScaleUp"); + /** + * Creates a new instance of SapDatabaseScaleMethod value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SapDatabaseScaleMethod() { + } + /** * Creates or finds a SapDatabaseScaleMethod from its string representation. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapDatabaseType.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapDatabaseType.java index ef178426ffde3..308fddb44a260 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapDatabaseType.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapDatabaseType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for SapDatabaseType. */ +/** Defines the supported SAP Database types. */ public final class SapDatabaseType extends ExpandableStringEnum { /** Static value HANA for SapDatabaseType. */ public static final SapDatabaseType HANA = fromString("HANA"); @@ -16,6 +16,15 @@ public final class SapDatabaseType extends ExpandableStringEnum /** Static value DB2 for SapDatabaseType. */ public static final SapDatabaseType DB2 = fromString("DB2"); + /** + * Creates a new instance of SapDatabaseType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SapDatabaseType() { + } + /** * Creates or finds a SapDatabaseType from its string representation. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapDeploymentType.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapDeploymentType.java index d9810c7f263a1..5cdd76535b014 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapDeploymentType.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapDeploymentType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for SapDeploymentType. */ +/** The type of SAP deployment, single server or Three tier. */ public final class SapDeploymentType extends ExpandableStringEnum { /** Static value SingleServer for SapDeploymentType. */ public static final SapDeploymentType SINGLE_SERVER = fromString("SingleServer"); @@ -16,6 +16,15 @@ public final class SapDeploymentType extends ExpandableStringEnum supportedConfigurations; - /* - * The disk count. - */ - @JsonProperty(value = "diskCount") - private Long diskCount; - - /* - * The disk size in GB. - */ - @JsonProperty(value = "diskSizeGB") - private Long diskSizeGB; - - /* - * The disk Iops. - */ - @JsonProperty(value = "diskIopsReadWrite") - private Long diskIopsReadWrite; - - /* - * The disk provisioned throughput in MBps. - */ - @JsonProperty(value = "diskMBpsReadWrite") - private Long diskMBpsReadWrite; - - /* - * The disk storage type - */ - @JsonProperty(value = "diskStorageType") - private String diskStorageType; - - /** - * Get the volume property: The volume name. - * - * @return the volume value. - */ - public String volume() { - return this.volume; - } - - /** - * Set the volume property: The volume name. - * - * @param volume the volume value to set. - * @return the SapDiskConfiguration object itself. - */ - public SapDiskConfiguration withVolume(String volume) { - this.volume = volume; - return this; - } - - /** - * Get the diskType property: The disk type. - * - * @return the diskType value. - */ - public String diskType() { - return this.diskType; - } - - /** - * Set the diskType property: The disk type. - * - * @param diskType the diskType value to set. - * @return the SapDiskConfiguration object itself. - */ - public SapDiskConfiguration withDiskType(String diskType) { - this.diskType = diskType; - return this; - } - - /** - * Get the diskCount property: The disk count. - * - * @return the diskCount value. - */ - public Long diskCount() { - return this.diskCount; - } - - /** - * Set the diskCount property: The disk count. - * - * @param diskCount the diskCount value to set. - * @return the SapDiskConfiguration object itself. - */ - public SapDiskConfiguration withDiskCount(Long diskCount) { - this.diskCount = diskCount; - return this; - } - - /** - * Get the diskSizeGB property: The disk size in GB. - * - * @return the diskSizeGB value. - */ - public Long diskSizeGB() { - return this.diskSizeGB; - } - - /** - * Set the diskSizeGB property: The disk size in GB. - * - * @param diskSizeGB the diskSizeGB value to set. - * @return the SapDiskConfiguration object itself. - */ - public SapDiskConfiguration withDiskSizeGB(Long diskSizeGB) { - this.diskSizeGB = diskSizeGB; - return this; - } - - /** - * Get the diskIopsReadWrite property: The disk Iops. - * - * @return the diskIopsReadWrite value. - */ - public Long diskIopsReadWrite() { - return this.diskIopsReadWrite; - } - - /** - * Set the diskIopsReadWrite property: The disk Iops. - * - * @param diskIopsReadWrite the diskIopsReadWrite value to set. - * @return the SapDiskConfiguration object itself. - */ - public SapDiskConfiguration withDiskIopsReadWrite(Long diskIopsReadWrite) { - this.diskIopsReadWrite = diskIopsReadWrite; - return this; + /** Creates an instance of SapDiskConfiguration class. */ + public SapDiskConfiguration() { } /** - * Get the diskMBpsReadWrite property: The disk provisioned throughput in MBps. + * Get the recommendedConfiguration property: The recommended disk details for a given VM Sku. * - * @return the diskMBpsReadWrite value. + * @return the recommendedConfiguration value. */ - public Long diskMBpsReadWrite() { - return this.diskMBpsReadWrite; + public DiskVolumeConfiguration recommendedConfiguration() { + return this.recommendedConfiguration; } /** - * Set the diskMBpsReadWrite property: The disk provisioned throughput in MBps. + * Set the recommendedConfiguration property: The recommended disk details for a given VM Sku. * - * @param diskMBpsReadWrite the diskMBpsReadWrite value to set. + * @param recommendedConfiguration the recommendedConfiguration value to set. * @return the SapDiskConfiguration object itself. */ - public SapDiskConfiguration withDiskMBpsReadWrite(Long diskMBpsReadWrite) { - this.diskMBpsReadWrite = diskMBpsReadWrite; + public SapDiskConfiguration withRecommendedConfiguration(DiskVolumeConfiguration recommendedConfiguration) { + this.recommendedConfiguration = recommendedConfiguration; return this; } /** - * Get the diskStorageType property: The disk storage type. + * Get the supportedConfigurations property: The list of supported disks for a given VM Sku. * - * @return the diskStorageType value. + * @return the supportedConfigurations value. */ - public String diskStorageType() { - return this.diskStorageType; + public List supportedConfigurations() { + return this.supportedConfigurations; } /** - * Set the diskStorageType property: The disk storage type. + * Set the supportedConfigurations property: The list of supported disks for a given VM Sku. * - * @param diskStorageType the diskStorageType value to set. + * @param supportedConfigurations the supportedConfigurations value to set. * @return the SapDiskConfiguration object itself. */ - public SapDiskConfiguration withDiskStorageType(String diskStorageType) { - this.diskStorageType = diskStorageType; + public SapDiskConfiguration withSupportedConfigurations(List supportedConfigurations) { + this.supportedConfigurations = supportedConfigurations; return this; } @@ -198,5 +75,11 @@ public SapDiskConfiguration withDiskStorageType(String diskStorageType) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (recommendedConfiguration() != null) { + recommendedConfiguration().validate(); + } + if (supportedConfigurations() != null) { + supportedConfigurations().forEach(e -> e.validate()); + } } } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapDiskConfigurationsRequest.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapDiskConfigurationsRequest.java index 9a52cc38e0c1b..537b7236b39da 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapDiskConfigurationsRequest.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapDiskConfigurationsRequest.java @@ -47,6 +47,10 @@ public final class SapDiskConfigurationsRequest { @JsonProperty(value = "dbVmSku", required = true) private String dbVmSku; + /** Creates an instance of SapDiskConfigurationsRequest class. */ + public SapDiskConfigurationsRequest() { + } + /** * Get the appLocation property: The geo-location where the SAP resources will be created. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapDiskConfigurationsResult.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapDiskConfigurationsResult.java index ea36058393fd6..3f115f77a0af6 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapDiskConfigurationsResult.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapDiskConfigurationsResult.java @@ -5,16 +5,17 @@ package com.azure.resourcemanager.workloads.models; import com.azure.resourcemanager.workloads.fluent.models.SapDiskConfigurationsResultInner; -import java.util.List; +import java.util.Map; /** An immutable client-side representation of SapDiskConfigurationsResult. */ public interface SapDiskConfigurationsResult { /** - * Gets the diskConfigurations property: Gets the list of Disk Configurations. + * Gets the volumeConfigurations property: The disk configuration for the db volume. For HANA, Required volumes are: + * ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os'], Optional volume : ['backup']. * - * @return the diskConfigurations value. + * @return the volumeConfigurations value. */ - List diskConfigurations(); + Map volumeConfigurations(); /** * Gets the inner com.azure.resourcemanager.workloads.fluent.models.SapDiskConfigurationsResultInner object. diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapEnvironmentType.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapEnvironmentType.java index 713ad14d6756b..931424be0520f 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapEnvironmentType.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapEnvironmentType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for SapEnvironmentType. */ +/** Defines the environment type - Production/Non Production. */ public final class SapEnvironmentType extends ExpandableStringEnum { /** Static value NonProd for SapEnvironmentType. */ public static final SapEnvironmentType NON_PROD = fromString("NonProd"); @@ -16,6 +16,15 @@ public final class SapEnvironmentType extends ExpandableStringEnum { /** Static value Unknown for SapHealthState. */ public static final SapHealthState UNKNOWN = fromString("Unknown"); @@ -22,6 +22,15 @@ public final class SapHealthState extends ExpandableStringEnum { /** Static value Degraded for SapHealthState. */ public static final SapHealthState DEGRADED = fromString("Degraded"); + /** + * Creates a new instance of SapHealthState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SapHealthState() { + } + /** * Creates or finds a SapHealthState from its string representation. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapHighAvailabilityType.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapHighAvailabilityType.java index da4c7760d7c80..a66a336798fde 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapHighAvailabilityType.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapHighAvailabilityType.java @@ -8,7 +8,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for SapHighAvailabilityType. */ +/** + * The high availability Type. AvailabilitySet guarantees 99.95% availability. Availability Zone guarantees 99.99% + * availability. + */ public final class SapHighAvailabilityType extends ExpandableStringEnum { /** Static value AvailabilitySet for SapHighAvailabilityType. */ public static final SapHighAvailabilityType AVAILABILITY_SET = fromString("AvailabilitySet"); @@ -16,6 +19,15 @@ public final class SapHighAvailabilityType extends ExpandableStringEnum topMetricsThresholds(); + + /** + * Gets the inner com.azure.resourcemanager.workloads.fluent.models.SapLandscapeMonitorInner object. + * + * @return the inner object. + */ + SapLandscapeMonitorInner innerModel(); +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapLandscapeMonitorListResult.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapLandscapeMonitorListResult.java new file mode 100644 index 0000000000000..5d518ac98a4f0 --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapLandscapeMonitorListResult.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.models; + +import com.azure.resourcemanager.workloads.fluent.models.SapLandscapeMonitorListResultInner; +import java.util.List; + +/** An immutable client-side representation of SapLandscapeMonitorListResult. */ +public interface SapLandscapeMonitorListResult { + /** + * Gets the value property: The list of Sap Landscape Monitor configuration. + * + * @return the value value. + */ + List value(); + + /** + * Gets the nextLink property: The URL to get the next set of SAP Landscape Monitor Dashboard. + * + * @return the nextLink value. + */ + String nextLink(); + + /** + * Gets the inner com.azure.resourcemanager.workloads.fluent.models.SapLandscapeMonitorListResultInner object. + * + * @return the inner object. + */ + SapLandscapeMonitorListResultInner innerModel(); +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapLandscapeMonitorMetricThresholds.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapLandscapeMonitorMetricThresholds.java new file mode 100644 index 0000000000000..1f33f2263563e --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapLandscapeMonitorMetricThresholds.java @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Gets or sets the Threshold Values for Top Metrics Health. */ +@Fluent +public final class SapLandscapeMonitorMetricThresholds { + /* + * Gets or sets the name of the threshold. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Gets or sets the threshold value for Green. + */ + @JsonProperty(value = "green") + private Float green; + + /* + * Gets or sets the threshold value for Yellow. + */ + @JsonProperty(value = "yellow") + private Float yellow; + + /* + * Gets or sets the threshold value for Red. + */ + @JsonProperty(value = "red") + private Float red; + + /** Creates an instance of SapLandscapeMonitorMetricThresholds class. */ + public SapLandscapeMonitorMetricThresholds() { + } + + /** + * Get the name property: Gets or sets the name of the threshold. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Gets or sets the name of the threshold. + * + * @param name the name value to set. + * @return the SapLandscapeMonitorMetricThresholds object itself. + */ + public SapLandscapeMonitorMetricThresholds withName(String name) { + this.name = name; + return this; + } + + /** + * Get the green property: Gets or sets the threshold value for Green. + * + * @return the green value. + */ + public Float green() { + return this.green; + } + + /** + * Set the green property: Gets or sets the threshold value for Green. + * + * @param green the green value to set. + * @return the SapLandscapeMonitorMetricThresholds object itself. + */ + public SapLandscapeMonitorMetricThresholds withGreen(Float green) { + this.green = green; + return this; + } + + /** + * Get the yellow property: Gets or sets the threshold value for Yellow. + * + * @return the yellow value. + */ + public Float yellow() { + return this.yellow; + } + + /** + * Set the yellow property: Gets or sets the threshold value for Yellow. + * + * @param yellow the yellow value to set. + * @return the SapLandscapeMonitorMetricThresholds object itself. + */ + public SapLandscapeMonitorMetricThresholds withYellow(Float yellow) { + this.yellow = yellow; + return this; + } + + /** + * Get the red property: Gets or sets the threshold value for Red. + * + * @return the red value. + */ + public Float red() { + return this.red; + } + + /** + * Set the red property: Gets or sets the threshold value for Red. + * + * @param red the red value to set. + * @return the SapLandscapeMonitorMetricThresholds object itself. + */ + public SapLandscapeMonitorMetricThresholds withRed(Float red) { + this.red = red; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapLandscapeMonitorPropertiesGrouping.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapLandscapeMonitorPropertiesGrouping.java new file mode 100644 index 0000000000000..5874142cbbe7a --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapLandscapeMonitorPropertiesGrouping.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Gets or sets the SID groupings by landscape and Environment. */ +@Fluent +public final class SapLandscapeMonitorPropertiesGrouping { + /* + * Gets or sets the list of landscape to SID mappings. + */ + @JsonProperty(value = "landscape") + private List landscape; + + /* + * Gets or sets the list of Sap Applications to SID mappings. + */ + @JsonProperty(value = "sapApplication") + private List sapApplication; + + /** Creates an instance of SapLandscapeMonitorPropertiesGrouping class. */ + public SapLandscapeMonitorPropertiesGrouping() { + } + + /** + * Get the landscape property: Gets or sets the list of landscape to SID mappings. + * + * @return the landscape value. + */ + public List landscape() { + return this.landscape; + } + + /** + * Set the landscape property: Gets or sets the list of landscape to SID mappings. + * + * @param landscape the landscape value to set. + * @return the SapLandscapeMonitorPropertiesGrouping object itself. + */ + public SapLandscapeMonitorPropertiesGrouping withLandscape(List landscape) { + this.landscape = landscape; + return this; + } + + /** + * Get the sapApplication property: Gets or sets the list of Sap Applications to SID mappings. + * + * @return the sapApplication value. + */ + public List sapApplication() { + return this.sapApplication; + } + + /** + * Set the sapApplication property: Gets or sets the list of Sap Applications to SID mappings. + * + * @param sapApplication the sapApplication value to set. + * @return the SapLandscapeMonitorPropertiesGrouping object itself. + */ + public SapLandscapeMonitorPropertiesGrouping withSapApplication( + List sapApplication) { + this.sapApplication = sapApplication; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (landscape() != null) { + landscape().forEach(e -> e.validate()); + } + if (sapApplication() != null) { + sapApplication().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapLandscapeMonitorProvisioningState.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapLandscapeMonitorProvisioningState.java new file mode 100644 index 0000000000000..194c23e6e2f43 --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapLandscapeMonitorProvisioningState.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** State of provisioning of the SAP monitor. */ +public final class SapLandscapeMonitorProvisioningState + extends ExpandableStringEnum { + /** Static value Accepted for SapLandscapeMonitorProvisioningState. */ + public static final SapLandscapeMonitorProvisioningState ACCEPTED = fromString("Accepted"); + + /** Static value Created for SapLandscapeMonitorProvisioningState. */ + public static final SapLandscapeMonitorProvisioningState CREATED = fromString("Created"); + + /** Static value Failed for SapLandscapeMonitorProvisioningState. */ + public static final SapLandscapeMonitorProvisioningState FAILED = fromString("Failed"); + + /** Static value Succeeded for SapLandscapeMonitorProvisioningState. */ + public static final SapLandscapeMonitorProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Canceled for SapLandscapeMonitorProvisioningState. */ + public static final SapLandscapeMonitorProvisioningState CANCELED = fromString("Canceled"); + + /** + * Creates a new instance of SapLandscapeMonitorProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SapLandscapeMonitorProvisioningState() { + } + + /** + * Creates or finds a SapLandscapeMonitorProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding SapLandscapeMonitorProvisioningState. + */ + @JsonCreator + public static SapLandscapeMonitorProvisioningState fromString(String name) { + return fromString(name, SapLandscapeMonitorProvisioningState.class); + } + + /** + * Gets known SapLandscapeMonitorProvisioningState values. + * + * @return known SapLandscapeMonitorProvisioningState values. + */ + public static Collection values() { + return values(SapLandscapeMonitorProvisioningState.class); + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapLandscapeMonitorSidMapping.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapLandscapeMonitorSidMapping.java new file mode 100644 index 0000000000000..a8fad7b330ba2 --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapLandscapeMonitorSidMapping.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Gets or sets the mapping for SID to Environment/Applications. */ +@Fluent +public final class SapLandscapeMonitorSidMapping { + /* + * Gets or sets the name of the grouping. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Gets or sets the list of SID's. + */ + @JsonProperty(value = "topSid") + private List topSid; + + /** Creates an instance of SapLandscapeMonitorSidMapping class. */ + public SapLandscapeMonitorSidMapping() { + } + + /** + * Get the name property: Gets or sets the name of the grouping. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Gets or sets the name of the grouping. + * + * @param name the name value to set. + * @return the SapLandscapeMonitorSidMapping object itself. + */ + public SapLandscapeMonitorSidMapping withName(String name) { + this.name = name; + return this; + } + + /** + * Get the topSid property: Gets or sets the list of SID's. + * + * @return the topSid value. + */ + public List topSid() { + return this.topSid; + } + + /** + * Set the topSid property: Gets or sets the list of SID's. + * + * @param topSid the topSid value to set. + * @return the SapLandscapeMonitorSidMapping object itself. + */ + public SapLandscapeMonitorSidMapping withTopSid(List topSid) { + this.topSid = topSid; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapLandscapeMonitors.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapLandscapeMonitors.java new file mode 100644 index 0000000000000..ce36bb440ba72 --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapLandscapeMonitors.java @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.workloads.fluent.models.SapLandscapeMonitorInner; + +/** Resource collection API of SapLandscapeMonitors. */ +public interface SapLandscapeMonitors { + /** + * Gets configuration values for Single Pane Of Glass for SAP monitor. + * + *

Gets configuration values for Single Pane Of Glass for SAP monitor for the specified subscription, resource + * group, and resource name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor 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 configuration values for Single Pane Of Glass for SAP monitor for the specified subscription, resource + * group, and resource name along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String monitorName, Context context); + + /** + * Gets configuration values for Single Pane Of Glass for SAP monitor. + * + *

Gets configuration values for Single Pane Of Glass for SAP monitor for the specified subscription, resource + * group, and resource name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor 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 configuration values for Single Pane Of Glass for SAP monitor for the specified subscription, resource + * group, and resource name. + */ + SapLandscapeMonitor get(String resourceGroupName, String monitorName); + + /** + * Creates a SAP Landscape Monitor Dashboard. + * + *

Creates a SAP Landscape Monitor Dashboard for the specified subscription, resource group, and resource name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor resource. + * @param sapLandscapeMonitorParameter Request body representing a configuration for Sap Landscape Monitor + * Dashboard. + * @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 configuration associated with SAP Landscape Monitor Dashboard along with {@link Response}. + */ + Response createWithResponse( + String resourceGroupName, + String monitorName, + SapLandscapeMonitorInner sapLandscapeMonitorParameter, + Context context); + + /** + * Creates a SAP Landscape Monitor Dashboard. + * + *

Creates a SAP Landscape Monitor Dashboard for the specified subscription, resource group, and resource name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor resource. + * @param sapLandscapeMonitorParameter Request body representing a configuration for Sap Landscape Monitor + * Dashboard. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 configuration associated with SAP Landscape Monitor Dashboard. + */ + SapLandscapeMonitor create( + String resourceGroupName, String monitorName, SapLandscapeMonitorInner sapLandscapeMonitorParameter); + + /** + * Deletes a SAP Landscape Monitor Dashboard. + * + *

Deletes a SAP Landscape Monitor Dashboard with the specified subscription, resource group, and SAP monitor + * name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor 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 Response}. + */ + Response deleteByResourceGroupWithResponse(String resourceGroupName, String monitorName, Context context); + + /** + * Deletes a SAP Landscape Monitor Dashboard. + * + *

Deletes a SAP Landscape Monitor Dashboard with the specified subscription, resource group, and SAP monitor + * name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor 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 monitorName); + + /** + * Patches the SAP Landscape Monitor Dashboard. + * + *

Patches the SAP Landscape Monitor Dashboard for the specified subscription, resource group, and SAP monitor + * name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor resource. + * @param sapLandscapeMonitorParameter Request body representing a configuration for Sap Landscape Monitor + * Dashboard. + * @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 configuration associated with SAP Landscape Monitor Dashboard along with {@link Response}. + */ + Response updateWithResponse( + String resourceGroupName, + String monitorName, + SapLandscapeMonitorInner sapLandscapeMonitorParameter, + Context context); + + /** + * Patches the SAP Landscape Monitor Dashboard. + * + *

Patches the SAP Landscape Monitor Dashboard for the specified subscription, resource group, and SAP monitor + * name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor resource. + * @param sapLandscapeMonitorParameter Request body representing a configuration for Sap Landscape Monitor + * Dashboard. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 configuration associated with SAP Landscape Monitor Dashboard. + */ + SapLandscapeMonitor update( + String resourceGroupName, String monitorName, SapLandscapeMonitorInner sapLandscapeMonitorParameter); + + /** + * Gets configuration values for Single Pane Of Glass for SAP monitor. + * + *

Gets configuration values for Single Pane Of Glass for SAP monitor for the specified subscription, resource + * group, and resource name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor 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 configuration values for Single Pane Of Glass for SAP monitor for the specified subscription, resource + * group, and resource name along with {@link Response}. + */ + Response listWithResponse( + String resourceGroupName, String monitorName, Context context); + + /** + * Gets configuration values for Single Pane Of Glass for SAP monitor. + * + *

Gets configuration values for Single Pane Of Glass for SAP monitor for the specified subscription, resource + * group, and resource name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor 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 configuration values for Single Pane Of Glass for SAP monitor for the specified subscription, resource + * group, and resource name. + */ + SapLandscapeMonitorListResult list(String resourceGroupName, String monitorName); +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapNetWeaverProviderInstanceProperties.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapNetWeaverProviderInstanceProperties.java index 232af284167e1..e5e7117c0d29c 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapNetWeaverProviderInstanceProperties.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapNetWeaverProviderInstanceProperties.java @@ -72,8 +72,18 @@ public final class SapNetWeaverProviderInstanceProperties extends ProviderSpecif /* * Gets or sets the blob URI to SSL certificate for the SAP system. */ - @JsonProperty(value = "sapSslCertificateUri") - private String sapSslCertificateUri; + @JsonProperty(value = "sslCertificateUri") + private String sslCertificateUri; + + /* + * Gets or sets certificate preference if secure communication is enabled. + */ + @JsonProperty(value = "sslPreference") + private SslPreference sslPreference; + + /** Creates an instance of SapNetWeaverProviderInstanceProperties class. */ + public SapNetWeaverProviderInstanceProperties() { + } /** * Get the sapSid property: Gets or sets the SAP System Identifier. @@ -256,22 +266,42 @@ public SapNetWeaverProviderInstanceProperties withSapPortNumber(String sapPortNu } /** - * Get the sapSslCertificateUri property: Gets or sets the blob URI to SSL certificate for the SAP system. + * Get the sslCertificateUri property: Gets or sets the blob URI to SSL certificate for the SAP system. + * + * @return the sslCertificateUri value. + */ + public String sslCertificateUri() { + return this.sslCertificateUri; + } + + /** + * Set the sslCertificateUri property: Gets or sets the blob URI to SSL certificate for the SAP system. + * + * @param sslCertificateUri the sslCertificateUri value to set. + * @return the SapNetWeaverProviderInstanceProperties object itself. + */ + public SapNetWeaverProviderInstanceProperties withSslCertificateUri(String sslCertificateUri) { + this.sslCertificateUri = sslCertificateUri; + return this; + } + + /** + * Get the sslPreference property: Gets or sets certificate preference if secure communication is enabled. * - * @return the sapSslCertificateUri value. + * @return the sslPreference value. */ - public String sapSslCertificateUri() { - return this.sapSslCertificateUri; + public SslPreference sslPreference() { + return this.sslPreference; } /** - * Set the sapSslCertificateUri property: Gets or sets the blob URI to SSL certificate for the SAP system. + * Set the sslPreference property: Gets or sets certificate preference if secure communication is enabled. * - * @param sapSslCertificateUri the sapSslCertificateUri value to set. + * @param sslPreference the sslPreference value to set. * @return the SapNetWeaverProviderInstanceProperties object itself. */ - public SapNetWeaverProviderInstanceProperties withSapSslCertificateUri(String sapSslCertificateUri) { - this.sapSslCertificateUri = sapSslCertificateUri; + public SapNetWeaverProviderInstanceProperties withSslPreference(SslPreference sslPreference) { + this.sslPreference = sslPreference; return this; } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapProductType.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapProductType.java index bffb68a16de29..09f253c132954 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapProductType.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapProductType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for SapProductType. */ +/** Defines the SAP Product type. */ public final class SapProductType extends ExpandableStringEnum { /** Static value ECC for SapProductType. */ public static final SapProductType ECC = fromString("ECC"); @@ -19,6 +19,15 @@ public final class SapProductType extends ExpandableStringEnum { /** Static value Other for SapProductType. */ public static final SapProductType OTHER = fromString("Other"); + /** + * Creates a new instance of SapProductType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SapProductType() { + } + /** * Creates or finds a SapProductType from its string representation. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapSizingRecommendationRequest.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapSizingRecommendationRequest.java index 0398398a97c42..ee5d846de3d8a 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapSizingRecommendationRequest.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapSizingRecommendationRequest.java @@ -65,6 +65,10 @@ public final class SapSizingRecommendationRequest { @JsonProperty(value = "highAvailabilityType") private SapHighAvailabilityType highAvailabilityType; + /** Creates an instance of SapSizingRecommendationRequest class. */ + public SapSizingRecommendationRequest() { + } + /** * Get the appLocation property: The geo-location where the resource is to be created. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapSoftwareInstallationType.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapSoftwareInstallationType.java index c33b4dbe521dd..eec1f6ba781bc 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapSoftwareInstallationType.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapSoftwareInstallationType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for SapSoftwareInstallationType. */ +/** The SAP software installation Type. */ public final class SapSoftwareInstallationType extends ExpandableStringEnum { /** Static value ServiceInitiated for SapSoftwareInstallationType. */ public static final SapSoftwareInstallationType SERVICE_INITIATED = fromString("ServiceInitiated"); @@ -17,6 +17,18 @@ public final class SapSoftwareInstallationType extends ExpandableStringEnum value; @@ -24,8 +24,12 @@ public final class SapVirtualInstanceList { @JsonProperty(value = "nextLink") private String nextLink; + /** Creates an instance of SapVirtualInstanceList class. */ + public SapVirtualInstanceList() { + } + /** - * Get the value property: Gets the list of Virtual Instances for SAP. + * Get the value property: Gets the list of Virtual Instances for SAP solutions resources. * * @return the value value. */ @@ -34,7 +38,7 @@ public List value() { } /** - * Set the value property: Gets the list of Virtual Instances for SAP. + * Set the value property: Gets the list of Virtual Instances for SAP solutions resources. * * @param value the value value to set. * @return the SapVirtualInstanceList object itself. diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapVirtualInstanceProvisioningState.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapVirtualInstanceProvisioningState.java index 9840b5f5774f1..a55a30d084d22 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapVirtualInstanceProvisioningState.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapVirtualInstanceProvisioningState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for SapVirtualInstanceProvisioningState. */ +/** Defines the provisioning states. */ public final class SapVirtualInstanceProvisioningState extends ExpandableStringEnum { /** Static value Succeeded for SapVirtualInstanceProvisioningState. */ @@ -26,6 +26,15 @@ public final class SapVirtualInstanceProvisioningState /** Static value Deleting for SapVirtualInstanceProvisioningState. */ public static final SapVirtualInstanceProvisioningState DELETING = fromString("Deleting"); + /** + * Creates a new instance of SapVirtualInstanceProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SapVirtualInstanceProvisioningState() { + } + /** * Creates or finds a SapVirtualInstanceProvisioningState from its string representation. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapVirtualInstanceState.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapVirtualInstanceState.java index b569749293326..2477bc03b0cb9 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapVirtualInstanceState.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SapVirtualInstanceState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for SapVirtualInstanceState. */ +/** Defines the Virtual Instance for SAP state. */ public final class SapVirtualInstanceState extends ExpandableStringEnum { /** Static value InfrastructureDeploymentPending for SapVirtualInstanceState. */ public static final SapVirtualInstanceState INFRASTRUCTURE_DEPLOYMENT_PENDING = @@ -33,6 +33,13 @@ public final class SapVirtualInstanceState extends ExpandableStringEnum { /** Static value Starting for SapVirtualInstanceStatus. */ public static final SapVirtualInstanceStatus STARTING = fromString("Starting"); @@ -28,6 +28,18 @@ public final class SapVirtualInstanceStatus extends ExpandableStringEnum getByResourceGroupWithResponse( + String resourceGroupName, String sapVirtualInstanceName, Context context); /** - * Gets an Virtual Instance for SAP. + * Gets a Virtual Instance for SAP solutions resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param context The context to associate with this operation. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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 an Virtual Instance for SAP along with {@link Response}. + * @return a Virtual Instance for SAP solutions resource. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String sapVirtualInstanceName, Context context); + SapVirtualInstance getByResourceGroup(String resourceGroupName, String sapVirtualInstanceName); /** - * Deletes an Virtual Instance for SAP. + * Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central + * Services Instance, Application Server Instances and Database Instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -49,10 +50,11 @@ Response getByResourceGroupWithResponse( OperationStatusResult deleteByResourceGroup(String resourceGroupName, String sapVirtualInstanceName); /** - * Deletes an Virtual Instance for SAP. + * Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central + * Services Instance, Application Server Instances and Database Instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -62,53 +64,57 @@ Response getByResourceGroupWithResponse( OperationStatusResult delete(String resourceGroupName, String sapVirtualInstanceName, Context context); /** - * Gets all Virtual Instances for SAP in a resource group. + * Gets all Virtual Instances for SAP solutions resources in a 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 Virtual Instances for SAP in a resource group as paginated response with {@link PagedIterable}. + * @return all Virtual Instances for SAP solutions resources in a Resource Group as paginated response with {@link + * PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); /** - * Gets all Virtual Instances for SAP in a resource group. + * Gets all Virtual Instances for SAP solutions resources in a 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 Virtual Instances for SAP in a resource group as paginated response with {@link PagedIterable}. + * @return all Virtual Instances for SAP solutions resources in a Resource Group as paginated response with {@link + * PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Gets all Virtual Instances for SAP in the subscription. + * Gets all Virtual Instances for SAP solutions resources in a 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 Virtual Instances for SAP in the subscription as paginated response with {@link PagedIterable}. + * @return all Virtual Instances for SAP solutions resources in a Subscription as paginated response with {@link + * PagedIterable}. */ PagedIterable list(); /** - * Gets all Virtual Instances for SAP in the subscription. + * Gets all Virtual Instances for SAP solutions resources in a 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 Virtual Instances for SAP in the subscription as paginated response with {@link PagedIterable}. + * @return all Virtual Instances for SAP solutions resources in a Subscription as paginated response with {@link + * PagedIterable}. */ PagedIterable list(Context context); /** - * Starts the SAP System. + * Starts the SAP application, that is the Central Services instance and Application server instances. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -117,10 +123,10 @@ Response getByResourceGroupWithResponse( OperationStatusResult start(String resourceGroupName, String sapVirtualInstanceName); /** - * Starts the SAP System. + * Starts the SAP application, that is the Central Services instance and Application server instances. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -130,23 +136,10 @@ Response getByResourceGroupWithResponse( OperationStatusResult start(String resourceGroupName, String sapVirtualInstanceName, Context context); /** - * Stops the SAP System. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param body The Virtual Instances for SAP stop request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 current status of an async operation. - */ - OperationStatusResult stop(String resourceGroupName, String sapVirtualInstanceName, StopRequest body); - - /** - * Stops the SAP System. + * Stops the SAP Application, that is the Application server instances and Central Services instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions 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. @@ -155,11 +148,11 @@ Response getByResourceGroupWithResponse( OperationStatusResult stop(String resourceGroupName, String sapVirtualInstanceName); /** - * Stops the SAP System. + * Stops the SAP Application, that is the Application server instances and Central Services instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. - * @param body The Virtual Instances for SAP stop request body. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource. + * @param body The Virtual Instance for SAP solutions resource stop request body. * @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. @@ -170,30 +163,31 @@ OperationStatusResult stop( String resourceGroupName, String sapVirtualInstanceName, StopRequest body, Context context); /** - * Gets an Virtual Instance for SAP. + * Gets a Virtual Instance for SAP solutions resource. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Virtual Instance for SAP along with {@link Response}. + * @return a Virtual Instance for SAP solutions resource along with {@link Response}. */ SapVirtualInstance getById(String id); /** - * Gets an Virtual Instance for SAP. + * Gets a Virtual Instance for SAP solutions resource. * * @param id the resource 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 an Virtual Instance for SAP along with {@link Response}. + * @return a Virtual Instance for SAP solutions resource along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Deletes an Virtual Instance for SAP. + * Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central + * Services Instance, Application Server Instances and Database Instance. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -204,7 +198,8 @@ OperationStatusResult stop( OperationStatusResult deleteById(String id); /** - * Deletes an Virtual Instance for SAP. + * Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central + * Services Instance, Application Server Instances and Database Instance. * * @param id the resource ID. * @param context The context to associate with this operation. diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SearchProfile.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SearchProfile.java deleted file mode 100644 index 6708270354b99..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SearchProfile.java +++ /dev/null @@ -1,92 +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.workloads.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Search profile. */ -@Fluent -public final class SearchProfile extends NodeProfile { - /* - * Search type - */ - @JsonProperty(value = "searchType", required = true) - private SearchType searchType; - - /** - * Get the searchType property: Search type. - * - * @return the searchType value. - */ - public SearchType searchType() { - return this.searchType; - } - - /** - * Set the searchType property: Search type. - * - * @param searchType the searchType value to set. - * @return the SearchProfile object itself. - */ - public SearchProfile withSearchType(SearchType searchType) { - this.searchType = searchType; - return this; - } - - /** {@inheritDoc} */ - @Override - public SearchProfile withName(String name) { - super.withName(name); - return this; - } - - /** {@inheritDoc} */ - @Override - public SearchProfile withNodeSku(String nodeSku) { - super.withNodeSku(nodeSku); - return this; - } - - /** {@inheritDoc} */ - @Override - public SearchProfile withOsImage(OsImageProfile osImage) { - super.withOsImage(osImage); - return this; - } - - /** {@inheritDoc} */ - @Override - public SearchProfile withOsDisk(DiskInfo osDisk) { - super.withOsDisk(osDisk); - return this; - } - - /** {@inheritDoc} */ - @Override - public SearchProfile withDataDisks(List dataDisks) { - super.withDataDisks(dataDisks); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (searchType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property searchType in model SearchProfile")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SearchProfile.class); -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SearchType.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SearchType.java deleted file mode 100644 index 05ec576807b65..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SearchType.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.workloads.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for SearchType. */ -public final class SearchType extends ExpandableStringEnum { - /** Static value Elastic for SearchType. */ - public static final SearchType ELASTIC = fromString("Elastic"); - - /** - * Creates or finds a SearchType from its string representation. - * - * @param name a name to look for. - * @return the corresponding SearchType. - */ - @JsonCreator - public static SearchType fromString(String name) { - return fromString(name, SearchType.class); - } - - /** - * Gets known SearchType values. - * - * @return known SearchType values. - */ - public static Collection values() { - return values(SearchType.class); - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ServiceInitiatedSoftwareConfiguration.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ServiceInitiatedSoftwareConfiguration.java index 81294dee4f459..9b27aa6844828 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ServiceInitiatedSoftwareConfiguration.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ServiceInitiatedSoftwareConfiguration.java @@ -51,6 +51,10 @@ public final class ServiceInitiatedSoftwareConfiguration extends SoftwareConfigu @JsonProperty(value = "highAvailabilitySoftwareConfiguration") private HighAvailabilitySoftwareConfiguration highAvailabilitySoftwareConfiguration; + /** Creates an instance of ServiceInitiatedSoftwareConfiguration class. */ + public ServiceInitiatedSoftwareConfiguration() { + } + /** * Get the bomUrl property: The URL to the SAP Build of Materials(BOM) file. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SharedStorageResourceNames.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SharedStorageResourceNames.java new file mode 100644 index 0000000000000..fb240937ff525 --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SharedStorageResourceNames.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The resource names object for shared storage. */ +@Fluent +public final class SharedStorageResourceNames { + /* + * The full name of the shared storage account. If it is not provided, it will be defaulted to {SID}nfs{guid of 15 + * chars}. + */ + @JsonProperty(value = "sharedStorageAccountName") + private String sharedStorageAccountName; + + /* + * The full name of private end point for the shared storage account. If it is not provided, it will be defaulted + * to {storageAccountName}_pe + */ + @JsonProperty(value = "sharedStorageAccountPrivateEndPointName") + private String sharedStorageAccountPrivateEndPointName; + + /** Creates an instance of SharedStorageResourceNames class. */ + public SharedStorageResourceNames() { + } + + /** + * Get the sharedStorageAccountName property: The full name of the shared storage account. If it is not provided, it + * will be defaulted to {SID}nfs{guid of 15 chars}. + * + * @return the sharedStorageAccountName value. + */ + public String sharedStorageAccountName() { + return this.sharedStorageAccountName; + } + + /** + * Set the sharedStorageAccountName property: The full name of the shared storage account. If it is not provided, it + * will be defaulted to {SID}nfs{guid of 15 chars}. + * + * @param sharedStorageAccountName the sharedStorageAccountName value to set. + * @return the SharedStorageResourceNames object itself. + */ + public SharedStorageResourceNames withSharedStorageAccountName(String sharedStorageAccountName) { + this.sharedStorageAccountName = sharedStorageAccountName; + return this; + } + + /** + * Get the sharedStorageAccountPrivateEndPointName property: The full name of private end point for the shared + * storage account. If it is not provided, it will be defaulted to {storageAccountName}_pe. + * + * @return the sharedStorageAccountPrivateEndPointName value. + */ + public String sharedStorageAccountPrivateEndPointName() { + return this.sharedStorageAccountPrivateEndPointName; + } + + /** + * Set the sharedStorageAccountPrivateEndPointName property: The full name of private end point for the shared + * storage account. If it is not provided, it will be defaulted to {storageAccountName}_pe. + * + * @param sharedStorageAccountPrivateEndPointName the sharedStorageAccountPrivateEndPointName value to set. + * @return the SharedStorageResourceNames object itself. + */ + public SharedStorageResourceNames withSharedStorageAccountPrivateEndPointName( + String sharedStorageAccountPrivateEndPointName) { + this.sharedStorageAccountPrivateEndPointName = sharedStorageAccountPrivateEndPointName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SingleServerConfiguration.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SingleServerConfiguration.java index 976acd4a9c543..e43bcc143cc4d 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SingleServerConfiguration.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SingleServerConfiguration.java @@ -39,6 +39,22 @@ public final class SingleServerConfiguration extends InfrastructureConfiguration @JsonProperty(value = "virtualMachineConfiguration", required = true) private VirtualMachineConfiguration virtualMachineConfiguration; + /* + * Gets or sets the disk configuration. + */ + @JsonProperty(value = "dbDiskConfiguration") + private DiskConfiguration dbDiskConfiguration; + + /* + * The set of custom names to be used for underlying azure resources that are part of the SAP system. + */ + @JsonProperty(value = "customResourceNames") + private SingleServerCustomResourceNames customResourceNames; + + /** Creates an instance of SingleServerConfiguration class. */ + public SingleServerConfiguration() { + } + /** * Get the networkConfiguration property: Network configuration for the server. * @@ -120,6 +136,48 @@ public SingleServerConfiguration withVirtualMachineConfiguration( return this; } + /** + * Get the dbDiskConfiguration property: Gets or sets the disk configuration. + * + * @return the dbDiskConfiguration value. + */ + public DiskConfiguration dbDiskConfiguration() { + return this.dbDiskConfiguration; + } + + /** + * Set the dbDiskConfiguration property: Gets or sets the disk configuration. + * + * @param dbDiskConfiguration the dbDiskConfiguration value to set. + * @return the SingleServerConfiguration object itself. + */ + public SingleServerConfiguration withDbDiskConfiguration(DiskConfiguration dbDiskConfiguration) { + this.dbDiskConfiguration = dbDiskConfiguration; + return this; + } + + /** + * Get the customResourceNames property: The set of custom names to be used for underlying azure resources that are + * part of the SAP system. + * + * @return the customResourceNames value. + */ + public SingleServerCustomResourceNames customResourceNames() { + return this.customResourceNames; + } + + /** + * Set the customResourceNames property: The set of custom names to be used for underlying azure resources that are + * part of the SAP system. + * + * @param customResourceNames the customResourceNames value to set. + * @return the SingleServerConfiguration object itself. + */ + public SingleServerConfiguration withCustomResourceNames(SingleServerCustomResourceNames customResourceNames) { + this.customResourceNames = customResourceNames; + return this; + } + /** {@inheritDoc} */ @Override public SingleServerConfiguration withAppResourceGroup(String appResourceGroup) { @@ -152,6 +210,12 @@ public void validate() { } else { virtualMachineConfiguration().validate(); } + if (dbDiskConfiguration() != null) { + dbDiskConfiguration().validate(); + } + if (customResourceNames() != null) { + customResourceNames().validate(); + } } private static final ClientLogger LOGGER = new ClientLogger(SingleServerConfiguration.class); diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SingleServerCustomResourceNames.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SingleServerCustomResourceNames.java new file mode 100644 index 0000000000000..e164e8c5dfef6 --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SingleServerCustomResourceNames.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The resource-names input to specify custom names for underlying azure resources that are part of a single server SAP + * system. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "namingPatternType", + defaultImpl = SingleServerCustomResourceNames.class) +@JsonTypeName("SingleServerCustomResourceNames") +@JsonSubTypes({@JsonSubTypes.Type(name = "FullResourceName", value = SingleServerFullResourceNames.class)}) +@Immutable +public class SingleServerCustomResourceNames { + /** Creates an instance of SingleServerCustomResourceNames class. */ + public SingleServerCustomResourceNames() { + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SingleServerFullResourceNames.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SingleServerFullResourceNames.java new file mode 100644 index 0000000000000..f2ffd25f38819 --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SingleServerFullResourceNames.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The resource name object where the specified values will be full resource names of the corresponding resources in a + * single server SAP system. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "namingPatternType") +@JsonTypeName("FullResourceName") +@Fluent +public final class SingleServerFullResourceNames extends SingleServerCustomResourceNames { + /* + * The resource names object for virtual machine and related resources. + */ + @JsonProperty(value = "virtualMachine") + private VirtualMachineResourceNames virtualMachine; + + /** Creates an instance of SingleServerFullResourceNames class. */ + public SingleServerFullResourceNames() { + } + + /** + * Get the virtualMachine property: The resource names object for virtual machine and related resources. + * + * @return the virtualMachine value. + */ + public VirtualMachineResourceNames virtualMachine() { + return this.virtualMachine; + } + + /** + * Set the virtualMachine property: The resource names object for virtual machine and related resources. + * + * @param virtualMachine the virtualMachine value to set. + * @return the SingleServerFullResourceNames object itself. + */ + public SingleServerFullResourceNames withVirtualMachine(VirtualMachineResourceNames virtualMachine) { + this.virtualMachine = virtualMachine; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (virtualMachine() != null) { + virtualMachine().validate(); + } + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SingleServerRecommendationResult.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SingleServerRecommendationResult.java index 029c73b08b8f2..15bd3a71f19c1 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SingleServerRecommendationResult.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SingleServerRecommendationResult.java @@ -21,6 +21,10 @@ public final class SingleServerRecommendationResult extends SapSizingRecommendat @JsonProperty(value = "vmSku") private String vmSku; + /** Creates an instance of SingleServerRecommendationResult class. */ + public SingleServerRecommendationResult() { + } + /** * Get the vmSku property: The recommended VM SKU for single server. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SiteProfile.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SiteProfile.java deleted file mode 100644 index 4a52c9a7fb391..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SiteProfile.java +++ /dev/null @@ -1,46 +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.workloads.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Workload website profile. */ -@Fluent -public final class SiteProfile { - /* - * Domain name for the application site URL - */ - @JsonProperty(value = "domainName") - private String domainName; - - /** - * Get the domainName property: Domain name for the application site URL. - * - * @return the domainName value. - */ - public String domainName() { - return this.domainName; - } - - /** - * Set the domainName property: Domain name for the application site URL. - * - * @param domainName the domainName value to set. - * @return the SiteProfile object itself. - */ - public SiteProfile withDomainName(String domainName) { - this.domainName = domainName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SkipFileShareConfiguration.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SkipFileShareConfiguration.java new file mode 100644 index 0000000000000..37b1a452f2976 --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SkipFileShareConfiguration.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Gets or sets the skip file share configuration. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "configurationType") +@JsonTypeName("Skip") +@Immutable +public final class SkipFileShareConfiguration extends FileShareConfiguration { + /** Creates an instance of SkipFileShareConfiguration class. */ + public SkipFileShareConfiguration() { + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/Sku.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/Sku.java deleted file mode 100644 index 57a483f67cd20..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/Sku.java +++ /dev/null @@ -1,170 +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.workloads.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The resource model definition representing SKU. */ -@Fluent -public final class Sku { - /* - * The name of the SKU. Ex - P3. It is typically a letter+number code - */ - @JsonProperty(value = "name", required = true) - private String name; - - /* - * This field is required to be implemented by the Resource Provider if the - * service has more than one tier, but is not required on a PUT. - */ - @JsonProperty(value = "tier") - private SkuTier tier; - - /* - * The SKU size. When the name field is the combination of tier and some - * other value, this would be the standalone code. - */ - @JsonProperty(value = "size") - private String size; - - /* - * If the service has different generations of hardware, for the same SKU, - * then that can be captured here. - */ - @JsonProperty(value = "family") - private String family; - - /* - * If the SKU supports scale out/in then the capacity integer should be - * included. If scale out/in is not possible for the resource this may be - * omitted. - */ - @JsonProperty(value = "capacity") - private Integer capacity; - - /** - * Get the name property: The name of the SKU. Ex - P3. It is typically a letter+number code. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name of the SKU. Ex - P3. It is typically a letter+number code. - * - * @param name the name value to set. - * @return the Sku object itself. - */ - public Sku withName(String name) { - this.name = name; - return this; - } - - /** - * Get the tier property: This field is required to be implemented by the Resource Provider if the service has more - * than one tier, but is not required on a PUT. - * - * @return the tier value. - */ - public SkuTier tier() { - return this.tier; - } - - /** - * Set the tier property: This field is required to be implemented by the Resource Provider if the service has more - * than one tier, but is not required on a PUT. - * - * @param tier the tier value to set. - * @return the Sku object itself. - */ - public Sku withTier(SkuTier tier) { - this.tier = tier; - return this; - } - - /** - * Get the size property: The SKU size. When the name field is the combination of tier and some other value, this - * would be the standalone code. - * - * @return the size value. - */ - public String size() { - return this.size; - } - - /** - * Set the size property: The SKU size. When the name field is the combination of tier and some other value, this - * would be the standalone code. - * - * @param size the size value to set. - * @return the Sku object itself. - */ - public Sku withSize(String size) { - this.size = size; - return this; - } - - /** - * Get the family property: If the service has different generations of hardware, for the same SKU, then that can be - * captured here. - * - * @return the family value. - */ - public String family() { - return this.family; - } - - /** - * Set the family property: If the service has different generations of hardware, for the same SKU, then that can be - * captured here. - * - * @param family the family value to set. - * @return the Sku object itself. - */ - public Sku withFamily(String family) { - this.family = family; - return this; - } - - /** - * Get the capacity property: If the SKU supports scale out/in then the capacity integer should be included. If - * scale out/in is not possible for the resource this may be omitted. - * - * @return the capacity value. - */ - public Integer capacity() { - return this.capacity; - } - - /** - * Set the capacity property: If the SKU supports scale out/in then the capacity integer should be included. If - * scale out/in is not possible for the resource this may be omitted. - * - * @param capacity the capacity value to set. - * @return the Sku object itself. - */ - public Sku withCapacity(Integer capacity) { - this.capacity = capacity; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("Missing required property name in model Sku")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(Sku.class); -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SkuCapability.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SkuCapability.java deleted file mode 100644 index 9321befb7daee..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SkuCapability.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.workloads.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The SKU capability definition. */ -@Fluent -public final class SkuCapability { - /* - * The capability name. - */ - @JsonProperty(value = "name") - private String name; - - /* - * The capability value. - */ - @JsonProperty(value = "value") - private String value; - - /** - * Get the name property: The capability name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The capability name. - * - * @param name the name value to set. - * @return the SkuCapability object itself. - */ - public SkuCapability withName(String name) { - this.name = name; - return this; - } - - /** - * Get the value property: The capability value. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Set the value property: The capability value. - * - * @param value the value value to set. - * @return the SkuCapability object itself. - */ - public SkuCapability withValue(String value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SkuCost.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SkuCost.java deleted file mode 100644 index 96d691b4e2711..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SkuCost.java +++ /dev/null @@ -1,98 +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.workloads.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The SKU cost definition. */ -@Fluent -public final class SkuCost { - /* - * Billing meter id. - */ - @JsonProperty(value = "meterId") - private String meterId; - - /* - * The quantity. - */ - @JsonProperty(value = "quantity") - private Integer quantity; - - /* - * The extended unit. - */ - @JsonProperty(value = "extendedUnit") - private String extendedUnit; - - /** - * Get the meterId property: Billing meter id. - * - * @return the meterId value. - */ - public String meterId() { - return this.meterId; - } - - /** - * Set the meterId property: Billing meter id. - * - * @param meterId the meterId value to set. - * @return the SkuCost object itself. - */ - public SkuCost withMeterId(String meterId) { - this.meterId = meterId; - return this; - } - - /** - * Get the quantity property: The quantity. - * - * @return the quantity value. - */ - public Integer quantity() { - return this.quantity; - } - - /** - * Set the quantity property: The quantity. - * - * @param quantity the quantity value to set. - * @return the SkuCost object itself. - */ - public SkuCost withQuantity(Integer quantity) { - this.quantity = quantity; - return this; - } - - /** - * Get the extendedUnit property: The extended unit. - * - * @return the extendedUnit value. - */ - public String extendedUnit() { - return this.extendedUnit; - } - - /** - * Set the extendedUnit property: The extended unit. - * - * @param extendedUnit the extendedUnit value to set. - * @return the SkuCost object itself. - */ - public SkuCost withExtendedUnit(String extendedUnit) { - this.extendedUnit = extendedUnit; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SkuDefinition.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SkuDefinition.java deleted file mode 100644 index 5ac983b1d5d97..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SkuDefinition.java +++ /dev/null @@ -1,107 +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.workloads.models; - -import com.azure.resourcemanager.workloads.fluent.models.SkuDefinitionInner; -import java.util.List; - -/** An immutable client-side representation of SkuDefinition. */ -public interface SkuDefinition { - /** - * Gets the name property: The name of the SKU. - * - * @return the name value. - */ - String name(); - - /** - * Gets the resourceType property: Resource type the SKU applicable for. - * - * @return the resourceType value. - */ - String resourceType(); - - /** - * Gets the tier property: This field is required to be implemented by the Resource Provider if the service has more - * than one tier, but is not required on a PUT. - * - * @return the tier value. - */ - String tier(); - - /** - * Gets the size property: The SKU size. When the name field is the combination of tier and some other value, this - * would be the standalone code. - * - * @return the size value. - */ - String size(); - - /** - * Gets the family property: If the service has different generations of hardware, for the same SKU, then that can - * be captured here. - * - * @return the family value. - */ - String family(); - - /** - * Gets the kind property: If the service has different kinds of hardware, for the same SKU, then that can be - * captured here. - * - * @return the kind value. - */ - String kind(); - - /** - * Gets the locations property: List of locations where this SKU is available. - * - * @return the locations value. - */ - List locations(); - - /** - * Gets the locationInfo property: List of locations where this SKU is available. - * - * @return the locationInfo value. - */ - List locationInfo(); - - /** - * Gets the capacity property: If the SKU supports scale out/in then the capacity integer should be included. If - * scale out/in is not possible for the resource this may be omitted. - * - * @return the capacity value. - */ - Object capacity(); - - /** - * Gets the costs property: The SKU costs. - * - * @return the costs value. - */ - List costs(); - - /** - * Gets the capabilities property: The SKU capabilities. - * - * @return the capabilities value. - */ - List capabilities(); - - /** - * Gets the restrictions property: The SKU restrictions. - * - * @return the restrictions value. - */ - List restrictions(); - - /** - * Gets the inner com.azure.resourcemanager.workloads.fluent.models.SkuDefinitionInner object. - * - * @return the inner object. - */ - SkuDefinitionInner innerModel(); -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SkuLocationAndZones.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SkuLocationAndZones.java deleted file mode 100644 index 9b2ac8bdc1274..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SkuLocationAndZones.java +++ /dev/null @@ -1,154 +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.workloads.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The SKU location and zone. */ -@Fluent -public final class SkuLocationAndZones { - /* - * The location of the SKU. - */ - @JsonProperty(value = "location") - private String location; - - /* - * The availability zones of SKU location. - */ - @JsonProperty(value = "zones") - private List zones; - - /* - * The availability zone details of the SKU location. - */ - @JsonProperty(value = "zoneDetails") - private List zoneDetails; - - /* - * The extended locations of SKU. - */ - @JsonProperty(value = "extendedLocations") - private List extendedLocations; - - /* - * Type of the extended location. - */ - @JsonProperty(value = "type") - private LocationType type; - - /** - * Get the location property: The location of the SKU. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: The location of the SKU. - * - * @param location the location value to set. - * @return the SkuLocationAndZones object itself. - */ - public SkuLocationAndZones withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the zones property: The availability zones of SKU location. - * - * @return the zones value. - */ - public List zones() { - return this.zones; - } - - /** - * Set the zones property: The availability zones of SKU location. - * - * @param zones the zones value to set. - * @return the SkuLocationAndZones object itself. - */ - public SkuLocationAndZones withZones(List zones) { - this.zones = zones; - return this; - } - - /** - * Get the zoneDetails property: The availability zone details of the SKU location. - * - * @return the zoneDetails value. - */ - public List zoneDetails() { - return this.zoneDetails; - } - - /** - * Set the zoneDetails property: The availability zone details of the SKU location. - * - * @param zoneDetails the zoneDetails value to set. - * @return the SkuLocationAndZones object itself. - */ - public SkuLocationAndZones withZoneDetails(List zoneDetails) { - this.zoneDetails = zoneDetails; - return this; - } - - /** - * Get the extendedLocations property: The extended locations of SKU. - * - * @return the extendedLocations value. - */ - public List extendedLocations() { - return this.extendedLocations; - } - - /** - * Set the extendedLocations property: The extended locations of SKU. - * - * @param extendedLocations the extendedLocations value to set. - * @return the SkuLocationAndZones object itself. - */ - public SkuLocationAndZones withExtendedLocations(List extendedLocations) { - this.extendedLocations = extendedLocations; - return this; - } - - /** - * Get the type property: Type of the extended location. - * - * @return the type value. - */ - public LocationType type() { - return this.type; - } - - /** - * Set the type property: Type of the extended location. - * - * @param type the type value to set. - * @return the SkuLocationAndZones object itself. - */ - public SkuLocationAndZones withType(LocationType type) { - this.type = type; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (zoneDetails() != null) { - zoneDetails().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SkuRestriction.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SkuRestriction.java deleted file mode 100644 index aedbbf763c2c2..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SkuRestriction.java +++ /dev/null @@ -1,125 +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.workloads.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The SKU restriction definition. */ -@Fluent -public final class SkuRestriction { - /* - * The SKU restriction type. - */ - @JsonProperty(value = "type") - private SkuRestrictionType type; - - /* - * Restriction values. - */ - @JsonProperty(value = "values") - private List values; - - /* - * The restriction information. - */ - @JsonProperty(value = "restrictionInfo") - private Object restrictionInfo; - - /* - * The SKU restriction reason code. - */ - @JsonProperty(value = "reasonCode") - private SkuRestrictionReasonCode reasonCode; - - /** - * Get the type property: The SKU restriction type. - * - * @return the type value. - */ - public SkuRestrictionType type() { - return this.type; - } - - /** - * Set the type property: The SKU restriction type. - * - * @param type the type value to set. - * @return the SkuRestriction object itself. - */ - public SkuRestriction withType(SkuRestrictionType type) { - this.type = type; - return this; - } - - /** - * Get the values property: Restriction values. - * - * @return the values value. - */ - public List values() { - return this.values; - } - - /** - * Set the values property: Restriction values. - * - * @param values the values value to set. - * @return the SkuRestriction object itself. - */ - public SkuRestriction withValues(List values) { - this.values = values; - return this; - } - - /** - * Get the restrictionInfo property: The restriction information. - * - * @return the restrictionInfo value. - */ - public Object restrictionInfo() { - return this.restrictionInfo; - } - - /** - * Set the restrictionInfo property: The restriction information. - * - * @param restrictionInfo the restrictionInfo value to set. - * @return the SkuRestriction object itself. - */ - public SkuRestriction withRestrictionInfo(Object restrictionInfo) { - this.restrictionInfo = restrictionInfo; - return this; - } - - /** - * Get the reasonCode property: The SKU restriction reason code. - * - * @return the reasonCode value. - */ - public SkuRestrictionReasonCode reasonCode() { - return this.reasonCode; - } - - /** - * Set the reasonCode property: The SKU restriction reason code. - * - * @param reasonCode the reasonCode value to set. - * @return the SkuRestriction object itself. - */ - public SkuRestriction withReasonCode(SkuRestrictionReasonCode reasonCode) { - this.reasonCode = reasonCode; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SkuRestrictionReasonCode.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SkuRestrictionReasonCode.java deleted file mode 100644 index 9c975d9309054..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SkuRestrictionReasonCode.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.workloads.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for SkuRestrictionReasonCode. */ -public final class SkuRestrictionReasonCode extends ExpandableStringEnum { - /** Static value NotSpecified for SkuRestrictionReasonCode. */ - public static final SkuRestrictionReasonCode NOT_SPECIFIED = fromString("NotSpecified"); - - /** Static value QuotaId for SkuRestrictionReasonCode. */ - public static final SkuRestrictionReasonCode QUOTA_ID = fromString("QuotaId"); - - /** Static value NotAvailableForSubscription for SkuRestrictionReasonCode. */ - public static final SkuRestrictionReasonCode NOT_AVAILABLE_FOR_SUBSCRIPTION = - fromString("NotAvailableForSubscription"); - - /** - * Creates or finds a SkuRestrictionReasonCode from its string representation. - * - * @param name a name to look for. - * @return the corresponding SkuRestrictionReasonCode. - */ - @JsonCreator - public static SkuRestrictionReasonCode fromString(String name) { - return fromString(name, SkuRestrictionReasonCode.class); - } - - /** - * Gets known SkuRestrictionReasonCode values. - * - * @return known SkuRestrictionReasonCode values. - */ - public static Collection values() { - return values(SkuRestrictionReasonCode.class); - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SkuRestrictionType.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SkuRestrictionType.java deleted file mode 100644 index 8090c72b4914c..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SkuRestrictionType.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.workloads.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for SkuRestrictionType. */ -public final class SkuRestrictionType extends ExpandableStringEnum { - /** Static value NotSpecified for SkuRestrictionType. */ - public static final SkuRestrictionType NOT_SPECIFIED = fromString("NotSpecified"); - - /** Static value Location for SkuRestrictionType. */ - public static final SkuRestrictionType LOCATION = fromString("Location"); - - /** Static value Zone for SkuRestrictionType. */ - public static final SkuRestrictionType ZONE = fromString("Zone"); - - /** - * Creates or finds a SkuRestrictionType from its string representation. - * - * @param name a name to look for. - * @return the corresponding SkuRestrictionType. - */ - @JsonCreator - public static SkuRestrictionType fromString(String name) { - return fromString(name, SkuRestrictionType.class); - } - - /** - * Gets known SkuRestrictionType values. - * - * @return known SkuRestrictionType values. - */ - public static Collection values() { - return values(SkuRestrictionType.class); - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SkuTier.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SkuTier.java deleted file mode 100644 index 8adcd71889f7f..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SkuTier.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.workloads.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for SkuTier. */ -public enum SkuTier { - /** Enum value Free. */ - FREE("Free"), - - /** Enum value Basic. */ - BASIC("Basic"), - - /** Enum value Standard. */ - STANDARD("Standard"), - - /** Enum value Premium. */ - PREMIUM("Premium"); - - /** The actual serialized value for a SkuTier instance. */ - private final String value; - - SkuTier(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a SkuTier instance. - * - * @param value the serialized value to parse. - * @return the parsed SkuTier object, or null if unable to parse. - */ - @JsonCreator - public static SkuTier fromString(String value) { - SkuTier[] items = SkuTier.values(); - for (SkuTier item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SkuZoneDetail.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SkuZoneDetail.java deleted file mode 100644 index 075fde9b308ce..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SkuZoneDetail.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.workloads.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The SKU zone details. */ -@Fluent -public final class SkuZoneDetail { - /* - * The physical zones. - */ - @JsonProperty(value = "zones") - private List zones; - - /* - * The capabilities. - */ - @JsonProperty(value = "capabilities") - private List capabilities; - - /** - * Get the zones property: The physical zones. - * - * @return the zones value. - */ - public List zones() { - return this.zones; - } - - /** - * Set the zones property: The physical zones. - * - * @param zones the zones value to set. - * @return the SkuZoneDetail object itself. - */ - public SkuZoneDetail withZones(List zones) { - this.zones = zones; - return this; - } - - /** - * Get the capabilities property: The capabilities. - * - * @return the capabilities value. - */ - public List capabilities() { - return this.capabilities; - } - - /** - * Set the capabilities property: The capabilities. - * - * @param capabilities the capabilities value to set. - * @return the SkuZoneDetail object itself. - */ - public SkuZoneDetail withCapabilities(List capabilities) { - this.capabilities = capabilities; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (capabilities() != null) { - capabilities().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/Skus.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/Skus.java deleted file mode 100644 index 3e72b5913dfd6..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/Skus.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.workloads.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** Resource collection API of Skus. */ -public interface Skus { - /** - * Lists all the available SKUs under this PR. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of SKUs supported by an Azure Resource Provider as paginated response with {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * Lists all the available SKUs under this PR. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of SKUs supported by an Azure Resource Provider as paginated response with {@link PagedIterable}. - */ - PagedIterable list(Context context); -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SkusListResult.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SkusListResult.java deleted file mode 100644 index 0a2025b01bb4f..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SkusListResult.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.workloads.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.workloads.fluent.models.SkuDefinitionInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A list of SKUs supported by an Azure Resource Provider. */ -@Immutable -public final class SkusListResult { - /* - * List of SKUs supported by the resource provider - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next set of SKU list results (if there are any). - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** - * Get the value property: List of SKUs supported by the resource provider. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next set of SKU list results (if there are any). - * - * @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) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SoftwareConfiguration.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SoftwareConfiguration.java index 2f7052375a494..d3083a90f5be0 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SoftwareConfiguration.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SoftwareConfiguration.java @@ -18,10 +18,17 @@ @JsonTypeName("SoftwareConfiguration") @JsonSubTypes({ @JsonSubTypes.Type(name = "ServiceInitiated", value = ServiceInitiatedSoftwareConfiguration.class), - @JsonSubTypes.Type(name = "SAPInstallWithoutOSConfig", value = SapInstallWithoutOSConfigSoftwareConfiguration.class) + @JsonSubTypes.Type( + name = "SAPInstallWithoutOSConfig", + value = SapInstallWithoutOSConfigSoftwareConfiguration.class), + @JsonSubTypes.Type(name = "External", value = ExternalInstallationSoftwareConfiguration.class) }) @Immutable public class SoftwareConfiguration { + /** Creates an instance of SoftwareConfiguration class. */ + public SoftwareConfiguration() { + } + /** * Validates the instance. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SshConfiguration.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SshConfiguration.java index 40de2ea33784a..f8b18d45402d1 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SshConfiguration.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SshConfiguration.java @@ -17,6 +17,10 @@ public final class SshConfiguration { @JsonProperty(value = "publicKeys") private List publicKeys; + /** Creates an instance of SshConfiguration class. */ + public SshConfiguration() { + } + /** * Get the publicKeys property: The list of SSH public keys used to authenticate with linux based VMs. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SshKeyPair.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SshKeyPair.java index 1bc4ac84cb355..47c261261b1ed 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SshKeyPair.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SshKeyPair.java @@ -26,6 +26,10 @@ public final class SshKeyPair { @JsonProperty(value = "privateKey") private String privateKey; + /** Creates an instance of SshKeyPair class. */ + public SshKeyPair() { + } + /** * Get the publicKey property: SSH public key. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SshPublicKey.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SshPublicKey.java index b21e9afbe1dab..01c019b8216bb 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SshPublicKey.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SshPublicKey.java @@ -13,15 +13,17 @@ @Fluent public final class SshPublicKey { /* - * SSH public key certificate used to authenticate with the VM through ssh. - * The key needs to be at least 2048-bit and in ssh-rsa format.

- * For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux - * VMs in + * SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit + * and in ssh-rsa format.

For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in * Azure](https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). */ @JsonProperty(value = "keyData") private String keyData; + /** Creates an instance of SshPublicKey class. */ + public SshPublicKey() { + } + /** * Get the keyData property: SSH public key certificate used to authenticate with the VM through ssh. The key needs * to be at least 2048-bit and in ssh-rsa format. <br><br> For creating ssh keys, see [Create SSH keys diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SslPreference.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SslPreference.java new file mode 100644 index 0000000000000..ed498983db094 --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/SslPreference.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Gets or sets certificate preference if secure communication is enabled. */ +public final class SslPreference extends ExpandableStringEnum { + /** Static value Disabled for SslPreference. */ + public static final SslPreference DISABLED = fromString("Disabled"); + + /** Static value RootCertificate for SslPreference. */ + public static final SslPreference ROOT_CERTIFICATE = fromString("RootCertificate"); + + /** Static value ServerCertificate for SslPreference. */ + public static final SslPreference SERVER_CERTIFICATE = fromString("ServerCertificate"); + + /** + * Creates a new instance of SslPreference value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SslPreference() { + } + + /** + * Creates or finds a SslPreference from its string representation. + * + * @param name a name to look for. + * @return the corresponding SslPreference. + */ + @JsonCreator + public static SslPreference fromString(String name) { + return fromString(name, SslPreference.class); + } + + /** + * Gets known SslPreference values. + * + * @return known SslPreference values. + */ + public static Collection values() { + return values(SslPreference.class); + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/StopRequest.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/StopRequest.java index c6235ff0185fd..9bd9ee6e22155 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/StopRequest.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/StopRequest.java @@ -7,32 +7,42 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Stop SAP Request. */ +/** Stop SAP instance(s) request body. */ @Fluent public final class StopRequest { /* - * A boolean to specify if the SAP system should be hard-stopped. + * This parameter defines how long (in seconds) the soft shutdown waits until the RFC/HTTP clients no longer + * consider the server for calls with load balancing. Value 0 means that the kernel does not wait, but goes + * directly into the next shutdown state, i.e. hard stop. */ - @JsonProperty(value = "hardStop") - private Boolean hardStop; + @JsonProperty(value = "softStopTimeoutSeconds") + private Long softStopTimeoutSeconds; + + /** Creates an instance of StopRequest class. */ + public StopRequest() { + } /** - * Get the hardStop property: A boolean to specify if the SAP system should be hard-stopped. + * Get the softStopTimeoutSeconds property: This parameter defines how long (in seconds) the soft shutdown waits + * until the RFC/HTTP clients no longer consider the server for calls with load balancing. Value 0 means that the + * kernel does not wait, but goes directly into the next shutdown state, i.e. hard stop. * - * @return the hardStop value. + * @return the softStopTimeoutSeconds value. */ - public Boolean hardStop() { - return this.hardStop; + public Long softStopTimeoutSeconds() { + return this.softStopTimeoutSeconds; } /** - * Set the hardStop property: A boolean to specify if the SAP system should be hard-stopped. + * Set the softStopTimeoutSeconds property: This parameter defines how long (in seconds) the soft shutdown waits + * until the RFC/HTTP clients no longer consider the server for calls with load balancing. Value 0 means that the + * kernel does not wait, but goes directly into the next shutdown state, i.e. hard stop. * - * @param hardStop the hardStop value to set. + * @param softStopTimeoutSeconds the softStopTimeoutSeconds value to set. * @return the StopRequest object itself. */ - public StopRequest withHardStop(Boolean hardStop) { - this.hardStop = hardStop; + public StopRequest withSoftStopTimeoutSeconds(Long softStopTimeoutSeconds) { + this.softStopTimeoutSeconds = softStopTimeoutSeconds; return this; } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/StorageConfiguration.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/StorageConfiguration.java new file mode 100644 index 0000000000000..5a18aff2b593a --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/StorageConfiguration.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Gets or sets the storage configuration. */ +@Fluent +public final class StorageConfiguration { + /* + * The properties of the transport directory attached to the VIS. The default for transportFileShareConfiguration + * is the createAndMount flow if storage configuration is missing. + */ + @JsonProperty(value = "transportFileShareConfiguration") + private FileShareConfiguration transportFileShareConfiguration; + + /** Creates an instance of StorageConfiguration class. */ + public StorageConfiguration() { + } + + /** + * Get the transportFileShareConfiguration property: The properties of the transport directory attached to the VIS. + * The default for transportFileShareConfiguration is the createAndMount flow if storage configuration is missing. + * + * @return the transportFileShareConfiguration value. + */ + public FileShareConfiguration transportFileShareConfiguration() { + return this.transportFileShareConfiguration; + } + + /** + * Set the transportFileShareConfiguration property: The properties of the transport directory attached to the VIS. + * The default for transportFileShareConfiguration is the createAndMount flow if storage configuration is missing. + * + * @param transportFileShareConfiguration the transportFileShareConfiguration value to set. + * @return the StorageConfiguration object itself. + */ + public StorageConfiguration withTransportFileShareConfiguration( + FileShareConfiguration transportFileShareConfiguration) { + this.transportFileShareConfiguration = transportFileShareConfiguration; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (transportFileShareConfiguration() != null) { + transportFileShareConfiguration().validate(); + } + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/StorageInformation.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/StorageInformation.java new file mode 100644 index 0000000000000..b3a8c168102b0 --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/StorageInformation.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Storage details of all the Storage accounts attached to the VM. For e.g. NFS on AFS Shared Storage. */ +@Immutable +public final class StorageInformation { + /* + * The id property. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** Creates an instance of StorageInformation class. */ + public StorageInformation() { + } + + /** + * Get the id property: The id property. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ThreeTierConfiguration.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ThreeTierConfiguration.java index 4bceec4683962..9f7aceadf0147 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ThreeTierConfiguration.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ThreeTierConfiguration.java @@ -45,6 +45,22 @@ public final class ThreeTierConfiguration extends InfrastructureConfiguration { @JsonProperty(value = "highAvailabilityConfig") private HighAvailabilityConfiguration highAvailabilityConfig; + /* + * The storage configuration. + */ + @JsonProperty(value = "storageConfiguration") + private StorageConfiguration storageConfiguration; + + /* + * The set of custom names to be used for underlying azure resources that are part of the SAP system. + */ + @JsonProperty(value = "customResourceNames") + private ThreeTierCustomResourceNames customResourceNames; + + /** Creates an instance of ThreeTierConfiguration class. */ + public ThreeTierConfiguration() { + } + /** * Get the networkConfiguration property: Network configuration common to all servers. * @@ -145,6 +161,48 @@ public ThreeTierConfiguration withHighAvailabilityConfig(HighAvailabilityConfigu return this; } + /** + * Get the storageConfiguration property: The storage configuration. + * + * @return the storageConfiguration value. + */ + public StorageConfiguration storageConfiguration() { + return this.storageConfiguration; + } + + /** + * Set the storageConfiguration property: The storage configuration. + * + * @param storageConfiguration the storageConfiguration value to set. + * @return the ThreeTierConfiguration object itself. + */ + public ThreeTierConfiguration withStorageConfiguration(StorageConfiguration storageConfiguration) { + this.storageConfiguration = storageConfiguration; + return this; + } + + /** + * Get the customResourceNames property: The set of custom names to be used for underlying azure resources that are + * part of the SAP system. + * + * @return the customResourceNames value. + */ + public ThreeTierCustomResourceNames customResourceNames() { + return this.customResourceNames; + } + + /** + * Set the customResourceNames property: The set of custom names to be used for underlying azure resources that are + * part of the SAP system. + * + * @param customResourceNames the customResourceNames value to set. + * @return the ThreeTierConfiguration object itself. + */ + public ThreeTierConfiguration withCustomResourceNames(ThreeTierCustomResourceNames customResourceNames) { + this.customResourceNames = customResourceNames; + return this; + } + /** {@inheritDoc} */ @Override public ThreeTierConfiguration withAppResourceGroup(String appResourceGroup) { @@ -190,6 +248,12 @@ public void validate() { if (highAvailabilityConfig() != null) { highAvailabilityConfig().validate(); } + if (storageConfiguration() != null) { + storageConfiguration().validate(); + } + if (customResourceNames() != null) { + customResourceNames().validate(); + } } private static final ClientLogger LOGGER = new ClientLogger(ThreeTierConfiguration.class); diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ThreeTierCustomResourceNames.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ThreeTierCustomResourceNames.java new file mode 100644 index 0000000000000..5b0e47e27d484 --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ThreeTierCustomResourceNames.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The resource-names input to specify custom names for underlying azure resources that are part of a three tier SAP + * system. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "namingPatternType", + defaultImpl = ThreeTierCustomResourceNames.class) +@JsonTypeName("ThreeTierCustomResourceNames") +@JsonSubTypes({@JsonSubTypes.Type(name = "FullResourceName", value = ThreeTierFullResourceNames.class)}) +@Immutable +public class ThreeTierCustomResourceNames { + /** Creates an instance of ThreeTierCustomResourceNames class. */ + public ThreeTierCustomResourceNames() { + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ThreeTierFullResourceNames.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ThreeTierFullResourceNames.java new file mode 100644 index 0000000000000..47296846a74c9 --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ThreeTierFullResourceNames.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The resource name object where the specified values will be full resource names of the corresponding resources in a + * three tier SAP system. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "namingPatternType") +@JsonTypeName("FullResourceName") +@Fluent +public final class ThreeTierFullResourceNames extends ThreeTierCustomResourceNames { + /* + * The full resource names object for central server layer resources. + */ + @JsonProperty(value = "centralServer") + private CentralServerFullResourceNames centralServer; + + /* + * The full resource names object for application layer resources. The number of entries in this list should be + * equal to the number VMs to be created for application layer. + */ + @JsonProperty(value = "applicationServer") + private ApplicationServerFullResourceNames applicationServer; + + /* + * The full resource names object for database layer resources. The number of entries in this list should be equal + * to the number VMs to be created for database layer. + */ + @JsonProperty(value = "databaseServer") + private DatabaseServerFullResourceNames databaseServer; + + /* + * The resource names object for shared storage. + */ + @JsonProperty(value = "sharedStorage") + private SharedStorageResourceNames sharedStorage; + + /** Creates an instance of ThreeTierFullResourceNames class. */ + public ThreeTierFullResourceNames() { + } + + /** + * Get the centralServer property: The full resource names object for central server layer resources. + * + * @return the centralServer value. + */ + public CentralServerFullResourceNames centralServer() { + return this.centralServer; + } + + /** + * Set the centralServer property: The full resource names object for central server layer resources. + * + * @param centralServer the centralServer value to set. + * @return the ThreeTierFullResourceNames object itself. + */ + public ThreeTierFullResourceNames withCentralServer(CentralServerFullResourceNames centralServer) { + this.centralServer = centralServer; + return this; + } + + /** + * Get the applicationServer property: The full resource names object for application layer resources. The number of + * entries in this list should be equal to the number VMs to be created for application layer. + * + * @return the applicationServer value. + */ + public ApplicationServerFullResourceNames applicationServer() { + return this.applicationServer; + } + + /** + * Set the applicationServer property: The full resource names object for application layer resources. The number of + * entries in this list should be equal to the number VMs to be created for application layer. + * + * @param applicationServer the applicationServer value to set. + * @return the ThreeTierFullResourceNames object itself. + */ + public ThreeTierFullResourceNames withApplicationServer(ApplicationServerFullResourceNames applicationServer) { + this.applicationServer = applicationServer; + return this; + } + + /** + * Get the databaseServer property: The full resource names object for database layer resources. The number of + * entries in this list should be equal to the number VMs to be created for database layer. + * + * @return the databaseServer value. + */ + public DatabaseServerFullResourceNames databaseServer() { + return this.databaseServer; + } + + /** + * Set the databaseServer property: The full resource names object for database layer resources. The number of + * entries in this list should be equal to the number VMs to be created for database layer. + * + * @param databaseServer the databaseServer value to set. + * @return the ThreeTierFullResourceNames object itself. + */ + public ThreeTierFullResourceNames withDatabaseServer(DatabaseServerFullResourceNames databaseServer) { + this.databaseServer = databaseServer; + return this; + } + + /** + * Get the sharedStorage property: The resource names object for shared storage. + * + * @return the sharedStorage value. + */ + public SharedStorageResourceNames sharedStorage() { + return this.sharedStorage; + } + + /** + * Set the sharedStorage property: The resource names object for shared storage. + * + * @param sharedStorage the sharedStorage value to set. + * @return the ThreeTierFullResourceNames object itself. + */ + public ThreeTierFullResourceNames withSharedStorage(SharedStorageResourceNames sharedStorage) { + this.sharedStorage = sharedStorage; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (centralServer() != null) { + centralServer().validate(); + } + if (applicationServer() != null) { + applicationServer().validate(); + } + if (databaseServer() != null) { + databaseServer().validate(); + } + if (sharedStorage() != null) { + sharedStorage().validate(); + } + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ThreeTierRecommendationResult.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ThreeTierRecommendationResult.java index 3d9139473fa26..d72b329df605f 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ThreeTierRecommendationResult.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/ThreeTierRecommendationResult.java @@ -51,6 +51,10 @@ public final class ThreeTierRecommendationResult extends SapSizingRecommendation @JsonProperty(value = "applicationServerInstanceCount") private Long applicationServerInstanceCount; + /** Creates an instance of ThreeTierRecommendationResult class. */ + public ThreeTierRecommendationResult() { + } + /** * Get the dbVmSku property: The database VM SKU. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/UpdateMonitorRequest.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/UpdateMonitorRequest.java index 0516c77a4c6d0..20cbd92cf4ef8 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/UpdateMonitorRequest.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/UpdateMonitorRequest.java @@ -25,6 +25,10 @@ public final class UpdateMonitorRequest { @JsonProperty(value = "identity") private UserAssignedServiceIdentity identity; + /** Creates an instance of UpdateMonitorRequest class. */ + public UpdateMonitorRequest() { + } + /** * Get the tags property: Gets or sets the Resource tags. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/UpdateSapApplicationInstanceRequest.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/UpdateSapApplicationInstanceRequest.java index 3708cae3ef859..2078f28cf8798 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/UpdateSapApplicationInstanceRequest.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/UpdateSapApplicationInstanceRequest.java @@ -19,6 +19,10 @@ public final class UpdateSapApplicationInstanceRequest { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; + /** Creates an instance of UpdateSapApplicationInstanceRequest class. */ + public UpdateSapApplicationInstanceRequest() { + } + /** * Get the tags property: Gets or sets the Resource tags. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/UpdateSapCentralInstanceRequest.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/UpdateSapCentralInstanceRequest.java index f075844eee0c4..9430f8a2b61a1 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/UpdateSapCentralInstanceRequest.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/UpdateSapCentralInstanceRequest.java @@ -19,6 +19,10 @@ public final class UpdateSapCentralInstanceRequest { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; + /** Creates an instance of UpdateSapCentralInstanceRequest class. */ + public UpdateSapCentralInstanceRequest() { + } + /** * Get the tags property: Gets or sets the Resource tags. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/UpdateSapDatabaseInstanceRequest.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/UpdateSapDatabaseInstanceRequest.java index 4a4537a32ee03..833459dea2847 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/UpdateSapDatabaseInstanceRequest.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/UpdateSapDatabaseInstanceRequest.java @@ -19,6 +19,10 @@ public final class UpdateSapDatabaseInstanceRequest { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; + /** Creates an instance of UpdateSapDatabaseInstanceRequest class. */ + public UpdateSapDatabaseInstanceRequest() { + } + /** * Get the tags property: Gets or sets the Resource tags. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/UpdateSapVirtualInstanceRequest.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/UpdateSapVirtualInstanceRequest.java index 5dac60464e28f..bb483f8908f15 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/UpdateSapVirtualInstanceRequest.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/UpdateSapVirtualInstanceRequest.java @@ -25,6 +25,10 @@ public final class UpdateSapVirtualInstanceRequest { @JsonProperty(value = "identity") private UserAssignedServiceIdentity identity; + /** Creates an instance of UpdateSapVirtualInstanceRequest class. */ + public UpdateSapVirtualInstanceRequest() { + } + /** * Get the tags property: Gets or sets the Resource tags. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/UserAssignedIdentity.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/UserAssignedIdentity.java index 2f8db3c40a673..415212a85ca69 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/UserAssignedIdentity.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/UserAssignedIdentity.java @@ -23,6 +23,10 @@ public class UserAssignedIdentity { @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) private UUID clientId; + /** Creates an instance of UserAssignedIdentity class. */ + public UserAssignedIdentity() { + } + /** * Get the principalId property: The principal ID of the assigned identity. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/UserAssignedServiceIdentity.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/UserAssignedServiceIdentity.java index 04dc22c5a253e..b1be524dd490c 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/UserAssignedServiceIdentity.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/UserAssignedServiceIdentity.java @@ -26,6 +26,10 @@ public class UserAssignedServiceIdentity { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map userAssignedIdentities; + /** Creates an instance of UserAssignedServiceIdentity class. */ + public UserAssignedServiceIdentity() { + } + /** * Get the type property: Type of manage identity. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/UserProfile.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/UserProfile.java deleted file mode 100644 index 5182edb1003fc..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/UserProfile.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.workloads.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** User profile to configure on a compute resources such as VM, VMSS. */ -@Fluent -public final class UserProfile { - /* - * User name - */ - @JsonProperty(value = "userName", required = true) - private String username; - - /* - * SSH public key data - */ - @JsonProperty(value = "sshPublicKey", required = true) - private String sshPublicKey; - - /** - * Get the username property: User name. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Set the username property: User name. - * - * @param username the username value to set. - * @return the UserProfile object itself. - */ - public UserProfile withUsername(String username) { - this.username = username; - return this; - } - - /** - * Get the sshPublicKey property: SSH public key data. - * - * @return the sshPublicKey value. - */ - public String sshPublicKey() { - return this.sshPublicKey; - } - - /** - * Set the sshPublicKey property: SSH public key data. - * - * @param sshPublicKey the sshPublicKey value to set. - * @return the UserProfile object itself. - */ - public UserProfile withSshPublicKey(String sshPublicKey) { - this.sshPublicKey = sshPublicKey; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (username() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property username in model UserProfile")); - } - if (sshPublicKey() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property sshPublicKey in model UserProfile")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(UserProfile.class); -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/VirtualMachineConfiguration.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/VirtualMachineConfiguration.java index 53a53100665bf..a5e80833640d0 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/VirtualMachineConfiguration.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/VirtualMachineConfiguration.java @@ -29,6 +29,10 @@ public final class VirtualMachineConfiguration { @JsonProperty(value = "osProfile", required = true) private OSProfile osProfile; + /** Creates an instance of VirtualMachineConfiguration class. */ + public VirtualMachineConfiguration() { + } + /** * Get the vmSize property: The virtual machine size. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/VirtualMachineResourceNames.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/VirtualMachineResourceNames.java new file mode 100644 index 0000000000000..dd454e38e1632 --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/VirtualMachineResourceNames.java @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** The resource names object for virtual machine and related resources. */ +@Fluent +public final class VirtualMachineResourceNames { + /* + * The full name for virtual machine. The length of this field can be upto 64 characters. If name is not provided, + * service uses a default name based on the deployment type. For SingleServer, default name is {SID}vm. In case of + * HA-AvZone systems, default name will be {SID}{app/ascs/db}z{a/b}vm with an incrementor at the end in case of + * more than 1 vm per layer. For distributed and HA-AvSet systems, default name will be {SID}{app/ascs/db}vm with + * an incrementor at the end in case of more than 1 vm per layer. + */ + @JsonProperty(value = "vmName") + private String vmName; + + /* + * The full name for virtual-machine's host (computer name). Currently, ACSS only supports host names which are + * less than or equal to 13 characters long. If this value is not provided, vmName will be used as host name. + */ + @JsonProperty(value = "hostName") + private String hostname; + + /* + * The list of network interface name objects for the selected virtual machine. Currently, only one network + * interface is supported per virtual machine. + */ + @JsonProperty(value = "networkInterfaces") + private List networkInterfaces; + + /* + * The full name for OS disk attached to the VM. If this value is not provided, it will be named by ARM as per its + * default naming standards (prefixed with vm name). There is only one OS disk attached per Virtual Machine. + */ + @JsonProperty(value = "osDiskName") + private String osDiskName; + + /* + * The full resource names for virtual machine data disks. This is a dictionary containing list of names of data + * disks per volume. Currently supported volumes for database layer are ['hana/data', 'hana/log', hana/shared', + * 'usr/sap', 'os', 'backup']. For application and cs layers, only 'default' volume is supported + */ + @JsonProperty(value = "dataDiskNames") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map> dataDiskNames; + + /** Creates an instance of VirtualMachineResourceNames class. */ + public VirtualMachineResourceNames() { + } + + /** + * Get the vmName property: The full name for virtual machine. The length of this field can be upto 64 characters. + * If name is not provided, service uses a default name based on the deployment type. For SingleServer, default name + * is {SID}vm. In case of HA-AvZone systems, default name will be {SID}{app/ascs/db}z{a/b}vm with an incrementor at + * the end in case of more than 1 vm per layer. For distributed and HA-AvSet systems, default name will be + * {SID}{app/ascs/db}vm with an incrementor at the end in case of more than 1 vm per layer. + * + * @return the vmName value. + */ + public String vmName() { + return this.vmName; + } + + /** + * Set the vmName property: The full name for virtual machine. The length of this field can be upto 64 characters. + * If name is not provided, service uses a default name based on the deployment type. For SingleServer, default name + * is {SID}vm. In case of HA-AvZone systems, default name will be {SID}{app/ascs/db}z{a/b}vm with an incrementor at + * the end in case of more than 1 vm per layer. For distributed and HA-AvSet systems, default name will be + * {SID}{app/ascs/db}vm with an incrementor at the end in case of more than 1 vm per layer. + * + * @param vmName the vmName value to set. + * @return the VirtualMachineResourceNames object itself. + */ + public VirtualMachineResourceNames withVmName(String vmName) { + this.vmName = vmName; + return this; + } + + /** + * Get the hostname property: The full name for virtual-machine's host (computer name). Currently, ACSS only + * supports host names which are less than or equal to 13 characters long. If this value is not provided, vmName + * will be used as host name. + * + * @return the hostname value. + */ + public String hostname() { + return this.hostname; + } + + /** + * Set the hostname property: The full name for virtual-machine's host (computer name). Currently, ACSS only + * supports host names which are less than or equal to 13 characters long. If this value is not provided, vmName + * will be used as host name. + * + * @param hostname the hostname value to set. + * @return the VirtualMachineResourceNames object itself. + */ + public VirtualMachineResourceNames withHostname(String hostname) { + this.hostname = hostname; + return this; + } + + /** + * Get the networkInterfaces property: The list of network interface name objects for the selected virtual machine. + * Currently, only one network interface is supported per virtual machine. + * + * @return the networkInterfaces value. + */ + public List networkInterfaces() { + return this.networkInterfaces; + } + + /** + * Set the networkInterfaces property: The list of network interface name objects for the selected virtual machine. + * Currently, only one network interface is supported per virtual machine. + * + * @param networkInterfaces the networkInterfaces value to set. + * @return the VirtualMachineResourceNames object itself. + */ + public VirtualMachineResourceNames withNetworkInterfaces(List networkInterfaces) { + this.networkInterfaces = networkInterfaces; + return this; + } + + /** + * Get the osDiskName property: The full name for OS disk attached to the VM. If this value is not provided, it will + * be named by ARM as per its default naming standards (prefixed with vm name). There is only one OS disk attached + * per Virtual Machine. + * + * @return the osDiskName value. + */ + public String osDiskName() { + return this.osDiskName; + } + + /** + * Set the osDiskName property: The full name for OS disk attached to the VM. If this value is not provided, it will + * be named by ARM as per its default naming standards (prefixed with vm name). There is only one OS disk attached + * per Virtual Machine. + * + * @param osDiskName the osDiskName value to set. + * @return the VirtualMachineResourceNames object itself. + */ + public VirtualMachineResourceNames withOsDiskName(String osDiskName) { + this.osDiskName = osDiskName; + return this; + } + + /** + * Get the dataDiskNames property: The full resource names for virtual machine data disks. This is a dictionary + * containing list of names of data disks per volume. Currently supported volumes for database layer are + * ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os', 'backup']. For application and cs layers, only 'default' + * volume is supported. + * + * @return the dataDiskNames value. + */ + public Map> dataDiskNames() { + return this.dataDiskNames; + } + + /** + * Set the dataDiskNames property: The full resource names for virtual machine data disks. This is a dictionary + * containing list of names of data disks per volume. Currently supported volumes for database layer are + * ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os', 'backup']. For application and cs layers, only 'default' + * volume is supported. + * + * @param dataDiskNames the dataDiskNames value to set. + * @return the VirtualMachineResourceNames object itself. + */ + public VirtualMachineResourceNames withDataDiskNames(Map> dataDiskNames) { + this.dataDiskNames = dataDiskNames; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (networkInterfaces() != null) { + networkInterfaces().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/VmssNodesProfile.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/VmssNodesProfile.java deleted file mode 100644 index af7ef3de302c4..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/VmssNodesProfile.java +++ /dev/null @@ -1,110 +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.workloads.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** VMSS profile. */ -@Fluent -public final class VmssNodesProfile extends NodeProfile { - /* - * Minimum number of nodes for autoscale - */ - @JsonProperty(value = "autoScaleMinCount") - private Integer autoScaleMinCount; - - /* - * Maximum number of nodes for autoscale - */ - @JsonProperty(value = "autoScaleMaxCount") - private Integer autoScaleMaxCount; - - /** - * Get the autoScaleMinCount property: Minimum number of nodes for autoscale. - * - * @return the autoScaleMinCount value. - */ - public Integer autoScaleMinCount() { - return this.autoScaleMinCount; - } - - /** - * Set the autoScaleMinCount property: Minimum number of nodes for autoscale. - * - * @param autoScaleMinCount the autoScaleMinCount value to set. - * @return the VmssNodesProfile object itself. - */ - public VmssNodesProfile withAutoScaleMinCount(Integer autoScaleMinCount) { - this.autoScaleMinCount = autoScaleMinCount; - return this; - } - - /** - * Get the autoScaleMaxCount property: Maximum number of nodes for autoscale. - * - * @return the autoScaleMaxCount value. - */ - public Integer autoScaleMaxCount() { - return this.autoScaleMaxCount; - } - - /** - * Set the autoScaleMaxCount property: Maximum number of nodes for autoscale. - * - * @param autoScaleMaxCount the autoScaleMaxCount value to set. - * @return the VmssNodesProfile object itself. - */ - public VmssNodesProfile withAutoScaleMaxCount(Integer autoScaleMaxCount) { - this.autoScaleMaxCount = autoScaleMaxCount; - return this; - } - - /** {@inheritDoc} */ - @Override - public VmssNodesProfile withName(String name) { - super.withName(name); - return this; - } - - /** {@inheritDoc} */ - @Override - public VmssNodesProfile withNodeSku(String nodeSku) { - super.withNodeSku(nodeSku); - return this; - } - - /** {@inheritDoc} */ - @Override - public VmssNodesProfile withOsImage(OsImageProfile osImage) { - super.withOsImage(osImage); - return this; - } - - /** {@inheritDoc} */ - @Override - public VmssNodesProfile withOsDisk(DiskInfo osDisk) { - super.withOsDisk(osDisk); - return this; - } - - /** {@inheritDoc} */ - @Override - public VmssNodesProfile withDataDisks(List dataDisks) { - super.withDataDisks(dataDisks); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/WindowsConfiguration.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/WindowsConfiguration.java index 8a1d046c41b5e..f3b326bb9ec17 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/WindowsConfiguration.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/WindowsConfiguration.java @@ -13,6 +13,10 @@ @JsonTypeName("Windows") @Immutable public final class WindowsConfiguration extends OSConfiguration { + /** Creates an instance of WindowsConfiguration class. */ + public WindowsConfiguration() { + } + /** * Validates the instance. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/WordpressInstanceResource.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/WordpressInstanceResource.java deleted file mode 100644 index 0cc54dca865c7..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/WordpressInstanceResource.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.workloads.models; - -import com.azure.resourcemanager.workloads.fluent.models.WordpressInstanceResourceInner; - -/** An immutable client-side representation of WordpressInstanceResource. */ -public interface WordpressInstanceResource { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the version property: Application version. - * - * @return the version value. - */ - WordpressVersions version(); - - /** - * Gets the databaseName property: Database name used by the application. - * - * @return the databaseName value. - */ - String databaseName(); - - /** - * Gets the databaseUser property: User name used by the application to connect to database. - * - * @return the databaseUser value. - */ - String databaseUser(); - - /** - * Gets the siteUrl property: Site Url to access the WordPress application. - * - * @return the siteUrl value. - */ - String siteUrl(); - - /** - * Gets the provisioningState property: WordPress instance provisioning state. - * - * @return the provisioningState value. - */ - ApplicationProvisioningState provisioningState(); - - /** - * Gets the inner com.azure.resourcemanager.workloads.fluent.models.WordpressInstanceResourceInner object. - * - * @return the inner object. - */ - WordpressInstanceResourceInner innerModel(); -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/WordpressInstanceResourceList.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/WordpressInstanceResourceList.java deleted file mode 100644 index d059f95f5e013..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/WordpressInstanceResourceList.java +++ /dev/null @@ -1,77 +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.workloads.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.workloads.fluent.models.WordpressInstanceResourceInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** WordPress instance resource list. */ -@Fluent -public final class WordpressInstanceResourceList { - /* - * List of resources in current page - */ - @JsonProperty(value = "value") - private List value; - - /* - * Link to next page of resources - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * Get the value property: List of resources in current page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: List of resources in current page. - * - * @param value the value value to set. - * @return the WordpressInstanceResourceList object itself. - */ - public WordpressInstanceResourceList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Link to next page of resources. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: Link to next page of resources. - * - * @param nextLink the nextLink value to set. - * @return the WordpressInstanceResourceList object itself. - */ - public WordpressInstanceResourceList 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) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/WordpressInstances.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/WordpressInstances.java deleted file mode 100644 index d2d907f64d732..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/WordpressInstances.java +++ /dev/null @@ -1,120 +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.workloads.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.workloads.fluent.models.WordpressInstanceResourceInner; - -/** Resource collection API of WordpressInstances. */ -public interface WordpressInstances { - /** - * Lists WordPress instance resources under a phpWorkload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload 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 wordPress instance resource list as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String phpWorkloadName); - - /** - * Lists WordPress instance resources under a phpWorkload resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload 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 wordPress instance resource list as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String phpWorkloadName, Context context); - - /** - * Gets the WordPress instance resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload 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 WordPress instance resource. - */ - WordpressInstanceResource get(String resourceGroupName, String phpWorkloadName); - - /** - * Gets the WordPress instance resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload 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 WordPress instance resource along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String phpWorkloadName, Context context); - - /** - * Create or updated WordPress instance resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param wordpressInstanceResource Resource create or update request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 wordPress instance resource. - */ - WordpressInstanceResource createOrUpdate( - String resourceGroupName, String phpWorkloadName, WordpressInstanceResourceInner wordpressInstanceResource); - - /** - * Create or updated WordPress instance resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload name. - * @param wordpressInstanceResource Resource create or update request payload. - * @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 wordPress instance resource. - */ - WordpressInstanceResource createOrUpdate( - String resourceGroupName, - String phpWorkloadName, - WordpressInstanceResourceInner wordpressInstanceResource, - Context context); - - /** - * Delete WordPress instance resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload 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. - */ - void deleteByResourceGroup(String resourceGroupName, String phpWorkloadName); - - /** - * Delete WordPress instance resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param phpWorkloadName Php workload 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 {@link Response}. - */ - Response deleteWithResponse(String resourceGroupName, String phpWorkloadName, Context context); -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/WordpressVersions.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/WordpressVersions.java deleted file mode 100644 index 661830b4d4f5c..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/WordpressVersions.java +++ /dev/null @@ -1,44 +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.workloads.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for WordpressVersions. */ -public final class WordpressVersions extends ExpandableStringEnum { - /** Static value 5.4.3 for WordpressVersions. */ - public static final WordpressVersions FIVE_FOUR_THREE = fromString("5.4.3"); - - /** Static value 5.4.2 for WordpressVersions. */ - public static final WordpressVersions FIVE_FOUR_TWO = fromString("5.4.2"); - - /** Static value 5.4.1 for WordpressVersions. */ - public static final WordpressVersions FIVE_FOUR_ONE = fromString("5.4.1"); - - /** Static value 5.4 for WordpressVersions. */ - public static final WordpressVersions FIVE_FOUR = fromString("5.4"); - - /** - * Creates or finds a WordpressVersions from its string representation. - * - * @param name a name to look for. - * @return the corresponding WordpressVersions. - */ - @JsonCreator - public static WordpressVersions fromString(String name) { - return fromString(name, WordpressVersions.class); - } - - /** - * Gets known WordpressVersions values. - * - * @return known WordpressVersions values. - */ - public static Collection values() { - return values(WordpressVersions.class); - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/WorkloadKind.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/WorkloadKind.java deleted file mode 100644 index 0107df87f7e5f..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/WorkloadKind.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.workloads.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for WorkloadKind. */ -public final class WorkloadKind extends ExpandableStringEnum { - /** Static value WordPress for WorkloadKind. */ - public static final WorkloadKind WORD_PRESS = fromString("WordPress"); - - /** - * Creates or finds a WorkloadKind from its string representation. - * - * @param name a name to look for. - * @return the corresponding WorkloadKind. - */ - @JsonCreator - public static WorkloadKind fromString(String name) { - return fromString(name, WorkloadKind.class); - } - - /** - * Gets known WorkloadKind values. - * - * @return known WorkloadKind values. - */ - public static Collection values() { - return values(WorkloadKind.class); - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/WorkloadMonitorProvisioningState.java b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/WorkloadMonitorProvisioningState.java index 8399e22227899..e7ae99ade7ab6 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/WorkloadMonitorProvisioningState.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/main/java/com/azure/resourcemanager/workloads/models/WorkloadMonitorProvisioningState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for WorkloadMonitorProvisioningState. */ +/** State of provisioning of the SAP monitor. */ public final class WorkloadMonitorProvisioningState extends ExpandableStringEnum { /** Static value Accepted for WorkloadMonitorProvisioningState. */ public static final WorkloadMonitorProvisioningState ACCEPTED = fromString("Accepted"); @@ -31,6 +31,15 @@ public final class WorkloadMonitorProvisioningState extends ExpandableStringEnum /** Static value Migrating for WorkloadMonitorProvisioningState. */ public static final WorkloadMonitorProvisioningState MIGRATING = fromString("Migrating"); + /** + * Creates a new instance of WorkloadMonitorProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public WorkloadMonitorProvisioningState() { + } + /** * Creates or finds a WorkloadMonitorProvisioningState from its string representation. * diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/MonitorsCreateSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/MonitorsCreateSamples.java index 27bf4d9274f97..7ac647d8a2a93 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/MonitorsCreateSamples.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/MonitorsCreateSamples.java @@ -12,7 +12,7 @@ /** Samples for Monitors Create. */ public final class MonitorsCreateSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/monitors_Create.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/monitors_Create.json */ /** * Sample code: Create a SAP monitor. diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/MonitorsDeleteSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/MonitorsDeleteSamples.java index 037c321d21d50..b5bf6843dde69 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/MonitorsDeleteSamples.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/MonitorsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.workloads.generated; -import com.azure.core.util.Context; - /** Samples for Monitors Delete. */ public final class MonitorsDeleteSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/monitors_Delete.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/monitors_Delete.json */ /** * Sample code: Deletes a SAP monitor. @@ -17,6 +15,6 @@ public final class MonitorsDeleteSamples { * @param manager Entry point to WorkloadsManager. */ public static void deletesASAPMonitor(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.monitors().delete("myResourceGroup", "mySapMonitor", Context.NONE); + manager.monitors().delete("myResourceGroup", "mySapMonitor", com.azure.core.util.Context.NONE); } } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/MonitorsGetByResourceGroupSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/MonitorsGetByResourceGroupSamples.java index b79d70ab56e24..74d140966c800 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/MonitorsGetByResourceGroupSamples.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/MonitorsGetByResourceGroupSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.workloads.generated; -import com.azure.core.util.Context; - /** Samples for Monitors GetByResourceGroup. */ public final class MonitorsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/monitors_Get.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/monitors_Get.json */ /** * Sample code: Get properties of a SAP monitor. @@ -17,6 +15,8 @@ public final class MonitorsGetByResourceGroupSamples { * @param manager Entry point to WorkloadsManager. */ public static void getPropertiesOfASAPMonitor(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.monitors().getByResourceGroupWithResponse("myResourceGroup", "mySapMonitor", Context.NONE); + manager + .monitors() + .getByResourceGroupWithResponse("myResourceGroup", "mySapMonitor", com.azure.core.util.Context.NONE); } } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/MonitorsListByResourceGroupSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/MonitorsListByResourceGroupSamples.java index 187d7f5685c42..6bd14e5667b00 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/MonitorsListByResourceGroupSamples.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/MonitorsListByResourceGroupSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.workloads.generated; -import com.azure.core.util.Context; - /** Samples for Monitors ListByResourceGroup. */ public final class MonitorsListByResourceGroupSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/monitors_ListByRG.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/monitors_ListByRG.json */ /** * Sample code: List all SAP monitors in a resource group. @@ -18,6 +16,6 @@ public final class MonitorsListByResourceGroupSamples { */ public static void listAllSAPMonitorsInAResourceGroup( com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.monitors().listByResourceGroup("example-rg", Context.NONE); + manager.monitors().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/MonitorsListSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/MonitorsListSamples.java index 0b93ae8b71b18..4b316cc90fe80 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/MonitorsListSamples.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/MonitorsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.workloads.generated; -import com.azure.core.util.Context; - /** Samples for Monitors List. */ public final class MonitorsListSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/monitors_List.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/monitors_List.json */ /** * Sample code: List all SAP monitors in a subscription. @@ -17,6 +15,6 @@ public final class MonitorsListSamples { * @param manager Entry point to WorkloadsManager. */ public static void listAllSAPMonitorsInASubscription(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.monitors().list(Context.NONE); + manager.monitors().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/MonitorsUpdateSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/MonitorsUpdateSamples.java index e792c35f9c581..988e80d07fa2a 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/MonitorsUpdateSamples.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/MonitorsUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.workloads.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.workloads.models.ManagedServiceIdentityType; import com.azure.resourcemanager.workloads.models.Monitor; import com.azure.resourcemanager.workloads.models.UserAssignedServiceIdentity; @@ -14,7 +13,7 @@ /** Samples for Monitors Update. */ public final class MonitorsUpdateSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/monitors_PatchTags_Delete.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/monitors_PatchTags_Delete.json */ /** * Sample code: Delete Tags field of a SAP monitor. @@ -25,7 +24,7 @@ public static void deleteTagsFieldOfASAPMonitor(com.azure.resourcemanager.worklo Monitor resource = manager .monitors() - .getByResourceGroupWithResponse("myResourceGroup", "mySapMonitor", Context.NONE) + .getByResourceGroupWithResponse("myResourceGroup", "mySapMonitor", com.azure.core.util.Context.NONE) .getValue(); resource .update() @@ -35,7 +34,7 @@ public static void deleteTagsFieldOfASAPMonitor(com.azure.resourcemanager.worklo } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/monitors_PatchTags.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/monitors_PatchTags.json */ /** * Sample code: Update Tags field of a SAP monitor. @@ -46,7 +45,7 @@ public static void updateTagsFieldOfASAPMonitor(com.azure.resourcemanager.worklo Monitor resource = manager .monitors() - .getByResourceGroupWithResponse("myResourceGroup", "mySapMonitor", Context.NONE) + .getByResourceGroupWithResponse("myResourceGroup", "mySapMonitor", com.azure.core.util.Context.NONE) .getValue(); resource .update() diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/OperationsListSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/OperationsListSamples.java index c3d3422ee5e4b..af2e364a2feeb 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/OperationsListSamples.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/OperationsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.workloads.generated; -import com.azure.core.util.Context; - /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/Operations_List.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/Operations_List.json */ /** * Sample code: Operations. @@ -17,6 +15,6 @@ public final class OperationsListSamples { * @param manager Entry point to WorkloadsManager. */ public static void operations(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.operations().list(Context.NONE); + manager.operations().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/PhpWorkloadsCreateOrUpdateSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/PhpWorkloadsCreateOrUpdateSamples.java deleted file mode 100644 index b4372c7b57414..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/PhpWorkloadsCreateOrUpdateSamples.java +++ /dev/null @@ -1,148 +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.workloads.generated; - -import com.azure.resourcemanager.workloads.models.AzureFrontDoorEnabled; -import com.azure.resourcemanager.workloads.models.BackupProfile; -import com.azure.resourcemanager.workloads.models.CacheProfile; -import com.azure.resourcemanager.workloads.models.DatabaseProfile; -import com.azure.resourcemanager.workloads.models.DatabaseTier; -import com.azure.resourcemanager.workloads.models.DatabaseType; -import com.azure.resourcemanager.workloads.models.DiskInfo; -import com.azure.resourcemanager.workloads.models.DiskStorageType; -import com.azure.resourcemanager.workloads.models.EnableBackup; -import com.azure.resourcemanager.workloads.models.EnableSslEnforcement; -import com.azure.resourcemanager.workloads.models.FileShareStorageType; -import com.azure.resourcemanager.workloads.models.FileShareType; -import com.azure.resourcemanager.workloads.models.FileshareProfile; -import com.azure.resourcemanager.workloads.models.HAEnabled; -import com.azure.resourcemanager.workloads.models.LoadBalancerType; -import com.azure.resourcemanager.workloads.models.ManagedRGConfiguration; -import com.azure.resourcemanager.workloads.models.NetworkProfile; -import com.azure.resourcemanager.workloads.models.NodeProfile; -import com.azure.resourcemanager.workloads.models.OSImageOffer; -import com.azure.resourcemanager.workloads.models.OSImagePublisher; -import com.azure.resourcemanager.workloads.models.OSImageSku; -import com.azure.resourcemanager.workloads.models.OSImageVersion; -import com.azure.resourcemanager.workloads.models.OsImageProfile; -import com.azure.resourcemanager.workloads.models.PhpProfile; -import com.azure.resourcemanager.workloads.models.PhpVersion; -import com.azure.resourcemanager.workloads.models.RedisCacheFamily; -import com.azure.resourcemanager.workloads.models.SearchProfile; -import com.azure.resourcemanager.workloads.models.SearchType; -import com.azure.resourcemanager.workloads.models.SiteProfile; -import com.azure.resourcemanager.workloads.models.Sku; -import com.azure.resourcemanager.workloads.models.UserProfile; -import com.azure.resourcemanager.workloads.models.VmssNodesProfile; -import com.azure.resourcemanager.workloads.models.WorkloadKind; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** Samples for PhpWorkloads CreateOrUpdate. */ -public final class PhpWorkloadsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/phpworkloads/PhpWorkloads_CreateOrUpdate.json - */ - /** - * Sample code: Workloads. - * - * @param manager Entry point to WorkloadsManager. - */ - public static void workloads(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager - .phpWorkloads() - .define("wp39") - .withRegion("eastus2") - .withExistingResourceGroup("test-rg") - .withKind(WorkloadKind.WORD_PRESS) - .withTags(mapOf()) - .withSku(new Sku().withName("Large")) - .withAppLocation("eastus") - .withManagedResourceGroupConfiguration(new ManagedRGConfiguration().withName("php-mrg-wp39")) - .withAdminUserProfile(new UserProfile().withUsername("wpadmin").withSshPublicKey("===SSH=PUBLIC=KEY===")) - .withWebNodesProfile( - new VmssNodesProfile() - .withName("web-server") - .withNodeSku("Standard_DS2_v2") - .withOsImage( - new OsImageProfile() - .withPublisher(OSImagePublisher.CANONICAL) - .withOffer(OSImageOffer.UBUNTU_SERVER) - .withSku(OSImageSku.fromString("18.0-LTS")) - .withVersion(OSImageVersion.LATEST)) - .withOsDisk(new DiskInfo().withStorageType(DiskStorageType.PREMIUM_LRS)) - .withAutoScaleMinCount(1) - .withAutoScaleMaxCount(1)) - .withControllerProfile( - new NodeProfile() - .withName("contoller-vm") - .withNodeSku("Standard_DS2_v2") - .withOsImage( - new OsImageProfile() - .withPublisher(OSImagePublisher.CANONICAL) - .withOffer(OSImageOffer.UBUNTU_SERVER) - .withSku(OSImageSku.fromString("18.0-LTS")) - .withVersion(OSImageVersion.LATEST)) - .withOsDisk(new DiskInfo().withStorageType(DiskStorageType.PREMIUM_LRS)) - .withDataDisks( - Arrays.asList(new DiskInfo().withStorageType(DiskStorageType.PREMIUM_LRS).withSizeInGB(100L)))) - .withNetworkProfile( - new NetworkProfile() - .withLoadBalancerType(LoadBalancerType.LOAD_BALANCER) - .withLoadBalancerSku("Standard") - .withAzureFrontDoorEnabled(AzureFrontDoorEnabled.ENABLED)) - .withDatabaseProfile( - new DatabaseProfile() - .withType(DatabaseType.MY_SQL) - .withServerName("wp-db-server") - .withVersion("5.7") - .withSku("Standard_D32s_v4") - .withTier(DatabaseTier.GENERAL_PURPOSE) - .withHaEnabled(HAEnabled.DISABLED) - .withStorageSku("Premium_LRS") - .withStorageInGB(128L) - .withStorageIops(200L) - .withBackupRetentionDays(7) - .withSslEnforcementEnabled(EnableSslEnforcement.ENABLED)) - .withSiteProfile(new SiteProfile().withDomainName("www.example.com")) - .withFileshareProfile( - new FileshareProfile() - .withShareType(FileShareType.AZURE_FILES) - .withStorageType(FileShareStorageType.PREMIUM_LRS) - .withShareSizeInGB(100L)) - .withPhpProfile(new PhpProfile().withVersion(PhpVersion.SEVEN_THREE)) - .withSearchProfile( - new SearchProfile() - .withNodeSku("Standard_DS2_v2") - .withOsImage( - new OsImageProfile() - .withPublisher(OSImagePublisher.CANONICAL) - .withOffer(OSImageOffer.UBUNTU_SERVER) - .withSku(OSImageSku.fromString("18.0-LTS")) - .withVersion(OSImageVersion.LATEST)) - .withOsDisk(new DiskInfo().withStorageType(DiskStorageType.PREMIUM_LRS)) - .withSearchType(SearchType.ELASTIC)) - .withCacheProfile( - new CacheProfile() - .withName("wp-cache") - .withSkuName("Basic") - .withFamily(RedisCacheFamily.C) - .withCapacity(0L)) - .withBackupProfile(new BackupProfile().withBackupEnabled(EnableBackup.DISABLED)) - .create(); - } - - @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/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/PhpWorkloadsDeleteSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/PhpWorkloadsDeleteSamples.java deleted file mode 100644 index a48ae635912f6..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/PhpWorkloadsDeleteSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.workloads.generated; - -import com.azure.core.util.Context; - -/** Samples for PhpWorkloads Delete. */ -public final class PhpWorkloadsDeleteSamples { - /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/phpworkloads/PhpWorkloads_Delete.json - */ - /** - * Sample code: Workloads. - * - * @param manager Entry point to WorkloadsManager. - */ - public static void workloads(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.phpWorkloads().delete("test-rg", "wp39", "false", Context.NONE); - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/PhpWorkloadsGetByResourceGroupSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/PhpWorkloadsGetByResourceGroupSamples.java deleted file mode 100644 index 0d68817c89131..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/PhpWorkloadsGetByResourceGroupSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.workloads.generated; - -import com.azure.core.util.Context; - -/** Samples for PhpWorkloads GetByResourceGroup. */ -public final class PhpWorkloadsGetByResourceGroupSamples { - /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/phpworkloads/PhpWorkloads_Get.json - */ - /** - * Sample code: Workloads. - * - * @param manager Entry point to WorkloadsManager. - */ - public static void workloads(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.phpWorkloads().getByResourceGroupWithResponse("test-rg", "wp39", Context.NONE); - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/PhpWorkloadsListByResourceGroupSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/PhpWorkloadsListByResourceGroupSamples.java deleted file mode 100644 index 46981f1eec860..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/PhpWorkloadsListByResourceGroupSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.workloads.generated; - -import com.azure.core.util.Context; - -/** Samples for PhpWorkloads ListByResourceGroup. */ -public final class PhpWorkloadsListByResourceGroupSamples { - /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/phpworkloads/PhpWorkloads_ListByResourceGroup.json - */ - /** - * Sample code: Workloads. - * - * @param manager Entry point to WorkloadsManager. - */ - public static void workloads(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.phpWorkloads().listByResourceGroup("test-rg", Context.NONE); - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/PhpWorkloadsListSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/PhpWorkloadsListSamples.java deleted file mode 100644 index 01ec31d5107a0..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/PhpWorkloadsListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.workloads.generated; - -import com.azure.core.util.Context; - -/** Samples for PhpWorkloads List. */ -public final class PhpWorkloadsListSamples { - /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/phpworkloads/PhpWorkloads_ListBySubscription.json - */ - /** - * Sample code: Workloads. - * - * @param manager Entry point to WorkloadsManager. - */ - public static void workloads(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.phpWorkloads().list(Context.NONE); - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/PhpWorkloadsUpdateSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/PhpWorkloadsUpdateSamples.java deleted file mode 100644 index 4fea151bd1c07..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/PhpWorkloadsUpdateSamples.java +++ /dev/null @@ -1,44 +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.workloads.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.workloads.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.workloads.models.PatchResourceRequestBodyIdentity; -import com.azure.resourcemanager.workloads.models.PhpWorkloadResource; -import java.util.HashMap; -import java.util.Map; - -/** Samples for PhpWorkloads Update. */ -public final class PhpWorkloadsUpdateSamples { - /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/phpworkloads/PhpWorkloads_Update.json - */ - /** - * Sample code: Workloads. - * - * @param manager Entry point to WorkloadsManager. - */ - public static void workloads(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - PhpWorkloadResource resource = - manager.phpWorkloads().getByResourceGroupWithResponse("test-rg", "wp39", Context.NONE).getValue(); - resource - .update() - .withTags(mapOf("tag_name", "tag_value")) - .withIdentity(new PatchResourceRequestBodyIdentity().withType(ManagedServiceIdentityType.NONE)) - .apply(); - } - - @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/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/ProviderInstancesCreateSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/ProviderInstancesCreateSamples.java index a9a45151a00d7..9cbc06ffb0be9 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/ProviderInstancesCreateSamples.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/ProviderInstancesCreateSamples.java @@ -10,12 +10,13 @@ import com.azure.resourcemanager.workloads.models.PrometheusHaClusterProviderInstanceProperties; import com.azure.resourcemanager.workloads.models.PrometheusOSProviderInstanceProperties; import com.azure.resourcemanager.workloads.models.SapNetWeaverProviderInstanceProperties; +import com.azure.resourcemanager.workloads.models.SslPreference; import java.util.Arrays; /** Samples for ProviderInstances Create. */ public final class ProviderInstancesCreateSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/MsSqlServerProviderInstance_Create.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/MsSqlServerProviderInstance_Create.json */ /** * Sample code: Create a MsSqlServer provider. @@ -32,14 +33,43 @@ public static void createAMsSqlServerProvider(com.azure.resourcemanager.workload .withHostname("hostname") .withDbPort("5912") .withDbUsername("user") - .withDbPassword("****") - .withDbPasswordUri("") - .withSapSid("sid")) + .withDbPassword("fakeTokenPlaceholder") + .withDbPasswordUri("fakeTokenPlaceholder") + .withSapSid("sid") + .withSslPreference(SslPreference.SERVER_CERTIFICATE) + .withSslCertificateUri("https://storageaccount.blob.core.windows.net/containername/filename")) .create(); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/ProviderInstances_Create.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/Db2ProviderInstances_Create_Root_Certificate.json + */ + /** + * Sample code: Create a Db2 provider with Root Certificate. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createADb2ProviderWithRootCertificate( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .providerInstances() + .define("myProviderInstance") + .withExistingMonitor("myResourceGroup", "mySapMonitor") + .withProviderSettings( + new DB2ProviderInstanceProperties() + .withHostname("hostname") + .withDbName("dbName") + .withDbPort("dbPort") + .withDbUsername("username") + .withDbPassword("fakeTokenPlaceholder") + .withDbPasswordUri("fakeTokenPlaceholder") + .withSapSid("SID") + .withSslPreference(SslPreference.ROOT_CERTIFICATE)) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/ProviderInstances_Create.json */ /** * Sample code: Create a SAP monitor Hana provider. @@ -58,15 +88,72 @@ public static void createASAPMonitorHanaProvider(com.azure.resourcemanager.workl .withSqlPort("0000") .withInstanceNumber("00") .withDbUsername("user") - .withDbPassword("****") - .withDbPasswordUri("") - .withDbSslCertificateUri("https://storageaccount.blob.core.windows.net/containername/filename") - .withSslHostnameInCertificate("xyz.domain.com")) + .withDbPassword("fakeTokenPlaceholder") + .withDbPasswordUri("fakeTokenPlaceholder") + .withSslCertificateUri("https://storageaccount.blob.core.windows.net/containername/filename") + .withSslHostnameInCertificate("xyz.domain.com") + .withSslPreference(SslPreference.SERVER_CERTIFICATE) + .withSapSid("SID")) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/NetWeaverProviderInstances_Create_Root_Certificate.json + */ + /** + * Sample code: Create a SAP monitor NetWeaver provider with Root Certificate. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createASAPMonitorNetWeaverProviderWithRootCertificate( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .providerInstances() + .define("myProviderInstance") + .withExistingMonitor("myResourceGroup", "mySapMonitor") + .withProviderSettings( + new SapNetWeaverProviderInstanceProperties() + .withSapSid("SID") + .withSapHostname("name") + .withSapInstanceNr("00") + .withSapHostFileEntries(Arrays.asList("127.0.0.1 name fqdn")) + .withSapUsername("username") + .withSapPassword("fakeTokenPlaceholder") + .withSapPasswordUri("fakeTokenPlaceholder") + .withSapClientId("111") + .withSapPortNumber("1234") + .withSslPreference(SslPreference.ROOT_CERTIFICATE)) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/MsSqlServerProviderInstance_Create_Root_Certificate.json + */ + /** + * Sample code: Create a MsSqlServer provider with Root Certificate. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createAMsSqlServerProviderWithRootCertificate( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .providerInstances() + .define("myProviderInstance") + .withExistingMonitor("myResourceGroup", "mySapMonitor") + .withProviderSettings( + new MsSqlServerProviderInstanceProperties() + .withHostname("hostname") + .withDbPort("5912") + .withDbUsername("user") + .withDbPassword("fakeTokenPlaceholder") + .withDbPasswordUri("fakeTokenPlaceholder") + .withSapSid("sid") + .withSslPreference(SslPreference.ROOT_CERTIFICATE)) .create(); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/PrometheusHaClusterProviderInstances_Create.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/PrometheusHaClusterProviderInstances_Create.json */ /** * Sample code: Create a PrometheusHaCluster provider. @@ -84,12 +171,38 @@ public static void createAPrometheusHaClusterProvider( .withPrometheusUrl("http://192.168.0.0:9090/metrics") .withHostname("hostname") .withSid("sid") - .withClusterName("clusterName")) + .withClusterName("clusterName") + .withSslPreference(SslPreference.SERVER_CERTIFICATE) + .withSslCertificateUri("https://storageaccount.blob.core.windows.net/containername/filename")) .create(); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/Db2ProviderInstances_Create.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/PrometheusHaClusterProviderInstances_Create_Root_Certificate.json + */ + /** + * Sample code: Create a PrometheusHaCluster provider with Root Certificate. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createAPrometheusHaClusterProviderWithRootCertificate( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .providerInstances() + .define("myProviderInstance") + .withExistingMonitor("myResourceGroup", "mySapMonitor") + .withProviderSettings( + new PrometheusHaClusterProviderInstanceProperties() + .withPrometheusUrl("http://192.168.0.0:9090/metrics") + .withHostname("hostname") + .withSid("sid") + .withClusterName("clusterName") + .withSslPreference(SslPreference.ROOT_CERTIFICATE)) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/Db2ProviderInstances_Create.json */ /** * Sample code: Create a Db2 provider. @@ -107,14 +220,38 @@ public static void createADb2Provider(com.azure.resourcemanager.workloads.Worklo .withDbName("dbName") .withDbPort("dbPort") .withDbUsername("username") - .withDbPassword("password") - .withDbPasswordUri("") + .withDbPassword("fakeTokenPlaceholder") + .withDbPasswordUri("fakeTokenPlaceholder") + .withSapSid("SID") + .withSslPreference(SslPreference.SERVER_CERTIFICATE) + .withSslCertificateUri("https://storageaccount.blob.core.windows.net/containername/filename")) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/PrometheusOSProviderInstances_Create_Root_Certificate.json + */ + /** + * Sample code: Create a OS provider with Root Certificate. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createAOSProviderWithRootCertificate( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .providerInstances() + .define("myProviderInstance") + .withExistingMonitor("myResourceGroup", "mySapMonitor") + .withProviderSettings( + new PrometheusOSProviderInstanceProperties() + .withPrometheusUrl("http://192.168.0.0:9090/metrics") + .withSslPreference(SslPreference.ROOT_CERTIFICATE) .withSapSid("SID")) .create(); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/PrometheusOSProviderInstances_Create.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/PrometheusOSProviderInstances_Create.json */ /** * Sample code: Create a OS provider. @@ -127,12 +264,16 @@ public static void createAOSProvider(com.azure.resourcemanager.workloads.Workloa .define("myProviderInstance") .withExistingMonitor("myResourceGroup", "mySapMonitor") .withProviderSettings( - new PrometheusOSProviderInstanceProperties().withPrometheusUrl("http://192.168.0.0:9090/metrics")) + new PrometheusOSProviderInstanceProperties() + .withPrometheusUrl("http://192.168.0.0:9090/metrics") + .withSslPreference(SslPreference.SERVER_CERTIFICATE) + .withSslCertificateUri("https://storageaccount.blob.core.windows.net/containername/filename") + .withSapSid("SID")) .create(); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/NetWeaverProviderInstances_Create.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/NetWeaverProviderInstances_Create.json */ /** * Sample code: Create a SAP monitor NetWeaver provider. @@ -152,11 +293,41 @@ public static void createASAPMonitorNetWeaverProvider( .withSapInstanceNr("00") .withSapHostFileEntries(Arrays.asList("127.0.0.1 name fqdn")) .withSapUsername("username") - .withSapPassword("****") - .withSapPasswordUri("") + .withSapPassword("fakeTokenPlaceholder") + .withSapPasswordUri("fakeTokenPlaceholder") .withSapClientId("111") .withSapPortNumber("1234") - .withSapSslCertificateUri("https://storageaccount.blob.core.windows.net/containername/filename")) + .withSslCertificateUri("https://storageaccount.blob.core.windows.net/containername/filename") + .withSslPreference(SslPreference.SERVER_CERTIFICATE)) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/ProviderInstances_Create_Root_Certificate.json + */ + /** + * Sample code: Create a SAP monitor Hana provider with Root Certificate. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createASAPMonitorHanaProviderWithRootCertificate( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .providerInstances() + .define("myProviderInstance") + .withExistingMonitor("myResourceGroup", "mySapMonitor") + .withProviderSettings( + new HanaDbProviderInstanceProperties() + .withHostname("name") + .withDbName("db") + .withSqlPort("0000") + .withInstanceNumber("00") + .withDbUsername("user") + .withDbPassword("fakeTokenPlaceholder") + .withDbPasswordUri("fakeTokenPlaceholder") + .withSslHostnameInCertificate("xyz.domain.com") + .withSslPreference(SslPreference.ROOT_CERTIFICATE) + .withSapSid("SID")) .create(); } } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/ProviderInstancesDeleteSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/ProviderInstancesDeleteSamples.java index 4f51768d64640..c8754eb5964dc 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/ProviderInstancesDeleteSamples.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/ProviderInstancesDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.workloads.generated; -import com.azure.core.util.Context; - /** Samples for ProviderInstances Delete. */ public final class ProviderInstancesDeleteSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/ProviderInstances_Delete.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/ProviderInstances_Delete.json */ /** * Sample code: Deletes a SAP monitor provider. @@ -17,6 +15,8 @@ public final class ProviderInstancesDeleteSamples { * @param manager Entry point to WorkloadsManager. */ public static void deletesASAPMonitorProvider(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.providerInstances().delete("myResourceGroup", "mySapMonitor", "myProviderInstance", Context.NONE); + manager + .providerInstances() + .delete("myResourceGroup", "mySapMonitor", "myProviderInstance", com.azure.core.util.Context.NONE); } } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/ProviderInstancesGetSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/ProviderInstancesGetSamples.java index aadcd35b48e55..b9bbd0181bd4c 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/ProviderInstancesGetSamples.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/ProviderInstancesGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.workloads.generated; -import com.azure.core.util.Context; - /** Samples for ProviderInstances Get. */ public final class ProviderInstancesGetSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/ProviderInstances_Get.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/ProviderInstances_Get.json */ /** * Sample code: Get properties of a SAP monitor Hana provider. @@ -20,11 +18,11 @@ public static void getPropertiesOfASAPMonitorHanaProvider( com.azure.resourcemanager.workloads.WorkloadsManager manager) { manager .providerInstances() - .getWithResponse("myResourceGroup", "mySapMonitor", "myProviderInstance", Context.NONE); + .getWithResponse("myResourceGroup", "mySapMonitor", "myProviderInstance", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/PrometheusHaClusterProviderInstances_Get.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/PrometheusHaClusterProviderInstances_Get.json */ /** * Sample code: Get properties of a PrometheusHaCluster provider. @@ -35,11 +33,11 @@ public static void getPropertiesOfAPrometheusHaClusterProvider( com.azure.resourcemanager.workloads.WorkloadsManager manager) { manager .providerInstances() - .getWithResponse("myResourceGroup", "mySapMonitor", "myProviderInstance", Context.NONE); + .getWithResponse("myResourceGroup", "mySapMonitor", "myProviderInstance", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/PrometheusOSProviderInstances_Get.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/PrometheusOSProviderInstances_Get.json */ /** * Sample code: Get properties of a OS provider. @@ -49,11 +47,11 @@ public static void getPropertiesOfAPrometheusHaClusterProvider( public static void getPropertiesOfAOSProvider(com.azure.resourcemanager.workloads.WorkloadsManager manager) { manager .providerInstances() - .getWithResponse("myResourceGroup", "mySapMonitor", "myProviderInstance", Context.NONE); + .getWithResponse("myResourceGroup", "mySapMonitor", "myProviderInstance", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/Db2ProviderInstances_Get.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/Db2ProviderInstances_Get.json */ /** * Sample code: Get properties of a Db2 provider. @@ -63,11 +61,11 @@ public static void getPropertiesOfAOSProvider(com.azure.resourcemanager.workload public static void getPropertiesOfADb2Provider(com.azure.resourcemanager.workloads.WorkloadsManager manager) { manager .providerInstances() - .getWithResponse("myResourceGroup", "mySapMonitor", "myProviderInstance", Context.NONE); + .getWithResponse("myResourceGroup", "mySapMonitor", "myProviderInstance", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/MsSqlServerProviderInstance_Get.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/MsSqlServerProviderInstance_Get.json */ /** * Sample code: Get properties of a MsSqlServer provider. @@ -78,11 +76,11 @@ public static void getPropertiesOfAMsSqlServerProvider( com.azure.resourcemanager.workloads.WorkloadsManager manager) { manager .providerInstances() - .getWithResponse("myResourceGroup", "mySapMonitor", "myProviderInstance", Context.NONE); + .getWithResponse("myResourceGroup", "mySapMonitor", "myProviderInstance", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/NetWeaverProviderInstances_Get.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/NetWeaverProviderInstances_Get.json */ /** * Sample code: Get properties of a SAP monitor NetWeaver provider. @@ -93,6 +91,6 @@ public static void getPropertiesOfASAPMonitorNetWeaverProvider( com.azure.resourcemanager.workloads.WorkloadsManager manager) { manager .providerInstances() - .getWithResponse("myResourceGroup", "mySapMonitor", "myProviderInstance", Context.NONE); + .getWithResponse("myResourceGroup", "mySapMonitor", "myProviderInstance", com.azure.core.util.Context.NONE); } } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/ProviderInstancesListSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/ProviderInstancesListSamples.java index 354f1c2cc701b..980309f517727 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/ProviderInstancesListSamples.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/ProviderInstancesListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.workloads.generated; -import com.azure.core.util.Context; - /** Samples for ProviderInstances List. */ public final class ProviderInstancesListSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/workloadmonitor/ProviderInstances_List.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/ProviderInstances_List.json */ /** * Sample code: List all SAP monitors providers in a subscription. @@ -18,6 +16,6 @@ public final class ProviderInstancesListSamples { */ public static void listAllSAPMonitorsProvidersInASubscription( com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.providerInstances().list("myResourceGroup", "mySapMonitor", Context.NONE); + manager.providerInstances().list("myResourceGroup", "mySapMonitor", com.azure.core.util.Context.NONE); } } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/ResourceProviderSapAvailabilityZoneDetailsSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/ResourceProviderSapAvailabilityZoneDetailsSamples.java index 53adb12c21ed2..ae285b03ffde7 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/ResourceProviderSapAvailabilityZoneDetailsSamples.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/ResourceProviderSapAvailabilityZoneDetailsSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.workloads.generated; -import com.azure.core.util.Context; - /** Samples for ResourceProvider SapAvailabilityZoneDetails. */ public final class ResourceProviderSapAvailabilityZoneDetailsSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPAvailabilityZoneDetails_northeurope.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPAvailabilityZoneDetails_northeurope.json */ /** * Sample code: SAPAvailabilityZoneDetails_northeurope. @@ -18,11 +16,13 @@ public final class ResourceProviderSapAvailabilityZoneDetailsSamples { */ public static void sAPAvailabilityZoneDetailsNortheurope( com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.resourceProviders().sapAvailabilityZoneDetailsWithResponse("centralus", null, Context.NONE); + manager + .resourceProviders() + .sapAvailabilityZoneDetailsWithResponse("centralus", null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPAvailabilityZoneDetails_eastus.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPAvailabilityZoneDetails_eastus.json */ /** * Sample code: SAPAvailabilityZoneDetails_eastus. @@ -30,6 +30,8 @@ public static void sAPAvailabilityZoneDetailsNortheurope( * @param manager Entry point to WorkloadsManager. */ public static void sAPAvailabilityZoneDetailsEastus(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.resourceProviders().sapAvailabilityZoneDetailsWithResponse("centralus", null, Context.NONE); + manager + .resourceProviders() + .sapAvailabilityZoneDetailsWithResponse("centralus", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/ResourceProviderSapDiskConfigurationsSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/ResourceProviderSapDiskConfigurationsSamples.java index d9559796a7ec3..6f2637803eb82 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/ResourceProviderSapDiskConfigurationsSamples.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/ResourceProviderSapDiskConfigurationsSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.workloads.generated; -import com.azure.core.util.Context; - /** Samples for ResourceProvider SapDiskConfigurations. */ public final class ResourceProviderSapDiskConfigurationsSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPDiskConfigurations_NonProd.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPDiskConfigurations_NonProd.json */ /** * Sample code: SAPDiskConfigurations_NonProd. @@ -17,11 +15,13 @@ public final class ResourceProviderSapDiskConfigurationsSamples { * @param manager Entry point to WorkloadsManager. */ public static void sAPDiskConfigurationsNonProd(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.resourceProviders().sapDiskConfigurationsWithResponse("centralus", null, Context.NONE); + manager + .resourceProviders() + .sapDiskConfigurationsWithResponse("centralus", null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPDiskConfigurations_Prod.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPDiskConfigurations_Prod.json */ /** * Sample code: SAPDiskConfigurations_Prod. @@ -29,6 +29,8 @@ public static void sAPDiskConfigurationsNonProd(com.azure.resourcemanager.worklo * @param manager Entry point to WorkloadsManager. */ public static void sAPDiskConfigurationsProd(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.resourceProviders().sapDiskConfigurationsWithResponse("centralus", null, Context.NONE); + manager + .resourceProviders() + .sapDiskConfigurationsWithResponse("centralus", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/ResourceProviderSapSizingRecommendationsSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/ResourceProviderSapSizingRecommendationsSamples.java index 1271c8f46f606..cf3d6f952a1a7 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/ResourceProviderSapSizingRecommendationsSamples.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/ResourceProviderSapSizingRecommendationsSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.workloads.generated; -import com.azure.core.util.Context; - /** Samples for ResourceProvider SapSizingRecommendations. */ public final class ResourceProviderSapSizingRecommendationsSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_Distributed.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_Distributed.json */ /** * Sample code: SAPSizingRecommendations_S4HANA_Distributed. @@ -18,11 +16,13 @@ public final class ResourceProviderSapSizingRecommendationsSamples { */ public static void sAPSizingRecommendationsS4HANADistributed( com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.resourceProviders().sapSizingRecommendationsWithResponse("centralus", null, Context.NONE); + manager + .resourceProviders() + .sapSizingRecommendationsWithResponse("centralus", null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_SingleServer.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_SingleServer.json */ /** * Sample code: SAPSizingRecommendations_S4HANA_SingleServer. @@ -31,11 +31,13 @@ public static void sAPSizingRecommendationsS4HANADistributed( */ public static void sAPSizingRecommendationsS4HANASingleServer( com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.resourceProviders().sapSizingRecommendationsWithResponse("centralus", null, Context.NONE); + manager + .resourceProviders() + .sapSizingRecommendationsWithResponse("centralus", null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_HA_AvZone.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_HA_AvZone.json */ /** * Sample code: SAPSizingRecommendations_S4HANA_DistributedHA_AvZone. @@ -44,11 +46,13 @@ public static void sAPSizingRecommendationsS4HANASingleServer( */ public static void sAPSizingRecommendationsS4HANADistributedHAAvZone( com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.resourceProviders().sapSizingRecommendationsWithResponse("centralus", null, Context.NONE); + manager + .resourceProviders() + .sapSizingRecommendationsWithResponse("centralus", null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_HA_AvSet.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_HA_AvSet.json */ /** * Sample code: SAPSizingRecommendations_S4HANA_DistributedHA_AvSet. @@ -57,6 +61,8 @@ public static void sAPSizingRecommendationsS4HANADistributedHAAvZone( */ public static void sAPSizingRecommendationsS4HANADistributedHAAvSet( com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.resourceProviders().sapSizingRecommendationsWithResponse("centralus", null, Context.NONE); + manager + .resourceProviders() + .sapSizingRecommendationsWithResponse("centralus", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/ResourceProviderSapSupportedSkuSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/ResourceProviderSapSupportedSkuSamples.java index 3f685b41fec31..638d2f3a5ade8 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/ResourceProviderSapSupportedSkuSamples.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/ResourceProviderSapSupportedSkuSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.workloads.generated; -import com.azure.core.util.Context; - /** Samples for ResourceProvider SapSupportedSku. */ public final class ResourceProviderSapSupportedSkuSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPSupportedSkus_SingleServer.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPSupportedSkus_SingleServer.json */ /** * Sample code: SAPSupportedSkus_SingleServer. @@ -17,11 +15,11 @@ public final class ResourceProviderSapSupportedSkuSamples { * @param manager Entry point to WorkloadsManager. */ public static void sAPSupportedSkusSingleServer(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.resourceProviders().sapSupportedSkuWithResponse("centralus", null, Context.NONE); + manager.resourceProviders().sapSupportedSkuWithResponse("centralus", null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPSupportedSkus_Distributed.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPSupportedSkus_Distributed.json */ /** * Sample code: SAPSupportedSkus_Distributed. @@ -29,11 +27,11 @@ public static void sAPSupportedSkusSingleServer(com.azure.resourcemanager.worklo * @param manager Entry point to WorkloadsManager. */ public static void sAPSupportedSkusDistributed(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.resourceProviders().sapSupportedSkuWithResponse("centralus", null, Context.NONE); + manager.resourceProviders().sapSupportedSkuWithResponse("centralus", null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPSupportedSkus_DistributedHA_AvZone.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPSupportedSkus_DistributedHA_AvZone.json */ /** * Sample code: SAPSupportedSkus_DistributedHA_AvZone. @@ -42,11 +40,11 @@ public static void sAPSupportedSkusDistributed(com.azure.resourcemanager.workloa */ public static void sAPSupportedSkusDistributedHAAvZone( com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.resourceProviders().sapSupportedSkuWithResponse("centralus", null, Context.NONE); + manager.resourceProviders().sapSupportedSkuWithResponse("centralus", null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPSupportedSkus_DistributedHA_AvSet.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPSupportedSkus_DistributedHA_AvSet.json */ /** * Sample code: SAPSupportedSkus_DistributedHA_AvSet. @@ -55,6 +53,6 @@ public static void sAPSupportedSkusDistributedHAAvZone( */ public static void sAPSupportedSkusDistributedHAAvSet( com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.resourceProviders().sapSupportedSkuWithResponse("centralus", null, Context.NONE); + manager.resourceProviders().sapSupportedSkuWithResponse("centralus", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapApplicationServerInstancesCreateSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapApplicationServerInstancesCreateSamples.java index b4cddf09f19e1..f0577817c4b32 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapApplicationServerInstancesCreateSamples.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapApplicationServerInstancesCreateSamples.java @@ -10,7 +10,7 @@ /** Samples for SapApplicationServerInstances Create. */ public final class SapApplicationServerInstancesCreateSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPApplicationServerInstances_Create.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPApplicationServerInstances_Create.json */ /** * Sample code: SAPApplicationServerInstances_Create. @@ -28,6 +28,25 @@ public static void sAPApplicationServerInstancesCreate( .create(); } + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPApplicationServerInstances_Create_HA_AvSet.json + */ + /** + * Sample code: Create SAP Application Server Instances for HA System with Availability Set. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createSAPApplicationServerInstancesForHASystemWithAvailabilitySet( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapApplicationServerInstances() + .define("app01") + .withRegion("westcentralus") + .withExistingSapVirtualInstance("test-rg", "X00") + .withTags(mapOf()) + .create(); + } + @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapApplicationServerInstancesDeleteSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapApplicationServerInstancesDeleteSamples.java index 5765e282caf3f..1071665409e99 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapApplicationServerInstancesDeleteSamples.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapApplicationServerInstancesDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.workloads.generated; -import com.azure.core.util.Context; - /** Samples for SapApplicationServerInstances Delete. */ public final class SapApplicationServerInstancesDeleteSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPApplicationServerInstances_Delete.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPApplicationServerInstances_Delete.json */ /** * Sample code: SAPApplicationServerInstances_Delete. @@ -18,6 +16,6 @@ public final class SapApplicationServerInstancesDeleteSamples { */ public static void sAPApplicationServerInstancesDelete( com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.sapApplicationServerInstances().delete("test-rg", "X00", "app01", Context.NONE); + manager.sapApplicationServerInstances().delete("test-rg", "X00", "app01", com.azure.core.util.Context.NONE); } } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapApplicationServerInstancesGetSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapApplicationServerInstancesGetSamples.java index fd8c900357bff..95e4ce6cf8857 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapApplicationServerInstancesGetSamples.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapApplicationServerInstancesGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.workloads.generated; -import com.azure.core.util.Context; - /** Samples for SapApplicationServerInstances Get. */ public final class SapApplicationServerInstancesGetSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPApplicationServerInstances_Get.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPApplicationServerInstances_Get.json */ /** * Sample code: SAPApplicationServerInstances_Get. @@ -17,6 +15,8 @@ public final class SapApplicationServerInstancesGetSamples { * @param manager Entry point to WorkloadsManager. */ public static void sAPApplicationServerInstancesGet(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.sapApplicationServerInstances().getWithResponse("test-rg", "X00", "app01", Context.NONE); + manager + .sapApplicationServerInstances() + .getWithResponse("test-rg", "X00", "app01", com.azure.core.util.Context.NONE); } } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapApplicationServerInstancesListSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapApplicationServerInstancesListSamples.java index aa31083ab91f4..583184aee3883 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapApplicationServerInstancesListSamples.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapApplicationServerInstancesListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.workloads.generated; -import com.azure.core.util.Context; - /** Samples for SapApplicationServerInstances List. */ public final class SapApplicationServerInstancesListSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPApplicationServerInstances_List.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPApplicationServerInstances_List.json */ /** * Sample code: SAPApplicationServerInstances_List. @@ -17,6 +15,6 @@ public final class SapApplicationServerInstancesListSamples { * @param manager Entry point to WorkloadsManager. */ public static void sAPApplicationServerInstancesList(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.sapApplicationServerInstances().list("test-rg", "X00", Context.NONE); + manager.sapApplicationServerInstances().list("test-rg", "X00", com.azure.core.util.Context.NONE); } } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapApplicationServerInstancesStartInstanceSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapApplicationServerInstancesStartInstanceSamples.java new file mode 100644 index 0000000000000..def92ec099785 --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapApplicationServerInstancesStartInstanceSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.generated; + +/** Samples for SapApplicationServerInstances StartInstance. */ +public final class SapApplicationServerInstancesStartInstanceSamples { + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPApplicationServerInstances_StartInstance.json + */ + /** + * Sample code: Start the SAP Application Server Instance. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void startTheSAPApplicationServerInstance( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapApplicationServerInstances() + .startInstance("test-rg", "X00", "app01", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapApplicationServerInstancesStopInstanceSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapApplicationServerInstancesStopInstanceSamples.java new file mode 100644 index 0000000000000..b5d01ee986c2d --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapApplicationServerInstancesStopInstanceSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.generated; + +import com.azure.resourcemanager.workloads.models.StopRequest; + +/** Samples for SapApplicationServerInstances StopInstance. */ +public final class SapApplicationServerInstancesStopInstanceSamples { + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPApplicationServerInstances_StopInstance.json + */ + /** + * Sample code: Stop the SAP Application Server Instance. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void stopTheSAPApplicationServerInstance( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapApplicationServerInstances() + .stopInstance( + "test-rg", + "X00", + "app01", + new StopRequest().withSoftStopTimeoutSeconds(0L), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapApplicationServerInstancesUpdateSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapApplicationServerInstancesUpdateSamples.java index b2deb73db565e..679cd8c5bc993 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapApplicationServerInstancesUpdateSamples.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapApplicationServerInstancesUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.workloads.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.workloads.models.SapApplicationServerInstance; import java.util.HashMap; import java.util.Map; @@ -12,7 +11,7 @@ /** Samples for SapApplicationServerInstances Update. */ public final class SapApplicationServerInstancesUpdateSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPApplicationServerInstances_Update.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPApplicationServerInstances_Update.json */ /** * Sample code: SAPApplicationServerInstances_Update. @@ -22,7 +21,10 @@ public final class SapApplicationServerInstancesUpdateSamples { public static void sAPApplicationServerInstancesUpdate( com.azure.resourcemanager.workloads.WorkloadsManager manager) { SapApplicationServerInstance resource = - manager.sapApplicationServerInstances().getWithResponse("test-rg", "X00", "app01", Context.NONE).getValue(); + manager + .sapApplicationServerInstances() + .getWithResponse("test-rg", "X00", "app01", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("tag1", "value1")).apply(); } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapCentralInstancesCreateSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapCentralInstancesCreateSamples.java index 18833f802ef40..102bab161a16f 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapCentralInstancesCreateSamples.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapCentralInstancesCreateSamples.java @@ -10,7 +10,26 @@ /** Samples for SapCentralInstances Create. */ public final class SapCentralInstancesCreateSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPCentralInstances_Create.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPCentralInstances_Create_HA_AvSet.json + */ + /** + * Sample code: Create SAP Central Instances for HA System with Availability Set. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createSAPCentralInstancesForHASystemWithAvailabilitySet( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapCentralInstances() + .define("centralServer") + .withRegion("westcentralus") + .withExistingSapVirtualInstance("test-rg", "X00") + .withTags(mapOf()) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPCentralInstances_Create.json */ /** * Sample code: SAPCentralInstances_Create. diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapCentralInstancesDeleteSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapCentralInstancesDeleteSamples.java index 99c0209735a32..6c2f9db1b69e5 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapCentralInstancesDeleteSamples.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapCentralInstancesDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.workloads.generated; -import com.azure.core.util.Context; - /** Samples for SapCentralInstances Delete. */ public final class SapCentralInstancesDeleteSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPCentralInstances_Delete.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPCentralInstances_Delete.json */ /** * Sample code: SAPCentralInstances_Delete. @@ -17,6 +15,6 @@ public final class SapCentralInstancesDeleteSamples { * @param manager Entry point to WorkloadsManager. */ public static void sAPCentralInstancesDelete(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.sapCentralInstances().delete("test-rg", "X00", "centralServer", Context.NONE); + manager.sapCentralInstances().delete("test-rg", "X00", "centralServer", com.azure.core.util.Context.NONE); } } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapCentralInstancesGetSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapCentralInstancesGetSamples.java index 60680e3826b8a..37f6dd0afdddc 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapCentralInstancesGetSamples.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapCentralInstancesGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.workloads.generated; -import com.azure.core.util.Context; - /** Samples for SapCentralInstances Get. */ public final class SapCentralInstancesGetSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPCentralInstances_Get.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPCentralInstances_Get.json */ /** * Sample code: SAPCentralInstances_Get. @@ -17,6 +15,8 @@ public final class SapCentralInstancesGetSamples { * @param manager Entry point to WorkloadsManager. */ public static void sAPCentralInstancesGet(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.sapCentralInstances().getWithResponse("test-rg", "X00", "centralServer", Context.NONE); + manager + .sapCentralInstances() + .getWithResponse("test-rg", "X00", "centralServer", com.azure.core.util.Context.NONE); } } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapCentralInstancesListSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapCentralInstancesListSamples.java index dbfdca738e8b2..2b786947b1421 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapCentralInstancesListSamples.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapCentralInstancesListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.workloads.generated; -import com.azure.core.util.Context; - /** Samples for SapCentralInstances List. */ public final class SapCentralInstancesListSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPCentralInstances_List.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPCentralInstances_List.json */ /** * Sample code: SAPCentralInstances_List. @@ -17,6 +15,6 @@ public final class SapCentralInstancesListSamples { * @param manager Entry point to WorkloadsManager. */ public static void sAPCentralInstancesList(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.sapCentralInstances().list("test-rg", "X00", Context.NONE); + manager.sapCentralInstances().list("test-rg", "X00", com.azure.core.util.Context.NONE); } } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapCentralInstancesStartInstanceSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapCentralInstancesStartInstanceSamples.java new file mode 100644 index 0000000000000..52bab758f2ce5 --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapCentralInstancesStartInstanceSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.generated; + +/** Samples for SapCentralInstances StartInstance. */ +public final class SapCentralInstancesStartInstanceSamples { + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPCentralInstances_StartInstance.json + */ + /** + * Sample code: Start the SAP Central Services Instance. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void startTheSAPCentralServicesInstance( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapCentralInstances() + .startInstance("test-rg", "X00", "centralServer", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapCentralInstancesStopInstanceSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapCentralInstancesStopInstanceSamples.java new file mode 100644 index 0000000000000..c70cc414fb593 --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapCentralInstancesStopInstanceSamples.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.generated; + +import com.azure.resourcemanager.workloads.models.StopRequest; + +/** Samples for SapCentralInstances StopInstance. */ +public final class SapCentralInstancesStopInstanceSamples { + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPCentralInstances_StopInstance.json + */ + /** + * Sample code: Stop the SAP Central Services Instance. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void stopTheSAPCentralServicesInstance(com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapCentralInstances() + .stopInstance( + "test-rg", + "X00", + "centralServer", + new StopRequest().withSoftStopTimeoutSeconds(1200L), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapCentralInstancesUpdateSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapCentralInstancesUpdateSamples.java index f25f79c281a2f..9f5bd90323c92 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapCentralInstancesUpdateSamples.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapCentralInstancesUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.workloads.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.workloads.models.SapCentralServerInstance; import java.util.HashMap; import java.util.Map; @@ -12,7 +11,7 @@ /** Samples for SapCentralInstances Update. */ public final class SapCentralInstancesUpdateSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPCentralInstances_Update.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPCentralInstances_Update.json */ /** * Sample code: SAPCentralInstances_Update. @@ -21,7 +20,10 @@ public final class SapCentralInstancesUpdateSamples { */ public static void sAPCentralInstancesUpdate(com.azure.resourcemanager.workloads.WorkloadsManager manager) { SapCentralServerInstance resource = - manager.sapCentralInstances().getWithResponse("test-rg", "X00", "centralServer", Context.NONE).getValue(); + manager + .sapCentralInstances() + .getWithResponse("test-rg", "X00", "centralServer", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("tag1", "value1")).apply(); } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapDatabaseInstancesCreateSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapDatabaseInstancesCreateSamples.java index dda92fd0e2567..35fb50e1e0719 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapDatabaseInstancesCreateSamples.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapDatabaseInstancesCreateSamples.java @@ -10,7 +10,26 @@ /** Samples for SapDatabaseInstances Create. */ public final class SapDatabaseInstancesCreateSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPDatabaseInstances_Create.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPDatabaseInstances_Create_HA_AvSet.json + */ + /** + * Sample code: Create SAP Database Instances for HA System with Availability Set. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createSAPDatabaseInstancesForHASystemWithAvailabilitySet( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapDatabaseInstances() + .define("databaseServer") + .withRegion("westcentralus") + .withExistingSapVirtualInstance("test-rg", "X00") + .withTags(mapOf()) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPDatabaseInstances_Create.json */ /** * Sample code: SAPDatabaseInstances_Create. diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapDatabaseInstancesDeleteSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapDatabaseInstancesDeleteSamples.java index 033795acad1be..c98542d8a0dce 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapDatabaseInstancesDeleteSamples.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapDatabaseInstancesDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.workloads.generated; -import com.azure.core.util.Context; - /** Samples for SapDatabaseInstances Delete. */ public final class SapDatabaseInstancesDeleteSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPDatabaseInstances_Delete.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPDatabaseInstances_Delete.json */ /** * Sample code: SAPDatabaseInstances_Delete. @@ -17,6 +15,6 @@ public final class SapDatabaseInstancesDeleteSamples { * @param manager Entry point to WorkloadsManager. */ public static void sAPDatabaseInstancesDelete(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.sapDatabaseInstances().delete("test-rg", "X00", "databaseServer", Context.NONE); + manager.sapDatabaseInstances().delete("test-rg", "X00", "databaseServer", com.azure.core.util.Context.NONE); } } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapDatabaseInstancesGetSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapDatabaseInstancesGetSamples.java index 3b8c3d97d48fb..ab4712765600e 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapDatabaseInstancesGetSamples.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapDatabaseInstancesGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.workloads.generated; -import com.azure.core.util.Context; - /** Samples for SapDatabaseInstances Get. */ public final class SapDatabaseInstancesGetSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPDatabaseInstances_Get.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPDatabaseInstances_Get.json */ /** * Sample code: SAPDatabaseInstances_Get. @@ -17,6 +15,8 @@ public final class SapDatabaseInstancesGetSamples { * @param manager Entry point to WorkloadsManager. */ public static void sAPDatabaseInstancesGet(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.sapDatabaseInstances().getWithResponse("test-rg", "X00", "databaseServer", Context.NONE); + manager + .sapDatabaseInstances() + .getWithResponse("test-rg", "X00", "databaseServer", com.azure.core.util.Context.NONE); } } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapDatabaseInstancesListSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapDatabaseInstancesListSamples.java index b5e6d38c52de7..372ba0bcfb5df 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapDatabaseInstancesListSamples.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapDatabaseInstancesListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.workloads.generated; -import com.azure.core.util.Context; - /** Samples for SapDatabaseInstances List. */ public final class SapDatabaseInstancesListSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPDatabaseInstances_List.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPDatabaseInstances_List.json */ /** * Sample code: SAPDatabaseInstances_List. @@ -17,6 +15,6 @@ public final class SapDatabaseInstancesListSamples { * @param manager Entry point to WorkloadsManager. */ public static void sAPDatabaseInstancesList(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.sapDatabaseInstances().list("test-rg", "X00", Context.NONE); + manager.sapDatabaseInstances().list("test-rg", "X00", com.azure.core.util.Context.NONE); } } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapDatabaseInstancesStartInstanceSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapDatabaseInstancesStartInstanceSamples.java new file mode 100644 index 0000000000000..69e90c9bf7a18 --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapDatabaseInstancesStartInstanceSamples.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.generated; + +/** Samples for SapDatabaseInstances StartInstance. */ +public final class SapDatabaseInstancesStartInstanceSamples { + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPDatabaseInstances_StartInstance.json + */ + /** + * Sample code: Start the database instance of the SAP system. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void startTheDatabaseInstanceOfTheSAPSystem( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager.sapDatabaseInstances().startInstance("test-rg", "X00", "db0", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapDatabaseInstancesStopInstanceSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapDatabaseInstancesStopInstanceSamples.java new file mode 100644 index 0000000000000..325d178924a88 --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapDatabaseInstancesStopInstanceSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.generated; + +import com.azure.resourcemanager.workloads.models.StopRequest; + +/** Samples for SapDatabaseInstances StopInstance. */ +public final class SapDatabaseInstancesStopInstanceSamples { + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPDatabaseInstances_StopInstance.json + */ + /** + * Sample code: Stop the database instance of the SAP system. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void stopTheDatabaseInstanceOfTheSAPSystem( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapDatabaseInstances() + .stopInstance( + "test-rg", + "X00", + "db0", + new StopRequest().withSoftStopTimeoutSeconds(0L), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapDatabaseInstancesUpdateSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapDatabaseInstancesUpdateSamples.java index b83af80ee25b6..13cf690092296 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapDatabaseInstancesUpdateSamples.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapDatabaseInstancesUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.workloads.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.workloads.models.SapDatabaseInstance; import java.util.HashMap; import java.util.Map; @@ -12,7 +11,7 @@ /** Samples for SapDatabaseInstances Update. */ public final class SapDatabaseInstancesUpdateSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPDatabaseInstances_Update.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPDatabaseInstances_Update.json */ /** * Sample code: SAPDatabaseInstances_Update. @@ -21,7 +20,10 @@ public final class SapDatabaseInstancesUpdateSamples { */ public static void sAPDatabaseInstancesUpdate(com.azure.resourcemanager.workloads.WorkloadsManager manager) { SapDatabaseInstance resource = - manager.sapDatabaseInstances().getWithResponse("test-rg", "X00", "databaseServer", Context.NONE).getValue(); + manager + .sapDatabaseInstances() + .getWithResponse("test-rg", "X00", "databaseServer", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("key1", "value1")).apply(); } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapLandscapeMonitorCreateSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapLandscapeMonitorCreateSamples.java new file mode 100644 index 0000000000000..ffbe6a7814f22 --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapLandscapeMonitorCreateSamples.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.generated; + +import com.azure.resourcemanager.workloads.fluent.models.SapLandscapeMonitorInner; +import com.azure.resourcemanager.workloads.models.SapLandscapeMonitorMetricThresholds; +import com.azure.resourcemanager.workloads.models.SapLandscapeMonitorPropertiesGrouping; +import com.azure.resourcemanager.workloads.models.SapLandscapeMonitorSidMapping; +import java.util.Arrays; + +/** Samples for SapLandscapeMonitor Create. */ +public final class SapLandscapeMonitorCreateSamples { + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/SapLandscapeMonitor_Create.json + */ + /** + * Sample code: Create for SAP Landscape monitor Dashboard. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createForSAPLandscapeMonitorDashboard( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapLandscapeMonitors() + .createWithResponse( + "myResourceGroup", + "mySapMonitor", + new SapLandscapeMonitorInner() + .withGrouping( + new SapLandscapeMonitorPropertiesGrouping() + .withLandscape( + Arrays + .asList( + new SapLandscapeMonitorSidMapping() + .withName("Prod") + .withTopSid(Arrays.asList("SID1", "SID2")))) + .withSapApplication( + Arrays + .asList( + new SapLandscapeMonitorSidMapping() + .withName("ERP1") + .withTopSid(Arrays.asList("SID1", "SID2"))))) + .withTopMetricsThresholds( + Arrays + .asList( + new SapLandscapeMonitorMetricThresholds() + .withName("Instance Availability") + .withGreen(90.0F) + .withYellow(75.0F) + .withRed(50.0F))), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapLandscapeMonitorDeleteSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapLandscapeMonitorDeleteSamples.java new file mode 100644 index 0000000000000..d090aa39cb391 --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapLandscapeMonitorDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.generated; + +/** Samples for SapLandscapeMonitor Delete. */ +public final class SapLandscapeMonitorDeleteSamples { + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/SapLandscapeMonitor_Delete.json + */ + /** + * Sample code: Deletes SAP monitor. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void deletesSAPMonitor(com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapLandscapeMonitors() + .deleteByResourceGroupWithResponse("myResourceGroup", "mySapMonitor", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapLandscapeMonitorGetSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapLandscapeMonitorGetSamples.java new file mode 100644 index 0000000000000..ba718311d7fb1 --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapLandscapeMonitorGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.generated; + +/** Samples for SapLandscapeMonitor Get. */ +public final class SapLandscapeMonitorGetSamples { + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/SapLandscapeMonitor_Get.json + */ + /** + * Sample code: Get properties of a SAP monitor. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void getPropertiesOfASAPMonitor(com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapLandscapeMonitors() + .getWithResponse("myResourceGroup", "mySapMonitor", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapLandscapeMonitorListSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapLandscapeMonitorListSamples.java new file mode 100644 index 0000000000000..d2b5569580211 --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapLandscapeMonitorListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.generated; + +/** Samples for SapLandscapeMonitor List. */ +public final class SapLandscapeMonitorListSamples { + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/SapLandscapeMonitor_List.json + */ + /** + * Sample code: Get properties of a SAP monitor. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void getPropertiesOfASAPMonitor(com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapLandscapeMonitors() + .listWithResponse("myResourceGroup", "mySapMonitor", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapLandscapeMonitorUpdateSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapLandscapeMonitorUpdateSamples.java new file mode 100644 index 0000000000000..72d23ab36aa3b --- /dev/null +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapLandscapeMonitorUpdateSamples.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.workloads.generated; + +import com.azure.resourcemanager.workloads.fluent.models.SapLandscapeMonitorInner; +import com.azure.resourcemanager.workloads.models.SapLandscapeMonitorMetricThresholds; +import com.azure.resourcemanager.workloads.models.SapLandscapeMonitorPropertiesGrouping; +import com.azure.resourcemanager.workloads.models.SapLandscapeMonitorSidMapping; +import java.util.Arrays; + +/** Samples for SapLandscapeMonitor Update. */ +public final class SapLandscapeMonitorUpdateSamples { + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/workloadmonitor/SapLandscapeMonitor_Update.json + */ + /** + * Sample code: Update SAP monitor. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void updateSAPMonitor(com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapLandscapeMonitors() + .updateWithResponse( + "myResourceGroup", + "mySapMonitor", + new SapLandscapeMonitorInner() + .withGrouping( + new SapLandscapeMonitorPropertiesGrouping() + .withLandscape( + Arrays + .asList( + new SapLandscapeMonitorSidMapping() + .withName("Prod") + .withTopSid(Arrays.asList("SID1", "SID2")))) + .withSapApplication( + Arrays + .asList( + new SapLandscapeMonitorSidMapping() + .withName("ERP1") + .withTopSid(Arrays.asList("SID1", "SID2"))))) + .withTopMetricsThresholds( + Arrays + .asList( + new SapLandscapeMonitorMetricThresholds() + .withName("Instance Availability") + .withGreen(90.0F) + .withYellow(75.0F) + .withRed(50.0F))), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapVirtualInstancesCreateSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapVirtualInstancesCreateSamples.java index 27b204fb35906..6125ad97252ca 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapVirtualInstancesCreateSamples.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapVirtualInstancesCreateSamples.java @@ -5,27 +5,45 @@ package com.azure.resourcemanager.workloads.generated; import com.azure.resourcemanager.workloads.models.ApplicationServerConfiguration; +import com.azure.resourcemanager.workloads.models.ApplicationServerFullResourceNames; import com.azure.resourcemanager.workloads.models.CentralServerConfiguration; +import com.azure.resourcemanager.workloads.models.CentralServerFullResourceNames; +import com.azure.resourcemanager.workloads.models.CreateAndMountFileShareConfiguration; import com.azure.resourcemanager.workloads.models.DatabaseConfiguration; -import com.azure.resourcemanager.workloads.models.DeployerVmPackages; +import com.azure.resourcemanager.workloads.models.DatabaseServerFullResourceNames; import com.azure.resourcemanager.workloads.models.DeploymentConfiguration; import com.azure.resourcemanager.workloads.models.DeploymentWithOSConfiguration; +import com.azure.resourcemanager.workloads.models.DiscoveryConfiguration; +import com.azure.resourcemanager.workloads.models.DiskConfiguration; +import com.azure.resourcemanager.workloads.models.DiskSku; +import com.azure.resourcemanager.workloads.models.DiskSkuName; +import com.azure.resourcemanager.workloads.models.DiskVolumeConfiguration; +import com.azure.resourcemanager.workloads.models.ExternalInstallationSoftwareConfiguration; import com.azure.resourcemanager.workloads.models.HighAvailabilityConfiguration; import com.azure.resourcemanager.workloads.models.ImageReference; import com.azure.resourcemanager.workloads.models.LinuxConfiguration; +import com.azure.resourcemanager.workloads.models.LoadBalancerResourceNames; +import com.azure.resourcemanager.workloads.models.MountFileShareConfiguration; import com.azure.resourcemanager.workloads.models.NetworkConfiguration; +import com.azure.resourcemanager.workloads.models.NetworkInterfaceResourceNames; import com.azure.resourcemanager.workloads.models.OSProfile; import com.azure.resourcemanager.workloads.models.OsSapConfiguration; import com.azure.resourcemanager.workloads.models.SapDatabaseType; import com.azure.resourcemanager.workloads.models.SapEnvironmentType; import com.azure.resourcemanager.workloads.models.SapHighAvailabilityType; +import com.azure.resourcemanager.workloads.models.SapInstallWithoutOSConfigSoftwareConfiguration; import com.azure.resourcemanager.workloads.models.SapProductType; +import com.azure.resourcemanager.workloads.models.SharedStorageResourceNames; import com.azure.resourcemanager.workloads.models.SingleServerConfiguration; +import com.azure.resourcemanager.workloads.models.SkipFileShareConfiguration; import com.azure.resourcemanager.workloads.models.SshConfiguration; import com.azure.resourcemanager.workloads.models.SshKeyPair; import com.azure.resourcemanager.workloads.models.SshPublicKey; +import com.azure.resourcemanager.workloads.models.StorageConfiguration; import com.azure.resourcemanager.workloads.models.ThreeTierConfiguration; +import com.azure.resourcemanager.workloads.models.ThreeTierFullResourceNames; import com.azure.resourcemanager.workloads.models.VirtualMachineConfiguration; +import com.azure.resourcemanager.workloads.models.VirtualMachineResourceNames; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -33,14 +51,1928 @@ /** Samples for SapVirtualInstances Create. */ public final class SapVirtualInstancesCreateSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_HA_AvSet.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Install_Distributed.json */ /** - * Sample code: SAPVirtualInstances_Create_WithOSConfig_HA_AvSet. + * Sample code: Install SAP Software on Distributed System. * * @param manager Entry point to WorkloadsManager. */ - public static void sAPVirtualInstancesCreateWithOSConfigHAAvSet( + public static void installSAPSoftwareOnDistributedSystem( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapVirtualInstances() + .define("X00") + .withRegion("eastus2") + .withExistingResourceGroup("test-rg") + .withEnvironment(SapEnvironmentType.PROD) + .withSapProduct(SapProductType.S4HANA) + .withConfiguration( + new DeploymentWithOSConfiguration() + .withAppLocation("eastus") + .withInfrastructureConfiguration( + new ThreeTierConfiguration() + .withAppResourceGroup("{{resourcegrp}}") + .withNetworkConfiguration(new NetworkConfiguration().withIsSecondaryIpEnabled(true)) + .withCentralServer( + new CentralServerConfiguration() + .withSubnetId( + "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E4ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP-HA") + .withSku("8.2") + .withVersion("8.2.2021091201")) + .withOsProfile( + new OSProfile() + .withAdminUsername("azureuser") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(1L)) + .withApplicationServer( + new ApplicationServerConfiguration() + .withSubnetId( + "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E4ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP-HA") + .withSku("8.2") + .withVersion("8.2.2021091201")) + .withOsProfile( + new OSProfile() + .withAdminUsername("azureuser") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(2L)) + .withDatabaseServer( + new DatabaseConfiguration() + .withSubnetId( + "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_M32ts") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP-HA") + .withSku("8.2") + .withVersion("8.2.2021091201")) + .withOsProfile( + new OSProfile() + .withAdminUsername("azureuser") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(1L))) + .withSoftwareConfiguration( + new SapInstallWithoutOSConfigSoftwareConfiguration() + .withBomUrl( + "https://teststorageaccount.blob.core.windows.net/sapbits/sapfiles/boms/S41909SPS03_v0011ms/S41909SPS03_v0011ms.yaml") + .withSapBitsStorageAccountId( + "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Storage/storageAccounts/teststorageaccount") + .withSoftwareVersion("SAP S/4HANA 1909 SPS 03")) + .withOsSapConfiguration(new OsSapConfiguration().withSapFqdn("sap.bpaas.com"))) + .withTags(mapOf("created by", "azureuser")) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_HA_AvZone.json + */ + /** + * Sample code: Create Infrastructure only for HA System with Availability Zone. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createInfrastructureOnlyForHASystemWithAvailabilityZone( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapVirtualInstances() + .define("X00") + .withRegion("westcentralus") + .withExistingResourceGroup("test-rg") + .withEnvironment(SapEnvironmentType.PROD) + .withSapProduct(SapProductType.S4HANA) + .withConfiguration( + new DeploymentConfiguration() + .withAppLocation("eastus") + .withInfrastructureConfiguration( + new ThreeTierConfiguration() + .withAppResourceGroup("X00-RG") + .withCentralServer( + new CentralServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E16ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSsh( + new SshConfiguration() + .withPublicKeys( + Arrays + .asList( + new SshPublicKey() + .withKeyData( + "fakeTokenPlaceholder"))))))) + .withInstanceCount(2L)) + .withApplicationServer( + new ApplicationServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E32ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSsh( + new SshConfiguration() + .withPublicKeys( + Arrays + .asList( + new SshPublicKey() + .withKeyData( + "fakeTokenPlaceholder"))))))) + .withInstanceCount(6L)) + .withDatabaseServer( + new DatabaseConfiguration() + .withDatabaseType(SapDatabaseType.HANA) + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_M32ts") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSsh( + new SshConfiguration() + .withPublicKeys( + Arrays + .asList( + new SshPublicKey() + .withKeyData( + "fakeTokenPlaceholder"))))))) + .withInstanceCount(2L)) + .withHighAvailabilityConfig( + new HighAvailabilityConfiguration() + .withHighAvailabilityType(SapHighAvailabilityType.AVAILABILITY_ZONE)))) + .withTags(mapOf()) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_Distributed.json + */ + /** + * Sample code: Create Infrastructure with OS configuration for Distributed System (Recommended). + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createInfrastructureWithOSConfigurationForDistributedSystemRecommended( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapVirtualInstances() + .define("X00") + .withRegion("westcentralus") + .withExistingResourceGroup("test-rg") + .withEnvironment(SapEnvironmentType.PROD) + .withSapProduct(SapProductType.S4HANA) + .withConfiguration( + new DeploymentWithOSConfiguration() + .withAppLocation("eastus") + .withInfrastructureConfiguration( + new ThreeTierConfiguration() + .withAppResourceGroup("X00-RG") + .withCentralServer( + new CentralServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E16ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(1L)) + .withApplicationServer( + new ApplicationServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E32ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(6L)) + .withDatabaseServer( + new DatabaseConfiguration() + .withDatabaseType(SapDatabaseType.HANA) + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_M32ts") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(1L))) + .withOsSapConfiguration(new OsSapConfiguration().withSapFqdn("xyz.test.com"))) + .withTags(mapOf()) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_DetectInstallation_SingleServer.json + */ + /** + * Sample code: Detect SAP Software Installation on a Single Server System. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void detectSAPSoftwareInstallationOnASingleServerSystem( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapVirtualInstances() + .define("X00") + .withRegion("westcentralus") + .withExistingResourceGroup("test-rg") + .withEnvironment(SapEnvironmentType.NON_PROD) + .withSapProduct(SapProductType.S4HANA) + .withConfiguration( + new DeploymentWithOSConfiguration() + .withAppLocation("eastus") + .withInfrastructureConfiguration( + new SingleServerConfiguration() + .withAppResourceGroup("X00-RG") + .withNetworkConfiguration(new NetworkConfiguration().withIsSecondaryIpEnabled(true)) + .withDatabaseType(SapDatabaseType.HANA) + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E32ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP-HA") + .withSku("84sapha-gen2") + .withVersion("8.4.2021091202")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder")))))) + .withSoftwareConfiguration( + new ExternalInstallationSoftwareConfiguration() + .withCentralServerVmId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0")) + .withOsSapConfiguration(new OsSapConfiguration().withSapFqdn("xyz.test.com"))) + .withTags(mapOf()) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_DiskDetails_HA_AvSet.json + */ + /** + * Sample code: Create Infrastructure with Disk and OS configuration for HA System with Availability Set + * (Recommended). + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createInfrastructureWithDiskAndOSConfigurationForHASystemWithAvailabilitySetRecommended( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapVirtualInstances() + .define("X00") + .withRegion("westcentralus") + .withExistingResourceGroup("test-rg") + .withEnvironment(SapEnvironmentType.PROD) + .withSapProduct(SapProductType.S4HANA) + .withConfiguration( + new DeploymentWithOSConfiguration() + .withAppLocation("eastus") + .withInfrastructureConfiguration( + new ThreeTierConfiguration() + .withAppResourceGroup("X00-RG") + .withCentralServer( + new CentralServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E16ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(2L)) + .withApplicationServer( + new ApplicationServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E32ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(6L)) + .withDatabaseServer( + new DatabaseConfiguration() + .withDatabaseType(SapDatabaseType.HANA) + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_M32ts") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(2L) + .withDiskConfiguration( + new DiskConfiguration() + .withDiskVolumeConfigurations( + mapOf( + "backup", + new DiskVolumeConfiguration() + .withCount(2L) + .withSizeGB(256L) + .withSku(new DiskSku().withName(DiskSkuName.STANDARD_SSD_LRS)), + "hana/data", + new DiskVolumeConfiguration() + .withCount(4L) + .withSizeGB(128L) + .withSku(new DiskSku().withName(DiskSkuName.PREMIUM_LRS)), + "hana/log", + new DiskVolumeConfiguration() + .withCount(3L) + .withSizeGB(128L) + .withSku(new DiskSku().withName(DiskSkuName.PREMIUM_LRS)), + "hana/shared", + new DiskVolumeConfiguration() + .withCount(1L) + .withSizeGB(256L) + .withSku(new DiskSku().withName(DiskSkuName.STANDARD_SSD_LRS)), + "os", + new DiskVolumeConfiguration() + .withCount(1L) + .withSizeGB(64L) + .withSku(new DiskSku().withName(DiskSkuName.STANDARD_SSD_LRS)), + "usr/sap", + new DiskVolumeConfiguration() + .withCount(1L) + .withSizeGB(128L) + .withSku(new DiskSku().withName(DiskSkuName.PREMIUM_LRS)))))) + .withHighAvailabilityConfig( + new HighAvailabilityConfiguration() + .withHighAvailabilityType(SapHighAvailabilityType.AVAILABILITY_SET))) + .withOsSapConfiguration(new OsSapConfiguration().withSapFqdn("xyz.test.com"))) + .withTags(mapOf()) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_Distributed_CreateTrans.json + */ + /** + * Sample code: Create Infrastructure with a new SAP Trans Fileshare. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createInfrastructureWithANewSAPTransFileshare( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapVirtualInstances() + .define("X00") + .withRegion("westcentralus") + .withExistingResourceGroup("test-rg") + .withEnvironment(SapEnvironmentType.PROD) + .withSapProduct(SapProductType.S4HANA) + .withConfiguration( + new DeploymentWithOSConfiguration() + .withAppLocation("eastus") + .withInfrastructureConfiguration( + new ThreeTierConfiguration() + .withAppResourceGroup("X00-RG") + .withCentralServer( + new CentralServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E16ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(1L)) + .withApplicationServer( + new ApplicationServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E32ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(6L)) + .withDatabaseServer( + new DatabaseConfiguration() + .withDatabaseType(SapDatabaseType.HANA) + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_M32ts") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(1L)) + .withStorageConfiguration( + new StorageConfiguration() + .withTransportFileShareConfiguration( + new CreateAndMountFileShareConfiguration() + .withResourceGroup("test-rg") + .withStorageAccountName("input-sa-name")))) + .withOsSapConfiguration(new OsSapConfiguration().withSapFqdn("xyz.test.com"))) + .withTags(mapOf()) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_Distributed_MountTrans.json + */ + /** + * Sample code: Create Infrastructure with an existing SAP Trans Fileshare. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createInfrastructureWithAnExistingSAPTransFileshare( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapVirtualInstances() + .define("X00") + .withRegion("westcentralus") + .withExistingResourceGroup("test-rg") + .withEnvironment(SapEnvironmentType.PROD) + .withSapProduct(SapProductType.S4HANA) + .withConfiguration( + new DeploymentWithOSConfiguration() + .withAppLocation("eastus") + .withInfrastructureConfiguration( + new ThreeTierConfiguration() + .withAppResourceGroup("X00-RG") + .withCentralServer( + new CentralServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E16ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(1L)) + .withApplicationServer( + new ApplicationServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E32ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(6L)) + .withDatabaseServer( + new DatabaseConfiguration() + .withDatabaseType(SapDatabaseType.HANA) + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_M32ts") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(1L)) + .withStorageConfiguration( + new StorageConfiguration() + .withTransportFileShareConfiguration( + new MountFileShareConfiguration() + .withId("fileshareID") + .withPrivateEndpointId("pe-arm-id")))) + .withOsSapConfiguration(new OsSapConfiguration().withSapFqdn("xyz.test.com"))) + .withTags(mapOf()) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_HA_AvSet.json + */ + /** + * Sample code: Create Infrastructure only for HA System with Availability Set. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createInfrastructureOnlyForHASystemWithAvailabilitySet( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapVirtualInstances() + .define("X00") + .withRegion("westcentralus") + .withExistingResourceGroup("test-rg") + .withEnvironment(SapEnvironmentType.PROD) + .withSapProduct(SapProductType.S4HANA) + .withConfiguration( + new DeploymentConfiguration() + .withAppLocation("eastus") + .withInfrastructureConfiguration( + new ThreeTierConfiguration() + .withAppResourceGroup("X00-RG") + .withCentralServer( + new CentralServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E16ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSsh( + new SshConfiguration() + .withPublicKeys( + Arrays + .asList( + new SshPublicKey() + .withKeyData( + "fakeTokenPlaceholder"))))))) + .withInstanceCount(2L)) + .withApplicationServer( + new ApplicationServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E32ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSsh( + new SshConfiguration() + .withPublicKeys( + Arrays + .asList( + new SshPublicKey() + .withKeyData( + "fakeTokenPlaceholder"))))))) + .withInstanceCount(5L)) + .withDatabaseServer( + new DatabaseConfiguration() + .withDatabaseType(SapDatabaseType.HANA) + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_M32ts") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSsh( + new SshConfiguration() + .withPublicKeys( + Arrays + .asList( + new SshPublicKey() + .withKeyData( + "fakeTokenPlaceholder"))))))) + .withInstanceCount(2L)) + .withHighAvailabilityConfig( + new HighAvailabilityConfiguration() + .withHighAvailabilityType(SapHighAvailabilityType.AVAILABILITY_SET)))) + .withTags(mapOf()) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_DetectInstallation_HA_AvZone.json + */ + /** + * Sample code: Detect SAP Software Installation on an HA System with Availability Zone. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void detectSAPSoftwareInstallationOnAnHASystemWithAvailabilityZone( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapVirtualInstances() + .define("X00") + .withRegion("westcentralus") + .withExistingResourceGroup("test-rg") + .withEnvironment(SapEnvironmentType.PROD) + .withSapProduct(SapProductType.S4HANA) + .withConfiguration( + new DeploymentWithOSConfiguration() + .withAppLocation("eastus") + .withInfrastructureConfiguration( + new ThreeTierConfiguration() + .withAppResourceGroup("X00-RG") + .withCentralServer( + new CentralServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E16ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP-HA") + .withSku("84sapha-gen2") + .withVersion("8.4.2021091202")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(2L)) + .withApplicationServer( + new ApplicationServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E32ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP-HA") + .withSku("84sapha-gen2") + .withVersion("8.4.2021091202")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(6L)) + .withDatabaseServer( + new DatabaseConfiguration() + .withDatabaseType(SapDatabaseType.HANA) + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_M32ts") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP-HA") + .withSku("84sapha-gen2") + .withVersion("8.4.2021091202")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(2L)) + .withHighAvailabilityConfig( + new HighAvailabilityConfiguration() + .withHighAvailabilityType(SapHighAvailabilityType.AVAILABILITY_ZONE))) + .withSoftwareConfiguration( + new ExternalInstallationSoftwareConfiguration() + .withCentralServerVmId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0")) + .withOsSapConfiguration(new OsSapConfiguration().withSapFqdn("xyz.test.com"))) + .withTags(mapOf()) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_SingleServer.json + */ + /** + * Sample code: Create Infrastructure only for Single Server System. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createInfrastructureOnlyForSingleServerSystem( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapVirtualInstances() + .define("X00") + .withRegion("westcentralus") + .withExistingResourceGroup("test-rg") + .withEnvironment(SapEnvironmentType.NON_PROD) + .withSapProduct(SapProductType.S4HANA) + .withConfiguration( + new DeploymentConfiguration() + .withAppLocation("eastus") + .withInfrastructureConfiguration( + new SingleServerConfiguration() + .withAppResourceGroup("X00-RG") + .withNetworkConfiguration(new NetworkConfiguration().withIsSecondaryIpEnabled(true)) + .withDatabaseType(SapDatabaseType.HANA) + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E32ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSsh( + new SshConfiguration() + .withPublicKeys( + Arrays + .asList( + new SshPublicKey() + .withKeyData("fakeTokenPlaceholder"))))))))) + .withTags(mapOf()) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_Discover.json + */ + /** + * Sample code: Register existing SAP system as Virtual Instance for SAP solutions. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void registerExistingSAPSystemAsVirtualInstanceForSAPSolutions( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapVirtualInstances() + .define("X00") + .withRegion("northeurope") + .withExistingResourceGroup("test-rg") + .withEnvironment(SapEnvironmentType.NON_PROD) + .withSapProduct(SapProductType.S4HANA) + .withConfiguration( + new DiscoveryConfiguration() + .withCentralServerVmId( + "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0")) + .withTags(mapOf("createdby", "abc@microsoft.com", "test", "abc")) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_CustomFullResourceNames_Distributed.json + */ + /** + * Sample code: Create Infrastructure (with OS configuration) with custom resource names for Distributed System. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createInfrastructureWithOSConfigurationWithCustomResourceNamesForDistributedSystem( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapVirtualInstances() + .define("X00") + .withRegion("westcentralus") + .withExistingResourceGroup("test-rg") + .withEnvironment(SapEnvironmentType.PROD) + .withSapProduct(SapProductType.S4HANA) + .withConfiguration( + new DeploymentWithOSConfiguration() + .withAppLocation("eastus") + .withInfrastructureConfiguration( + new ThreeTierConfiguration() + .withAppResourceGroup("X00-RG") + .withCentralServer( + new CentralServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E16ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(1L)) + .withApplicationServer( + new ApplicationServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E32ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(6L)) + .withDatabaseServer( + new DatabaseConfiguration() + .withDatabaseType(SapDatabaseType.HANA) + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_M32ts") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(1L)) + .withCustomResourceNames( + new ThreeTierFullResourceNames() + .withCentralServer( + new CentralServerFullResourceNames() + .withVirtualMachines( + Arrays + .asList( + new VirtualMachineResourceNames() + .withVmName("ascsvm") + .withHostname("ascshostName") + .withNetworkInterfaces( + Arrays + .asList( + new NetworkInterfaceResourceNames() + .withNetworkInterfaceName("ascsnic"))) + .withOsDiskName("ascsosdisk") + .withDataDiskNames( + mapOf("default", Arrays.asList("ascsdisk0")))))) + .withApplicationServer( + new ApplicationServerFullResourceNames() + .withVirtualMachines( + Arrays + .asList( + new VirtualMachineResourceNames() + .withVmName("appvm0") + .withHostname("apphostName0") + .withNetworkInterfaces( + Arrays + .asList( + new NetworkInterfaceResourceNames() + .withNetworkInterfaceName("appnic0"))) + .withOsDiskName("app0osdisk") + .withDataDiskNames( + mapOf("default", Arrays.asList("app0disk0"))), + new VirtualMachineResourceNames() + .withVmName("appvm1") + .withHostname("apphostName1") + .withNetworkInterfaces( + Arrays + .asList( + new NetworkInterfaceResourceNames() + .withNetworkInterfaceName("appnic1"))) + .withOsDiskName("app1osdisk") + .withDataDiskNames( + mapOf("default", Arrays.asList("app1disk0"))))) + .withAvailabilitySetName("appAvSet")) + .withDatabaseServer( + new DatabaseServerFullResourceNames() + .withVirtualMachines( + Arrays + .asList( + new VirtualMachineResourceNames() + .withVmName("dbvm") + .withHostname("dbhostName") + .withNetworkInterfaces( + Arrays + .asList( + new NetworkInterfaceResourceNames() + .withNetworkInterfaceName("dbnic"))) + .withOsDiskName("dbosdisk") + .withDataDiskNames( + mapOf( + "hanaData", + Arrays.asList("hanadata0", "hanadata1"), + "hanaLog", + Arrays.asList("hanalog0", "hanalog1", "hanalog2"), + "hanaShared", + Arrays.asList("hanashared0", "hanashared1"), + "usrSap", + Arrays.asList("usrsap0")))))) + .withSharedStorage( + new SharedStorageResourceNames() + .withSharedStorageAccountName("storageacc") + .withSharedStorageAccountPrivateEndPointName("peForxNFS")))) + .withOsSapConfiguration(new OsSapConfiguration().withSapFqdn("xyz.test.com"))) + .withTags(mapOf()) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_CustomFullResourceNames_SingleServer.json + */ + /** + * Sample code: Create Infrastructure (with OS configuration) with custom resource names for Single Server System. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createInfrastructureWithOSConfigurationWithCustomResourceNamesForSingleServerSystem( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapVirtualInstances() + .define("X00") + .withRegion("westcentralus") + .withExistingResourceGroup("test-rg") + .withEnvironment(SapEnvironmentType.NON_PROD) + .withSapProduct(SapProductType.S4HANA) + .withConfiguration( + new DeploymentWithOSConfiguration() + .withAppLocation("eastus") + .withInfrastructureConfiguration( + new SingleServerConfiguration() + .withAppResourceGroup("X00-RG") + .withNetworkConfiguration(new NetworkConfiguration().withIsSecondaryIpEnabled(true)) + .withDatabaseType(SapDatabaseType.HANA) + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E32ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder")))))) + .withOsSapConfiguration(new OsSapConfiguration().withSapFqdn("xyz.test.com"))) + .withTags(mapOf()) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_CustomFullResourceNames_HA_AvZone.json + */ + /** + * Sample code: Create Infrastructure (with OS configuration) with custom resource names for HA system with + * Availability Zone. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createInfrastructureWithOSConfigurationWithCustomResourceNamesForHASystemWithAvailabilityZone( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapVirtualInstances() + .define("X00") + .withRegion("westcentralus") + .withExistingResourceGroup("test-rg") + .withEnvironment(SapEnvironmentType.PROD) + .withSapProduct(SapProductType.S4HANA) + .withConfiguration( + new DeploymentWithOSConfiguration() + .withAppLocation("eastus") + .withInfrastructureConfiguration( + new ThreeTierConfiguration() + .withAppResourceGroup("X00-RG") + .withCentralServer( + new CentralServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E16ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(2L)) + .withApplicationServer( + new ApplicationServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E32ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(6L)) + .withDatabaseServer( + new DatabaseConfiguration() + .withDatabaseType(SapDatabaseType.HANA) + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_M32ts") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(2L)) + .withHighAvailabilityConfig( + new HighAvailabilityConfiguration() + .withHighAvailabilityType(SapHighAvailabilityType.AVAILABILITY_ZONE)) + .withCustomResourceNames( + new ThreeTierFullResourceNames() + .withCentralServer( + new CentralServerFullResourceNames() + .withVirtualMachines( + Arrays + .asList( + new VirtualMachineResourceNames() + .withVmName("ascsvm") + .withHostname("ascshostName") + .withNetworkInterfaces( + Arrays + .asList( + new NetworkInterfaceResourceNames() + .withNetworkInterfaceName("ascsnic"))) + .withOsDiskName("ascsosdisk"), + new VirtualMachineResourceNames() + .withVmName("ersvm") + .withHostname("ershostName") + .withNetworkInterfaces( + Arrays + .asList( + new NetworkInterfaceResourceNames() + .withNetworkInterfaceName("ersnic"))) + .withOsDiskName("ersosdisk"))) + .withLoadBalancer( + new LoadBalancerResourceNames() + .withLoadBalancerName("ascslb") + .withFrontendIpConfigurationNames( + Arrays.asList("ascsip0", "ersip0")) + .withBackendPoolNames(Arrays.asList("ascsBackendPool")) + .withHealthProbeNames( + Arrays.asList("ascsHealthProbe", "ersHealthProbe")))) + .withApplicationServer( + new ApplicationServerFullResourceNames() + .withVirtualMachines( + Arrays + .asList( + new VirtualMachineResourceNames() + .withVmName("appvm0") + .withHostname("apphostName0") + .withNetworkInterfaces( + Arrays + .asList( + new NetworkInterfaceResourceNames() + .withNetworkInterfaceName("appnic0"))) + .withOsDiskName("app0osdisk") + .withDataDiskNames( + mapOf("default", Arrays.asList("app0disk0"))), + new VirtualMachineResourceNames() + .withVmName("appvm1") + .withHostname("apphostName1") + .withNetworkInterfaces( + Arrays + .asList( + new NetworkInterfaceResourceNames() + .withNetworkInterfaceName("appnic1"))) + .withOsDiskName("app1osdisk") + .withDataDiskNames( + mapOf("default", Arrays.asList("app1disk0")))))) + .withDatabaseServer( + new DatabaseServerFullResourceNames() + .withVirtualMachines( + Arrays + .asList( + new VirtualMachineResourceNames() + .withVmName("dbvmpr") + .withHostname("dbprhostName") + .withNetworkInterfaces( + Arrays + .asList( + new NetworkInterfaceResourceNames() + .withNetworkInterfaceName("dbprnic"))) + .withOsDiskName("dbprosdisk") + .withDataDiskNames( + mapOf( + "hanaData", + Arrays.asList("hanadatapr0", "hanadatapr1"), + "hanaLog", + Arrays + .asList( + "hanalogpr0", "hanalogpr1", "hanalogpr2"), + "hanaShared", + Arrays.asList("hanasharedpr0", "hanasharedpr1"), + "usrSap", + Arrays.asList("usrsappr0"))), + new VirtualMachineResourceNames() + .withVmName("dbvmsr") + .withHostname("dbsrhostName") + .withNetworkInterfaces( + Arrays + .asList( + new NetworkInterfaceResourceNames() + .withNetworkInterfaceName("dbsrnic"))) + .withOsDiskName("dbsrosdisk") + .withDataDiskNames( + mapOf( + "hanaData", + Arrays.asList("hanadatasr0", "hanadatasr1"), + "hanaLog", + Arrays + .asList( + "hanalogsr0", "hanalogsr1", "hanalogsr2"), + "hanaShared", + Arrays.asList("hanasharedsr0", "hanasharedsr1"), + "usrSap", + Arrays.asList("usrsapsr0"))))) + .withLoadBalancer( + new LoadBalancerResourceNames() + .withLoadBalancerName("dblb") + .withFrontendIpConfigurationNames(Arrays.asList("dbip")) + .withBackendPoolNames(Arrays.asList("dbBackendPool")) + .withHealthProbeNames(Arrays.asList("dbHealthProbe")))) + .withSharedStorage( + new SharedStorageResourceNames() + .withSharedStorageAccountName("storageacc") + .withSharedStorageAccountPrivateEndPointName("peForxNFS")))) + .withOsSapConfiguration(new OsSapConfiguration().withSapFqdn("xyz.test.com"))) + .withTags(mapOf()) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_CustomFullResourceNames_HA_AvSet.json + */ + /** + * Sample code: Create Infrastructure (with OS configuration) with custom resource names for HA System with + * Availability Set. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createInfrastructureWithOSConfigurationWithCustomResourceNamesForHASystemWithAvailabilitySet( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapVirtualInstances() + .define("X00") + .withRegion("westcentralus") + .withExistingResourceGroup("test-rg") + .withEnvironment(SapEnvironmentType.PROD) + .withSapProduct(SapProductType.S4HANA) + .withConfiguration( + new DeploymentWithOSConfiguration() + .withAppLocation("eastus") + .withInfrastructureConfiguration( + new ThreeTierConfiguration() + .withAppResourceGroup("X00-RG") + .withCentralServer( + new CentralServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E16ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(2L)) + .withApplicationServer( + new ApplicationServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E32ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(6L)) + .withDatabaseServer( + new DatabaseConfiguration() + .withDatabaseType(SapDatabaseType.HANA) + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_M32ts") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(2L)) + .withHighAvailabilityConfig( + new HighAvailabilityConfiguration() + .withHighAvailabilityType(SapHighAvailabilityType.AVAILABILITY_SET)) + .withCustomResourceNames( + new ThreeTierFullResourceNames() + .withCentralServer( + new CentralServerFullResourceNames() + .withVirtualMachines( + Arrays + .asList( + new VirtualMachineResourceNames() + .withVmName("ascsvm") + .withHostname("ascshostName") + .withNetworkInterfaces( + Arrays + .asList( + new NetworkInterfaceResourceNames() + .withNetworkInterfaceName("ascsnic"))) + .withOsDiskName("ascsosdisk"), + new VirtualMachineResourceNames() + .withVmName("ersvm") + .withHostname("ershostName") + .withNetworkInterfaces( + Arrays + .asList( + new NetworkInterfaceResourceNames() + .withNetworkInterfaceName("ersnic"))) + .withOsDiskName("ersosdisk"))) + .withAvailabilitySetName("csAvSet") + .withLoadBalancer( + new LoadBalancerResourceNames() + .withLoadBalancerName("ascslb") + .withFrontendIpConfigurationNames( + Arrays.asList("ascsip0", "ersip0")) + .withBackendPoolNames(Arrays.asList("ascsBackendPool")) + .withHealthProbeNames( + Arrays.asList("ascsHealthProbe", "ersHealthProbe")))) + .withApplicationServer( + new ApplicationServerFullResourceNames() + .withVirtualMachines( + Arrays + .asList( + new VirtualMachineResourceNames() + .withVmName("appvm0") + .withHostname("apphostName0") + .withNetworkInterfaces( + Arrays + .asList( + new NetworkInterfaceResourceNames() + .withNetworkInterfaceName("appnic0"))) + .withOsDiskName("app0osdisk") + .withDataDiskNames( + mapOf("default", Arrays.asList("app0disk0"))), + new VirtualMachineResourceNames() + .withVmName("appvm1") + .withHostname("apphostName1") + .withNetworkInterfaces( + Arrays + .asList( + new NetworkInterfaceResourceNames() + .withNetworkInterfaceName("appnic1"))) + .withOsDiskName("app1osdisk") + .withDataDiskNames( + mapOf("default", Arrays.asList("app1disk0"))))) + .withAvailabilitySetName("appAvSet")) + .withDatabaseServer( + new DatabaseServerFullResourceNames() + .withVirtualMachines( + Arrays + .asList( + new VirtualMachineResourceNames() + .withVmName("dbvmpr") + .withHostname("dbprhostName") + .withNetworkInterfaces( + Arrays + .asList( + new NetworkInterfaceResourceNames() + .withNetworkInterfaceName("dbprnic"))) + .withOsDiskName("dbprosdisk") + .withDataDiskNames( + mapOf( + "hanaData", + Arrays.asList("hanadatapr0", "hanadatapr1"), + "hanaLog", + Arrays + .asList( + "hanalogpr0", "hanalogpr1", "hanalogpr2"), + "hanaShared", + Arrays.asList("hanasharedpr0", "hanasharedpr1"), + "usrSap", + Arrays.asList("usrsappr0"))), + new VirtualMachineResourceNames() + .withVmName("dbvmsr") + .withHostname("dbsrhostName") + .withNetworkInterfaces( + Arrays + .asList( + new NetworkInterfaceResourceNames() + .withNetworkInterfaceName("dbsrnic"))) + .withOsDiskName("dbsrosdisk") + .withDataDiskNames( + mapOf( + "hanaData", + Arrays.asList("hanadatasr0", "hanadatasr1"), + "hanaLog", + Arrays + .asList( + "hanalogsr0", "hanalogsr1", "hanalogsr2"), + "hanaShared", + Arrays.asList("hanasharedsr0", "hanasharedsr1"), + "usrSap", + Arrays.asList("usrsapsr0"))))) + .withAvailabilitySetName("dbAvSet") + .withLoadBalancer( + new LoadBalancerResourceNames() + .withLoadBalancerName("dblb") + .withFrontendIpConfigurationNames(Arrays.asList("dbip")) + .withBackendPoolNames(Arrays.asList("dbBackendPool")) + .withHealthProbeNames(Arrays.asList("dbHealthProbe")))) + .withSharedStorage( + new SharedStorageResourceNames() + .withSharedStorageAccountName("storageacc") + .withSharedStorageAccountPrivateEndPointName("peForxNFS")))) + .withOsSapConfiguration(new OsSapConfiguration().withSapFqdn("xyz.test.com"))) + .withTags(mapOf()) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_HA_AvSet.json + */ + /** + * Sample code: Create Infrastructure with OS configuration for HA System with Availability Set (Recommended). + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createInfrastructureWithOSConfigurationForHASystemWithAvailabilitySetRecommended( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapVirtualInstances() + .define("X00") + .withRegion("westcentralus") + .withExistingResourceGroup("test-rg") + .withEnvironment(SapEnvironmentType.PROD) + .withSapProduct(SapProductType.S4HANA) + .withConfiguration( + new DeploymentWithOSConfiguration() + .withAppLocation("eastus") + .withInfrastructureConfiguration( + new ThreeTierConfiguration() + .withAppResourceGroup("X00-RG") + .withCentralServer( + new CentralServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E16ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(2L)) + .withApplicationServer( + new ApplicationServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E32ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(6L)) + .withDatabaseServer( + new DatabaseConfiguration() + .withDatabaseType(SapDatabaseType.HANA) + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_M32ts") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(2L)) + .withHighAvailabilityConfig( + new HighAvailabilityConfiguration() + .withHighAvailabilityType(SapHighAvailabilityType.AVAILABILITY_SET))) + .withOsSapConfiguration(new OsSapConfiguration().withSapFqdn("xyz.test.com"))) + .withTags(mapOf()) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_Distributed_SkipTransMount.json + */ + /** + * Sample code: Create Infrastructure without SAP Trans Fileshare. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createInfrastructureWithoutSAPTransFileshare( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapVirtualInstances() + .define("X00") + .withRegion("westcentralus") + .withExistingResourceGroup("test-rg") + .withEnvironment(SapEnvironmentType.PROD) + .withSapProduct(SapProductType.S4HANA) + .withConfiguration( + new DeploymentWithOSConfiguration() + .withAppLocation("eastus") + .withInfrastructureConfiguration( + new ThreeTierConfiguration() + .withAppResourceGroup("X00-RG") + .withCentralServer( + new CentralServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E16ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(1L)) + .withApplicationServer( + new ApplicationServerConfiguration() + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E32ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(6L)) + .withDatabaseServer( + new DatabaseConfiguration() + .withDatabaseType(SapDatabaseType.HANA) + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_M32ts") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(1L)) + .withStorageConfiguration( + new StorageConfiguration() + .withTransportFileShareConfiguration(new SkipFileShareConfiguration()))) + .withOsSapConfiguration(new OsSapConfiguration().withSapFqdn("xyz.test.com"))) + .withTags(mapOf()) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_DiskDetails_Distributed.json + */ + /** + * Sample code: Create Infrastructure with Disk and OS configuration for Distributed System (Recommended). + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createInfrastructureWithDiskAndOSConfigurationForDistributedSystemRecommended( com.azure.resourcemanager.workloads.WorkloadsManager manager) { manager .sapVirtualInstances() @@ -76,9 +2008,9 @@ public static void sAPVirtualInstancesCreateWithOSConfigHAAvSet( .withDisablePasswordAuthentication(true) .withSshKeyPair( new SshKeyPair() - .withPublicKey("abc") - .withPrivateKey("xyz"))))) - .withInstanceCount(2L)) + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(1L)) .withApplicationServer( new ApplicationServerConfiguration() .withSubnetId( @@ -100,8 +2032,8 @@ public static void sAPVirtualInstancesCreateWithOSConfigHAAvSet( .withDisablePasswordAuthentication(true) .withSshKeyPair( new SshKeyPair() - .withPublicKey("abc") - .withPrivateKey("xyz"))))) + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) .withInstanceCount(6L)) .withDatabaseServer( new DatabaseConfiguration() @@ -125,39 +2057,62 @@ public static void sAPVirtualInstancesCreateWithOSConfigHAAvSet( .withDisablePasswordAuthentication(true) .withSshKeyPair( new SshKeyPair() - .withPublicKey("abc") - .withPrivateKey("xyz"))))) - .withInstanceCount(2L)) - .withHighAvailabilityConfig( - new HighAvailabilityConfiguration() - .withHighAvailabilityType(SapHighAvailabilityType.AVAILABILITY_SET))) - .withOsSapConfiguration( - new OsSapConfiguration() - .withDeployerVmPackages( - new DeployerVmPackages() - .withUrl( - "https://ybteststorageaccount.blob.core.windows.net/sapbits/deployervmpackages/DeployerVMPackages.zip") - .withStorageAccountId( - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/yb-SapInstall/providers/Microsoft.Storage/storageAccounts/ybteststorageaccount")) - .withSapFqdn("xyz.test.com"))) + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(1L) + .withDiskConfiguration( + new DiskConfiguration() + .withDiskVolumeConfigurations( + mapOf( + "backup", + new DiskVolumeConfiguration() + .withCount(2L) + .withSizeGB(256L) + .withSku(new DiskSku().withName(DiskSkuName.STANDARD_SSD_LRS)), + "hana/data", + new DiskVolumeConfiguration() + .withCount(4L) + .withSizeGB(128L) + .withSku(new DiskSku().withName(DiskSkuName.PREMIUM_LRS)), + "hana/log", + new DiskVolumeConfiguration() + .withCount(3L) + .withSizeGB(128L) + .withSku(new DiskSku().withName(DiskSkuName.PREMIUM_LRS)), + "hana/shared", + new DiskVolumeConfiguration() + .withCount(1L) + .withSizeGB(256L) + .withSku(new DiskSku().withName(DiskSkuName.STANDARD_SSD_LRS)), + "os", + new DiskVolumeConfiguration() + .withCount(1L) + .withSizeGB(64L) + .withSku(new DiskSku().withName(DiskSkuName.STANDARD_SSD_LRS)), + "usr/sap", + new DiskVolumeConfiguration() + .withCount(1L) + .withSizeGB(128L) + .withSku(new DiskSku().withName(DiskSkuName.PREMIUM_LRS))))))) + .withOsSapConfiguration(new OsSapConfiguration().withSapFqdn("xyz.test.com"))) .withTags(mapOf()) .create(); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_HA_AvZone.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_DetectInstallation_Distributed.json */ /** - * Sample code: SAPVirtualInstances_Create_WithOSConfig_HA_AvZone. + * Sample code: Detect SAP Software Installation on a Distributed System. * * @param manager Entry point to WorkloadsManager. */ - public static void sAPVirtualInstancesCreateWithOSConfigHAAvZone( + public static void detectSAPSoftwareInstallationOnADistributedSystem( com.azure.resourcemanager.workloads.WorkloadsManager manager) { manager .sapVirtualInstances() .define("X00") - .withRegion("westcentralus") + .withRegion("eastus2") .withExistingResourceGroup("test-rg") .withEnvironment(SapEnvironmentType.PROD) .withSapProduct(SapProductType.S4HANA) @@ -166,105 +2121,98 @@ public static void sAPVirtualInstancesCreateWithOSConfigHAAvZone( .withAppLocation("eastus") .withInfrastructureConfiguration( new ThreeTierConfiguration() - .withAppResourceGroup("X00-RG") + .withAppResourceGroup("{{resourcegrp}}") + .withNetworkConfiguration(new NetworkConfiguration().withIsSecondaryIpEnabled(true)) .withCentralServer( new CentralServerConfiguration() .withSubnetId( - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app") .withVirtualMachineConfiguration( new VirtualMachineConfiguration() - .withVmSize("Standard_E16ds_v4") + .withVmSize("Standard_E4ds_v4") .withImageReference( new ImageReference() .withPublisher("RedHat") - .withOffer("RHEL-SAP") - .withSku("7.4") - .withVersion("7.4.2019062505")) + .withOffer("RHEL-SAP-HA") + .withSku("84sapha-gen2") + .withVersion("8.4.2021091202")) .withOsProfile( new OSProfile() - .withAdminUsername("{your-username}") + .withAdminUsername("azureuser") .withOsConfiguration( new LinuxConfiguration() .withDisablePasswordAuthentication(true) .withSshKeyPair( new SshKeyPair() - .withPublicKey("abc") - .withPrivateKey("xyz"))))) - .withInstanceCount(2L)) + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(1L)) .withApplicationServer( new ApplicationServerConfiguration() .withSubnetId( - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app") .withVirtualMachineConfiguration( new VirtualMachineConfiguration() - .withVmSize("Standard_E32ds_v4") + .withVmSize("Standard_E4ds_v4") .withImageReference( new ImageReference() .withPublisher("RedHat") - .withOffer("RHEL-SAP") - .withSku("7.4") - .withVersion("7.4.2019062505")) + .withOffer("RHEL-SAP-HA") + .withSku("84sapha-gen2") + .withVersion("8.4.2021091202")) .withOsProfile( new OSProfile() - .withAdminUsername("{your-username}") + .withAdminUsername("azureuser") .withOsConfiguration( new LinuxConfiguration() .withDisablePasswordAuthentication(true) .withSshKeyPair( new SshKeyPair() - .withPublicKey("abc") - .withPrivateKey("xyz"))))) - .withInstanceCount(6L)) + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(2L)) .withDatabaseServer( new DatabaseConfiguration() - .withDatabaseType(SapDatabaseType.HANA) .withSubnetId( - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet") + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app") .withVirtualMachineConfiguration( new VirtualMachineConfiguration() .withVmSize("Standard_M32ts") .withImageReference( new ImageReference() .withPublisher("RedHat") - .withOffer("RHEL-SAP") - .withSku("7.4") - .withVersion("7.4.2019062505")) + .withOffer("RHEL-SAP-HA") + .withSku("84sapha-gen2") + .withVersion("8.4.2021091202")) .withOsProfile( new OSProfile() - .withAdminUsername("{your-username}") + .withAdminUsername("azureuser") .withOsConfiguration( new LinuxConfiguration() .withDisablePasswordAuthentication(true) .withSshKeyPair( new SshKeyPair() - .withPublicKey("abc") - .withPrivateKey("xyz"))))) - .withInstanceCount(2L)) - .withHighAvailabilityConfig( - new HighAvailabilityConfiguration() - .withHighAvailabilityType(SapHighAvailabilityType.AVAILABILITY_ZONE))) - .withOsSapConfiguration( - new OsSapConfiguration() - .withDeployerVmPackages( - new DeployerVmPackages() - .withUrl( - "https://ybteststorageaccount.blob.core.windows.net/sapbits/deployervmpackages/DeployerVMPackages.zip") - .withStorageAccountId( - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/yb-SapInstall/providers/Microsoft.Storage/storageAccounts/ybteststorageaccount")) - .withSapFqdn("xyz.test.com"))) - .withTags(mapOf()) + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(1L))) + .withSoftwareConfiguration( + new ExternalInstallationSoftwareConfiguration() + .withCentralServerVmId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0")) + .withOsSapConfiguration(new OsSapConfiguration().withSapFqdn("sap.bpaas.com"))) + .withTags(mapOf("created by", "azureuser")) .create(); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_Distributed.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_DetectInstallation_HA_AvSet.json */ /** - * Sample code: SAPVirtualInstances_Create_Distributed. + * Sample code: Detect SAP Software Installation on an HA System with Availability Set. * * @param manager Entry point to WorkloadsManager. */ - public static void sAPVirtualInstancesCreateDistributed( + public static void detectSAPSoftwareInstallationOnAnHASystemWithAvailabilitySet( com.azure.resourcemanager.workloads.WorkloadsManager manager) { manager .sapVirtualInstances() @@ -274,7 +2222,7 @@ public static void sAPVirtualInstancesCreateDistributed( .withEnvironment(SapEnvironmentType.PROD) .withSapProduct(SapProductType.S4HANA) .withConfiguration( - new DeploymentConfiguration() + new DeploymentWithOSConfiguration() .withAppLocation("eastus") .withInfrastructureConfiguration( new ThreeTierConfiguration() @@ -282,101 +2230,154 @@ public static void sAPVirtualInstancesCreateDistributed( .withCentralServer( new CentralServerConfiguration() .withSubnetId( - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") .withVirtualMachineConfiguration( new VirtualMachineConfiguration() .withVmSize("Standard_E16ds_v4") .withImageReference( new ImageReference() .withPublisher("RedHat") - .withOffer("RHEL-SAP") - .withSku("7.4") - .withVersion("7.4.2019062505")) + .withOffer("RHEL-SAP-HA") + .withSku("84sapha-gen2") + .withVersion("8.4.2021091202")) .withOsProfile( new OSProfile() .withAdminUsername("{your-username}") .withOsConfiguration( new LinuxConfiguration() .withDisablePasswordAuthentication(true) - .withSsh( - new SshConfiguration() - .withPublicKeys( - Arrays - .asList( - new SshPublicKey() - .withKeyData( - "ssh-rsa public key"))))))) - .withInstanceCount(1L)) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(2L)) .withApplicationServer( new ApplicationServerConfiguration() .withSubnetId( - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") .withVirtualMachineConfiguration( new VirtualMachineConfiguration() .withVmSize("Standard_E32ds_v4") .withImageReference( new ImageReference() .withPublisher("RedHat") - .withOffer("RHEL-SAP") - .withSku("7.4") - .withVersion("7.4.2019062505")) + .withOffer("RHEL-SAP-HA") + .withSku("84sapha-gen2") + .withVersion("8.4.2021091202")) .withOsProfile( new OSProfile() .withAdminUsername("{your-username}") .withOsConfiguration( new LinuxConfiguration() .withDisablePasswordAuthentication(true) - .withSsh( - new SshConfiguration() - .withPublicKeys( - Arrays - .asList( - new SshPublicKey() - .withKeyData( - "ssh-rsa public key"))))))) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) .withInstanceCount(6L)) .withDatabaseServer( new DatabaseConfiguration() .withDatabaseType(SapDatabaseType.HANA) .withSubnetId( - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet") + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet") .withVirtualMachineConfiguration( new VirtualMachineConfiguration() .withVmSize("Standard_M32ts") .withImageReference( new ImageReference() .withPublisher("RedHat") - .withOffer("RHEL-SAP") - .withSku("7.4") - .withVersion("7.4.2019062505")) + .withOffer("RHEL-SAP-HA") + .withSku("84sapha-gen2") + .withVersion("8.4.2021091202")) .withOsProfile( new OSProfile() .withAdminUsername("{your-username}") .withOsConfiguration( new LinuxConfiguration() .withDisablePasswordAuthentication(true) - .withSsh( - new SshConfiguration() - .withPublicKeys( - Arrays - .asList( - new SshPublicKey() - .withKeyData( - "ssh-rsa public key"))))))) - .withInstanceCount(1L)))) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(2L)) + .withHighAvailabilityConfig( + new HighAvailabilityConfiguration() + .withHighAvailabilityType(SapHighAvailabilityType.AVAILABILITY_SET))) + .withSoftwareConfiguration( + new ExternalInstallationSoftwareConfiguration() + .withCentralServerVmId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0")) + .withOsSapConfiguration(new OsSapConfiguration().withSapFqdn("xyz.test.com"))) + .withTags(mapOf()) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Install_SingleServer.json + */ + /** + * Sample code: Install SAP Software on Single Server System. + * + * @param manager Entry point to WorkloadsManager. + */ + public static void installSAPSoftwareOnSingleServerSystem( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapVirtualInstances() + .define("X00") + .withRegion("eastus2") + .withExistingResourceGroup("test-rg") + .withEnvironment(SapEnvironmentType.NON_PROD) + .withSapProduct(SapProductType.S4HANA) + .withConfiguration( + new DeploymentWithOSConfiguration() + .withAppLocation("eastus") + .withInfrastructureConfiguration( + new SingleServerConfiguration() + .withAppResourceGroup("test-rg") + .withSubnetId( + "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/testsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E32ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("SUSE") + .withOffer("SLES-SAP") + .withSku("12-sp4-gen2") + .withVersion("2022.02.01")) + .withOsProfile( + new OSProfile() + .withAdminUsername("azureappadmin") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder")))))) + .withSoftwareConfiguration( + new SapInstallWithoutOSConfigSoftwareConfiguration() + .withBomUrl( + "https://teststorageaccount.blob.core.windows.net/sapbits/sapfiles/boms/S41909SPS03_v0011ms/S41909SPS03_v0011ms.yaml") + .withSapBitsStorageAccountId( + "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Storage/storageAccounts/teststorageaccount") + .withSoftwareVersion("SAP S/4HANA 1909 SPS 03")) + .withOsSapConfiguration(new OsSapConfiguration().withSapFqdn("sap.bpaas.com"))) .withTags(mapOf()) .create(); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_HA_AvZone.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_Distributed.json */ /** - * Sample code: SAPVirtualInstances_Create_HA_AvZone. + * Sample code: Create Infrastructure only for Distributed System. * * @param manager Entry point to WorkloadsManager. */ - public static void sAPVirtualInstancesCreateHAAvZone(com.azure.resourcemanager.workloads.WorkloadsManager manager) { + public static void createInfrastructureOnlyForDistributedSystem( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { manager .sapVirtualInstances() .define("X00") @@ -393,7 +2394,7 @@ public static void sAPVirtualInstancesCreateHAAvZone(com.azure.resourcemanager.w .withCentralServer( new CentralServerConfiguration() .withSubnetId( - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") .withVirtualMachineConfiguration( new VirtualMachineConfiguration() .withVmSize("Standard_E16ds_v4") @@ -416,12 +2417,12 @@ public static void sAPVirtualInstancesCreateHAAvZone(com.azure.resourcemanager.w .asList( new SshPublicKey() .withKeyData( - "ssh-rsa public key"))))))) - .withInstanceCount(2L)) + "fakeTokenPlaceholder"))))))) + .withInstanceCount(1L)) .withApplicationServer( new ApplicationServerConfiguration() .withSubnetId( - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") .withVirtualMachineConfiguration( new VirtualMachineConfiguration() .withVmSize("Standard_E32ds_v4") @@ -444,13 +2445,13 @@ public static void sAPVirtualInstancesCreateHAAvZone(com.azure.resourcemanager.w .asList( new SshPublicKey() .withKeyData( - "ssh-rsa public key"))))))) + "fakeTokenPlaceholder"))))))) .withInstanceCount(6L)) .withDatabaseServer( new DatabaseConfiguration() .withDatabaseType(SapDatabaseType.HANA) .withSubnetId( - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet") + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet") .withVirtualMachineConfiguration( new VirtualMachineConfiguration() .withVmSize("Standard_M32ts") @@ -473,81 +2474,47 @@ public static void sAPVirtualInstancesCreateHAAvZone(com.azure.resourcemanager.w .asList( new SshPublicKey() .withKeyData( - "ssh-rsa public key"))))))) - .withInstanceCount(2L)) - .withHighAvailabilityConfig( - new HighAvailabilityConfiguration() - .withHighAvailabilityType(SapHighAvailabilityType.AVAILABILITY_ZONE)))) + "fakeTokenPlaceholder"))))))) + .withInstanceCount(1L)))) .withTags(mapOf()) .create(); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_SingleServer.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_Discover_CustomMrgStorageAccountName.json */ /** - * Sample code: SAPVirtualInstances_Create_WithOSConfig_SingleServer. + * Sample code: Register existing SAP system as Virtual Instance for SAP solutions with optional customizations. * * @param manager Entry point to WorkloadsManager. */ - public static void sAPVirtualInstancesCreateWithOSConfigSingleServer( + public static void registerExistingSAPSystemAsVirtualInstanceForSAPSolutionsWithOptionalCustomizations( com.azure.resourcemanager.workloads.WorkloadsManager manager) { manager .sapVirtualInstances() .define("X00") - .withRegion("westcentralus") + .withRegion("northeurope") .withExistingResourceGroup("test-rg") .withEnvironment(SapEnvironmentType.NON_PROD) .withSapProduct(SapProductType.S4HANA) .withConfiguration( - new DeploymentWithOSConfiguration() - .withAppLocation("eastus") - .withInfrastructureConfiguration( - new SingleServerConfiguration() - .withAppResourceGroup("X00-RG") - .withNetworkConfiguration(new NetworkConfiguration().withIsSecondaryIpEnabled(true)) - .withDatabaseType(SapDatabaseType.HANA) - .withSubnetId( - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") - .withVirtualMachineConfiguration( - new VirtualMachineConfiguration() - .withVmSize("Standard_E32ds_v4") - .withImageReference( - new ImageReference() - .withPublisher("RedHat") - .withOffer("RHEL-SAP") - .withSku("7.4") - .withVersion("7.4.2019062505")) - .withOsProfile( - new OSProfile() - .withAdminUsername("{your-username}") - .withOsConfiguration( - new LinuxConfiguration() - .withDisablePasswordAuthentication(true) - .withSshKeyPair( - new SshKeyPair().withPublicKey("abc").withPrivateKey("xyz")))))) - .withOsSapConfiguration( - new OsSapConfiguration() - .withDeployerVmPackages( - new DeployerVmPackages() - .withUrl( - "https://ybteststorageaccount.blob.core.windows.net/sapbits/deployervmpackages/DeployerVMPackages.zip") - .withStorageAccountId( - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/yb-SapInstall/providers/Microsoft.Storage/storageAccounts/ybteststorageaccount")) - .withSapFqdn("xyz.test.com"))) - .withTags(mapOf()) + new DiscoveryConfiguration() + .withCentralServerVmId( + "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0") + .withManagedRgStorageAccountName("q20saacssgrs")) + .withTags(mapOf("createdby", "abc@microsoft.com", "test", "abc")) .create(); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_SingleServer.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_SingleServer.json */ /** - * Sample code: SAPVirtualInstances_Create_SingleServer. + * Sample code: Create Infrastructure with OS configuration for Single Server System (Recommended). * * @param manager Entry point to WorkloadsManager. */ - public static void sAPVirtualInstancesCreateSingleServer( + public static void createInfrastructureWithOSConfigurationForSingleServerSystemRecommended( com.azure.resourcemanager.workloads.WorkloadsManager manager) { manager .sapVirtualInstances() @@ -557,7 +2524,7 @@ public static void sAPVirtualInstancesCreateSingleServer( .withEnvironment(SapEnvironmentType.NON_PROD) .withSapProduct(SapProductType.S4HANA) .withConfiguration( - new DeploymentConfiguration() + new DeploymentWithOSConfiguration() .withAppLocation("eastus") .withInfrastructureConfiguration( new SingleServerConfiguration() @@ -565,7 +2532,7 @@ public static void sAPVirtualInstancesCreateSingleServer( .withNetworkConfiguration(new NetworkConfiguration().withIsSecondaryIpEnabled(true)) .withDatabaseType(SapDatabaseType.HANA) .withSubnetId( - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") .withVirtualMachineConfiguration( new VirtualMachineConfiguration() .withVmSize("Standard_E32ds_v4") @@ -581,26 +2548,26 @@ public static void sAPVirtualInstancesCreateSingleServer( .withOsConfiguration( new LinuxConfiguration() .withDisablePasswordAuthentication(true) - .withSsh( - new SshConfiguration() - .withPublicKeys( - Arrays - .asList( - new SshPublicKey() - .withKeyData("ssh-rsa public key"))))))))) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder")))))) + .withOsSapConfiguration(new OsSapConfiguration().withSapFqdn("xyz.test.com"))) .withTags(mapOf()) .create(); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_HA_AvSet.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_DiskDetails_HA_AvZone.json */ /** - * Sample code: SAPVirtualInstances_Create_HA_AvSet. + * Sample code: Create Infrastructure with Disk and OS configuration for HA System with Availability Zone + * (Recommended). * * @param manager Entry point to WorkloadsManager. */ - public static void sAPVirtualInstancesCreateHAAvSet(com.azure.resourcemanager.workloads.WorkloadsManager manager) { + public static void createInfrastructureWithDiskAndOSConfigurationForHASystemWithAvailabilityZoneRecommended( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { manager .sapVirtualInstances() .define("X00") @@ -609,7 +2576,7 @@ public static void sAPVirtualInstancesCreateHAAvSet(com.azure.resourcemanager.wo .withEnvironment(SapEnvironmentType.PROD) .withSapProduct(SapProductType.S4HANA) .withConfiguration( - new DeploymentConfiguration() + new DeploymentWithOSConfiguration() .withAppLocation("eastus") .withInfrastructureConfiguration( new ThreeTierConfiguration() @@ -633,14 +2600,10 @@ public static void sAPVirtualInstancesCreateHAAvSet(com.azure.resourcemanager.wo .withOsConfiguration( new LinuxConfiguration() .withDisablePasswordAuthentication(true) - .withSsh( - new SshConfiguration() - .withPublicKeys( - Arrays - .asList( - new SshPublicKey() - .withKeyData( - "ssh-rsa public key"))))))) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) .withInstanceCount(2L)) .withApplicationServer( new ApplicationServerConfiguration() @@ -661,15 +2624,11 @@ public static void sAPVirtualInstancesCreateHAAvSet(com.azure.resourcemanager.wo .withOsConfiguration( new LinuxConfiguration() .withDisablePasswordAuthentication(true) - .withSsh( - new SshConfiguration() - .withPublicKeys( - Arrays - .asList( - new SshPublicKey() - .withKeyData( - "ssh-rsa public key"))))))) - .withInstanceCount(5L)) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(6L)) .withDatabaseServer( new DatabaseConfiguration() .withDatabaseType(SapDatabaseType.HANA) @@ -690,31 +2649,62 @@ public static void sAPVirtualInstancesCreateHAAvSet(com.azure.resourcemanager.wo .withOsConfiguration( new LinuxConfiguration() .withDisablePasswordAuthentication(true) - .withSsh( - new SshConfiguration() - .withPublicKeys( - Arrays - .asList( - new SshPublicKey() - .withKeyData( - "ssh-rsa public key"))))))) - .withInstanceCount(2L)) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(2L) + .withDiskConfiguration( + new DiskConfiguration() + .withDiskVolumeConfigurations( + mapOf( + "backup", + new DiskVolumeConfiguration() + .withCount(2L) + .withSizeGB(256L) + .withSku(new DiskSku().withName(DiskSkuName.STANDARD_SSD_LRS)), + "hana/data", + new DiskVolumeConfiguration() + .withCount(4L) + .withSizeGB(128L) + .withSku(new DiskSku().withName(DiskSkuName.PREMIUM_LRS)), + "hana/log", + new DiskVolumeConfiguration() + .withCount(3L) + .withSizeGB(128L) + .withSku(new DiskSku().withName(DiskSkuName.PREMIUM_LRS)), + "hana/shared", + new DiskVolumeConfiguration() + .withCount(1L) + .withSizeGB(256L) + .withSku(new DiskSku().withName(DiskSkuName.STANDARD_SSD_LRS)), + "os", + new DiskVolumeConfiguration() + .withCount(1L) + .withSizeGB(64L) + .withSku(new DiskSku().withName(DiskSkuName.STANDARD_SSD_LRS)), + "usr/sap", + new DiskVolumeConfiguration() + .withCount(1L) + .withSizeGB(128L) + .withSku(new DiskSku().withName(DiskSkuName.PREMIUM_LRS)))))) .withHighAvailabilityConfig( new HighAvailabilityConfiguration() - .withHighAvailabilityType(SapHighAvailabilityType.AVAILABILITY_SET)))) + .withHighAvailabilityType(SapHighAvailabilityType.AVAILABILITY_ZONE))) + .withOsSapConfiguration(new OsSapConfiguration().withSapFqdn("xyz.test.com"))) .withTags(mapOf()) .create(); } /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_Distributed.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_HA_AvZone.json */ /** - * Sample code: SAPVirtualInstances_Create_WithOSConfig_Distributed. + * Sample code: Create Infrastructure with OS configuration for HA System with Availability Zone (Recommended). * * @param manager Entry point to WorkloadsManager. */ - public static void sAPVirtualInstancesCreateWithOSConfigDistributed( + public static void createInfrastructureWithOSConfigurationForHASystemWithAvailabilityZoneRecommended( com.azure.resourcemanager.workloads.WorkloadsManager manager) { manager .sapVirtualInstances() @@ -732,7 +2722,7 @@ public static void sAPVirtualInstancesCreateWithOSConfigDistributed( .withCentralServer( new CentralServerConfiguration() .withSubnetId( - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") .withVirtualMachineConfiguration( new VirtualMachineConfiguration() .withVmSize("Standard_E16ds_v4") @@ -750,13 +2740,13 @@ public static void sAPVirtualInstancesCreateWithOSConfigDistributed( .withDisablePasswordAuthentication(true) .withSshKeyPair( new SshKeyPair() - .withPublicKey("abc") - .withPrivateKey("xyz"))))) - .withInstanceCount(1L)) + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(2L)) .withApplicationServer( new ApplicationServerConfiguration() .withSubnetId( - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") .withVirtualMachineConfiguration( new VirtualMachineConfiguration() .withVmSize("Standard_E32ds_v4") @@ -774,14 +2764,14 @@ public static void sAPVirtualInstancesCreateWithOSConfigDistributed( .withDisablePasswordAuthentication(true) .withSshKeyPair( new SshKeyPair() - .withPublicKey("abc") - .withPrivateKey("xyz"))))) + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) .withInstanceCount(6L)) .withDatabaseServer( new DatabaseConfiguration() .withDatabaseType(SapDatabaseType.HANA) .withSubnetId( - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet") + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet") .withVirtualMachineConfiguration( new VirtualMachineConfiguration() .withVmSize("Standard_M32ts") @@ -799,18 +2789,98 @@ public static void sAPVirtualInstancesCreateWithOSConfigDistributed( .withDisablePasswordAuthentication(true) .withSshKeyPair( new SshKeyPair() - .withPublicKey("abc") - .withPrivateKey("xyz"))))) - .withInstanceCount(1L))) - .withOsSapConfiguration( - new OsSapConfiguration() - .withDeployerVmPackages( - new DeployerVmPackages() - .withUrl( - "https://ybteststorageaccount.blob.core.windows.net/sapbits/deployervmpackages/DeployerVMPackages.zip") - .withStorageAccountId( - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/yb-SapInstall/providers/Microsoft.Storage/storageAccounts/ybteststorageaccount")) - .withSapFqdn("xyz.test.com"))) + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withInstanceCount(2L)) + .withHighAvailabilityConfig( + new HighAvailabilityConfiguration() + .withHighAvailabilityType(SapHighAvailabilityType.AVAILABILITY_ZONE))) + .withOsSapConfiguration(new OsSapConfiguration().withSapFqdn("xyz.test.com"))) + .withTags(mapOf()) + .create(); + } + + /* + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_DiskDetails_SingleServer.json + */ + /** + * Sample code: Create Infrastructure with Disk and OS configurations for Single Server System (Recommended). + * + * @param manager Entry point to WorkloadsManager. + */ + public static void createInfrastructureWithDiskAndOSConfigurationsForSingleServerSystemRecommended( + com.azure.resourcemanager.workloads.WorkloadsManager manager) { + manager + .sapVirtualInstances() + .define("X00") + .withRegion("westcentralus") + .withExistingResourceGroup("test-rg") + .withEnvironment(SapEnvironmentType.NON_PROD) + .withSapProduct(SapProductType.S4HANA) + .withConfiguration( + new DeploymentWithOSConfiguration() + .withAppLocation("eastus") + .withInfrastructureConfiguration( + new SingleServerConfiguration() + .withAppResourceGroup("X00-RG") + .withNetworkConfiguration(new NetworkConfiguration().withIsSecondaryIpEnabled(true)) + .withDatabaseType(SapDatabaseType.HANA) + .withSubnetId( + "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet") + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withVmSize("Standard_E32ds_v4") + .withImageReference( + new ImageReference() + .withPublisher("RedHat") + .withOffer("RHEL-SAP") + .withSku("7.4") + .withVersion("7.4.2019062505")) + .withOsProfile( + new OSProfile() + .withAdminUsername("{your-username}") + .withOsConfiguration( + new LinuxConfiguration() + .withDisablePasswordAuthentication(true) + .withSshKeyPair( + new SshKeyPair() + .withPublicKey("fakeTokenPlaceholder") + .withPrivateKey("fakeTokenPlaceholder"))))) + .withDbDiskConfiguration( + new DiskConfiguration() + .withDiskVolumeConfigurations( + mapOf( + "backup", + new DiskVolumeConfiguration() + .withCount(2L) + .withSizeGB(256L) + .withSku(new DiskSku().withName(DiskSkuName.STANDARD_SSD_LRS)), + "hana/data", + new DiskVolumeConfiguration() + .withCount(4L) + .withSizeGB(128L) + .withSku(new DiskSku().withName(DiskSkuName.PREMIUM_LRS)), + "hana/log", + new DiskVolumeConfiguration() + .withCount(3L) + .withSizeGB(128L) + .withSku(new DiskSku().withName(DiskSkuName.PREMIUM_LRS)), + "hana/shared", + new DiskVolumeConfiguration() + .withCount(1L) + .withSizeGB(256L) + .withSku(new DiskSku().withName(DiskSkuName.STANDARD_SSD_LRS)), + "os", + new DiskVolumeConfiguration() + .withCount(1L) + .withSizeGB(64L) + .withSku(new DiskSku().withName(DiskSkuName.STANDARD_SSD_LRS)), + "usr/sap", + new DiskVolumeConfiguration() + .withCount(1L) + .withSizeGB(128L) + .withSku(new DiskSku().withName(DiskSkuName.PREMIUM_LRS)))))) + .withOsSapConfiguration(new OsSapConfiguration().withSapFqdn("xyz.test.com"))) .withTags(mapOf()) .create(); } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapVirtualInstancesDeleteSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapVirtualInstancesDeleteSamples.java index 09c48bea990fc..154766837b13b 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapVirtualInstancesDeleteSamples.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapVirtualInstancesDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.workloads.generated; -import com.azure.core.util.Context; - /** Samples for SapVirtualInstances Delete. */ public final class SapVirtualInstancesDeleteSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Delete.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Delete.json */ /** * Sample code: SAPVirtualInstances_Delete. @@ -17,6 +15,6 @@ public final class SapVirtualInstancesDeleteSamples { * @param manager Entry point to WorkloadsManager. */ public static void sAPVirtualInstancesDelete(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.sapVirtualInstances().delete("test-rg", "X00", Context.NONE); + manager.sapVirtualInstances().delete("test-rg", "X00", com.azure.core.util.Context.NONE); } } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapVirtualInstancesGetByResourceGroupSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapVirtualInstancesGetByResourceGroupSamples.java index 69b81dc630210..6acedd0891850 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapVirtualInstancesGetByResourceGroupSamples.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapVirtualInstancesGetByResourceGroupSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.workloads.generated; -import com.azure.core.util.Context; - /** Samples for SapVirtualInstances GetByResourceGroup. */ public final class SapVirtualInstancesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Get.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Get.json */ /** * Sample code: SAPVirtualInstances_Get. @@ -17,6 +15,8 @@ public final class SapVirtualInstancesGetByResourceGroupSamples { * @param manager Entry point to WorkloadsManager. */ public static void sAPVirtualInstancesGet(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.sapVirtualInstances().getByResourceGroupWithResponse("test-rg", "X00", Context.NONE); + manager + .sapVirtualInstances() + .getByResourceGroupWithResponse("test-rg", "X00", com.azure.core.util.Context.NONE); } } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapVirtualInstancesListByResourceGroupSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapVirtualInstancesListByResourceGroupSamples.java index 3465f146b28a2..a65fce11a39e1 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapVirtualInstancesListByResourceGroupSamples.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapVirtualInstancesListByResourceGroupSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.workloads.generated; -import com.azure.core.util.Context; - /** Samples for SapVirtualInstances ListByResourceGroup. */ public final class SapVirtualInstancesListByResourceGroupSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_ListByResourceGroup.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_ListByResourceGroup.json */ /** * Sample code: SAPVirtualInstances_ListByResourceGroup. @@ -18,6 +16,6 @@ public final class SapVirtualInstancesListByResourceGroupSamples { */ public static void sAPVirtualInstancesListByResourceGroup( com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.sapVirtualInstances().listByResourceGroup("test-rg", Context.NONE); + manager.sapVirtualInstances().listByResourceGroup("test-rg", com.azure.core.util.Context.NONE); } } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapVirtualInstancesListSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapVirtualInstancesListSamples.java index f0f730536b353..0bcfa3a834b08 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapVirtualInstancesListSamples.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapVirtualInstancesListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.workloads.generated; -import com.azure.core.util.Context; - /** Samples for SapVirtualInstances List. */ public final class SapVirtualInstancesListSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_ListBySubscription.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_ListBySubscription.json */ /** * Sample code: SAPVirtualInstances_ListBySubscription. @@ -18,6 +16,6 @@ public final class SapVirtualInstancesListSamples { */ public static void sAPVirtualInstancesListBySubscription( com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.sapVirtualInstances().list(Context.NONE); + manager.sapVirtualInstances().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapVirtualInstancesStartSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapVirtualInstancesStartSamples.java index ae3af9a4b8089..695943185de61 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapVirtualInstancesStartSamples.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapVirtualInstancesStartSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.workloads.generated; -import com.azure.core.util.Context; - /** Samples for SapVirtualInstances Start. */ public final class SapVirtualInstancesStartSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Start.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Start.json */ /** * Sample code: SAPVirtualInstances_Start. @@ -17,6 +15,6 @@ public final class SapVirtualInstancesStartSamples { * @param manager Entry point to WorkloadsManager. */ public static void sAPVirtualInstancesStart(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.sapVirtualInstances().start("test-rg", "X00", Context.NONE); + manager.sapVirtualInstances().start("test-rg", "X00", com.azure.core.util.Context.NONE); } } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapVirtualInstancesStopSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapVirtualInstancesStopSamples.java index 17e635aad0b65..20406cab241e6 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapVirtualInstancesStopSamples.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapVirtualInstancesStopSamples.java @@ -4,13 +4,12 @@ package com.azure.resourcemanager.workloads.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.workloads.models.StopRequest; /** Samples for SapVirtualInstances Stop. */ public final class SapVirtualInstancesStopSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Stop.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Stop.json */ /** * Sample code: SAPVirtualInstances_Stop. @@ -18,6 +17,8 @@ public final class SapVirtualInstancesStopSamples { * @param manager Entry point to WorkloadsManager. */ public static void sAPVirtualInstancesStop(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.sapVirtualInstances().stop("test-rg", "X00", new StopRequest().withHardStop(false), Context.NONE); + manager + .sapVirtualInstances() + .stop("test-rg", "X00", new StopRequest().withSoftStopTimeoutSeconds(0L), com.azure.core.util.Context.NONE); } } diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapVirtualInstancesUpdateSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapVirtualInstancesUpdateSamples.java index c93e17cc9fa94..d46964500313d 100644 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapVirtualInstancesUpdateSamples.java +++ b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SapVirtualInstancesUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.workloads.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.workloads.models.ManagedServiceIdentityType; import com.azure.resourcemanager.workloads.models.SapVirtualInstance; import com.azure.resourcemanager.workloads.models.UserAssignedServiceIdentity; @@ -14,7 +13,7 @@ /** Samples for SapVirtualInstances Update. */ public final class SapVirtualInstancesUpdateSamples { /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Update.json + * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2022-11-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Update.json */ /** * Sample code: SAPVirtualInstances_Update. @@ -23,7 +22,10 @@ public final class SapVirtualInstancesUpdateSamples { */ public static void sAPVirtualInstancesUpdate(com.azure.resourcemanager.workloads.WorkloadsManager manager) { SapVirtualInstance resource = - manager.sapVirtualInstances().getByResourceGroupWithResponse("test-rg", "X00", Context.NONE).getValue(); + manager + .sapVirtualInstances() + .getByResourceGroupWithResponse("test-rg", "X00", com.azure.core.util.Context.NONE) + .getValue(); resource .update() .withTags(mapOf("key1", "svi1")) diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SkusListSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SkusListSamples.java deleted file mode 100644 index f5939dab1529a..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/SkusListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.workloads.generated; - -import com.azure.core.util.Context; - -/** Samples for Skus List. */ -public final class SkusListSamples { - /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/Skus_List.json - */ - /** - * Sample code: Skus. - * - * @param manager Entry point to WorkloadsManager. - */ - public static void skus(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.skus().list(Context.NONE); - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/WordpressInstancesCreateOrUpdateSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/WordpressInstancesCreateOrUpdateSamples.java deleted file mode 100644 index 905a055a40597..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/WordpressInstancesCreateOrUpdateSamples.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.workloads.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.workloads.fluent.models.WordpressInstanceResourceInner; -import com.azure.resourcemanager.workloads.models.WordpressVersions; - -/** Samples for WordpressInstances CreateOrUpdate. */ -public final class WordpressInstancesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/phpworkloads/WordpressInstances_CreateOrUpdate.json - */ - /** - * Sample code: Workloads. - * - * @param manager Entry point to WorkloadsManager. - */ - public static void workloads(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager - .wordpressInstances() - .createOrUpdate( - "test-rg", - "wp39", - new WordpressInstanceResourceInner() - .withVersion(WordpressVersions.FIVE_FOUR_TWO) - .withDatabaseName("wpdb") - .withDatabaseUser("wpuser"), - Context.NONE); - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/WordpressInstancesDeleteSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/WordpressInstancesDeleteSamples.java deleted file mode 100644 index 919b8391f2bda..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/WordpressInstancesDeleteSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.workloads.generated; - -import com.azure.core.util.Context; - -/** Samples for WordpressInstances Delete. */ -public final class WordpressInstancesDeleteSamples { - /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/phpworkloads/WordpressInstances_Delete.json - */ - /** - * Sample code: Workloads. - * - * @param manager Entry point to WorkloadsManager. - */ - public static void workloads(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.wordpressInstances().deleteWithResponse("test-rg", "wp39", Context.NONE); - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/WordpressInstancesGetSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/WordpressInstancesGetSamples.java deleted file mode 100644 index e74388d522169..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/WordpressInstancesGetSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.workloads.generated; - -import com.azure.core.util.Context; - -/** Samples for WordpressInstances Get. */ -public final class WordpressInstancesGetSamples { - /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/phpworkloads/WordpressInstances_Get.json - */ - /** - * Sample code: Workloads. - * - * @param manager Entry point to WorkloadsManager. - */ - public static void workloads(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.wordpressInstances().getWithResponse("test-rg", "wp39", Context.NONE); - } -} diff --git a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/WordpressInstancesListSamples.java b/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/WordpressInstancesListSamples.java deleted file mode 100644 index a82bf254d169d..0000000000000 --- a/sdk/workloads/azure-resourcemanager-workloads/src/samples/java/com/azure/resourcemanager/workloads/generated/WordpressInstancesListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.workloads.generated; - -import com.azure.core.util.Context; - -/** Samples for WordpressInstances List. */ -public final class WordpressInstancesListSamples { - /* - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/phpworkloads/WordpressInstances_List.json - */ - /** - * Sample code: Workloads. - * - * @param manager Entry point to WorkloadsManager. - */ - public static void workloads(com.azure.resourcemanager.workloads.WorkloadsManager manager) { - manager.wordpressInstances().list("test-rg", "wp39", Context.NONE); - } -}