diff --git a/sdk/elastic/azure-resourcemanager-elastic/CHANGELOG.md b/sdk/elastic/azure-resourcemanager-elastic/CHANGELOG.md index 56a165f8e6f2..98768656f948 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/CHANGELOG.md +++ b/sdk/elastic/azure-resourcemanager-elastic/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.5 (Unreleased) +## 1.0.0-beta.1 (2023-11-13) + +- Azure Resource Manager elastic client library for Java. This package contains Microsoft Azure SDK for elastic Management SDK. Package tag package-2023-11-01-preview. 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/elastic/azure-resourcemanager-elastic/README.md b/sdk/elastic/azure-resourcemanager-elastic/README.md index 33c6d93d9afa..b685709c816b 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/README.md +++ b/sdk/elastic/azure-resourcemanager-elastic/README.md @@ -2,7 +2,7 @@ Azure Resource Manager elastic client library for Java. -This package contains Microsoft Azure SDK for elastic Management SDK. Package tag package-2023-02-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 elastic Management SDK. Package tag package-2023-11-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-elastic - 1.0.0-beta.4 + 1.0.0-beta.5 ``` [//]: # ({x-version-update-end}) @@ -45,7 +45,7 @@ Azure Management Libraries require a `TokenCredential` implementation for authen ### Authentication -By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables. +By default, Microsoft Entra ID 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. @@ -94,7 +94,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS [docs]: https://azure.github.io/azure-sdk-for-java/ -[jdk]: https://docs.microsoft.com/java/azure/jdk/ +[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/ [azure_subscription]: https://azure.microsoft.com/free/ [azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity [azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty @@ -103,3 +103,5 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md [coc]: https://opensource.microsoft.com/codeofconduct/ [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Felastic%2Fazure-resourcemanager-elastic%2FREADME.png) diff --git a/sdk/elastic/azure-resourcemanager-elastic/SAMPLE.md b/sdk/elastic/azure-resourcemanager-elastic/SAMPLE.md index db19761c9e32..d93755f49049 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/SAMPLE.md +++ b/sdk/elastic/azure-resourcemanager-elastic/SAMPLE.md @@ -9,6 +9,14 @@ - [Associate](#associatetrafficfilter_associate) +## BillingInfo + +- [Get](#billinginfo_get) + +## ConnectedPartnerResources + +- [List](#connectedpartnerresources_list) + ## CreateAndAssociateIpFilter - [Create](#createandassociateipfilter_create) @@ -65,6 +73,7 @@ ## Organizations - [GetApiKey](#organizations_getapikey) +- [GetElasticToAzureSubscriptionMapping](#organizations_getelastictoazuresubscriptionmapping) ## TagRules @@ -98,7 +107,7 @@ /** Samples for AllTrafficFilters List. */ public final class AllTrafficFiltersListSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/AllTrafficFilters_list.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/AllTrafficFilters_list.json */ /** * Sample code: AllTrafficFilters_list. @@ -117,7 +126,7 @@ public final class AllTrafficFiltersListSamples { /** Samples for AssociateTrafficFilter Associate. */ public final class AssociateTrafficFilterAssociateSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/AssociateTrafficFilter_Update.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/AssociateTrafficFilter_Update.json */ /** * Sample code: AssociateTrafficFilter_Associate. @@ -133,13 +142,51 @@ public final class AssociateTrafficFilterAssociateSamples { } ``` +### BillingInfo_Get + +```java +/** Samples for BillingInfo Get. */ +public final class BillingInfoGetSamples { + /* + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/BillingInfo_Get.json + */ + /** + * Sample code: BillingInfo_Get. + * + * @param manager Entry point to ElasticManager. + */ + public static void billingInfoGet(com.azure.resourcemanager.elastic.ElasticManager manager) { + manager.billingInfoes().getWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); + } +} +``` + +### ConnectedPartnerResources_List + +```java +/** Samples for ConnectedPartnerResources List. */ +public final class ConnectedPartnerResourcesListSamples { + /* + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/ConnectedPartnerResources_List.json + */ + /** + * Sample code: ConnectedPartnerResources_List. + * + * @param manager Entry point to ElasticManager. + */ + public static void connectedPartnerResourcesList(com.azure.resourcemanager.elastic.ElasticManager manager) { + manager.connectedPartnerResources().list("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); + } +} +``` + ### CreateAndAssociateIpFilter_Create ```java /** Samples for CreateAndAssociateIpFilter Create. */ public final class CreateAndAssociateIpFilterCreateSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/IPTrafficFilter_Create.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/IPTrafficFilter_Create.json */ /** * Sample code: createAndAssociateIPFilter_Create. @@ -165,7 +212,7 @@ public final class CreateAndAssociateIpFilterCreateSamples { /** Samples for CreateAndAssociatePLFilter Create. */ public final class CreateAndAssociatePLFilterCreateSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/PrivateLinkTrafficFilters_Create.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/PrivateLinkTrafficFilters_Create.json */ /** * Sample code: createAndAssociatePLFilter_Create. @@ -192,7 +239,7 @@ public final class CreateAndAssociatePLFilterCreateSamples { /** Samples for DeploymentInfo List. */ public final class DeploymentInfoListSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/DeploymentInfo_List.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/DeploymentInfo_List.json */ /** * Sample code: DeploymentInfo_List. @@ -211,7 +258,7 @@ public final class DeploymentInfoListSamples { /** Samples for DetachAndDeleteTrafficFilter Delete. */ public final class DetachAndDeleteTrafficFilterDeleteSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/DetachAndDeleteTrafficFilter_Delete.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/DetachAndDeleteTrafficFilter_Delete.json */ /** * Sample code: DetachAndDeleteTrafficFilter_Delete. @@ -233,7 +280,7 @@ public final class DetachAndDeleteTrafficFilterDeleteSamples { /** Samples for DetachTrafficFilter Update. */ public final class DetachTrafficFilterUpdateSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/DetachTrafficFilters_Update.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/DetachTrafficFilters_Update.json */ /** * Sample code: DetachTrafficFilter_Update. @@ -255,7 +302,7 @@ public final class DetachTrafficFilterUpdateSamples { /** Samples for ElasticVersions List. */ public final class ElasticVersionsListSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/ElasticVersions_List.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/ElasticVersions_List.json */ /** * Sample code: ElasticVersions_List. @@ -274,7 +321,7 @@ public final class ElasticVersionsListSamples { /** Samples for ExternalUser CreateOrUpdate. */ public final class ExternalUserCreateOrUpdateSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/ExternalUserInfo.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/ExternalUserInfo.json */ /** * Sample code: ExternalUser_CreateOrUpdate. @@ -295,7 +342,7 @@ public final class ExternalUserCreateOrUpdateSamples { /** Samples for ListAssociatedTrafficFilters List. */ public final class ListAssociatedTrafficFiltersListSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/AssociatedFiltersForDeployment_list.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/AssociatedFiltersForDeployment_list.json */ /** * Sample code: listAssociatedTrafficFilters_list. @@ -316,7 +363,7 @@ public final class ListAssociatedTrafficFiltersListSamples { /** Samples for MonitorOperation Upgrade. */ public final class MonitorOperationUpgradeSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/Monitor_Upgrade.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/Monitor_Upgrade.json */ /** * Sample code: Monitor_Upgrade. @@ -335,7 +382,7 @@ public final class MonitorOperationUpgradeSamples { /** Samples for MonitoredResources List. */ public final class MonitoredResourcesListSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/MonitoredResources_List.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/MonitoredResources_List.json */ /** * Sample code: MonitoredResources_List. @@ -354,7 +401,7 @@ public final class MonitoredResourcesListSamples { /** Samples for Monitors Create. */ public final class MonitorsCreateSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/Monitors_Create.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/Monitors_Create.json */ /** * Sample code: Monitors_Create. @@ -378,7 +425,7 @@ public final class MonitorsCreateSamples { /** Samples for Monitors Delete. */ public final class MonitorsDeleteSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/Monitors_Delete.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/Monitors_Delete.json */ /** * Sample code: Monitors_Delete. @@ -397,7 +444,7 @@ public final class MonitorsDeleteSamples { /** Samples for Monitors GetByResourceGroup. */ public final class MonitorsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/Monitors_Get.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/Monitors_Get.json */ /** * Sample code: Monitors_Get. @@ -418,7 +465,7 @@ public final class MonitorsGetByResourceGroupSamples { /** Samples for Monitors List. */ public final class MonitorsListSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/Monitors_List.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/Monitors_List.json */ /** * Sample code: Monitors_List. @@ -437,7 +484,7 @@ public final class MonitorsListSamples { /** Samples for Monitors ListByResourceGroup. */ public final class MonitorsListByResourceGroupSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/Monitors_ListByResourceGroup.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/Monitors_ListByResourceGroup.json */ /** * Sample code: Monitors_ListByResourceGroup. @@ -458,7 +505,7 @@ import com.azure.resourcemanager.elastic.models.ElasticMonitorResource; /** Samples for Monitors Update. */ public final class MonitorsUpdateSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/Monitors_Update.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/Monitors_Update.json */ /** * Sample code: Monitors_Update. @@ -482,7 +529,7 @@ public final class MonitorsUpdateSamples { /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/Operations_List.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/Operations_List.json */ /** * Sample code: Operations_List. @@ -501,7 +548,7 @@ public final class OperationsListSamples { /** Samples for Organizations GetApiKey. */ public final class OrganizationsGetApiKeySamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/Organizations_GetApiKey.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/Organizations_GetApiKey.json */ /** * Sample code: Organizations_GetApiKey. @@ -514,13 +561,33 @@ public final class OrganizationsGetApiKeySamples { } ``` +### Organizations_GetElasticToAzureSubscriptionMapping + +```java +/** Samples for Organizations GetElasticToAzureSubscriptionMapping. */ +public final class OrganizationsGetElasticToAzureSubscriptionMappingSamples { + /* + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/Organizations_GetElasticToAzureSubscriptionMapping.json + */ + /** + * Sample code: Organizations_GetElasticToAzureSubscriptionMapping. + * + * @param manager Entry point to ElasticManager. + */ + public static void organizationsGetElasticToAzureSubscriptionMapping( + com.azure.resourcemanager.elastic.ElasticManager manager) { + manager.organizations().getElasticToAzureSubscriptionMappingWithResponse(com.azure.core.util.Context.NONE); + } +} +``` + ### TagRules_CreateOrUpdate ```java /** Samples for TagRules CreateOrUpdate. */ public final class TagRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/TagRules_CreateOrUpdate.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/TagRules_CreateOrUpdate.json */ /** * Sample code: TagRules_CreateOrUpdate. @@ -539,7 +606,7 @@ public final class TagRulesCreateOrUpdateSamples { /** Samples for TagRules Delete. */ public final class TagRulesDeleteSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/TagRules_Delete.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/TagRules_Delete.json */ /** * Sample code: TagRules_Delete. @@ -558,7 +625,7 @@ public final class TagRulesDeleteSamples { /** Samples for TagRules Get. */ public final class TagRulesGetSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/TagRules_Get.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/TagRules_Get.json */ /** * Sample code: TagRules_Get. @@ -577,7 +644,7 @@ public final class TagRulesGetSamples { /** Samples for TagRules List. */ public final class TagRulesListSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/TagRules_List.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/TagRules_List.json */ /** * Sample code: TagRules_List. @@ -596,7 +663,7 @@ public final class TagRulesListSamples { /** Samples for TrafficFilters Delete. */ public final class TrafficFiltersDeleteSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/TrafficFilters_Delete.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/TrafficFilters_Delete.json */ /** * Sample code: TrafficFilters_Delete. @@ -618,7 +685,7 @@ public final class TrafficFiltersDeleteSamples { /** Samples for UpgradableVersions Details. */ public final class UpgradableVersionsDetailsSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/UpgradableVersions_Details.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/UpgradableVersions_Details.json */ /** * Sample code: UpgradableVersions_Details. @@ -639,7 +706,7 @@ public final class UpgradableVersionsDetailsSamples { /** Samples for VMCollection Update. */ public final class VMCollectionUpdateSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/VMCollection_Update.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/VMCollection_Update.json */ /** * Sample code: VMCollection_Update. @@ -660,7 +727,7 @@ public final class VMCollectionUpdateSamples { /** Samples for VMHost List. */ public final class VMHostListSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/VMHost_List.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/VMHost_List.json */ /** * Sample code: VMHost_List. @@ -679,7 +746,7 @@ public final class VMHostListSamples { /** Samples for VMIngestion Details. */ public final class VMIngestionDetailsSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/VMIngestion_Details.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/VMIngestion_Details.json */ /** * Sample code: VMIngestion_Details. diff --git a/sdk/elastic/azure-resourcemanager-elastic/pom.xml b/sdk/elastic/azure-resourcemanager-elastic/pom.xml index fcaa49cd199f..cfd59d5d62eb 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/pom.xml +++ b/sdk/elastic/azure-resourcemanager-elastic/pom.xml @@ -18,7 +18,7 @@ jar Microsoft Azure SDK for elastic Management - This package contains Microsoft Azure SDK for elastic Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2023-02-01-preview. + This package contains Microsoft Azure SDK for elastic Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2023-11-01-preview. https://github.com/Azure/azure-sdk-for-java @@ -45,6 +45,7 @@ UTF-8 0 0 + true diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/ElasticManager.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/ElasticManager.java index 5c3475761e39..78365d96197c 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/ElasticManager.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/ElasticManager.java @@ -26,6 +26,8 @@ import com.azure.resourcemanager.elastic.fluent.MicrosoftElastic; import com.azure.resourcemanager.elastic.implementation.AllTrafficFiltersImpl; import com.azure.resourcemanager.elastic.implementation.AssociateTrafficFiltersImpl; +import com.azure.resourcemanager.elastic.implementation.BillingInfoesImpl; +import com.azure.resourcemanager.elastic.implementation.ConnectedPartnerResourcesImpl; import com.azure.resourcemanager.elastic.implementation.CreateAndAssociateIpFiltersImpl; import com.azure.resourcemanager.elastic.implementation.CreateAndAssociatePLFiltersImpl; import com.azure.resourcemanager.elastic.implementation.DeploymentInfoesImpl; @@ -48,6 +50,8 @@ import com.azure.resourcemanager.elastic.implementation.VMIngestionsImpl; import com.azure.resourcemanager.elastic.models.AllTrafficFilters; import com.azure.resourcemanager.elastic.models.AssociateTrafficFilters; +import com.azure.resourcemanager.elastic.models.BillingInfoes; +import com.azure.resourcemanager.elastic.models.ConnectedPartnerResources; import com.azure.resourcemanager.elastic.models.CreateAndAssociateIpFilters; import com.azure.resourcemanager.elastic.models.CreateAndAssociatePLFilters; import com.azure.resourcemanager.elastic.models.DeploymentInfoes; @@ -88,6 +92,10 @@ public final class ElasticManager { private ExternalUsers externalUsers; + private BillingInfoes billingInfoes; + + private ConnectedPartnerResources connectedPartnerResources; + private TagRules tagRules; private VMHosts vMHosts; @@ -283,7 +291,7 @@ public ElasticManager authenticate(TokenCredential credential, AzureProfile prof .append("-") .append("com.azure.resourcemanager.elastic") .append("/") - .append("1.0.0-beta.4"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -412,6 +420,31 @@ public ExternalUsers externalUsers() { return externalUsers; } + /** + * Gets the resource collection API of BillingInfoes. + * + * @return Resource collection API of BillingInfoes. + */ + public BillingInfoes billingInfoes() { + if (this.billingInfoes == null) { + this.billingInfoes = new BillingInfoesImpl(clientObject.getBillingInfoes(), this); + } + return billingInfoes; + } + + /** + * Gets the resource collection API of ConnectedPartnerResources. + * + * @return Resource collection API of ConnectedPartnerResources. + */ + public ConnectedPartnerResources connectedPartnerResources() { + if (this.connectedPartnerResources == null) { + this.connectedPartnerResources = + new ConnectedPartnerResourcesImpl(clientObject.getConnectedPartnerResources(), this); + } + return connectedPartnerResources; + } + /** * Gets the resource collection API of TagRules. It manages MonitoringTagRules. * @@ -598,8 +631,10 @@ public Organizations organizations() { } /** - * @return Wrapped service client MicrosoftElastic providing direct access to the underlying auto-generated API - * implementation, based on Azure REST API. + * Gets wrapped service client MicrosoftElastic providing direct access to the underlying auto-generated API + * implementation, based on Azure REST API. + * + * @return Wrapped service client MicrosoftElastic. */ public MicrosoftElastic serviceClient() { return this.clientObject; diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/AllTrafficFiltersClient.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/AllTrafficFiltersClient.java index 5f10c409d41d..e323b85aa661 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/AllTrafficFiltersClient.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/AllTrafficFiltersClient.java @@ -15,7 +15,7 @@ public interface AllTrafficFiltersClient { /** * Get the list of all traffic filters for the account. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -30,7 +30,7 @@ Response listWithResponse( /** * Get the list of all traffic filters for the account. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @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/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/AssociateTrafficFiltersClient.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/AssociateTrafficFiltersClient.java index 124a820e1dc7..c94281784a67 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/AssociateTrafficFiltersClient.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/AssociateTrafficFiltersClient.java @@ -15,7 +15,7 @@ public interface AssociateTrafficFiltersClient { /** * Associate traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -28,7 +28,7 @@ public interface AssociateTrafficFiltersClient { /** * Associate traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param rulesetId Ruleset Id of the filter. * @param context The context to associate with this operation. @@ -44,7 +44,7 @@ SyncPoller, Void> beginAssociate( /** * Associate traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -56,7 +56,7 @@ SyncPoller, Void> beginAssociate( /** * Associate traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param rulesetId Ruleset Id of the filter. * @param context The context to associate with this operation. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/BillingInfoesClient.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/BillingInfoesClient.java new file mode 100644 index 000000000000..c16c34640b16 --- /dev/null +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/BillingInfoesClient.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.elastic.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.elastic.fluent.models.BillingInfoResponseInner; + +/** An instance of this class provides access to all the operations defined in BillingInfoesClient. */ +public interface BillingInfoesClient { + /** + * Get marketplace and organization info mapped to the given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource 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 marketplace and organization info mapped to the given monitor along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String monitorName, Context context); + + /** + * Get marketplace and organization info mapped to the given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource 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 marketplace and organization info mapped to the given monitor. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BillingInfoResponseInner get(String resourceGroupName, String monitorName); +} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/ConnectedPartnerResourcesClient.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/ConnectedPartnerResourcesClient.java new file mode 100644 index 000000000000..5ce97bd953c2 --- /dev/null +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/ConnectedPartnerResourcesClient.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.elastic.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.elastic.fluent.models.ConnectedPartnerResourcesListFormatInner; + +/** An instance of this class provides access to all the operations defined in ConnectedPartnerResourcesClient. */ +public interface ConnectedPartnerResourcesClient { + /** + * List of all active deployments that are associated with the marketplace subscription linked to the given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource 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 list of all active elastic deployments as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String monitorName); + + /** + * List of all active deployments that are associated with the marketplace subscription linked to the given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource 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 list of all active elastic deployments as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, String monitorName, Context context); +} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/CreateAndAssociateIpFiltersClient.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/CreateAndAssociateIpFiltersClient.java index fe6ee7e86553..fcef19dd9a4e 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/CreateAndAssociateIpFiltersClient.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/CreateAndAssociateIpFiltersClient.java @@ -15,7 +15,7 @@ public interface CreateAndAssociateIpFiltersClient { /** * Create and Associate IP traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -28,7 +28,7 @@ public interface CreateAndAssociateIpFiltersClient { /** * Create and Associate IP traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ips List of ips. * @param name Name of the traffic filter. @@ -45,7 +45,7 @@ SyncPoller, Void> beginCreate( /** * Create and Associate IP traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -57,7 +57,7 @@ SyncPoller, Void> beginCreate( /** * Create and Associate IP traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ips List of ips. * @param name Name of the traffic filter. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/CreateAndAssociatePLFiltersClient.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/CreateAndAssociatePLFiltersClient.java index d7f22009476e..4b0630bb0b47 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/CreateAndAssociatePLFiltersClient.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/CreateAndAssociatePLFiltersClient.java @@ -15,7 +15,7 @@ public interface CreateAndAssociatePLFiltersClient { /** * Create and Associate private link traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -28,7 +28,7 @@ public interface CreateAndAssociatePLFiltersClient { /** * Create and Associate private link traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param name Name of the traffic filter. * @param privateEndpointGuid Guid of the private endpoint. @@ -51,7 +51,7 @@ SyncPoller, Void> beginCreate( /** * Create and Associate private link traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -63,7 +63,7 @@ SyncPoller, Void> beginCreate( /** * Create and Associate private link traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param name Name of the traffic filter. * @param privateEndpointGuid Guid of the private endpoint. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/DeploymentInfoesClient.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/DeploymentInfoesClient.java index 41fffcec599f..0af9a3bc473f 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/DeploymentInfoesClient.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/DeploymentInfoesClient.java @@ -15,7 +15,7 @@ public interface DeploymentInfoesClient { /** * Fetch information regarding Elastic cloud deployment corresponding to the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -31,7 +31,7 @@ Response listWithResponse( /** * Fetch information regarding Elastic cloud deployment corresponding to the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @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/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/DetachAndDeleteTrafficFiltersClient.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/DetachAndDeleteTrafficFiltersClient.java index 5ef0790d8d1c..2264f1ad5426 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/DetachAndDeleteTrafficFiltersClient.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/DetachAndDeleteTrafficFiltersClient.java @@ -14,7 +14,7 @@ public interface DetachAndDeleteTrafficFiltersClient { /** * Detach and Delete traffic filter from the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param rulesetId Ruleset Id of the filter. * @param context The context to associate with this operation. @@ -29,7 +29,7 @@ public interface DetachAndDeleteTrafficFiltersClient { /** * Detach and Delete traffic filter from the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @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/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/DetachTrafficFiltersClient.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/DetachTrafficFiltersClient.java index 5604f828c8ef..f9dcf451df6b 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/DetachTrafficFiltersClient.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/DetachTrafficFiltersClient.java @@ -15,7 +15,7 @@ public interface DetachTrafficFiltersClient { /** * Detach traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -28,7 +28,7 @@ public interface DetachTrafficFiltersClient { /** * Detach traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param rulesetId Ruleset Id of the filter. * @param context The context to associate with this operation. @@ -44,7 +44,7 @@ SyncPoller, Void> beginUpdate( /** * Detach traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -56,7 +56,7 @@ SyncPoller, Void> beginUpdate( /** * Detach traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param rulesetId Ruleset Id of the filter. * @param context The context to associate with this operation. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/ExternalUsersClient.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/ExternalUsersClient.java index 8eecd98132e3..fae09b6dd261 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/ExternalUsersClient.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/ExternalUsersClient.java @@ -17,7 +17,7 @@ public interface ExternalUsersClient { * Create User inside elastic deployment which are used by customers to perform operations on the elastic * deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Elastic External User Creation Parameters. * @param context The context to associate with this operation. @@ -35,7 +35,7 @@ Response createOrUpdateWithResponse( * Create User inside elastic deployment which are used by customers to perform operations on the elastic * deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @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/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/ListAssociatedTrafficFiltersClient.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/ListAssociatedTrafficFiltersClient.java index 2f32d0d07d86..4850c57ec104 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/ListAssociatedTrafficFiltersClient.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/ListAssociatedTrafficFiltersClient.java @@ -15,7 +15,7 @@ public interface ListAssociatedTrafficFiltersClient { /** * Get the list of all associated traffic filters for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -30,7 +30,7 @@ Response listWithResponse( /** * Get the list of all associated traffic filters for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @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/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/MicrosoftElastic.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/MicrosoftElastic.java index 9b7d89c76894..66addb3a44a4 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/MicrosoftElastic.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/MicrosoftElastic.java @@ -10,7 +10,7 @@ /** The interface for MicrosoftElastic class. */ public interface MicrosoftElastic { /** - * Gets The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + * Gets The ID of the target subscription. The value must be an UUID. * * @return the subscriptionId value. */ @@ -86,6 +86,20 @@ public interface MicrosoftElastic { */ ExternalUsersClient getExternalUsers(); + /** + * Gets the BillingInfoesClient object to access its operations. + * + * @return the BillingInfoesClient object. + */ + BillingInfoesClient getBillingInfoes(); + + /** + * Gets the ConnectedPartnerResourcesClient object to access its operations. + * + * @return the ConnectedPartnerResourcesClient object. + */ + ConnectedPartnerResourcesClient getConnectedPartnerResources(); + /** * Gets the TagRulesClient object to access its operations. * diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/MonitorOperationsClient.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/MonitorOperationsClient.java index 5443ca595440..6dfab826775a 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/MonitorOperationsClient.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/MonitorOperationsClient.java @@ -16,7 +16,7 @@ public interface MonitorOperationsClient { /** * Upgradable version for a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -29,7 +29,7 @@ public interface MonitorOperationsClient { /** * Upgradable version for a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Elastic Monitor Upgrade Parameters. * @param context The context to associate with this operation. @@ -45,7 +45,7 @@ SyncPoller, Void> beginUpgrade( /** * Upgradable version for a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -57,7 +57,7 @@ SyncPoller, Void> beginUpgrade( /** * Upgradable version for a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Elastic Monitor Upgrade Parameters. * @param context The context to associate with this operation. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/MonitoredResourcesClient.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/MonitoredResourcesClient.java index 468b1fc38918..62ea24238007 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/MonitoredResourcesClient.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/MonitoredResourcesClient.java @@ -15,7 +15,7 @@ public interface MonitoredResourcesClient { /** * List the resources currently being monitored by the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -28,7 +28,7 @@ public interface MonitoredResourcesClient { /** * List the resources currently being monitored by the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/MonitorsClient.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/MonitorsClient.java index 54ac7ad652cc..2e0081b9209a 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/MonitorsClient.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/MonitorsClient.java @@ -41,7 +41,7 @@ public interface MonitorsClient { /** * List all monitors under the specified resource group. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @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. @@ -53,7 +53,7 @@ public interface MonitorsClient { /** * List all monitors under the specified resource group. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @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. @@ -66,7 +66,7 @@ public interface MonitorsClient { /** * Get the properties of a specific monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -81,7 +81,7 @@ Response getByResourceGroupWithResponse( /** * Get the properties of a specific monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -94,7 +94,7 @@ Response getByResourceGroupWithResponse( /** * Create a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -108,7 +108,7 @@ SyncPoller, ElasticMonitorResourceInner> /** * Create a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Elastic monitor resource model. * @param context The context to associate with this operation. @@ -124,7 +124,7 @@ SyncPoller, ElasticMonitorResourceInner> /** * Create a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -137,7 +137,7 @@ SyncPoller, ElasticMonitorResourceInner> /** * Create a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Elastic monitor resource model. * @param context The context to associate with this operation. @@ -153,7 +153,7 @@ ElasticMonitorResourceInner create( /** * Update a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Elastic resource model update parameters. * @param context The context to associate with this operation. @@ -169,7 +169,7 @@ Response updateWithResponse( /** * Update a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -182,7 +182,7 @@ Response updateWithResponse( /** * Delete a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -195,7 +195,7 @@ Response updateWithResponse( /** * Delete a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -209,7 +209,7 @@ Response updateWithResponse( /** * Delete a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -221,7 +221,7 @@ Response updateWithResponse( /** * Delete a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/OrganizationsClient.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/OrganizationsClient.java index 107b3262fe16..057c3c6002c6 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/OrganizationsClient.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/OrganizationsClient.java @@ -8,6 +8,7 @@ import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; +import com.azure.resourcemanager.elastic.fluent.models.ElasticOrganizationToAzureSubscriptionMappingResponseInner; import com.azure.resourcemanager.elastic.fluent.models.UserApiKeyResponseInner; import com.azure.resourcemanager.elastic.models.UserEmailId; @@ -39,4 +40,28 @@ public interface OrganizationsClient { */ @ServiceMethod(returns = ReturnType.SINGLE) UserApiKeyResponseInner getApiKey(); + + /** + * Get Elastic Organization To Azure Subscription Mapping details for the logged-in user. + * + * @param context The context to associate with this 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 elastic Organization To Azure Subscription Mapping details for the logged-in user along with {@link + * Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response + getElasticToAzureSubscriptionMappingWithResponse(Context context); + + /** + * Get Elastic Organization To Azure Subscription Mapping details for the logged-in user. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return elastic Organization To Azure Subscription Mapping details for the logged-in user. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticOrganizationToAzureSubscriptionMappingResponseInner getElasticToAzureSubscriptionMapping(); } diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/TagRulesClient.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/TagRulesClient.java index 62f656d4b861..3bf11066d3f3 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/TagRulesClient.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/TagRulesClient.java @@ -18,7 +18,7 @@ public interface TagRulesClient { /** * List the tag rules for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -31,7 +31,7 @@ public interface TagRulesClient { /** * List the tag rules for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -45,7 +45,7 @@ public interface TagRulesClient { /** * Create or update a tag rule set for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Tag Rule Set resource name. * @param body request body of MonitoringTagRules. @@ -66,7 +66,7 @@ Response createOrUpdateWithResponse( /** * Create or update a tag rule set for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Tag Rule Set resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -80,7 +80,7 @@ Response createOrUpdateWithResponse( /** * Get a tag rule set for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Tag Rule Set resource name. * @param context The context to associate with this operation. @@ -96,7 +96,7 @@ Response getWithResponse( /** * Get a tag rule set for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Tag Rule Set resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -110,7 +110,7 @@ Response getWithResponse( /** * Delete a tag rule set for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Tag Rule Set resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -124,7 +124,7 @@ Response getWithResponse( /** * Delete a tag rule set for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Tag Rule Set resource name. * @param context The context to associate with this operation. @@ -140,7 +140,7 @@ SyncPoller, Void> beginDelete( /** * Delete a tag rule set for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Tag Rule Set resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -153,7 +153,7 @@ SyncPoller, Void> beginDelete( /** * Delete a tag rule set for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Tag Rule Set resource name. * @param context The context to associate with this operation. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/TrafficFiltersClient.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/TrafficFiltersClient.java index 73463b936075..af5f300284f9 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/TrafficFiltersClient.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/TrafficFiltersClient.java @@ -14,7 +14,7 @@ public interface TrafficFiltersClient { /** * Delete traffic filter from the account. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param rulesetId Ruleset Id of the filter. * @param context The context to associate with this operation. @@ -29,7 +29,7 @@ public interface TrafficFiltersClient { /** * Delete traffic filter from the account. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @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/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/UpgradableVersionsClient.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/UpgradableVersionsClient.java index b851936ef4dd..ccbb5dc58744 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/UpgradableVersionsClient.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/UpgradableVersionsClient.java @@ -15,7 +15,7 @@ public interface UpgradableVersionsClient { /** * List of upgradable versions for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -30,7 +30,7 @@ Response detailsWithResponse( /** * List of upgradable versions for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @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/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/VMCollectionsClient.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/VMCollectionsClient.java index 6a4500302673..d49e3e626b70 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/VMCollectionsClient.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/VMCollectionsClient.java @@ -15,7 +15,7 @@ public interface VMCollectionsClient { /** * Update the vm details that will be monitored by the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body VM resource Id. * @param context The context to associate with this operation. @@ -31,7 +31,7 @@ Response updateWithResponse( /** * Update the vm details that will be monitored by the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @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/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/VMHostsClient.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/VMHostsClient.java index 2c1f478a1a89..95e7ae56a241 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/VMHostsClient.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/VMHostsClient.java @@ -15,7 +15,7 @@ public interface VMHostsClient { /** * List the vm resources currently being monitored by the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -28,7 +28,7 @@ public interface VMHostsClient { /** * List the vm resources currently being monitored by the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/VMIngestionsClient.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/VMIngestionsClient.java index c6792c96c8f6..acf8e90a501f 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/VMIngestionsClient.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/VMIngestionsClient.java @@ -15,7 +15,7 @@ public interface VMIngestionsClient { /** * List the vm ingestion details that will be monitored by the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -30,7 +30,7 @@ Response detailsWithResponse( /** * List the vm ingestion details that will be monitored by the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @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/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/models/BillingInfoResponseInner.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/models/BillingInfoResponseInner.java new file mode 100644 index 000000000000..0d198e2fb6d7 --- /dev/null +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/models/BillingInfoResponseInner.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.elastic.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.elastic.models.MarketplaceSaaSInfo; +import com.azure.resourcemanager.elastic.models.PartnerBillingEntity; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Marketplace Subscription and Organization details to which resource gets billed into. */ +@Fluent +public final class BillingInfoResponseInner { + /* + * Marketplace Subscription details + */ + @JsonProperty(value = "marketplaceSaasInfo") + private MarketplaceSaaSInfo marketplaceSaasInfo; + + /* + * Partner Billing Entity details: Organization Info + */ + @JsonProperty(value = "partnerBillingEntity") + private PartnerBillingEntity partnerBillingEntity; + + /** Creates an instance of BillingInfoResponseInner class. */ + public BillingInfoResponseInner() { + } + + /** + * Get the marketplaceSaasInfo property: Marketplace Subscription details. + * + * @return the marketplaceSaasInfo value. + */ + public MarketplaceSaaSInfo marketplaceSaasInfo() { + return this.marketplaceSaasInfo; + } + + /** + * Set the marketplaceSaasInfo property: Marketplace Subscription details. + * + * @param marketplaceSaasInfo the marketplaceSaasInfo value to set. + * @return the BillingInfoResponseInner object itself. + */ + public BillingInfoResponseInner withMarketplaceSaasInfo(MarketplaceSaaSInfo marketplaceSaasInfo) { + this.marketplaceSaasInfo = marketplaceSaasInfo; + return this; + } + + /** + * Get the partnerBillingEntity property: Partner Billing Entity details: Organization Info. + * + * @return the partnerBillingEntity value. + */ + public PartnerBillingEntity partnerBillingEntity() { + return this.partnerBillingEntity; + } + + /** + * Set the partnerBillingEntity property: Partner Billing Entity details: Organization Info. + * + * @param partnerBillingEntity the partnerBillingEntity value to set. + * @return the BillingInfoResponseInner object itself. + */ + public BillingInfoResponseInner withPartnerBillingEntity(PartnerBillingEntity partnerBillingEntity) { + this.partnerBillingEntity = partnerBillingEntity; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (marketplaceSaasInfo() != null) { + marketplaceSaasInfo().validate(); + } + if (partnerBillingEntity() != null) { + partnerBillingEntity().validate(); + } + } +} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/models/ConnectedPartnerResourcesListFormatInner.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/models/ConnectedPartnerResourcesListFormatInner.java new file mode 100644 index 000000000000..1349f90fbd6e --- /dev/null +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/models/ConnectedPartnerResourcesListFormatInner.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.elastic.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.elastic.models.ConnectedPartnerResourceProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Connected Partner Resources List Format. */ +@Fluent +public final class ConnectedPartnerResourcesListFormatInner { + /* + * Connected Partner Resource Properties + */ + @JsonProperty(value = "properties") + private ConnectedPartnerResourceProperties properties; + + /** Creates an instance of ConnectedPartnerResourcesListFormatInner class. */ + public ConnectedPartnerResourcesListFormatInner() { + } + + /** + * Get the properties property: Connected Partner Resource Properties. + * + * @return the properties value. + */ + public ConnectedPartnerResourceProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Connected Partner Resource Properties. + * + * @param properties the properties value to set. + * @return the ConnectedPartnerResourcesListFormatInner object itself. + */ + public ConnectedPartnerResourcesListFormatInner withProperties(ConnectedPartnerResourceProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/models/DeploymentInfoResponseInner.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/models/DeploymentInfoResponseInner.java index cf89f5259099..41c155eaf75f 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/models/DeploymentInfoResponseInner.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/models/DeploymentInfoResponseInner.java @@ -36,6 +36,13 @@ public final class DeploymentInfoResponseInner { @JsonProperty(value = "diskCapacity", access = JsonProperty.Access.WRITE_ONLY) private String diskCapacity; + /* + * Elasticsearch endpoint in Elastic cloud deployment. This is either the aliased_endpoint if available, or the + * service_url otherwise. + */ + @JsonProperty(value = "elasticsearchEndPoint", access = JsonProperty.Access.WRITE_ONLY) + private String elasticsearchEndPoint; + /* * Deployment URL of the elasticsearch in Elastic cloud deployment. */ @@ -88,6 +95,16 @@ public String diskCapacity() { return this.diskCapacity; } + /** + * Get the elasticsearchEndPoint property: Elasticsearch endpoint in Elastic cloud deployment. This is either the + * aliased_endpoint if available, or the service_url otherwise. + * + * @return the elasticsearchEndPoint value. + */ + public String elasticsearchEndPoint() { + return this.elasticsearchEndPoint; + } + /** * Get the deploymentUrl property: Deployment URL of the elasticsearch in Elastic cloud deployment. * diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/models/ElasticOrganizationToAzureSubscriptionMappingResponseInner.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/models/ElasticOrganizationToAzureSubscriptionMappingResponseInner.java new file mode 100644 index 000000000000..f0a910634257 --- /dev/null +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/fluent/models/ElasticOrganizationToAzureSubscriptionMappingResponseInner.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.elastic.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.elastic.models.ElasticOrganizationToAzureSubscriptionMappingResponseProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The Azure Subscription ID to which the Organization of the logged in user belongs and gets billed into. */ +@Fluent +public final class ElasticOrganizationToAzureSubscriptionMappingResponseInner { + /* + * The properties of Azure Subscription ID to which the Organization of the logged in user belongs and gets billed + * into. + */ + @JsonProperty(value = "properties") + private ElasticOrganizationToAzureSubscriptionMappingResponseProperties properties; + + /** Creates an instance of ElasticOrganizationToAzureSubscriptionMappingResponseInner class. */ + public ElasticOrganizationToAzureSubscriptionMappingResponseInner() { + } + + /** + * Get the properties property: The properties of Azure Subscription ID to which the Organization of the logged in + * user belongs and gets billed into. + * + * @return the properties value. + */ + public ElasticOrganizationToAzureSubscriptionMappingResponseProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The properties of Azure Subscription ID to which the Organization of the logged in + * user belongs and gets billed into. + * + * @param properties the properties value to set. + * @return the ElasticOrganizationToAzureSubscriptionMappingResponseInner object itself. + */ + public ElasticOrganizationToAzureSubscriptionMappingResponseInner withProperties( + ElasticOrganizationToAzureSubscriptionMappingResponseProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/AllTrafficFiltersClientImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/AllTrafficFiltersClientImpl.java index 1ef12416d192..cd0ffb123253 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/AllTrafficFiltersClientImpl.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/AllTrafficFiltersClientImpl.java @@ -69,7 +69,7 @@ Mono> list( /** * Get the list of all traffic filters for the account. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -118,7 +118,7 @@ private Mono> listWithResponseAsync( /** * Get the list of all traffic filters for the account. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -165,7 +165,7 @@ private Mono> listWithResponseAsync( /** * Get the list of all traffic filters for the account. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -180,7 +180,7 @@ private Mono listAsync(String resourceGroupNa /** * Get the list of all traffic filters for the account. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -197,7 +197,7 @@ public Response listWithResponse( /** * Get the list of all traffic filters for the account. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/AssociateTrafficFiltersClientImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/AssociateTrafficFiltersClientImpl.java index 5056c198e7ba..bfb7c6ca84b8 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/AssociateTrafficFiltersClientImpl.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/AssociateTrafficFiltersClientImpl.java @@ -75,7 +75,7 @@ Mono>> associate( /** * Associate traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param rulesetId Ruleset Id of the filter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -125,7 +125,7 @@ private Mono>> associateWithResponseAsync( /** * Associate traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param rulesetId Ruleset Id of the filter. * @param context The context to associate with this operation. @@ -173,7 +173,7 @@ private Mono>> associateWithResponseAsync( /** * Associate traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param rulesetId Ruleset Id of the filter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -194,7 +194,7 @@ private PollerFlux, Void> beginAssociateAsync( /** * Associate traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -214,7 +214,7 @@ private PollerFlux, Void> beginAssociateAsync(String resourceGr /** * Associate traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param rulesetId Ruleset Id of the filter. * @param context The context to associate with this operation. @@ -237,7 +237,7 @@ private PollerFlux, Void> beginAssociateAsync( /** * Associate traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -253,7 +253,7 @@ public SyncPoller, Void> beginAssociate(String resourceGroupNam /** * Associate traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param rulesetId Ruleset Id of the filter. * @param context The context to associate with this operation. @@ -271,7 +271,7 @@ public SyncPoller, Void> beginAssociate( /** * Associate traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param rulesetId Ruleset Id of the filter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -289,7 +289,7 @@ private Mono associateAsync(String resourceGroupName, String monitorName, /** * Associate traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -307,7 +307,7 @@ private Mono associateAsync(String resourceGroupName, String monitorName) /** * Associate traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param rulesetId Ruleset Id of the filter. * @param context The context to associate with this operation. @@ -326,7 +326,7 @@ private Mono associateAsync(String resourceGroupName, String monitorName, /** * Associate traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -341,7 +341,7 @@ public void associate(String resourceGroupName, String monitorName) { /** * Associate traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param rulesetId Ruleset Id of the filter. * @param context The context to associate with this operation. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/BillingInfoResponseImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/BillingInfoResponseImpl.java new file mode 100644 index 000000000000..77e9645076e6 --- /dev/null +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/BillingInfoResponseImpl.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.elastic.implementation; + +import com.azure.resourcemanager.elastic.fluent.models.BillingInfoResponseInner; +import com.azure.resourcemanager.elastic.models.BillingInfoResponse; +import com.azure.resourcemanager.elastic.models.MarketplaceSaaSInfo; +import com.azure.resourcemanager.elastic.models.PartnerBillingEntity; + +public final class BillingInfoResponseImpl implements BillingInfoResponse { + private BillingInfoResponseInner innerObject; + + private final com.azure.resourcemanager.elastic.ElasticManager serviceManager; + + BillingInfoResponseImpl( + BillingInfoResponseInner innerObject, com.azure.resourcemanager.elastic.ElasticManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public MarketplaceSaaSInfo marketplaceSaasInfo() { + return this.innerModel().marketplaceSaasInfo(); + } + + public PartnerBillingEntity partnerBillingEntity() { + return this.innerModel().partnerBillingEntity(); + } + + public BillingInfoResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.elastic.ElasticManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/BillingInfoesClientImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/BillingInfoesClientImpl.java new file mode 100644 index 000000000000..21f6a3988b05 --- /dev/null +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/BillingInfoesClientImpl.java @@ -0,0 +1,211 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.elastic.implementation; + +import com.azure.core.annotation.ExpectedResponses; +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.Post; +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.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.elastic.fluent.BillingInfoesClient; +import com.azure.resourcemanager.elastic.fluent.models.BillingInfoResponseInner; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in BillingInfoesClient. */ +public final class BillingInfoesClientImpl implements BillingInfoesClient { + /** The proxy service used to perform REST calls. */ + private final BillingInfoesService service; + + /** The service client containing this operation class. */ + private final MicrosoftElasticImpl client; + + /** + * Initializes an instance of BillingInfoesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + BillingInfoesClientImpl(MicrosoftElasticImpl client) { + this.service = + RestProxy.create(BillingInfoesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MicrosoftElasticBillingInfoes to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "MicrosoftElasticBill") + public interface BillingInfoesService { + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Elastic/monitors/{monitorName}/getBillingInfo") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @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); + } + + /** + * Get marketplace and organization info mapped to the given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource 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 marketplace and organization info mapped to the given monitor along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String monitorName) { + 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.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + monitorName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get marketplace and organization info mapped to the given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource 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 marketplace and organization info mapped to the given monitor along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String monitorName, 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.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + monitorName, + accept, + context); + } + + /** + * Get marketplace and organization info mapped to the given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource 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 marketplace and organization info mapped to the given monitor on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String monitorName) { + return getWithResponseAsync(resourceGroupName, monitorName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get marketplace and organization info mapped to the given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource 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 marketplace and organization info mapped to the given monitor along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String monitorName, Context context) { + return getWithResponseAsync(resourceGroupName, monitorName, context).block(); + } + + /** + * Get marketplace and organization info mapped to the given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource 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 marketplace and organization info mapped to the given monitor. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BillingInfoResponseInner get(String resourceGroupName, String monitorName) { + return getWithResponse(resourceGroupName, monitorName, Context.NONE).getValue(); + } +} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/BillingInfoesImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/BillingInfoesImpl.java new file mode 100644 index 000000000000..251632239259 --- /dev/null +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/BillingInfoesImpl.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.elastic.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.elastic.fluent.BillingInfoesClient; +import com.azure.resourcemanager.elastic.fluent.models.BillingInfoResponseInner; +import com.azure.resourcemanager.elastic.models.BillingInfoResponse; +import com.azure.resourcemanager.elastic.models.BillingInfoes; + +public final class BillingInfoesImpl implements BillingInfoes { + private static final ClientLogger LOGGER = new ClientLogger(BillingInfoesImpl.class); + + private final BillingInfoesClient innerClient; + + private final com.azure.resourcemanager.elastic.ElasticManager serviceManager; + + public BillingInfoesImpl( + BillingInfoesClient innerClient, com.azure.resourcemanager.elastic.ElasticManager 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 BillingInfoResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public BillingInfoResponse get(String resourceGroupName, String monitorName) { + BillingInfoResponseInner inner = this.serviceClient().get(resourceGroupName, monitorName); + if (inner != null) { + return new BillingInfoResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + private BillingInfoesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.elastic.ElasticManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ConnectedPartnerResourcesClientImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ConnectedPartnerResourcesClientImpl.java new file mode 100644 index 000000000000..fdb293d2e36d --- /dev/null +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ConnectedPartnerResourcesClientImpl.java @@ -0,0 +1,344 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.elastic.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.Post; +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.elastic.fluent.ConnectedPartnerResourcesClient; +import com.azure.resourcemanager.elastic.fluent.models.ConnectedPartnerResourcesListFormatInner; +import com.azure.resourcemanager.elastic.models.ConnectedPartnerResourcesListResponse; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in ConnectedPartnerResourcesClient. */ +public final class ConnectedPartnerResourcesClientImpl implements ConnectedPartnerResourcesClient { + /** The proxy service used to perform REST calls. */ + private final ConnectedPartnerResourcesService service; + + /** The service client containing this operation class. */ + private final MicrosoftElasticImpl client; + + /** + * Initializes an instance of ConnectedPartnerResourcesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ConnectedPartnerResourcesClientImpl(MicrosoftElasticImpl client) { + this.service = + RestProxy + .create( + ConnectedPartnerResourcesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MicrosoftElasticConnectedPartnerResources to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "MicrosoftElasticConn") + public interface ConnectedPartnerResourcesService { + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Elastic/monitors/{monitorName}/listConnectedPartnerResources") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + 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); + + @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); + } + + /** + * List of all active deployments that are associated with the marketplace subscription linked to the given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource 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 list of all active elastic deployments along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String monitorName) { + 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.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + 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())); + } + + /** + * List of all active deployments that are associated with the marketplace subscription linked to the given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource 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 list of all active elastic deployments along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String monitorName, 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.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + monitorName, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List of all active deployments that are associated with the marketplace subscription linked to the given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource 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 list of all active elastic deployments as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String monitorName) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, monitorName), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List of all active deployments that are associated with the marketplace subscription linked to the given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource 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 list of all active elastic deployments as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String monitorName, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, monitorName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List of all active deployments that are associated with the marketplace subscription linked to the given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource 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 list of all active elastic deployments as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String monitorName) { + return new PagedIterable<>(listAsync(resourceGroupName, monitorName)); + } + + /** + * List of all active deployments that are associated with the marketplace subscription linked to the given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource 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 list of all active elastic deployments as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, String monitorName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, monitorName, context)); + } + + /** + * Get the next page of items. + * + * @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 list of all active elastic deployments 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 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 list of all active elastic deployments 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/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ConnectedPartnerResourcesImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ConnectedPartnerResourcesImpl.java new file mode 100644 index 000000000000..5f8ce3108e80 --- /dev/null +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ConnectedPartnerResourcesImpl.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.elastic.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.elastic.fluent.ConnectedPartnerResourcesClient; +import com.azure.resourcemanager.elastic.fluent.models.ConnectedPartnerResourcesListFormatInner; +import com.azure.resourcemanager.elastic.models.ConnectedPartnerResources; +import com.azure.resourcemanager.elastic.models.ConnectedPartnerResourcesListFormat; + +public final class ConnectedPartnerResourcesImpl implements ConnectedPartnerResources { + private static final ClientLogger LOGGER = new ClientLogger(ConnectedPartnerResourcesImpl.class); + + private final ConnectedPartnerResourcesClient innerClient; + + private final com.azure.resourcemanager.elastic.ElasticManager serviceManager; + + public ConnectedPartnerResourcesImpl( + ConnectedPartnerResourcesClient innerClient, com.azure.resourcemanager.elastic.ElasticManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String monitorName) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, monitorName); + return Utils.mapPage(inner, inner1 -> new ConnectedPartnerResourcesListFormatImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, String monitorName, Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, monitorName, context); + return Utils.mapPage(inner, inner1 -> new ConnectedPartnerResourcesListFormatImpl(inner1, this.manager())); + } + + private ConnectedPartnerResourcesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.elastic.ElasticManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ConnectedPartnerResourcesListFormatImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ConnectedPartnerResourcesListFormatImpl.java new file mode 100644 index 000000000000..1a33c4fc0cc5 --- /dev/null +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ConnectedPartnerResourcesListFormatImpl.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.elastic.implementation; + +import com.azure.resourcemanager.elastic.fluent.models.ConnectedPartnerResourcesListFormatInner; +import com.azure.resourcemanager.elastic.models.ConnectedPartnerResourceProperties; +import com.azure.resourcemanager.elastic.models.ConnectedPartnerResourcesListFormat; + +public final class ConnectedPartnerResourcesListFormatImpl implements ConnectedPartnerResourcesListFormat { + private ConnectedPartnerResourcesListFormatInner innerObject; + + private final com.azure.resourcemanager.elastic.ElasticManager serviceManager; + + ConnectedPartnerResourcesListFormatImpl( + ConnectedPartnerResourcesListFormatInner innerObject, + com.azure.resourcemanager.elastic.ElasticManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public ConnectedPartnerResourceProperties properties() { + return this.innerModel().properties(); + } + + public ConnectedPartnerResourcesListFormatInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.elastic.ElasticManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/CreateAndAssociateIpFiltersClientImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/CreateAndAssociateIpFiltersClientImpl.java index b2abb61eeb84..7f18972a3610 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/CreateAndAssociateIpFiltersClientImpl.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/CreateAndAssociateIpFiltersClientImpl.java @@ -77,7 +77,7 @@ Mono>> create( /** * Create and Associate IP traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ips List of ips. * @param name Name of the traffic filter. @@ -129,7 +129,7 @@ private Mono>> createWithResponseAsync( /** * Create and Associate IP traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ips List of ips. * @param name Name of the traffic filter. @@ -179,7 +179,7 @@ private Mono>> createWithResponseAsync( /** * Create and Associate IP traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ips List of ips. * @param name Name of the traffic filter. @@ -201,7 +201,7 @@ private PollerFlux, Void> beginCreateAsync( /** * Create and Associate IP traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -222,7 +222,7 @@ private PollerFlux, Void> beginCreateAsync(String resourceGroup /** * Create and Associate IP traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ips List of ips. * @param name Name of the traffic filter. @@ -246,7 +246,7 @@ private PollerFlux, Void> beginCreateAsync( /** * Create and Associate IP traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -263,7 +263,7 @@ public SyncPoller, Void> beginCreate(String resourceGroupName, /** * Create and Associate IP traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ips List of ips. * @param name Name of the traffic filter. @@ -282,7 +282,7 @@ public SyncPoller, Void> beginCreate( /** * Create and Associate IP traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ips List of ips. * @param name Name of the traffic filter. @@ -301,7 +301,7 @@ private Mono createAsync(String resourceGroupName, String monitorName, Str /** * Create and Associate IP traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -320,7 +320,7 @@ private Mono createAsync(String resourceGroupName, String monitorName) { /** * Create and Associate IP traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ips List of ips. * @param name Name of the traffic filter. @@ -341,7 +341,7 @@ private Mono createAsync( /** * Create and Associate IP traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -357,7 +357,7 @@ public void create(String resourceGroupName, String monitorName) { /** * Create and Associate IP traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ips List of ips. * @param name Name of the traffic filter. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/CreateAndAssociatePLFiltersClientImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/CreateAndAssociatePLFiltersClientImpl.java index f229e0da4321..00193e56d40c 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/CreateAndAssociatePLFiltersClientImpl.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/CreateAndAssociatePLFiltersClientImpl.java @@ -78,7 +78,7 @@ Mono>> create( /** * Create and Associate private link traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param name Name of the traffic filter. * @param privateEndpointGuid Guid of the private endpoint. @@ -136,7 +136,7 @@ private Mono>> createWithResponseAsync( /** * Create and Associate private link traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param name Name of the traffic filter. * @param privateEndpointGuid Guid of the private endpoint. @@ -193,7 +193,7 @@ private Mono>> createWithResponseAsync( /** * Create and Associate private link traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param name Name of the traffic filter. * @param privateEndpointGuid Guid of the private endpoint. @@ -221,7 +221,7 @@ private PollerFlux, Void> beginCreateAsync( /** * Create and Associate private link traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -244,7 +244,7 @@ private PollerFlux, Void> beginCreateAsync(String resourceGroup /** * Create and Associate private link traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param name Name of the traffic filter. * @param privateEndpointGuid Guid of the private endpoint. @@ -275,7 +275,7 @@ private PollerFlux, Void> beginCreateAsync( /** * Create and Associate private link traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -295,7 +295,7 @@ public SyncPoller, Void> beginCreate(String resourceGroupName, /** * Create and Associate private link traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param name Name of the traffic filter. * @param privateEndpointGuid Guid of the private endpoint. @@ -322,7 +322,7 @@ public SyncPoller, Void> beginCreate( /** * Create and Associate private link traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param name Name of the traffic filter. * @param privateEndpointGuid Guid of the private endpoint. @@ -347,7 +347,7 @@ private Mono createAsync( /** * Create and Associate private link traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -367,7 +367,7 @@ private Mono createAsync(String resourceGroupName, String monitorName) { /** * Create and Associate private link traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param name Name of the traffic filter. * @param privateEndpointGuid Guid of the private endpoint. @@ -394,7 +394,7 @@ private Mono createAsync( /** * Create and Associate private link traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -411,7 +411,7 @@ public void create(String resourceGroupName, String monitorName) { /** * Create and Associate private link traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param name Name of the traffic filter. * @param privateEndpointGuid Guid of the private endpoint. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/DeploymentInfoResponseImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/DeploymentInfoResponseImpl.java index 00b1db29708d..ad67aa0b0126 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/DeploymentInfoResponseImpl.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/DeploymentInfoResponseImpl.java @@ -36,6 +36,10 @@ public String diskCapacity() { return this.innerModel().diskCapacity(); } + public String elasticsearchEndPoint() { + return this.innerModel().elasticsearchEndPoint(); + } + public String deploymentUrl() { return this.innerModel().deploymentUrl(); } diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/DeploymentInfoesClientImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/DeploymentInfoesClientImpl.java index 8fabcbb6a6d3..3ddf7bf505da 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/DeploymentInfoesClientImpl.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/DeploymentInfoesClientImpl.java @@ -69,7 +69,7 @@ Mono> list( /** * Fetch information regarding Elastic cloud deployment corresponding to the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -118,7 +118,7 @@ private Mono> listWithResponseAsync( /** * Fetch information regarding Elastic cloud deployment corresponding to the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -165,7 +165,7 @@ private Mono> listWithResponseAsync( /** * Fetch information regarding Elastic cloud deployment corresponding to the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -181,7 +181,7 @@ private Mono listAsync(String resourceGroupName, St /** * Fetch information regarding Elastic cloud deployment corresponding to the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -199,7 +199,7 @@ public Response listWithResponse( /** * Fetch information regarding Elastic cloud deployment corresponding to the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/DetachAndDeleteTrafficFiltersClientImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/DetachAndDeleteTrafficFiltersClientImpl.java index 62d3392d497e..ba0b87004dd2 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/DetachAndDeleteTrafficFiltersClientImpl.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/DetachAndDeleteTrafficFiltersClientImpl.java @@ -73,7 +73,7 @@ Mono> delete( /** * Detach and Delete traffic filter from the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param rulesetId Ruleset Id of the filter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -123,7 +123,7 @@ private Mono> deleteWithResponseAsync( /** * Detach and Delete traffic filter from the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param rulesetId Ruleset Id of the filter. * @param context The context to associate with this operation. @@ -171,7 +171,7 @@ private Mono> deleteWithResponseAsync( /** * Detach and Delete traffic filter from the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -187,7 +187,7 @@ private Mono deleteAsync(String resourceGroupName, String monitorName) { /** * Detach and Delete traffic filter from the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param rulesetId Ruleset Id of the filter. * @param context The context to associate with this operation. @@ -205,7 +205,7 @@ public Response deleteWithResponse( /** * Detach and Delete traffic filter from the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/DetachTrafficFiltersClientImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/DetachTrafficFiltersClientImpl.java index 705066608283..693823fc06d9 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/DetachTrafficFiltersClientImpl.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/DetachTrafficFiltersClientImpl.java @@ -75,7 +75,7 @@ Mono>> update( /** * Detach traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param rulesetId Ruleset Id of the filter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -125,7 +125,7 @@ private Mono>> updateWithResponseAsync( /** * Detach traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param rulesetId Ruleset Id of the filter. * @param context The context to associate with this operation. @@ -173,7 +173,7 @@ private Mono>> updateWithResponseAsync( /** * Detach traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param rulesetId Ruleset Id of the filter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -194,7 +194,7 @@ private PollerFlux, Void> beginUpdateAsync( /** * Detach traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -214,7 +214,7 @@ private PollerFlux, Void> beginUpdateAsync(String resourceGroup /** * Detach traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param rulesetId Ruleset Id of the filter. * @param context The context to associate with this operation. @@ -237,7 +237,7 @@ private PollerFlux, Void> beginUpdateAsync( /** * Detach traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -253,7 +253,7 @@ public SyncPoller, Void> beginUpdate(String resourceGroupName, /** * Detach traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param rulesetId Ruleset Id of the filter. * @param context The context to associate with this operation. @@ -271,7 +271,7 @@ public SyncPoller, Void> beginUpdate( /** * Detach traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param rulesetId Ruleset Id of the filter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -289,7 +289,7 @@ private Mono updateAsync(String resourceGroupName, String monitorName, Str /** * Detach traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -307,7 +307,7 @@ private Mono updateAsync(String resourceGroupName, String monitorName) { /** * Detach traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param rulesetId Ruleset Id of the filter. * @param context The context to associate with this operation. @@ -326,7 +326,7 @@ private Mono updateAsync(String resourceGroupName, String monitorName, Str /** * Detach traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -341,7 +341,7 @@ public void update(String resourceGroupName, String monitorName) { /** * Detach traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param rulesetId Ruleset Id of the filter. * @param context The context to associate with this operation. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ElasticOrganizationToAzureSubscriptionMappingResponseImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ElasticOrganizationToAzureSubscriptionMappingResponseImpl.java new file mode 100644 index 000000000000..4a6a9c16f548 --- /dev/null +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ElasticOrganizationToAzureSubscriptionMappingResponseImpl.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.elastic.implementation; + +import com.azure.resourcemanager.elastic.fluent.models.ElasticOrganizationToAzureSubscriptionMappingResponseInner; +import com.azure.resourcemanager.elastic.models.ElasticOrganizationToAzureSubscriptionMappingResponse; +import com.azure.resourcemanager.elastic.models.ElasticOrganizationToAzureSubscriptionMappingResponseProperties; + +public final class ElasticOrganizationToAzureSubscriptionMappingResponseImpl + implements ElasticOrganizationToAzureSubscriptionMappingResponse { + private ElasticOrganizationToAzureSubscriptionMappingResponseInner innerObject; + + private final com.azure.resourcemanager.elastic.ElasticManager serviceManager; + + ElasticOrganizationToAzureSubscriptionMappingResponseImpl( + ElasticOrganizationToAzureSubscriptionMappingResponseInner innerObject, + com.azure.resourcemanager.elastic.ElasticManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public ElasticOrganizationToAzureSubscriptionMappingResponseProperties properties() { + return this.innerModel().properties(); + } + + public ElasticOrganizationToAzureSubscriptionMappingResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.elastic.ElasticManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ExternalUsersClientImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ExternalUsersClientImpl.java index 5401e42fe1b4..fa5a31896744 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ExternalUsersClientImpl.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ExternalUsersClientImpl.java @@ -73,7 +73,7 @@ Mono> createOrUpdate( * Create User inside elastic deployment which are used by customers to perform operations on the elastic * deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Elastic External User Creation Parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -128,7 +128,7 @@ private Mono> createOrUpdateWithResp * Create User inside elastic deployment which are used by customers to perform operations on the elastic * deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Elastic External User Creation Parameters. * @param context The context to associate with this operation. @@ -181,7 +181,7 @@ private Mono> createOrUpdateWithResp * Create User inside elastic deployment which are used by customers to perform operations on the elastic * deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -200,7 +200,7 @@ private Mono createOrUpdateAsync(String resou * Create User inside elastic deployment which are used by customers to perform operations on the elastic * deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Elastic External User Creation Parameters. * @param context The context to associate with this operation. @@ -220,7 +220,7 @@ public Response createOrUpdateWithResponse( * Create User inside elastic deployment which are used by customers to perform operations on the elastic * deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ListAssociatedTrafficFiltersClientImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ListAssociatedTrafficFiltersClientImpl.java index f44e60a05ada..dbc5baba2c46 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ListAssociatedTrafficFiltersClientImpl.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/ListAssociatedTrafficFiltersClientImpl.java @@ -71,7 +71,7 @@ Mono> list( /** * Get the list of all associated traffic filters for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -120,7 +120,7 @@ private Mono> listWithResponseAsync( /** * Get the list of all associated traffic filters for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -167,7 +167,7 @@ private Mono> listWithResponseAsync( /** * Get the list of all associated traffic filters for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -183,7 +183,7 @@ private Mono listAsync(String resourceGroupNa /** * Get the list of all associated traffic filters for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -200,7 +200,7 @@ public Response listWithResponse( /** * Get the list of all associated traffic filters for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/MicrosoftElasticBuilder.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/MicrosoftElasticBuilder.java index 21330a44cf78..a9d61bcedb29 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/MicrosoftElasticBuilder.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/MicrosoftElasticBuilder.java @@ -18,12 +18,12 @@ @ServiceClientBuilder(serviceClients = {MicrosoftElasticImpl.class}) public final class MicrosoftElasticBuilder { /* - * The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + * The ID of the target subscription. The value must be an UUID. */ private String subscriptionId; /** - * Sets The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + * Sets The ID of the target subscription. The value must be an UUID. * * @param subscriptionId the subscriptionId value. * @return the MicrosoftElasticBuilder. @@ -137,7 +137,7 @@ public MicrosoftElasticImpl buildClient() { localSerializerAdapter, localDefaultPollInterval, localEnvironment, - subscriptionId, + this.subscriptionId, localEndpoint); return client; } diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/MicrosoftElasticImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/MicrosoftElasticImpl.java index 7f5c8bab3725..3687783f3469 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/MicrosoftElasticImpl.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/MicrosoftElasticImpl.java @@ -24,6 +24,8 @@ import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.elastic.fluent.AllTrafficFiltersClient; import com.azure.resourcemanager.elastic.fluent.AssociateTrafficFiltersClient; +import com.azure.resourcemanager.elastic.fluent.BillingInfoesClient; +import com.azure.resourcemanager.elastic.fluent.ConnectedPartnerResourcesClient; import com.azure.resourcemanager.elastic.fluent.CreateAndAssociateIpFiltersClient; import com.azure.resourcemanager.elastic.fluent.CreateAndAssociatePLFiltersClient; import com.azure.resourcemanager.elastic.fluent.DeploymentInfoesClient; @@ -56,11 +58,11 @@ /** Initializes a new instance of the MicrosoftElasticImpl type. */ @ServiceClient(builder = MicrosoftElasticBuilder.class) public final class MicrosoftElasticImpl implements MicrosoftElastic { - /** The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). */ + /** The ID of the target subscription. The value must be an UUID. */ private final String subscriptionId; /** - * Gets The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + * Gets The ID of the target subscription. The value must be an UUID. * * @return the subscriptionId value. */ @@ -200,6 +202,30 @@ public ExternalUsersClient getExternalUsers() { return this.externalUsers; } + /** The BillingInfoesClient object to access its operations. */ + private final BillingInfoesClient billingInfoes; + + /** + * Gets the BillingInfoesClient object to access its operations. + * + * @return the BillingInfoesClient object. + */ + public BillingInfoesClient getBillingInfoes() { + return this.billingInfoes; + } + + /** The ConnectedPartnerResourcesClient object to access its operations. */ + private final ConnectedPartnerResourcesClient connectedPartnerResources; + + /** + * Gets the ConnectedPartnerResourcesClient object to access its operations. + * + * @return the ConnectedPartnerResourcesClient object. + */ + public ConnectedPartnerResourcesClient getConnectedPartnerResources() { + return this.connectedPartnerResources; + } + /** The TagRulesClient object to access its operations. */ private final TagRulesClient tagRules; @@ -387,8 +413,7 @@ public OrganizationsClient getOrganizations() { * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. - * @param subscriptionId The Azure subscription ID. This is a GUID-formatted string (e.g. - * 00000000-0000-0000-0000-000000000000). + * @param subscriptionId The ID of the target subscription. The value must be an UUID. * @param endpoint server parameter. */ MicrosoftElasticImpl( @@ -403,13 +428,15 @@ public OrganizationsClient getOrganizations() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2023-02-01-preview"; + this.apiVersion = "2023-11-01-preview"; this.operations = new OperationsClientImpl(this); this.monitors = new MonitorsClientImpl(this); this.elasticVersions = new ElasticVersionsClientImpl(this); this.monitoredResources = new MonitoredResourcesClientImpl(this); this.deploymentInfoes = new DeploymentInfoesClientImpl(this); this.externalUsers = new ExternalUsersClientImpl(this); + this.billingInfoes = new BillingInfoesClientImpl(this); + this.connectedPartnerResources = new ConnectedPartnerResourcesClientImpl(this); this.tagRules = new TagRulesClientImpl(this); this.vMHosts = new VMHostsClientImpl(this); this.vMIngestions = new VMIngestionsClientImpl(this); diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/MonitorOperationsClientImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/MonitorOperationsClientImpl.java index 09b198e2223d..04b633fb54da 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/MonitorOperationsClientImpl.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/MonitorOperationsClientImpl.java @@ -76,7 +76,7 @@ Mono>> upgrade( /** * Upgradable version for a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Elastic Monitor Upgrade Parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -129,7 +129,7 @@ private Mono>> upgradeWithResponseAsync( /** * Upgradable version for a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Elastic Monitor Upgrade Parameters. * @param context The context to associate with this operation. @@ -180,7 +180,7 @@ private Mono>> upgradeWithResponseAsync( /** * Upgradable version for a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Elastic Monitor Upgrade Parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -201,7 +201,7 @@ private PollerFlux, Void> beginUpgradeAsync( /** * Upgradable version for a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -221,7 +221,7 @@ private PollerFlux, Void> beginUpgradeAsync(String resourceGrou /** * Upgradable version for a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Elastic Monitor Upgrade Parameters. * @param context The context to associate with this operation. @@ -243,7 +243,7 @@ private PollerFlux, Void> beginUpgradeAsync( /** * Upgradable version for a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -259,7 +259,7 @@ public SyncPoller, Void> beginUpgrade(String resourceGroupName, /** * Upgradable version for a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Elastic Monitor Upgrade Parameters. * @param context The context to associate with this operation. @@ -277,7 +277,7 @@ public SyncPoller, Void> beginUpgrade( /** * Upgradable version for a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Elastic Monitor Upgrade Parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -295,7 +295,7 @@ private Mono upgradeAsync(String resourceGroupName, String monitorName, El /** * Upgradable version for a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -313,7 +313,7 @@ private Mono upgradeAsync(String resourceGroupName, String monitorName) { /** * Upgradable version for a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Elastic Monitor Upgrade Parameters. * @param context The context to associate with this operation. @@ -333,7 +333,7 @@ private Mono upgradeAsync( /** * Upgradable version for a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -348,7 +348,7 @@ public void upgrade(String resourceGroupName, String monitorName) { /** * Upgradable version for a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Elastic Monitor Upgrade Parameters. * @param context The context to associate with this operation. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/MonitoredResourcesClientImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/MonitoredResourcesClientImpl.java index c9e1e262c08c..3782bc649e50 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/MonitoredResourcesClientImpl.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/MonitoredResourcesClientImpl.java @@ -85,7 +85,7 @@ Mono> listNext( /** * List the resources currently being monitored by the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -142,7 +142,7 @@ private Mono> listSinglePageAsync( /** * List the resources currently being monitored by the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -197,7 +197,7 @@ private Mono> listSinglePageAsync( /** * List the resources currently being monitored by the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -213,7 +213,7 @@ private PagedFlux listAsync(String resourceGroupName, St /** * List the resources currently being monitored by the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -231,7 +231,7 @@ private PagedFlux listAsync(String resourceGroupName, St /** * List the resources currently being monitored by the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -246,7 +246,7 @@ public PagedIterable list(String resourceGroupName, Stri /** * List the resources currently being monitored by the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/MonitorsClientImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/MonitorsClientImpl.java index c3e89825923a..18ba15f76ec7 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/MonitorsClientImpl.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/MonitorsClientImpl.java @@ -310,7 +310,7 @@ public PagedIterable list(Context context) { /** * List all monitors under the specified resource group. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @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. @@ -362,7 +362,7 @@ private Mono> listByResourceGroupSing /** * List all monitors under the specified resource group. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @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. @@ -412,7 +412,7 @@ private Mono> listByResourceGroupSing /** * List all monitors under the specified resource group. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @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. @@ -428,7 +428,7 @@ private PagedFlux listByResourceGroupAsync(String r /** * List all monitors under the specified resource group. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @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. @@ -445,7 +445,7 @@ private PagedFlux listByResourceGroupAsync(String r /** * List all monitors under the specified resource group. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @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. @@ -459,7 +459,7 @@ public PagedIterable listByResourceGroup(String res /** * List all monitors under the specified resource group. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @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. @@ -474,7 +474,7 @@ public PagedIterable listByResourceGroup(String res /** * Get the properties of a specific monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -523,7 +523,7 @@ private Mono> getByResourceGroupWithRespon /** * Get the properties of a specific monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -570,7 +570,7 @@ private Mono> getByResourceGroupWithRespon /** * Get the properties of a specific monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -586,7 +586,7 @@ private Mono getByResourceGroupAsync(String resourc /** * Get the properties of a specific monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -603,7 +603,7 @@ public Response getByResourceGroupWithResponse( /** * Get the properties of a specific monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -618,7 +618,7 @@ public ElasticMonitorResourceInner getByResourceGroup(String resourceGroupName, /** * Create a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Elastic monitor resource model. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -671,7 +671,7 @@ private Mono>> createWithResponseAsync( /** * Create a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Elastic monitor resource model. * @param context The context to associate with this operation. @@ -722,7 +722,7 @@ private Mono>> createWithResponseAsync( /** * Create a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Elastic monitor resource model. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -747,7 +747,7 @@ private PollerFlux, ElasticMonitorResour /** * Create a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -772,7 +772,7 @@ private PollerFlux, ElasticMonitorResour /** * Create a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Elastic monitor resource model. * @param context The context to associate with this operation. @@ -799,7 +799,7 @@ private PollerFlux, ElasticMonitorResour /** * Create a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -816,7 +816,7 @@ public SyncPoller, ElasticMonitorResourc /** * Create a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Elastic monitor resource model. * @param context The context to associate with this operation. @@ -834,7 +834,7 @@ public SyncPoller, ElasticMonitorResourc /** * Create a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Elastic monitor resource model. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -853,7 +853,7 @@ private Mono createAsync( /** * Create a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -871,7 +871,7 @@ private Mono createAsync(String resourceGroupName, /** * Create a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Elastic monitor resource model. * @param context The context to associate with this operation. @@ -891,7 +891,7 @@ private Mono createAsync( /** * Create a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -907,7 +907,7 @@ public ElasticMonitorResourceInner create(String resourceGroupName, String monit /** * Create a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Elastic monitor resource model. * @param context The context to associate with this operation. @@ -925,7 +925,7 @@ public ElasticMonitorResourceInner create( /** * Update a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Elastic resource model update parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -978,7 +978,7 @@ private Mono> updateWithResponseAsync( /** * Update a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Elastic resource model update parameters. * @param context The context to associate with this operation. @@ -1029,7 +1029,7 @@ private Mono> updateWithResponseAsync( /** * Update a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1046,7 +1046,7 @@ private Mono updateAsync(String resourceGroupName, /** * Update a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Elastic resource model update parameters. * @param context The context to associate with this operation. @@ -1064,7 +1064,7 @@ public Response updateWithResponse( /** * Update a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1080,7 +1080,7 @@ public ElasticMonitorResourceInner update(String resourceGroupName, String monit /** * Delete a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1127,7 +1127,7 @@ private Mono>> deleteWithResponseAsync(String resource /** * Delete a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1173,7 +1173,7 @@ private Mono>> deleteWithResponseAsync( /** * Delete a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1192,7 +1192,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup /** * Delete a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1213,7 +1213,7 @@ private PollerFlux, Void> beginDeleteAsync( /** * Delete a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1228,7 +1228,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Delete a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1245,7 +1245,7 @@ public SyncPoller, Void> beginDelete( /** * Delete a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1260,7 +1260,7 @@ private Mono deleteAsync(String resourceGroupName, String monitorName) { /** * Delete a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1278,7 +1278,7 @@ private Mono deleteAsync(String resourceGroupName, String monitorName, Con /** * Delete a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1292,7 +1292,7 @@ public void delete(String resourceGroupName, String monitorName) { /** * Delete a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/OrganizationsClientImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/OrganizationsClientImpl.java index ecf9e3316031..e487f8836fe2 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/OrganizationsClientImpl.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/OrganizationsClientImpl.java @@ -23,6 +23,7 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.elastic.fluent.OrganizationsClient; +import com.azure.resourcemanager.elastic.fluent.models.ElasticOrganizationToAzureSubscriptionMappingResponseInner; import com.azure.resourcemanager.elastic.fluent.models.UserApiKeyResponseInner; import com.azure.resourcemanager.elastic.models.UserEmailId; import reactor.core.publisher.Mono; @@ -64,6 +65,18 @@ Mono> getApiKey( @BodyParam("application/json") UserEmailId body, @HeaderParam("Accept") String accept, Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/providers/Microsoft.Elastic/getElasticOrganizationToAzureSubscriptionMapping") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getElasticToAzureSubscriptionMapping( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, + Context context); } /** @@ -196,4 +209,119 @@ public UserApiKeyResponseInner getApiKey() { final UserEmailId body = null; return getApiKeyWithResponse(body, Context.NONE).getValue(); } + + /** + * Get Elastic Organization To Azure Subscription Mapping details for the logged-in user. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return elastic Organization To Azure Subscription Mapping details for the logged-in user along with {@link + * Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getElasticToAzureSubscriptionMappingWithResponseAsync() { + 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 + .getElasticToAzureSubscriptionMapping( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get Elastic Organization To Azure Subscription Mapping details for the logged-in user. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return elastic Organization To Azure Subscription Mapping details for the logged-in user along with {@link + * Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getElasticToAzureSubscriptionMappingWithResponseAsync(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 + .getElasticToAzureSubscriptionMapping( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + accept, + context); + } + + /** + * Get Elastic Organization To Azure Subscription Mapping details for the logged-in user. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return elastic Organization To Azure Subscription Mapping details for the logged-in user on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono + getElasticToAzureSubscriptionMappingAsync() { + return getElasticToAzureSubscriptionMappingWithResponseAsync().flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get Elastic Organization To Azure Subscription Mapping details for the logged-in user. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return elastic Organization To Azure Subscription Mapping details for the logged-in user along with {@link + * Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response + getElasticToAzureSubscriptionMappingWithResponse(Context context) { + return getElasticToAzureSubscriptionMappingWithResponseAsync(context).block(); + } + + /** + * Get Elastic Organization To Azure Subscription Mapping details for the logged-in user. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return elastic Organization To Azure Subscription Mapping details for the logged-in user. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticOrganizationToAzureSubscriptionMappingResponseInner getElasticToAzureSubscriptionMapping() { + return getElasticToAzureSubscriptionMappingWithResponse(Context.NONE).getValue(); + } } diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/OrganizationsImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/OrganizationsImpl.java index a93922c759ca..915610e08710 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/OrganizationsImpl.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/OrganizationsImpl.java @@ -9,7 +9,9 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.elastic.fluent.OrganizationsClient; +import com.azure.resourcemanager.elastic.fluent.models.ElasticOrganizationToAzureSubscriptionMappingResponseInner; import com.azure.resourcemanager.elastic.fluent.models.UserApiKeyResponseInner; +import com.azure.resourcemanager.elastic.models.ElasticOrganizationToAzureSubscriptionMappingResponse; import com.azure.resourcemanager.elastic.models.Organizations; import com.azure.resourcemanager.elastic.models.UserApiKeyResponse; import com.azure.resourcemanager.elastic.models.UserEmailId; @@ -49,6 +51,31 @@ public UserApiKeyResponse getApiKey() { } } + public Response + getElasticToAzureSubscriptionMappingWithResponse(Context context) { + Response inner = + this.serviceClient().getElasticToAzureSubscriptionMappingWithResponse(context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ElasticOrganizationToAzureSubscriptionMappingResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ElasticOrganizationToAzureSubscriptionMappingResponse getElasticToAzureSubscriptionMapping() { + ElasticOrganizationToAzureSubscriptionMappingResponseInner inner = + this.serviceClient().getElasticToAzureSubscriptionMapping(); + if (inner != null) { + return new ElasticOrganizationToAzureSubscriptionMappingResponseImpl(inner, this.manager()); + } else { + return null; + } + } + private OrganizationsClient serviceClient() { return this.innerClient; } diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/TagRulesClientImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/TagRulesClientImpl.java index 34d4e5119812..79546612c47b 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/TagRulesClientImpl.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/TagRulesClientImpl.java @@ -137,7 +137,7 @@ Mono> listNext( /** * List the tag rules for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -194,7 +194,7 @@ private Mono> listSinglePageAsync( /** * List the tag rules for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -249,7 +249,7 @@ private Mono> listSinglePageAsync( /** * List the tag rules for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -265,7 +265,7 @@ private PagedFlux listAsync(String resourceGroupName, S /** * List the tag rules for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -284,7 +284,7 @@ private PagedFlux listAsync( /** * List the tag rules for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -299,7 +299,7 @@ public PagedIterable list(String resourceGroupName, Str /** * List the tag rules for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -315,7 +315,7 @@ public PagedIterable list(String resourceGroupName, Str /** * Create or update a tag rule set for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Tag Rule Set resource name. * @param body request body of MonitoringTagRules. @@ -374,7 +374,7 @@ private Mono> createOrUpdateWithResponseAsync( /** * Create or update a tag rule set for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Tag Rule Set resource name. * @param body request body of MonitoringTagRules. @@ -435,7 +435,7 @@ private Mono> createOrUpdateWithResponseAsync( /** * Create or update a tag rule set for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Tag Rule Set resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -454,7 +454,7 @@ private Mono createOrUpdateAsync( /** * Create or update a tag rule set for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Tag Rule Set resource name. * @param body request body of MonitoringTagRules. @@ -477,7 +477,7 @@ public Response createOrUpdateWithResponse( /** * Create or update a tag rule set for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Tag Rule Set resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -494,7 +494,7 @@ public MonitoringTagRulesInner createOrUpdate(String resourceGroupName, String m /** * Get a tag rule set for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Tag Rule Set resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -548,7 +548,7 @@ private Mono> getWithResponseAsync( /** * Get a tag rule set for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Tag Rule Set resource name. * @param context The context to associate with this operation. @@ -600,7 +600,7 @@ private Mono> getWithResponseAsync( /** * Get a tag rule set for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Tag Rule Set resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -617,7 +617,7 @@ private Mono getAsync(String resourceGroupName, String /** * Get a tag rule set for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Tag Rule Set resource name. * @param context The context to associate with this operation. @@ -635,7 +635,7 @@ public Response getWithResponse( /** * Get a tag rule set for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Tag Rule Set resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -651,7 +651,7 @@ public MonitoringTagRulesInner get(String resourceGroupName, String monitorName, /** * Delete a tag rule set for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Tag Rule Set resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -704,7 +704,7 @@ private Mono>> deleteWithResponseAsync( /** * Delete a tag rule set for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Tag Rule Set resource name. * @param context The context to associate with this operation. @@ -755,7 +755,7 @@ private Mono>> deleteWithResponseAsync( /** * Delete a tag rule set for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Tag Rule Set resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -776,7 +776,7 @@ private PollerFlux, Void> beginDeleteAsync( /** * Delete a tag rule set for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Tag Rule Set resource name. * @param context The context to associate with this operation. @@ -799,7 +799,7 @@ private PollerFlux, Void> beginDeleteAsync( /** * Delete a tag rule set for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Tag Rule Set resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -816,7 +816,7 @@ public SyncPoller, Void> beginDelete( /** * Delete a tag rule set for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Tag Rule Set resource name. * @param context The context to associate with this operation. @@ -834,7 +834,7 @@ public SyncPoller, Void> beginDelete( /** * Delete a tag rule set for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Tag Rule Set resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -852,7 +852,7 @@ private Mono deleteAsync(String resourceGroupName, String monitorName, Str /** * Delete a tag rule set for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Tag Rule Set resource name. * @param context The context to associate with this operation. @@ -871,7 +871,7 @@ private Mono deleteAsync(String resourceGroupName, String monitorName, Str /** * Delete a tag rule set for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Tag Rule Set resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -886,7 +886,7 @@ public void delete(String resourceGroupName, String monitorName, String ruleSetN /** * Delete a tag rule set for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Tag Rule Set resource name. * @param context The context to associate with this operation. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/TrafficFiltersClientImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/TrafficFiltersClientImpl.java index 5f3eefc4a8f4..4777c75d3a65 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/TrafficFiltersClientImpl.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/TrafficFiltersClientImpl.java @@ -69,7 +69,7 @@ Mono> delete( /** * Delete traffic filter from the account. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param rulesetId Ruleset Id of the filter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -119,7 +119,7 @@ private Mono> deleteWithResponseAsync( /** * Delete traffic filter from the account. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param rulesetId Ruleset Id of the filter. * @param context The context to associate with this operation. @@ -167,7 +167,7 @@ private Mono> deleteWithResponseAsync( /** * Delete traffic filter from the account. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -183,7 +183,7 @@ private Mono deleteAsync(String resourceGroupName, String monitorName) { /** * Delete traffic filter from the account. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param rulesetId Ruleset Id of the filter. * @param context The context to associate with this operation. @@ -201,7 +201,7 @@ public Response deleteWithResponse( /** * Delete traffic filter from the account. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/UpgradableVersionsClientImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/UpgradableVersionsClientImpl.java index f2805a93db46..070f08b23199 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/UpgradableVersionsClientImpl.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/UpgradableVersionsClientImpl.java @@ -69,7 +69,7 @@ Mono> details( /** * List of upgradable versions for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -118,7 +118,7 @@ private Mono> detailsWithResponseAsync( /** * List of upgradable versions for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -165,7 +165,7 @@ private Mono> detailsWithResponseAsync( /** * List of upgradable versions for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -181,7 +181,7 @@ private Mono detailsAsync(String resourceGroupName, /** * List of upgradable versions for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -198,7 +198,7 @@ public Response detailsWithResponse( /** * List of upgradable versions for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/Utils.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/Utils.java index cb3d96477d15..cec583c6cbcb 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/Utils.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/Utils.java @@ -20,6 +20,9 @@ import reactor.core.publisher.Flux; final class Utils { + private Utils() { + } + static String getValueFromIdByName(String id, String name) { if (id == null) { return null; @@ -60,7 +63,7 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri segments.add(idSegment); idItrReverted.forEachRemaining(segments::add); Collections.reverse(segments); - if (segments.size() > 0 && segments.get(0).isEmpty()) { + if (!segments.isEmpty() && segments.get(0).isEmpty()) { segments.remove(0); } return String.join("/", segments); @@ -74,7 +77,7 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri } static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { - return new PagedIterableImpl(pageIterable, mapper); + return new PagedIterableImpl<>(pageIterable, mapper); } private static final class PagedIterableImpl extends PagedIterable { @@ -133,30 +136,27 @@ public Stream> streamByPage(String continuationToken, int prefe @Override public Iterator iterator() { - return new IteratorImpl(pagedIterable.iterator(), mapper); + return new IteratorImpl<>(pagedIterable.iterator(), mapper); } @Override public Iterable> iterableByPage() { - return new IterableImpl, PagedResponse>(pagedIterable.iterableByPage(), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper); } @Override public Iterable> iterableByPage(String continuationToken) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(continuationToken), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper); } @Override public Iterable> iterableByPage(int preferredPageSize) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(preferredPageSize), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper); } @Override public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); } } @@ -198,7 +198,7 @@ private IterableImpl(Iterable iterable, Function mapper) { @Override public Iterator iterator() { - return new IteratorImpl(iterable.iterator(), mapper); + return new IteratorImpl<>(iterable.iterator(), mapper); } } } diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/VMCollectionsClientImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/VMCollectionsClientImpl.java index a8660c2687b5..7100c596031e 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/VMCollectionsClientImpl.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/VMCollectionsClientImpl.java @@ -71,7 +71,7 @@ Mono> update( /** * Update the vm details that will be monitored by the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body VM resource Id. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -124,7 +124,7 @@ private Mono> updateWithResponseAsync( /** * Update the vm details that will be monitored by the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body VM resource Id. * @param context The context to associate with this operation. @@ -175,7 +175,7 @@ private Mono> updateWithResponseAsync( /** * Update the vm details that will be monitored by the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -191,7 +191,7 @@ private Mono updateAsync(String resourceGroupName, String monitorName) { /** * Update the vm details that will be monitored by the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body VM resource Id. * @param context The context to associate with this operation. @@ -209,7 +209,7 @@ public Response updateWithResponse( /** * Update the vm details that will be monitored by the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/VMHostsClientImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/VMHostsClientImpl.java index 771bc370b33f..8d74ea44dbef 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/VMHostsClientImpl.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/VMHostsClientImpl.java @@ -84,7 +84,7 @@ Mono> listNext( /** * List the vm resources currently being monitored by the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -140,7 +140,7 @@ private Mono> listSinglePageAsync(String resourc /** * List the vm resources currently being monitored by the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -195,7 +195,7 @@ private Mono> listSinglePageAsync( /** * List the vm resources currently being monitored by the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -211,7 +211,7 @@ private PagedFlux listAsync(String resourceGroupName, String m /** * List the vm resources currently being monitored by the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -229,7 +229,7 @@ private PagedFlux listAsync(String resourceGroupName, String m /** * List the vm resources currently being monitored by the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -244,7 +244,7 @@ public PagedIterable list(String resourceGroupName, String mon /** * List the vm resources currently being monitored by the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/VMIngestionsClientImpl.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/VMIngestionsClientImpl.java index 376d88e22a22..5e8bbd3a50c6 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/VMIngestionsClientImpl.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/implementation/VMIngestionsClientImpl.java @@ -69,7 +69,7 @@ Mono> details( /** * List the vm ingestion details that will be monitored by the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -118,7 +118,7 @@ private Mono> detailsWithResponseAsync /** * List the vm ingestion details that will be monitored by the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -165,7 +165,7 @@ private Mono> detailsWithResponseAsync /** * List the vm ingestion details that will be monitored by the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -181,7 +181,7 @@ private Mono detailsAsync(String resourceGroupN /** * List the vm ingestion details that will be monitored by the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -198,7 +198,7 @@ public Response detailsWithResponse( /** * List the vm ingestion details that will be monitored by the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/AllTrafficFilters.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/AllTrafficFilters.java index 3e0dea5b3030..7d685208587f 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/AllTrafficFilters.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/AllTrafficFilters.java @@ -12,7 +12,7 @@ public interface AllTrafficFilters { /** * Get the list of all traffic filters for the account. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -26,7 +26,7 @@ Response listWithResponse( /** * Get the list of all traffic filters for the account. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @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/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/AssociateTrafficFilters.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/AssociateTrafficFilters.java index 44496b070da3..6ba6e9e08840 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/AssociateTrafficFilters.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/AssociateTrafficFilters.java @@ -11,7 +11,7 @@ public interface AssociateTrafficFilters { /** * Associate traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -22,7 +22,7 @@ public interface AssociateTrafficFilters { /** * Associate traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param rulesetId Ruleset Id of the filter. * @param context The context to associate with this operation. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/BillingInfoResponse.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/BillingInfoResponse.java new file mode 100644 index 000000000000..ebaad72b7e07 --- /dev/null +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/BillingInfoResponse.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.elastic.models; + +import com.azure.resourcemanager.elastic.fluent.models.BillingInfoResponseInner; + +/** An immutable client-side representation of BillingInfoResponse. */ +public interface BillingInfoResponse { + /** + * Gets the marketplaceSaasInfo property: Marketplace Subscription details. + * + * @return the marketplaceSaasInfo value. + */ + MarketplaceSaaSInfo marketplaceSaasInfo(); + + /** + * Gets the partnerBillingEntity property: Partner Billing Entity details: Organization Info. + * + * @return the partnerBillingEntity value. + */ + PartnerBillingEntity partnerBillingEntity(); + + /** + * Gets the inner com.azure.resourcemanager.elastic.fluent.models.BillingInfoResponseInner object. + * + * @return the inner object. + */ + BillingInfoResponseInner innerModel(); +} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/BillingInfoes.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/BillingInfoes.java new file mode 100644 index 000000000000..d07c583192be --- /dev/null +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/BillingInfoes.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.elastic.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of BillingInfoes. */ +public interface BillingInfoes { + /** + * Get marketplace and organization info mapped to the given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource 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 marketplace and organization info mapped to the given monitor along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String monitorName, Context context); + + /** + * Get marketplace and organization info mapped to the given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource 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 marketplace and organization info mapped to the given monitor. + */ + BillingInfoResponse get(String resourceGroupName, String monitorName); +} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/ConnectedPartnerResourceProperties.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/ConnectedPartnerResourceProperties.java new file mode 100644 index 000000000000..0b10873a6fda --- /dev/null +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/ConnectedPartnerResourceProperties.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.elastic.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Connected Partner Resource Properties. */ +@Fluent +public final class ConnectedPartnerResourceProperties { + /* + * Elastic deployment name + */ + @JsonProperty(value = "partnerDeploymentName") + private String partnerDeploymentName; + + /* + * Deployment URL of the elasticsearch in Elastic cloud deployment. + */ + @JsonProperty(value = "partnerDeploymentUri") + private String partnerDeploymentUri; + + /* + * The azure resource Id of the deployment. + */ + @JsonProperty(value = "azureResourceId") + private String azureResourceId; + + /* + * The location of the deployment. + */ + @JsonProperty(value = "location") + private String location; + + /** Creates an instance of ConnectedPartnerResourceProperties class. */ + public ConnectedPartnerResourceProperties() { + } + + /** + * Get the partnerDeploymentName property: Elastic deployment name. + * + * @return the partnerDeploymentName value. + */ + public String partnerDeploymentName() { + return this.partnerDeploymentName; + } + + /** + * Set the partnerDeploymentName property: Elastic deployment name. + * + * @param partnerDeploymentName the partnerDeploymentName value to set. + * @return the ConnectedPartnerResourceProperties object itself. + */ + public ConnectedPartnerResourceProperties withPartnerDeploymentName(String partnerDeploymentName) { + this.partnerDeploymentName = partnerDeploymentName; + return this; + } + + /** + * Get the partnerDeploymentUri property: Deployment URL of the elasticsearch in Elastic cloud deployment. + * + * @return the partnerDeploymentUri value. + */ + public String partnerDeploymentUri() { + return this.partnerDeploymentUri; + } + + /** + * Set the partnerDeploymentUri property: Deployment URL of the elasticsearch in Elastic cloud deployment. + * + * @param partnerDeploymentUri the partnerDeploymentUri value to set. + * @return the ConnectedPartnerResourceProperties object itself. + */ + public ConnectedPartnerResourceProperties withPartnerDeploymentUri(String partnerDeploymentUri) { + this.partnerDeploymentUri = partnerDeploymentUri; + return this; + } + + /** + * Get the azureResourceId property: The azure resource Id of the deployment. + * + * @return the azureResourceId value. + */ + public String azureResourceId() { + return this.azureResourceId; + } + + /** + * Set the azureResourceId property: The azure resource Id of the deployment. + * + * @param azureResourceId the azureResourceId value to set. + * @return the ConnectedPartnerResourceProperties object itself. + */ + public ConnectedPartnerResourceProperties withAzureResourceId(String azureResourceId) { + this.azureResourceId = azureResourceId; + return this; + } + + /** + * Get the location property: The location of the deployment. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The location of the deployment. + * + * @param location the location value to set. + * @return the ConnectedPartnerResourceProperties object itself. + */ + public ConnectedPartnerResourceProperties withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/ConnectedPartnerResources.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/ConnectedPartnerResources.java new file mode 100644 index 000000000000..4fdf341a2a23 --- /dev/null +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/ConnectedPartnerResources.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.elastic.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** Resource collection API of ConnectedPartnerResources. */ +public interface ConnectedPartnerResources { + /** + * List of all active deployments that are associated with the marketplace subscription linked to the given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource 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 list of all active elastic deployments as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String monitorName); + + /** + * List of all active deployments that are associated with the marketplace subscription linked to the given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource 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 list of all active elastic deployments as paginated response with {@link PagedIterable}. + */ + PagedIterable list( + String resourceGroupName, String monitorName, Context context); +} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/ConnectedPartnerResourcesListFormat.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/ConnectedPartnerResourcesListFormat.java new file mode 100644 index 000000000000..0b5b0336cbdf --- /dev/null +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/ConnectedPartnerResourcesListFormat.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.elastic.models; + +import com.azure.resourcemanager.elastic.fluent.models.ConnectedPartnerResourcesListFormatInner; + +/** An immutable client-side representation of ConnectedPartnerResourcesListFormat. */ +public interface ConnectedPartnerResourcesListFormat { + /** + * Gets the properties property: Connected Partner Resource Properties. + * + * @return the properties value. + */ + ConnectedPartnerResourceProperties properties(); + + /** + * Gets the inner com.azure.resourcemanager.elastic.fluent.models.ConnectedPartnerResourcesListFormatInner object. + * + * @return the inner object. + */ + ConnectedPartnerResourcesListFormatInner innerModel(); +} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/ConnectedPartnerResourcesListResponse.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/ConnectedPartnerResourcesListResponse.java new file mode 100644 index 000000000000..d4eca28d06f7 --- /dev/null +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/ConnectedPartnerResourcesListResponse.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.elastic.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.elastic.fluent.models.ConnectedPartnerResourcesListFormatInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** List of all active elastic deployments. */ +@Fluent +public final class ConnectedPartnerResourcesListResponse { + /* + * Results of a list operation. + */ + @JsonProperty(value = "value") + private List value; + + /* + * Link to the next set of results, if any. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of ConnectedPartnerResourcesListResponse class. */ + public ConnectedPartnerResourcesListResponse() { + } + + /** + * Get the value property: Results of a list operation. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Results of a list operation. + * + * @param value the value value to set. + * @return the ConnectedPartnerResourcesListResponse object itself. + */ + public ConnectedPartnerResourcesListResponse withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to the next set of results, if any. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: Link to the next set of results, if any. + * + * @param nextLink the nextLink value to set. + * @return the ConnectedPartnerResourcesListResponse object itself. + */ + public ConnectedPartnerResourcesListResponse 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/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/CreateAndAssociateIpFilters.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/CreateAndAssociateIpFilters.java index 6e04f980725e..406bb21bfa42 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/CreateAndAssociateIpFilters.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/CreateAndAssociateIpFilters.java @@ -11,7 +11,7 @@ public interface CreateAndAssociateIpFilters { /** * Create and Associate IP traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -22,7 +22,7 @@ public interface CreateAndAssociateIpFilters { /** * Create and Associate IP traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ips List of ips. * @param name Name of the traffic filter. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/CreateAndAssociatePLFilters.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/CreateAndAssociatePLFilters.java index 716147cd0a48..0d2b5d44213b 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/CreateAndAssociatePLFilters.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/CreateAndAssociatePLFilters.java @@ -11,7 +11,7 @@ public interface CreateAndAssociatePLFilters { /** * Create and Associate private link traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -22,7 +22,7 @@ public interface CreateAndAssociatePLFilters { /** * Create and Associate private link traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param name Name of the traffic filter. * @param privateEndpointGuid Guid of the private endpoint. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/DeploymentInfoResponse.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/DeploymentInfoResponse.java index 1adbfc15665d..cd2a5998fd29 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/DeploymentInfoResponse.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/DeploymentInfoResponse.java @@ -36,6 +36,14 @@ public interface DeploymentInfoResponse { */ String diskCapacity(); + /** + * Gets the elasticsearchEndPoint property: Elasticsearch endpoint in Elastic cloud deployment. This is either the + * aliased_endpoint if available, or the service_url otherwise. + * + * @return the elasticsearchEndPoint value. + */ + String elasticsearchEndPoint(); + /** * Gets the deploymentUrl property: Deployment URL of the elasticsearch in Elastic cloud deployment. * diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/DeploymentInfoes.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/DeploymentInfoes.java index 826985e63465..3a92e028f828 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/DeploymentInfoes.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/DeploymentInfoes.java @@ -12,7 +12,7 @@ public interface DeploymentInfoes { /** * Fetch information regarding Elastic cloud deployment corresponding to the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -26,7 +26,7 @@ public interface DeploymentInfoes { /** * Fetch information regarding Elastic cloud deployment corresponding to the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @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/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/DetachAndDeleteTrafficFilters.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/DetachAndDeleteTrafficFilters.java index 040cb312c619..9c3be32f2005 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/DetachAndDeleteTrafficFilters.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/DetachAndDeleteTrafficFilters.java @@ -12,7 +12,7 @@ public interface DetachAndDeleteTrafficFilters { /** * Detach and Delete traffic filter from the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param rulesetId Ruleset Id of the filter. * @param context The context to associate with this operation. @@ -26,7 +26,7 @@ public interface DetachAndDeleteTrafficFilters { /** * Detach and Delete traffic filter from the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @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/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/DetachTrafficFilters.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/DetachTrafficFilters.java index 340150b390ed..142873a93675 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/DetachTrafficFilters.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/DetachTrafficFilters.java @@ -11,7 +11,7 @@ public interface DetachTrafficFilters { /** * Detach traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -22,7 +22,7 @@ public interface DetachTrafficFilters { /** * Detach traffic filter for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param rulesetId Ruleset Id of the filter. * @param context The context to associate with this operation. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/ElasticMonitorResource.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/ElasticMonitorResource.java index b40bbb764674..1967ce4b3d0f 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/ElasticMonitorResource.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/ElasticMonitorResource.java @@ -110,11 +110,13 @@ interface Definition DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } + /** The ElasticMonitorResource definition stages. */ interface DefinitionStages { /** The first stage of the ElasticMonitorResource definition. */ interface Blank extends WithLocation { } + /** The stage of the ElasticMonitorResource definition allowing to specify location. */ interface WithLocation { /** @@ -133,16 +135,18 @@ interface WithLocation { */ WithResourceGroup withRegion(String location); } + /** The stage of the ElasticMonitorResource definition allowing to specify parent resource. */ interface WithResourceGroup { /** * Specifies resourceGroupName. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ WithCreate withExistingResourceGroup(String resourceGroupName); } + /** * The stage of the ElasticMonitorResource 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. @@ -167,6 +171,7 @@ interface WithCreate */ ElasticMonitorResource create(Context context); } + /** The stage of the ElasticMonitorResource definition allowing to specify tags. */ interface WithTags { /** @@ -177,6 +182,7 @@ interface WithTags { */ WithCreate withTags(Map tags); } + /** The stage of the ElasticMonitorResource definition allowing to specify sku. */ interface WithSku { /** @@ -187,6 +193,7 @@ interface WithSku { */ WithCreate withSku(ResourceSku sku); } + /** The stage of the ElasticMonitorResource definition allowing to specify properties. */ interface WithProperties { /** @@ -197,6 +204,7 @@ interface WithProperties { */ WithCreate withProperties(MonitorProperties properties); } + /** The stage of the ElasticMonitorResource definition allowing to specify identity. */ interface WithIdentity { /** @@ -208,6 +216,7 @@ interface WithIdentity { WithCreate withIdentity(IdentityProperties identity); } } + /** * Begins update for the ElasticMonitorResource resource. * @@ -232,6 +241,7 @@ interface Update extends UpdateStages.WithTags { */ ElasticMonitorResource apply(Context context); } + /** The ElasticMonitorResource update stages. */ interface UpdateStages { /** The stage of the ElasticMonitorResource update allowing to specify tags. */ @@ -245,6 +255,7 @@ interface WithTags { Update withTags(Map tags); } } + /** * Refreshes the resource to sync with Azure. * diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/ElasticOrganizationToAzureSubscriptionMappingResponse.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/ElasticOrganizationToAzureSubscriptionMappingResponse.java new file mode 100644 index 000000000000..7bacf0ea4de8 --- /dev/null +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/ElasticOrganizationToAzureSubscriptionMappingResponse.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.elastic.models; + +import com.azure.resourcemanager.elastic.fluent.models.ElasticOrganizationToAzureSubscriptionMappingResponseInner; + +/** An immutable client-side representation of ElasticOrganizationToAzureSubscriptionMappingResponse. */ +public interface ElasticOrganizationToAzureSubscriptionMappingResponse { + /** + * Gets the properties property: The properties of Azure Subscription ID to which the Organization of the logged in + * user belongs and gets billed into. + * + * @return the properties value. + */ + ElasticOrganizationToAzureSubscriptionMappingResponseProperties properties(); + + /** + * Gets the inner + * com.azure.resourcemanager.elastic.fluent.models.ElasticOrganizationToAzureSubscriptionMappingResponseInner + * object. + * + * @return the inner object. + */ + ElasticOrganizationToAzureSubscriptionMappingResponseInner innerModel(); +} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/ElasticOrganizationToAzureSubscriptionMappingResponseProperties.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/ElasticOrganizationToAzureSubscriptionMappingResponseProperties.java new file mode 100644 index 000000000000..9e10b5cf8f37 --- /dev/null +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/ElasticOrganizationToAzureSubscriptionMappingResponseProperties.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.elastic.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The properties of Azure Subscription ID to which the Organization of the logged in user belongs and gets billed into. + */ +@Fluent +public final class ElasticOrganizationToAzureSubscriptionMappingResponseProperties { + /* + * The Azure Subscription ID to which the Organization belongs and gets billed into. This is empty for a new user + * OR a user without an Elastic Organization. + */ + @JsonProperty(value = "billedAzureSubscriptionId") + private String billedAzureSubscriptionId; + + /* + * Marketplace SaaS Info of the resource. + */ + @JsonProperty(value = "marketplaceSaasInfo", access = JsonProperty.Access.WRITE_ONLY) + private MarketplaceSaaSInfo marketplaceSaasInfo; + + /* + * The Elastic Organization Id. + */ + @JsonProperty(value = "elasticOrganizationId") + private String elasticOrganizationId; + + /* + * The Elastic Organization Name. + */ + @JsonProperty(value = "elasticOrganizationName") + private String elasticOrganizationName; + + /** Creates an instance of ElasticOrganizationToAzureSubscriptionMappingResponseProperties class. */ + public ElasticOrganizationToAzureSubscriptionMappingResponseProperties() { + } + + /** + * Get the billedAzureSubscriptionId property: The Azure Subscription ID to which the Organization belongs and gets + * billed into. This is empty for a new user OR a user without an Elastic Organization. + * + * @return the billedAzureSubscriptionId value. + */ + public String billedAzureSubscriptionId() { + return this.billedAzureSubscriptionId; + } + + /** + * Set the billedAzureSubscriptionId property: The Azure Subscription ID to which the Organization belongs and gets + * billed into. This is empty for a new user OR a user without an Elastic Organization. + * + * @param billedAzureSubscriptionId the billedAzureSubscriptionId value to set. + * @return the ElasticOrganizationToAzureSubscriptionMappingResponseProperties object itself. + */ + public ElasticOrganizationToAzureSubscriptionMappingResponseProperties withBilledAzureSubscriptionId( + String billedAzureSubscriptionId) { + this.billedAzureSubscriptionId = billedAzureSubscriptionId; + return this; + } + + /** + * Get the marketplaceSaasInfo property: Marketplace SaaS Info of the resource. + * + * @return the marketplaceSaasInfo value. + */ + public MarketplaceSaaSInfo marketplaceSaasInfo() { + return this.marketplaceSaasInfo; + } + + /** + * Get the elasticOrganizationId property: The Elastic Organization Id. + * + * @return the elasticOrganizationId value. + */ + public String elasticOrganizationId() { + return this.elasticOrganizationId; + } + + /** + * Set the elasticOrganizationId property: The Elastic Organization Id. + * + * @param elasticOrganizationId the elasticOrganizationId value to set. + * @return the ElasticOrganizationToAzureSubscriptionMappingResponseProperties object itself. + */ + public ElasticOrganizationToAzureSubscriptionMappingResponseProperties withElasticOrganizationId( + String elasticOrganizationId) { + this.elasticOrganizationId = elasticOrganizationId; + return this; + } + + /** + * Get the elasticOrganizationName property: The Elastic Organization Name. + * + * @return the elasticOrganizationName value. + */ + public String elasticOrganizationName() { + return this.elasticOrganizationName; + } + + /** + * Set the elasticOrganizationName property: The Elastic Organization Name. + * + * @param elasticOrganizationName the elasticOrganizationName value to set. + * @return the ElasticOrganizationToAzureSubscriptionMappingResponseProperties object itself. + */ + public ElasticOrganizationToAzureSubscriptionMappingResponseProperties withElasticOrganizationName( + String elasticOrganizationName) { + this.elasticOrganizationName = elasticOrganizationName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (marketplaceSaasInfo() != null) { + marketplaceSaasInfo().validate(); + } + } +} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/ExternalUsers.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/ExternalUsers.java index 90ef4f9542ae..c93ffa9c8c19 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/ExternalUsers.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/ExternalUsers.java @@ -13,7 +13,7 @@ public interface ExternalUsers { * Create User inside elastic deployment which are used by customers to perform operations on the elastic * deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Elastic External User Creation Parameters. * @param context The context to associate with this operation. @@ -30,7 +30,7 @@ Response createOrUpdateWithResponse( * Create User inside elastic deployment which are used by customers to perform operations on the elastic * deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @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/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/ListAssociatedTrafficFilters.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/ListAssociatedTrafficFilters.java index 849b0f7b7974..59fc700d5c60 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/ListAssociatedTrafficFilters.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/ListAssociatedTrafficFilters.java @@ -12,7 +12,7 @@ public interface ListAssociatedTrafficFilters { /** * Get the list of all associated traffic filters for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -26,7 +26,7 @@ Response listWithResponse( /** * Get the list of all associated traffic filters for the given deployment. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @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/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/MarketplaceSaaSInfo.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/MarketplaceSaaSInfo.java index 036873ec47d7..ad9e693ff3f6 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/MarketplaceSaaSInfo.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/MarketplaceSaaSInfo.java @@ -28,6 +28,24 @@ public final class MarketplaceSaaSInfo { @JsonProperty(value = "marketplaceResourceId") private String marketplaceResourceId; + /* + * Marketplace Subscription Details: SaaS Subscription Status + */ + @JsonProperty(value = "marketplaceStatus") + private String marketplaceStatus; + + /* + * The Azure Subscription ID to which the Marketplace Subscription belongs and gets billed into. + */ + @JsonProperty(value = "billedAzureSubscriptionId") + private String billedAzureSubscriptionId; + + /* + * Flag specifying if the Marketplace status is subscribed or not. + */ + @JsonProperty(value = "subscribed") + private Boolean subscribed; + /** Creates an instance of MarketplaceSaaSInfo class. */ public MarketplaceSaaSInfo() { } @@ -93,6 +111,68 @@ public MarketplaceSaaSInfo withMarketplaceResourceId(String marketplaceResourceI return this; } + /** + * Get the marketplaceStatus property: Marketplace Subscription Details: SaaS Subscription Status. + * + * @return the marketplaceStatus value. + */ + public String marketplaceStatus() { + return this.marketplaceStatus; + } + + /** + * Set the marketplaceStatus property: Marketplace Subscription Details: SaaS Subscription Status. + * + * @param marketplaceStatus the marketplaceStatus value to set. + * @return the MarketplaceSaaSInfo object itself. + */ + public MarketplaceSaaSInfo withMarketplaceStatus(String marketplaceStatus) { + this.marketplaceStatus = marketplaceStatus; + return this; + } + + /** + * Get the billedAzureSubscriptionId property: The Azure Subscription ID to which the Marketplace Subscription + * belongs and gets billed into. + * + * @return the billedAzureSubscriptionId value. + */ + public String billedAzureSubscriptionId() { + return this.billedAzureSubscriptionId; + } + + /** + * Set the billedAzureSubscriptionId property: The Azure Subscription ID to which the Marketplace Subscription + * belongs and gets billed into. + * + * @param billedAzureSubscriptionId the billedAzureSubscriptionId value to set. + * @return the MarketplaceSaaSInfo object itself. + */ + public MarketplaceSaaSInfo withBilledAzureSubscriptionId(String billedAzureSubscriptionId) { + this.billedAzureSubscriptionId = billedAzureSubscriptionId; + return this; + } + + /** + * Get the subscribed property: Flag specifying if the Marketplace status is subscribed or not. + * + * @return the subscribed value. + */ + public Boolean subscribed() { + return this.subscribed; + } + + /** + * Set the subscribed property: Flag specifying if the Marketplace status is subscribed or not. + * + * @param subscribed the subscribed value to set. + * @return the MarketplaceSaaSInfo object itself. + */ + public MarketplaceSaaSInfo withSubscribed(Boolean subscribed) { + this.subscribed = subscribed; + return this; + } + /** * Validates the instance. * diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/MonitorOperations.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/MonitorOperations.java index 1dc7eab8facd..fdf2a16f62cc 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/MonitorOperations.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/MonitorOperations.java @@ -11,7 +11,7 @@ public interface MonitorOperations { /** * Upgradable version for a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -22,7 +22,7 @@ public interface MonitorOperations { /** * Upgradable version for a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Elastic Monitor Upgrade Parameters. * @param context The context to associate with this operation. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/MonitorProperties.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/MonitorProperties.java index 6543534f0dea..c1da5d189c89 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/MonitorProperties.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/MonitorProperties.java @@ -36,12 +36,36 @@ public final class MonitorProperties { @JsonProperty(value = "userInfo") private UserInfo userInfo; + /* + * Plan details of the monitor resource. + */ + @JsonProperty(value = "planDetails") + private PlanDetails planDetails; + /* * Version of elastic of the monitor resource */ @JsonProperty(value = "version") private String version; + /* + * Status of Azure Subscription where Marketplace SaaS is located. + */ + @JsonProperty(value = "saaSAzureSubscriptionStatus") + private String saaSAzureSubscriptionStatus; + + /* + * Name of the marketing campaign. + */ + @JsonProperty(value = "sourceCampaignName") + private String sourceCampaignName; + + /* + * A unique identifier associated with the campaign. + */ + @JsonProperty(value = "sourceCampaignId") + private String sourceCampaignId; + /* * The liftrResourceCategory property. */ @@ -148,6 +172,26 @@ public MonitorProperties withUserInfo(UserInfo userInfo) { return this; } + /** + * Get the planDetails property: Plan details of the monitor resource. + * + * @return the planDetails value. + */ + public PlanDetails planDetails() { + return this.planDetails; + } + + /** + * Set the planDetails property: Plan details of the monitor resource. + * + * @param planDetails the planDetails value to set. + * @return the MonitorProperties object itself. + */ + public MonitorProperties withPlanDetails(PlanDetails planDetails) { + this.planDetails = planDetails; + return this; + } + /** * Get the version property: Version of elastic of the monitor resource. * @@ -168,6 +212,66 @@ public MonitorProperties withVersion(String version) { return this; } + /** + * Get the saaSAzureSubscriptionStatus property: Status of Azure Subscription where Marketplace SaaS is located. + * + * @return the saaSAzureSubscriptionStatus value. + */ + public String saaSAzureSubscriptionStatus() { + return this.saaSAzureSubscriptionStatus; + } + + /** + * Set the saaSAzureSubscriptionStatus property: Status of Azure Subscription where Marketplace SaaS is located. + * + * @param saaSAzureSubscriptionStatus the saaSAzureSubscriptionStatus value to set. + * @return the MonitorProperties object itself. + */ + public MonitorProperties withSaaSAzureSubscriptionStatus(String saaSAzureSubscriptionStatus) { + this.saaSAzureSubscriptionStatus = saaSAzureSubscriptionStatus; + return this; + } + + /** + * Get the sourceCampaignName property: Name of the marketing campaign. + * + * @return the sourceCampaignName value. + */ + public String sourceCampaignName() { + return this.sourceCampaignName; + } + + /** + * Set the sourceCampaignName property: Name of the marketing campaign. + * + * @param sourceCampaignName the sourceCampaignName value to set. + * @return the MonitorProperties object itself. + */ + public MonitorProperties withSourceCampaignName(String sourceCampaignName) { + this.sourceCampaignName = sourceCampaignName; + return this; + } + + /** + * Get the sourceCampaignId property: A unique identifier associated with the campaign. + * + * @return the sourceCampaignId value. + */ + public String sourceCampaignId() { + return this.sourceCampaignId; + } + + /** + * Set the sourceCampaignId property: A unique identifier associated with the campaign. + * + * @param sourceCampaignId the sourceCampaignId value to set. + * @return the MonitorProperties object itself. + */ + public MonitorProperties withSourceCampaignId(String sourceCampaignId) { + this.sourceCampaignId = sourceCampaignId; + return this; + } + /** * Get the liftrResourceCategory property: The liftrResourceCategory property. * @@ -218,5 +322,8 @@ public void validate() { if (userInfo() != null) { userInfo().validate(); } + if (planDetails() != null) { + planDetails().validate(); + } } } diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/MonitoredResources.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/MonitoredResources.java index 642d1aece907..1a0bf833273f 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/MonitoredResources.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/MonitoredResources.java @@ -12,7 +12,7 @@ public interface MonitoredResources { /** * List the resources currently being monitored by the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -24,7 +24,7 @@ public interface MonitoredResources { /** * List the resources currently being monitored by the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/MonitoringTagRules.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/MonitoringTagRules.java index 5faa657ab1dd..36ce867bbe34 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/MonitoringTagRules.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/MonitoringTagRules.java @@ -63,22 +63,25 @@ public interface MonitoringTagRules { interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } + /** The MonitoringTagRules definition stages. */ interface DefinitionStages { /** The first stage of the MonitoringTagRules definition. */ interface Blank extends WithParentResource { } + /** The stage of the MonitoringTagRules definition allowing to specify parent resource. */ interface WithParentResource { /** * Specifies resourceGroupName, monitorName. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @return the next definition stage. */ WithCreate withExistingMonitor(String resourceGroupName, String monitorName); } + /** * The stage of the MonitoringTagRules 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. @@ -99,6 +102,7 @@ interface WithCreate extends DefinitionStages.WithProperties { */ MonitoringTagRules create(Context context); } + /** The stage of the MonitoringTagRules definition allowing to specify properties. */ interface WithProperties { /** @@ -110,6 +114,7 @@ interface WithProperties { WithCreate withProperties(MonitoringTagRulesProperties properties); } } + /** * Begins update for the MonitoringTagRules resource. * @@ -134,6 +139,7 @@ interface Update extends UpdateStages.WithProperties { */ MonitoringTagRules apply(Context context); } + /** The MonitoringTagRules update stages. */ interface UpdateStages { /** The stage of the MonitoringTagRules update allowing to specify properties. */ @@ -147,6 +153,7 @@ interface WithProperties { Update withProperties(MonitoringTagRulesProperties properties); } } + /** * Refreshes the resource to sync with Azure. * diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/Monitors.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/Monitors.java index 2fa393928f8b..cc3a558ef482 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/Monitors.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/Monitors.java @@ -33,7 +33,7 @@ public interface Monitors { /** * List all monitors under the specified resource group. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @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. @@ -44,7 +44,7 @@ public interface Monitors { /** * List all monitors under the specified resource group. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @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. @@ -56,7 +56,7 @@ public interface Monitors { /** * Get the properties of a specific monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -70,7 +70,7 @@ Response getByResourceGroupWithResponse( /** * Get the properties of a specific monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -82,7 +82,7 @@ Response getByResourceGroupWithResponse( /** * Delete a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -93,7 +93,7 @@ Response getByResourceGroupWithResponse( /** * Delete a monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/Organizations.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/Organizations.java index 62329b93b9cc..231ebe81a26e 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/Organizations.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/Organizations.java @@ -33,4 +33,26 @@ public interface Organizations { * request. */ UserApiKeyResponse getApiKey(); + + /** + * Get Elastic Organization To Azure Subscription Mapping details for the logged-in user. + * + * @param context The context to associate with this 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 elastic Organization To Azure Subscription Mapping details for the logged-in user along with {@link + * Response}. + */ + Response getElasticToAzureSubscriptionMappingWithResponse( + Context context); + + /** + * Get Elastic Organization To Azure Subscription Mapping details for the logged-in user. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return elastic Organization To Azure Subscription Mapping details for the logged-in user. + */ + ElasticOrganizationToAzureSubscriptionMappingResponse getElasticToAzureSubscriptionMapping(); } diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/PartnerBillingEntity.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/PartnerBillingEntity.java new file mode 100644 index 000000000000..01fb9730aa02 --- /dev/null +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/PartnerBillingEntity.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.elastic.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Partner Billing details associated with the resource. */ +@Fluent +public final class PartnerBillingEntity { + /* + * The Elastic Organization Id. + */ + @JsonProperty(value = "id") + private String id; + + /* + * The Elastic Organization Name. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Link to the elastic organization page + */ + @JsonProperty(value = "partnerEntityUri") + private String partnerEntityUri; + + /** Creates an instance of PartnerBillingEntity class. */ + public PartnerBillingEntity() { + } + + /** + * Get the id property: The Elastic Organization Id. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: The Elastic Organization Id. + * + * @param id the id value to set. + * @return the PartnerBillingEntity object itself. + */ + public PartnerBillingEntity withId(String id) { + this.id = id; + return this; + } + + /** + * Get the name property: The Elastic Organization Name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The Elastic Organization Name. + * + * @param name the name value to set. + * @return the PartnerBillingEntity object itself. + */ + public PartnerBillingEntity withName(String name) { + this.name = name; + return this; + } + + /** + * Get the partnerEntityUri property: Link to the elastic organization page. + * + * @return the partnerEntityUri value. + */ + public String partnerEntityUri() { + return this.partnerEntityUri; + } + + /** + * Set the partnerEntityUri property: Link to the elastic organization page. + * + * @param partnerEntityUri the partnerEntityUri value to set. + * @return the PartnerBillingEntity object itself. + */ + public PartnerBillingEntity withPartnerEntityUri(String partnerEntityUri) { + this.partnerEntityUri = partnerEntityUri; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/PlanDetails.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/PlanDetails.java new file mode 100644 index 000000000000..d11faf0bc556 --- /dev/null +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/PlanDetails.java @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.elastic.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Plan details of the monitor resource. */ +@Fluent +public final class PlanDetails { + /* + * Offer ID of the plan + */ + @JsonProperty(value = "offerID") + private String offerId; + + /* + * Publisher ID of the plan + */ + @JsonProperty(value = "publisherID") + private String publisherId; + + /* + * Term ID of the plan + */ + @JsonProperty(value = "termID") + private String termId; + + /* + * Plan ID + */ + @JsonProperty(value = "planID") + private String planId; + + /* + * Plan Name + */ + @JsonProperty(value = "planName") + private String planName; + + /** Creates an instance of PlanDetails class. */ + public PlanDetails() { + } + + /** + * Get the offerId property: Offer ID of the plan. + * + * @return the offerId value. + */ + public String offerId() { + return this.offerId; + } + + /** + * Set the offerId property: Offer ID of the plan. + * + * @param offerId the offerId value to set. + * @return the PlanDetails object itself. + */ + public PlanDetails withOfferId(String offerId) { + this.offerId = offerId; + return this; + } + + /** + * Get the publisherId property: Publisher ID of the plan. + * + * @return the publisherId value. + */ + public String publisherId() { + return this.publisherId; + } + + /** + * Set the publisherId property: Publisher ID of the plan. + * + * @param publisherId the publisherId value to set. + * @return the PlanDetails object itself. + */ + public PlanDetails withPublisherId(String publisherId) { + this.publisherId = publisherId; + return this; + } + + /** + * Get the termId property: Term ID of the plan. + * + * @return the termId value. + */ + public String termId() { + return this.termId; + } + + /** + * Set the termId property: Term ID of the plan. + * + * @param termId the termId value to set. + * @return the PlanDetails object itself. + */ + public PlanDetails withTermId(String termId) { + this.termId = termId; + return this; + } + + /** + * Get the planId property: Plan ID. + * + * @return the planId value. + */ + public String planId() { + return this.planId; + } + + /** + * Set the planId property: Plan ID. + * + * @param planId the planId value to set. + * @return the PlanDetails object itself. + */ + public PlanDetails withPlanId(String planId) { + this.planId = planId; + return this; + } + + /** + * Get the planName property: Plan Name. + * + * @return the planName value. + */ + public String planName() { + return this.planName; + } + + /** + * Set the planName property: Plan Name. + * + * @param planName the planName value to set. + * @return the PlanDetails object itself. + */ + public PlanDetails withPlanName(String planName) { + this.planName = planName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/TagRules.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/TagRules.java index bec8cfbfbe00..4cd8fba4033e 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/TagRules.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/TagRules.java @@ -13,7 +13,7 @@ public interface TagRules { /** * List the tag rules for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -25,7 +25,7 @@ public interface TagRules { /** * List the tag rules for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -38,7 +38,7 @@ public interface TagRules { /** * Get a tag rule set for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Tag Rule Set resource name. * @param context The context to associate with this operation. @@ -53,7 +53,7 @@ Response getWithResponse( /** * Get a tag rule set for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Tag Rule Set resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -66,7 +66,7 @@ Response getWithResponse( /** * Delete a tag rule set for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Tag Rule Set resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -78,7 +78,7 @@ Response getWithResponse( /** * Delete a tag rule set for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Tag Rule Set resource name. * @param context The context to associate with this operation. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/TrafficFilters.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/TrafficFilters.java index 969caa6e69bf..eeec09e77493 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/TrafficFilters.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/TrafficFilters.java @@ -12,7 +12,7 @@ public interface TrafficFilters { /** * Delete traffic filter from the account. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param rulesetId Ruleset Id of the filter. * @param context The context to associate with this operation. @@ -26,7 +26,7 @@ public interface TrafficFilters { /** * Delete traffic filter from the account. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @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/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/UpgradableVersions.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/UpgradableVersions.java index 4680b55302d8..06e7da2ce06c 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/UpgradableVersions.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/UpgradableVersions.java @@ -12,7 +12,7 @@ public interface UpgradableVersions { /** * List of upgradable versions for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -25,7 +25,7 @@ public interface UpgradableVersions { /** * List of upgradable versions for a given monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @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/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/VMCollections.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/VMCollections.java index cf5346600007..7696d313b497 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/VMCollections.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/VMCollections.java @@ -12,7 +12,7 @@ public interface VMCollections { /** * Update the vm details that will be monitored by the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body VM resource Id. * @param context The context to associate with this operation. @@ -27,7 +27,7 @@ Response updateWithResponse( /** * Update the vm details that will be monitored by the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @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/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/VMHosts.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/VMHosts.java index d40317164353..f67b8f4ea67d 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/VMHosts.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/VMHosts.java @@ -12,7 +12,7 @@ public interface VMHosts { /** * List the vm resources currently being monitored by the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -24,7 +24,7 @@ public interface VMHosts { /** * List the vm resources currently being monitored by the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/VMIngestions.java b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/VMIngestions.java index db1ee985036a..771cc8b8c91a 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/VMIngestions.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/java/com/azure/resourcemanager/elastic/models/VMIngestions.java @@ -12,7 +12,7 @@ public interface VMIngestions { /** * List the vm ingestion details that will be monitored by the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -26,7 +26,7 @@ Response detailsWithResponse( /** * List the vm ingestion details that will be monitored by the Elastic monitor resource. * - * @param resourceGroupName The name of the resource group to which the Elastic resource belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @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/elastic/azure-resourcemanager-elastic/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-elastic/proxy-config.json b/sdk/elastic/azure-resourcemanager-elastic/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-elastic/proxy-config.json new file mode 100644 index 000000000000..993c53f5a09e --- /dev/null +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-elastic/proxy-config.json @@ -0,0 +1 @@ +[ [ "com.azure.resourcemanager.elastic.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.elastic.implementation.MonitorsClientImpl$MonitorsService" ], [ "com.azure.resourcemanager.elastic.implementation.ElasticVersionsClientImpl$ElasticVersionsService" ], [ "com.azure.resourcemanager.elastic.implementation.MonitoredResourcesClientImpl$MonitoredResourcesService" ], [ "com.azure.resourcemanager.elastic.implementation.DeploymentInfoesClientImpl$DeploymentInfoesService" ], [ "com.azure.resourcemanager.elastic.implementation.ExternalUsersClientImpl$ExternalUsersService" ], [ "com.azure.resourcemanager.elastic.implementation.BillingInfoesClientImpl$BillingInfoesService" ], [ "com.azure.resourcemanager.elastic.implementation.ConnectedPartnerResourcesClientImpl$ConnectedPartnerResourcesService" ], [ "com.azure.resourcemanager.elastic.implementation.TagRulesClientImpl$TagRulesService" ], [ "com.azure.resourcemanager.elastic.implementation.VMHostsClientImpl$VMHostsService" ], [ "com.azure.resourcemanager.elastic.implementation.VMIngestionsClientImpl$VMIngestionsService" ], [ "com.azure.resourcemanager.elastic.implementation.VMCollectionsClientImpl$VMCollectionsService" ], [ "com.azure.resourcemanager.elastic.implementation.UpgradableVersionsClientImpl$UpgradableVersionsService" ], [ "com.azure.resourcemanager.elastic.implementation.MonitorOperationsClientImpl$MonitorOperationsService" ], [ "com.azure.resourcemanager.elastic.implementation.AllTrafficFiltersClientImpl$AllTrafficFiltersService" ], [ "com.azure.resourcemanager.elastic.implementation.ListAssociatedTrafficFiltersClientImpl$ListAssociatedTrafficFiltersService" ], [ "com.azure.resourcemanager.elastic.implementation.CreateAndAssociateIpFiltersClientImpl$CreateAndAssociateIpFiltersService" ], [ "com.azure.resourcemanager.elastic.implementation.CreateAndAssociatePLFiltersClientImpl$CreateAndAssociatePLFiltersService" ], [ "com.azure.resourcemanager.elastic.implementation.AssociateTrafficFiltersClientImpl$AssociateTrafficFiltersService" ], [ "com.azure.resourcemanager.elastic.implementation.DetachAndDeleteTrafficFiltersClientImpl$DetachAndDeleteTrafficFiltersService" ], [ "com.azure.resourcemanager.elastic.implementation.DetachTrafficFiltersClientImpl$DetachTrafficFiltersService" ], [ "com.azure.resourcemanager.elastic.implementation.TrafficFiltersClientImpl$TrafficFiltersService" ], [ "com.azure.resourcemanager.elastic.implementation.OrganizationsClientImpl$OrganizationsService" ] ] \ No newline at end of file diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-elastic/reflect-config.json b/sdk/elastic/azure-resourcemanager-elastic/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-elastic/reflect-config.json new file mode 100644 index 000000000000..be00f860024a --- /dev/null +++ b/sdk/elastic/azure-resourcemanager-elastic/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-elastic/reflect-config.json @@ -0,0 +1,291 @@ +[ { + "name" : "com.azure.resourcemanager.elastic.models.OperationListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.fluent.models.OperationResultInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.models.OperationDisplay", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.models.ElasticMonitorResourceListResponse", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.fluent.models.ElasticMonitorResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.models.ResourceSku", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.models.MonitorProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.models.ElasticProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.models.ElasticCloudUser", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.models.ElasticCloudDeployment", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.models.UserInfo", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.models.CompanyInfo", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.models.PlanDetails", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.models.IdentityProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.models.ElasticVersionsListResponse", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.fluent.models.ElasticVersionListFormatInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.models.ElasticVersionListProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.models.ElasticMonitorResourceUpdateParameters", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.models.MonitoredResourceListResponse", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.fluent.models.MonitoredResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.fluent.models.DeploymentInfoResponseInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.models.MarketplaceSaaSInfo", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.models.MarketplaceSaaSInfoMarketplaceSubscription", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.models.ExternalUserInfo", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.fluent.models.ExternalUserCreationResponseInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.fluent.models.BillingInfoResponseInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.models.PartnerBillingEntity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.models.ConnectedPartnerResourcesListResponse", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.fluent.models.ConnectedPartnerResourcesListFormatInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.models.ConnectedPartnerResourceProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.models.MonitoringTagRulesListResponse", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.fluent.models.MonitoringTagRulesInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.models.MonitoringTagRulesProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.models.LogRules", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.models.FilteringTag", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.models.VMHostListResponse", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.fluent.models.VMResourcesInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.fluent.models.VMIngestionDetailsResponseInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.models.VMCollectionUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.fluent.models.UpgradableVersionsListInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.models.ElasticMonitorUpgrade", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.fluent.models.ElasticTrafficFilterResponseInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.models.ElasticTrafficFilter", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.models.ElasticTrafficFilterRule", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.models.UserEmailId", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.fluent.models.UserApiKeyResponseInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.models.UserApiKeyResponseProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.fluent.models.ElasticOrganizationToAzureSubscriptionMappingResponseInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.models.ElasticOrganizationToAzureSubscriptionMappingResponseProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.models.ProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.models.MonitoringStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.models.LiftrResourceCategories", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.models.ManagedIdentityTypes", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.models.SendingLogs", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.models.ElasticDeploymentStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.models.TagAction", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.models.OperationName", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.elastic.models.Type", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +} ] \ No newline at end of file diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/AllTrafficFiltersListSamples.java b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/AllTrafficFiltersListSamples.java index fcb3443de8f0..62fe87c72044 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/AllTrafficFiltersListSamples.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/AllTrafficFiltersListSamples.java @@ -7,7 +7,7 @@ /** Samples for AllTrafficFilters List. */ public final class AllTrafficFiltersListSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/AllTrafficFilters_list.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/AllTrafficFilters_list.json */ /** * Sample code: AllTrafficFilters_list. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/AssociateTrafficFilterAssociateSamples.java b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/AssociateTrafficFilterAssociateSamples.java index 0df6b742ef47..aa425b75f004 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/AssociateTrafficFilterAssociateSamples.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/AssociateTrafficFilterAssociateSamples.java @@ -7,7 +7,7 @@ /** Samples for AssociateTrafficFilter Associate. */ public final class AssociateTrafficFilterAssociateSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/AssociateTrafficFilter_Update.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/AssociateTrafficFilter_Update.json */ /** * Sample code: AssociateTrafficFilter_Associate. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/BillingInfoGetSamples.java b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/BillingInfoGetSamples.java new file mode 100644 index 000000000000..7ef0029b0931 --- /dev/null +++ b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/BillingInfoGetSamples.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.elastic.generated; + +/** Samples for BillingInfo Get. */ +public final class BillingInfoGetSamples { + /* + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/BillingInfo_Get.json + */ + /** + * Sample code: BillingInfo_Get. + * + * @param manager Entry point to ElasticManager. + */ + public static void billingInfoGet(com.azure.resourcemanager.elastic.ElasticManager manager) { + manager.billingInfoes().getWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/ConnectedPartnerResourcesListSamples.java b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/ConnectedPartnerResourcesListSamples.java new file mode 100644 index 000000000000..b49afd6938b3 --- /dev/null +++ b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/ConnectedPartnerResourcesListSamples.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.elastic.generated; + +/** Samples for ConnectedPartnerResources List. */ +public final class ConnectedPartnerResourcesListSamples { + /* + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/ConnectedPartnerResources_List.json + */ + /** + * Sample code: ConnectedPartnerResources_List. + * + * @param manager Entry point to ElasticManager. + */ + public static void connectedPartnerResourcesList(com.azure.resourcemanager.elastic.ElasticManager manager) { + manager.connectedPartnerResources().list("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/CreateAndAssociateIpFilterCreateSamples.java b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/CreateAndAssociateIpFilterCreateSamples.java index 4c4bcba15825..136ba9291618 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/CreateAndAssociateIpFilterCreateSamples.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/CreateAndAssociateIpFilterCreateSamples.java @@ -7,7 +7,7 @@ /** Samples for CreateAndAssociateIpFilter Create. */ public final class CreateAndAssociateIpFilterCreateSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/IPTrafficFilter_Create.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/IPTrafficFilter_Create.json */ /** * Sample code: createAndAssociateIPFilter_Create. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/CreateAndAssociatePLFilterCreateSamples.java b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/CreateAndAssociatePLFilterCreateSamples.java index c839447ff9f1..d9e88bba9096 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/CreateAndAssociatePLFilterCreateSamples.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/CreateAndAssociatePLFilterCreateSamples.java @@ -7,7 +7,7 @@ /** Samples for CreateAndAssociatePLFilter Create. */ public final class CreateAndAssociatePLFilterCreateSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/PrivateLinkTrafficFilters_Create.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/PrivateLinkTrafficFilters_Create.json */ /** * Sample code: createAndAssociatePLFilter_Create. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/DeploymentInfoListSamples.java b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/DeploymentInfoListSamples.java index 225e9f01803a..211e93c514cd 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/DeploymentInfoListSamples.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/DeploymentInfoListSamples.java @@ -7,7 +7,7 @@ /** Samples for DeploymentInfo List. */ public final class DeploymentInfoListSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/DeploymentInfo_List.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/DeploymentInfo_List.json */ /** * Sample code: DeploymentInfo_List. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/DetachAndDeleteTrafficFilterDeleteSamples.java b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/DetachAndDeleteTrafficFilterDeleteSamples.java index 5bf45edc201c..eb624b5cb052 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/DetachAndDeleteTrafficFilterDeleteSamples.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/DetachAndDeleteTrafficFilterDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for DetachAndDeleteTrafficFilter Delete. */ public final class DetachAndDeleteTrafficFilterDeleteSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/DetachAndDeleteTrafficFilter_Delete.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/DetachAndDeleteTrafficFilter_Delete.json */ /** * Sample code: DetachAndDeleteTrafficFilter_Delete. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/DetachTrafficFilterUpdateSamples.java b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/DetachTrafficFilterUpdateSamples.java index d71f23072076..f397d2a6ccd3 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/DetachTrafficFilterUpdateSamples.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/DetachTrafficFilterUpdateSamples.java @@ -7,7 +7,7 @@ /** Samples for DetachTrafficFilter Update. */ public final class DetachTrafficFilterUpdateSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/DetachTrafficFilters_Update.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/DetachTrafficFilters_Update.json */ /** * Sample code: DetachTrafficFilter_Update. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/ElasticVersionsListSamples.java b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/ElasticVersionsListSamples.java index 37fc6580aea4..babd53223d2f 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/ElasticVersionsListSamples.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/ElasticVersionsListSamples.java @@ -7,7 +7,7 @@ /** Samples for ElasticVersions List. */ public final class ElasticVersionsListSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/ElasticVersions_List.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/ElasticVersions_List.json */ /** * Sample code: ElasticVersions_List. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/ExternalUserCreateOrUpdateSamples.java b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/ExternalUserCreateOrUpdateSamples.java index 334bb9a902ed..2fd4b416796a 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/ExternalUserCreateOrUpdateSamples.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/ExternalUserCreateOrUpdateSamples.java @@ -7,7 +7,7 @@ /** Samples for ExternalUser CreateOrUpdate. */ public final class ExternalUserCreateOrUpdateSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/ExternalUserInfo.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/ExternalUserInfo.json */ /** * Sample code: ExternalUser_CreateOrUpdate. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/ListAssociatedTrafficFiltersListSamples.java b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/ListAssociatedTrafficFiltersListSamples.java index 7ee662c9297f..dcfa281e6e83 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/ListAssociatedTrafficFiltersListSamples.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/ListAssociatedTrafficFiltersListSamples.java @@ -7,7 +7,7 @@ /** Samples for ListAssociatedTrafficFilters List. */ public final class ListAssociatedTrafficFiltersListSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/AssociatedFiltersForDeployment_list.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/AssociatedFiltersForDeployment_list.json */ /** * Sample code: listAssociatedTrafficFilters_list. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/MonitorOperationUpgradeSamples.java b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/MonitorOperationUpgradeSamples.java index a33a7c14eee4..c16bc6312091 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/MonitorOperationUpgradeSamples.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/MonitorOperationUpgradeSamples.java @@ -7,7 +7,7 @@ /** Samples for MonitorOperation Upgrade. */ public final class MonitorOperationUpgradeSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/Monitor_Upgrade.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/Monitor_Upgrade.json */ /** * Sample code: Monitor_Upgrade. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/MonitoredResourcesListSamples.java b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/MonitoredResourcesListSamples.java index 320a32b33f27..735752386e6c 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/MonitoredResourcesListSamples.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/MonitoredResourcesListSamples.java @@ -7,7 +7,7 @@ /** Samples for MonitoredResources List. */ public final class MonitoredResourcesListSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/MonitoredResources_List.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/MonitoredResources_List.json */ /** * Sample code: MonitoredResources_List. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/MonitorsCreateSamples.java b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/MonitorsCreateSamples.java index 4865755eb4cd..c1b00aa51b61 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/MonitorsCreateSamples.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/MonitorsCreateSamples.java @@ -7,7 +7,7 @@ /** Samples for Monitors Create. */ public final class MonitorsCreateSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/Monitors_Create.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/Monitors_Create.json */ /** * Sample code: Monitors_Create. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/MonitorsDeleteSamples.java b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/MonitorsDeleteSamples.java index 8cc4f2e57732..7130806dd770 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/MonitorsDeleteSamples.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/MonitorsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for Monitors Delete. */ public final class MonitorsDeleteSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/Monitors_Delete.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/Monitors_Delete.json */ /** * Sample code: Monitors_Delete. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/MonitorsGetByResourceGroupSamples.java b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/MonitorsGetByResourceGroupSamples.java index c3719956ba1b..df1e9be4a4ee 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/MonitorsGetByResourceGroupSamples.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/MonitorsGetByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for Monitors GetByResourceGroup. */ public final class MonitorsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/Monitors_Get.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/Monitors_Get.json */ /** * Sample code: Monitors_Get. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/MonitorsListByResourceGroupSamples.java b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/MonitorsListByResourceGroupSamples.java index affbcf566b97..76cd3420c882 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/MonitorsListByResourceGroupSamples.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/MonitorsListByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for Monitors ListByResourceGroup. */ public final class MonitorsListByResourceGroupSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/Monitors_ListByResourceGroup.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/Monitors_ListByResourceGroup.json */ /** * Sample code: Monitors_ListByResourceGroup. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/MonitorsListSamples.java b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/MonitorsListSamples.java index 62f6b749db4e..077cfc40502c 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/MonitorsListSamples.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/MonitorsListSamples.java @@ -7,7 +7,7 @@ /** Samples for Monitors List. */ public final class MonitorsListSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/Monitors_List.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/Monitors_List.json */ /** * Sample code: Monitors_List. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/MonitorsUpdateSamples.java b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/MonitorsUpdateSamples.java index 4d2a708043d3..f6b3a5324db0 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/MonitorsUpdateSamples.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/MonitorsUpdateSamples.java @@ -9,7 +9,7 @@ /** Samples for Monitors Update. */ public final class MonitorsUpdateSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/Monitors_Update.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/Monitors_Update.json */ /** * Sample code: Monitors_Update. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/OperationsListSamples.java b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/OperationsListSamples.java index 6f1b12e3f86f..b437c35ab81f 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/OperationsListSamples.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/OperationsListSamples.java @@ -7,7 +7,7 @@ /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/Operations_List.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/Operations_List.json */ /** * Sample code: Operations_List. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/OrganizationsGetApiKeySamples.java b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/OrganizationsGetApiKeySamples.java index c3e889b03143..acafec68b8ba 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/OrganizationsGetApiKeySamples.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/OrganizationsGetApiKeySamples.java @@ -7,7 +7,7 @@ /** Samples for Organizations GetApiKey. */ public final class OrganizationsGetApiKeySamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/Organizations_GetApiKey.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/Organizations_GetApiKey.json */ /** * Sample code: Organizations_GetApiKey. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/OrganizationsGetElasticToAzureSubscriptionMappingSamples.java b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/OrganizationsGetElasticToAzureSubscriptionMappingSamples.java new file mode 100644 index 000000000000..208a5dd6543a --- /dev/null +++ b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/OrganizationsGetElasticToAzureSubscriptionMappingSamples.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.elastic.generated; + +/** Samples for Organizations GetElasticToAzureSubscriptionMapping. */ +public final class OrganizationsGetElasticToAzureSubscriptionMappingSamples { + /* + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/Organizations_GetElasticToAzureSubscriptionMapping.json + */ + /** + * Sample code: Organizations_GetElasticToAzureSubscriptionMapping. + * + * @param manager Entry point to ElasticManager. + */ + public static void organizationsGetElasticToAzureSubscriptionMapping( + com.azure.resourcemanager.elastic.ElasticManager manager) { + manager.organizations().getElasticToAzureSubscriptionMappingWithResponse(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/TagRulesCreateOrUpdateSamples.java b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/TagRulesCreateOrUpdateSamples.java index bb8dc9a46a57..a81276079e13 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/TagRulesCreateOrUpdateSamples.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/TagRulesCreateOrUpdateSamples.java @@ -7,7 +7,7 @@ /** Samples for TagRules CreateOrUpdate. */ public final class TagRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/TagRules_CreateOrUpdate.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/TagRules_CreateOrUpdate.json */ /** * Sample code: TagRules_CreateOrUpdate. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/TagRulesDeleteSamples.java b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/TagRulesDeleteSamples.java index 2d14f7e66be6..d907f816efb5 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/TagRulesDeleteSamples.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/TagRulesDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for TagRules Delete. */ public final class TagRulesDeleteSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/TagRules_Delete.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/TagRules_Delete.json */ /** * Sample code: TagRules_Delete. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/TagRulesGetSamples.java b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/TagRulesGetSamples.java index 00926753f304..ddebd891eb2e 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/TagRulesGetSamples.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/TagRulesGetSamples.java @@ -7,7 +7,7 @@ /** Samples for TagRules Get. */ public final class TagRulesGetSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/TagRules_Get.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/TagRules_Get.json */ /** * Sample code: TagRules_Get. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/TagRulesListSamples.java b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/TagRulesListSamples.java index 1cfce8fc155b..29b35f2d46b9 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/TagRulesListSamples.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/TagRulesListSamples.java @@ -7,7 +7,7 @@ /** Samples for TagRules List. */ public final class TagRulesListSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/TagRules_List.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/TagRules_List.json */ /** * Sample code: TagRules_List. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/TrafficFiltersDeleteSamples.java b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/TrafficFiltersDeleteSamples.java index e38c6423e11a..d4f24b2a63fb 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/TrafficFiltersDeleteSamples.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/TrafficFiltersDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for TrafficFilters Delete. */ public final class TrafficFiltersDeleteSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/TrafficFilters_Delete.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/TrafficFilters_Delete.json */ /** * Sample code: TrafficFilters_Delete. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/UpgradableVersionsDetailsSamples.java b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/UpgradableVersionsDetailsSamples.java index f202e0b844ac..7cc383e2a633 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/UpgradableVersionsDetailsSamples.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/UpgradableVersionsDetailsSamples.java @@ -7,7 +7,7 @@ /** Samples for UpgradableVersions Details. */ public final class UpgradableVersionsDetailsSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/UpgradableVersions_Details.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/UpgradableVersions_Details.json */ /** * Sample code: UpgradableVersions_Details. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/VMCollectionUpdateSamples.java b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/VMCollectionUpdateSamples.java index f14962eaea80..4567a5b1a340 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/VMCollectionUpdateSamples.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/VMCollectionUpdateSamples.java @@ -7,7 +7,7 @@ /** Samples for VMCollection Update. */ public final class VMCollectionUpdateSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/VMCollection_Update.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/VMCollection_Update.json */ /** * Sample code: VMCollection_Update. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/VMHostListSamples.java b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/VMHostListSamples.java index 8ea2a12c8caa..ab53c494806d 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/VMHostListSamples.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/VMHostListSamples.java @@ -7,7 +7,7 @@ /** Samples for VMHost List. */ public final class VMHostListSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/VMHost_List.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/VMHost_List.json */ /** * Sample code: VMHost_List. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/VMIngestionDetailsSamples.java b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/VMIngestionDetailsSamples.java index 26563256d221..c42bfeb2adfe 100644 --- a/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/VMIngestionDetailsSamples.java +++ b/sdk/elastic/azure-resourcemanager-elastic/src/samples/java/com/azure/resourcemanager/elastic/generated/VMIngestionDetailsSamples.java @@ -7,7 +7,7 @@ /** Samples for VMIngestion Details. */ public final class VMIngestionDetailsSamples { /* - * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/VMIngestion_Details.json + * x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-11-01-preview/examples/VMIngestion_Details.json */ /** * Sample code: VMIngestion_Details. diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/AllTrafficFiltersListWithResponseMockTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/AllTrafficFiltersListWithResponseMockTests.java deleted file mode 100644 index 82ca5e39dd8f..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/AllTrafficFiltersListWithResponseMockTests.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.elastic.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.elastic.ElasticManager; -import com.azure.resourcemanager.elastic.models.ElasticTrafficFilterResponse; -import com.azure.resourcemanager.elastic.models.Type; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class AllTrafficFiltersListWithResponseMockTests { - @Test - public void testListWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"rulesets\":[{\"id\":\"bh\",\"name\":\"nlankxmyskpb\",\"description\":\"nbtkcxywnytnr\",\"region\":\"nlqidybyxczf\",\"type\":\"azure_private_endpoint\",\"includeByDefault\":false,\"rules\":[]},{\"id\":\"abphlw\",\"name\":\"lfktsths\",\"description\":\"ocmnyyazttbtwwrq\",\"region\":\"edckzywbiexzfey\",\"type\":\"ip\",\"includeByDefault\":false,\"rules\":[]},{\"id\":\"jwbhqwalmuz\",\"name\":\"xaepdkzjancuxr\",\"description\":\"wbavxbniwdj\",\"region\":\"zt\",\"type\":\"ip\",\"includeByDefault\":true,\"rules\":[]}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ElasticManager manager = - ElasticManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ElasticTrafficFilterResponse response = - manager - .allTrafficFilters() - .listWithResponse("na", "zmhjrunmp", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("bh", response.rulesets().get(0).id()); - Assertions.assertEquals("nlankxmyskpb", response.rulesets().get(0).name()); - Assertions.assertEquals("nbtkcxywnytnr", response.rulesets().get(0).description()); - Assertions.assertEquals("nlqidybyxczf", response.rulesets().get(0).region()); - Assertions.assertEquals(Type.AZURE_PRIVATE_ENDPOINT, response.rulesets().get(0).type()); - Assertions.assertEquals(false, response.rulesets().get(0).includeByDefault()); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/CompanyInfoTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/CompanyInfoTests.java deleted file mode 100644 index 8fd3d14b8755..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/CompanyInfoTests.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.elastic.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.elastic.models.CompanyInfo; -import org.junit.jupiter.api.Assertions; - -public final class CompanyInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CompanyInfo model = - BinaryData - .fromString( - "{\"domain\":\"ndv\",\"business\":\"ozwyiftyhxhuro\",\"employeesNumber\":\"tyxolniwpwc\",\"state\":\"jfkgiawxk\",\"country\":\"ypl\"}") - .toObject(CompanyInfo.class); - Assertions.assertEquals("ndv", model.domain()); - Assertions.assertEquals("ozwyiftyhxhuro", model.business()); - Assertions.assertEquals("tyxolniwpwc", model.employeesNumber()); - Assertions.assertEquals("jfkgiawxk", model.state()); - Assertions.assertEquals("ypl", model.country()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CompanyInfo model = - new CompanyInfo() - .withDomain("ndv") - .withBusiness("ozwyiftyhxhuro") - .withEmployeesNumber("tyxolniwpwc") - .withState("jfkgiawxk") - .withCountry("ypl"); - model = BinaryData.fromObject(model).toObject(CompanyInfo.class); - Assertions.assertEquals("ndv", model.domain()); - Assertions.assertEquals("ozwyiftyhxhuro", model.business()); - Assertions.assertEquals("tyxolniwpwc", model.employeesNumber()); - Assertions.assertEquals("jfkgiawxk", model.state()); - Assertions.assertEquals("ypl", model.country()); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/CreateAndAssociateIpFiltersCreateMockTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/CreateAndAssociateIpFiltersCreateMockTests.java deleted file mode 100644 index af0a3a9caa14..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/CreateAndAssociateIpFiltersCreateMockTests.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.elastic.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.elastic.ElasticManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class CreateAndAssociateIpFiltersCreateMockTests { - @Test - public void testCreate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ElasticManager manager = - ElasticManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .createAndAssociateIpFilters() - .create("kfplgmgsxnk", "zkd", "slpvlop", "i", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/CreateAndAssociatePLFiltersCreateMockTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/CreateAndAssociatePLFiltersCreateMockTests.java deleted file mode 100644 index c402b82e4f93..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/CreateAndAssociatePLFiltersCreateMockTests.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.elastic.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.elastic.ElasticManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class CreateAndAssociatePLFiltersCreateMockTests { - @Test - public void testCreate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ElasticManager manager = - ElasticManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .createAndAssociatePLFilters() - .create("ighxpk", "wzbaiue", "baumnyqupedeoj", "a", "ckhsmtxpsieb", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/DeploymentInfoResponseInnerTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/DeploymentInfoResponseInnerTests.java deleted file mode 100644 index 82c4d324b0b3..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/DeploymentInfoResponseInnerTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.elastic.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.elastic.fluent.models.DeploymentInfoResponseInner; - -public final class DeploymentInfoResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DeploymentInfoResponseInner model = - BinaryData - .fromString( - "{\"status\":\"Unhealthy\",\"version\":\"b\",\"memoryCapacity\":\"jvtbvpyss\",\"diskCapacity\":\"nruj\",\"deploymentUrl\":\"uhmuouqfprwzwbn\",\"marketplaceSaasInfo\":{\"marketplaceSubscription\":{\"id\":\"nwui\"},\"marketplaceName\":\"a\",\"marketplaceResourceId\":\"ufizuckyf\"}}") - .toObject(DeploymentInfoResponseInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeploymentInfoResponseInner model = new DeploymentInfoResponseInner(); - model = BinaryData.fromObject(model).toObject(DeploymentInfoResponseInner.class); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/DeploymentInfoesListWithResponseMockTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/DeploymentInfoesListWithResponseMockTests.java deleted file mode 100644 index 0314bcdd8ffb..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/DeploymentInfoesListWithResponseMockTests.java +++ /dev/null @@ -1,67 +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.elastic.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.elastic.ElasticManager; -import com.azure.resourcemanager.elastic.models.DeploymentInfoResponse; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DeploymentInfoesListWithResponseMockTests { - @Test - public void testListWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"status\":\"Unhealthy\",\"version\":\"vfaxkffeiith\",\"memoryCapacity\":\"m\",\"diskCapacity\":\"yvshxmz\",\"deploymentUrl\":\"bzoggigrx\",\"marketplaceSaasInfo\":{\"marketplaceSubscription\":{\"id\":\"vjxxjnsp\"},\"marketplaceName\":\"ptkoenkoukn\",\"marketplaceResourceId\":\"dwtiukbldngkp\"}}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ElasticManager manager = - ElasticManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DeploymentInfoResponse response = - manager - .deploymentInfoes() - .listWithResponse("hocohslkev", "eggzfb", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/DetachAndDeleteTrafficFiltersDeleteWithResponseMockTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/DetachAndDeleteTrafficFiltersDeleteWithResponseMockTests.java deleted file mode 100644 index e3152f950227..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/DetachAndDeleteTrafficFiltersDeleteWithResponseMockTests.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.elastic.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.elastic.ElasticManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DetachAndDeleteTrafficFiltersDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ElasticManager manager = - ElasticManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .detachAndDeleteTrafficFilters() - .deleteWithResponse("fhvpesaps", "rdqmhjjdhtldwkyz", "uutkncw", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ElasticCloudDeploymentTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ElasticCloudDeploymentTests.java deleted file mode 100644 index 4d4f87dea6a8..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ElasticCloudDeploymentTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.elastic.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.elastic.models.ElasticCloudDeployment; - -public final class ElasticCloudDeploymentTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ElasticCloudDeployment model = - BinaryData - .fromString( - "{\"name\":\"wclxxwrl\",\"deploymentId\":\"ouskcqvkocrc\",\"azureSubscriptionId\":\"kwt\",\"elasticsearchRegion\":\"xbnjbiksq\",\"elasticsearchServiceUrl\":\"lssai\",\"kibanaServiceUrl\":\"p\",\"kibanaSsoUrl\":\"nzl\"}") - .toObject(ElasticCloudDeployment.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ElasticCloudDeployment model = new ElasticCloudDeployment(); - model = BinaryData.fromObject(model).toObject(ElasticCloudDeployment.class); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ElasticCloudUserTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ElasticCloudUserTests.java deleted file mode 100644 index 6d1847d79e13..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ElasticCloudUserTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.elastic.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.elastic.models.ElasticCloudUser; - -public final class ElasticCloudUserTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ElasticCloudUser model = - BinaryData - .fromString( - "{\"emailAddress\":\"jaeq\",\"id\":\"qjbasvms\",\"elasticCloudSsoDefaultUrl\":\"qulngsntnbybkzgc\"}") - .toObject(ElasticCloudUser.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ElasticCloudUser model = new ElasticCloudUser(); - model = BinaryData.fromObject(model).toObject(ElasticCloudUser.class); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ElasticMonitorResourceUpdateParametersTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ElasticMonitorResourceUpdateParametersTests.java deleted file mode 100644 index a19dbb99ee66..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ElasticMonitorResourceUpdateParametersTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.elastic.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.elastic.models.ElasticMonitorResourceUpdateParameters; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ElasticMonitorResourceUpdateParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ElasticMonitorResourceUpdateParameters model = - BinaryData - .fromString( - "{\"tags\":{\"pspwgcuertu\":\"duqkt\",\"bmdg\":\"kdosvqw\",\"dgmb\":\"bjf\",\"tq\":\"bexppb\"}}") - .toObject(ElasticMonitorResourceUpdateParameters.class); - Assertions.assertEquals("duqkt", model.tags().get("pspwgcuertu")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ElasticMonitorResourceUpdateParameters model = - new ElasticMonitorResourceUpdateParameters() - .withTags(mapOf("pspwgcuertu", "duqkt", "bmdg", "kdosvqw", "dgmb", "bjf", "tq", "bexppb")); - model = BinaryData.fromObject(model).toObject(ElasticMonitorResourceUpdateParameters.class); - Assertions.assertEquals("duqkt", model.tags().get("pspwgcuertu")); - } - - @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/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ElasticMonitorUpgradeTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ElasticMonitorUpgradeTests.java deleted file mode 100644 index 0bc7321c7992..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ElasticMonitorUpgradeTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.elastic.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.elastic.models.ElasticMonitorUpgrade; -import org.junit.jupiter.api.Assertions; - -public final class ElasticMonitorUpgradeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ElasticMonitorUpgrade model = - BinaryData.fromString("{\"version\":\"hrhcffcyddglmjth\"}").toObject(ElasticMonitorUpgrade.class); - Assertions.assertEquals("hrhcffcyddglmjth", model.version()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ElasticMonitorUpgrade model = new ElasticMonitorUpgrade().withVersion("hrhcffcyddglmjth"); - model = BinaryData.fromObject(model).toObject(ElasticMonitorUpgrade.class); - Assertions.assertEquals("hrhcffcyddglmjth", model.version()); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ElasticPropertiesTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ElasticPropertiesTests.java deleted file mode 100644 index ebee27d335b9..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ElasticPropertiesTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.elastic.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.elastic.models.ElasticCloudDeployment; -import com.azure.resourcemanager.elastic.models.ElasticCloudUser; -import com.azure.resourcemanager.elastic.models.ElasticProperties; - -public final class ElasticPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ElasticProperties model = - BinaryData - .fromString( - "{\"elasticCloudUser\":{\"emailAddress\":\"xofpdvhpfxxypi\",\"id\":\"nmayhuybb\",\"elasticCloudSsoDefaultUrl\":\"odepoogin\"},\"elasticCloudDeployment\":{\"name\":\"mihe\",\"deploymentId\":\"narxzxtheotus\",\"azureSubscriptionId\":\"yevc\",\"elasticsearchRegion\":\"qi\",\"elasticsearchServiceUrl\":\"hungbwjzrnf\",\"kibanaServiceUrl\":\"xgispemvtzfkufu\",\"kibanaSsoUrl\":\"jofxqe\"}}") - .toObject(ElasticProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ElasticProperties model = - new ElasticProperties() - .withElasticCloudUser(new ElasticCloudUser()) - .withElasticCloudDeployment(new ElasticCloudDeployment()); - model = BinaryData.fromObject(model).toObject(ElasticProperties.class); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ElasticTrafficFilterResponseInnerTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ElasticTrafficFilterResponseInnerTests.java deleted file mode 100644 index 6ec4ed5d1677..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ElasticTrafficFilterResponseInnerTests.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.elastic.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.elastic.fluent.models.ElasticTrafficFilterResponseInner; -import com.azure.resourcemanager.elastic.models.ElasticTrafficFilter; -import com.azure.resourcemanager.elastic.models.Type; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ElasticTrafficFilterResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ElasticTrafficFilterResponseInner model = - BinaryData - .fromString( - "{\"rulesets\":[{\"id\":\"pyeicxm\",\"name\":\"iwqvhkh\",\"description\":\"uigdtopbobjog\",\"region\":\"e\",\"type\":\"ip\",\"includeByDefault\":false,\"rules\":[]}]}") - .toObject(ElasticTrafficFilterResponseInner.class); - Assertions.assertEquals("pyeicxm", model.rulesets().get(0).id()); - Assertions.assertEquals("iwqvhkh", model.rulesets().get(0).name()); - Assertions.assertEquals("uigdtopbobjog", model.rulesets().get(0).description()); - Assertions.assertEquals("e", model.rulesets().get(0).region()); - Assertions.assertEquals(Type.IP, model.rulesets().get(0).type()); - Assertions.assertEquals(false, model.rulesets().get(0).includeByDefault()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ElasticTrafficFilterResponseInner model = - new ElasticTrafficFilterResponseInner() - .withRulesets( - Arrays - .asList( - new ElasticTrafficFilter() - .withId("pyeicxm") - .withName("iwqvhkh") - .withDescription("uigdtopbobjog") - .withRegion("e") - .withType(Type.IP) - .withIncludeByDefault(false) - .withRules(Arrays.asList()))); - model = BinaryData.fromObject(model).toObject(ElasticTrafficFilterResponseInner.class); - Assertions.assertEquals("pyeicxm", model.rulesets().get(0).id()); - Assertions.assertEquals("iwqvhkh", model.rulesets().get(0).name()); - Assertions.assertEquals("uigdtopbobjog", model.rulesets().get(0).description()); - Assertions.assertEquals("e", model.rulesets().get(0).region()); - Assertions.assertEquals(Type.IP, model.rulesets().get(0).type()); - Assertions.assertEquals(false, model.rulesets().get(0).includeByDefault()); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ElasticTrafficFilterRuleTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ElasticTrafficFilterRuleTests.java deleted file mode 100644 index 34c6195f8290..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ElasticTrafficFilterRuleTests.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.elastic.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.elastic.models.ElasticTrafficFilterRule; -import org.junit.jupiter.api.Assertions; - -public final class ElasticTrafficFilterRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ElasticTrafficFilterRule model = - BinaryData - .fromString( - "{\"source\":\"qgtz\",\"description\":\"pnqbqqwxrjfe\",\"azureEndpointGuid\":\"lnwsubisn\",\"azureEndpointName\":\"mpmngnzscxaqwoo\",\"id\":\"cbonqvpk\"}") - .toObject(ElasticTrafficFilterRule.class); - Assertions.assertEquals("qgtz", model.source()); - Assertions.assertEquals("pnqbqqwxrjfe", model.description()); - Assertions.assertEquals("lnwsubisn", model.azureEndpointGuid()); - Assertions.assertEquals("mpmngnzscxaqwoo", model.azureEndpointName()); - Assertions.assertEquals("cbonqvpk", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ElasticTrafficFilterRule model = - new ElasticTrafficFilterRule() - .withSource("qgtz") - .withDescription("pnqbqqwxrjfe") - .withAzureEndpointGuid("lnwsubisn") - .withAzureEndpointName("mpmngnzscxaqwoo") - .withId("cbonqvpk"); - model = BinaryData.fromObject(model).toObject(ElasticTrafficFilterRule.class); - Assertions.assertEquals("qgtz", model.source()); - Assertions.assertEquals("pnqbqqwxrjfe", model.description()); - Assertions.assertEquals("lnwsubisn", model.azureEndpointGuid()); - Assertions.assertEquals("mpmngnzscxaqwoo", model.azureEndpointName()); - Assertions.assertEquals("cbonqvpk", model.id()); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ElasticTrafficFilterTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ElasticTrafficFilterTests.java deleted file mode 100644 index 87a385a61c77..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ElasticTrafficFilterTests.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.elastic.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.elastic.models.ElasticTrafficFilter; -import com.azure.resourcemanager.elastic.models.ElasticTrafficFilterRule; -import com.azure.resourcemanager.elastic.models.Type; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ElasticTrafficFilterTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ElasticTrafficFilter model = - BinaryData - .fromString( - "{\"id\":\"z\",\"name\":\"vvtpgvdfgio\",\"description\":\"ftutqxlngxlefgu\",\"region\":\"xkrxdqmi\",\"type\":\"ip\",\"includeByDefault\":false,\"rules\":[{\"source\":\"drabhjybige\",\"description\":\"qfbow\",\"azureEndpointGuid\":\"anyktzlcuiywg\",\"azureEndpointName\":\"wgndrvynhzgpp\",\"id\":\"cgyncocpecf\"},{\"source\":\"mcoo\",\"description\":\"xlzevgbmqjqabcy\",\"azureEndpointGuid\":\"ivkwlzuvccfwnfnb\",\"azureEndpointName\":\"fionl\",\"id\":\"x\"}]}") - .toObject(ElasticTrafficFilter.class); - Assertions.assertEquals("z", model.id()); - Assertions.assertEquals("vvtpgvdfgio", model.name()); - Assertions.assertEquals("ftutqxlngxlefgu", model.description()); - Assertions.assertEquals("xkrxdqmi", model.region()); - Assertions.assertEquals(Type.IP, model.type()); - Assertions.assertEquals(false, model.includeByDefault()); - Assertions.assertEquals("drabhjybige", model.rules().get(0).source()); - Assertions.assertEquals("qfbow", model.rules().get(0).description()); - Assertions.assertEquals("anyktzlcuiywg", model.rules().get(0).azureEndpointGuid()); - Assertions.assertEquals("wgndrvynhzgpp", model.rules().get(0).azureEndpointName()); - Assertions.assertEquals("cgyncocpecf", model.rules().get(0).id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ElasticTrafficFilter model = - new ElasticTrafficFilter() - .withId("z") - .withName("vvtpgvdfgio") - .withDescription("ftutqxlngxlefgu") - .withRegion("xkrxdqmi") - .withType(Type.IP) - .withIncludeByDefault(false) - .withRules( - Arrays - .asList( - new ElasticTrafficFilterRule() - .withSource("drabhjybige") - .withDescription("qfbow") - .withAzureEndpointGuid("anyktzlcuiywg") - .withAzureEndpointName("wgndrvynhzgpp") - .withId("cgyncocpecf"), - new ElasticTrafficFilterRule() - .withSource("mcoo") - .withDescription("xlzevgbmqjqabcy") - .withAzureEndpointGuid("ivkwlzuvccfwnfnb") - .withAzureEndpointName("fionl") - .withId("x"))); - model = BinaryData.fromObject(model).toObject(ElasticTrafficFilter.class); - Assertions.assertEquals("z", model.id()); - Assertions.assertEquals("vvtpgvdfgio", model.name()); - Assertions.assertEquals("ftutqxlngxlefgu", model.description()); - Assertions.assertEquals("xkrxdqmi", model.region()); - Assertions.assertEquals(Type.IP, model.type()); - Assertions.assertEquals(false, model.includeByDefault()); - Assertions.assertEquals("drabhjybige", model.rules().get(0).source()); - Assertions.assertEquals("qfbow", model.rules().get(0).description()); - Assertions.assertEquals("anyktzlcuiywg", model.rules().get(0).azureEndpointGuid()); - Assertions.assertEquals("wgndrvynhzgpp", model.rules().get(0).azureEndpointName()); - Assertions.assertEquals("cgyncocpecf", model.rules().get(0).id()); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ElasticVersionListFormatInnerTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ElasticVersionListFormatInnerTests.java deleted file mode 100644 index a212ec3cf600..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ElasticVersionListFormatInnerTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.elastic.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.elastic.fluent.models.ElasticVersionListFormatInner; -import com.azure.resourcemanager.elastic.models.ElasticVersionListProperties; -import org.junit.jupiter.api.Assertions; - -public final class ElasticVersionListFormatInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ElasticVersionListFormatInner model = - BinaryData - .fromString("{\"properties\":{\"version\":\"kzsmodm\"}}") - .toObject(ElasticVersionListFormatInner.class); - Assertions.assertEquals("kzsmodm", model.properties().version()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ElasticVersionListFormatInner model = - new ElasticVersionListFormatInner() - .withProperties(new ElasticVersionListProperties().withVersion("kzsmodm")); - model = BinaryData.fromObject(model).toObject(ElasticVersionListFormatInner.class); - Assertions.assertEquals("kzsmodm", model.properties().version()); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ElasticVersionListPropertiesTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ElasticVersionListPropertiesTests.java deleted file mode 100644 index 10aa6d2f8b61..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ElasticVersionListPropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.elastic.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.elastic.models.ElasticVersionListProperties; -import org.junit.jupiter.api.Assertions; - -public final class ElasticVersionListPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ElasticVersionListProperties model = - BinaryData.fromString("{\"version\":\"ougpbkwt\"}").toObject(ElasticVersionListProperties.class); - Assertions.assertEquals("ougpbkwt", model.version()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ElasticVersionListProperties model = new ElasticVersionListProperties().withVersion("ougpbkwt"); - model = BinaryData.fromObject(model).toObject(ElasticVersionListProperties.class); - Assertions.assertEquals("ougpbkwt", model.version()); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ElasticVersionsListMockTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ElasticVersionsListMockTests.java deleted file mode 100644 index ba4a5157c936..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ElasticVersionsListMockTests.java +++ /dev/null @@ -1,67 +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.elastic.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.elastic.ElasticManager; -import com.azure.resourcemanager.elastic.models.ElasticVersionListFormat; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ElasticVersionsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"value\":[{\"properties\":{\"version\":\"imjm\"}}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ElasticManager manager = - ElasticManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.elasticVersions().list("ofoskghs", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("imjm", response.iterator().next().properties().version()); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ElasticVersionsListResponseTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ElasticVersionsListResponseTests.java deleted file mode 100644 index 9fac6a5cab53..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ElasticVersionsListResponseTests.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.elastic.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.elastic.fluent.models.ElasticVersionListFormatInner; -import com.azure.resourcemanager.elastic.models.ElasticVersionListProperties; -import com.azure.resourcemanager.elastic.models.ElasticVersionsListResponse; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ElasticVersionsListResponseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ElasticVersionsListResponse model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"version\":\"zndlikwy\"}},{\"properties\":{\"version\":\"fgibmadgakeq\"}},{\"properties\":{\"version\":\"yb\"}}],\"nextLink\":\"qedqytbciqfoufl\"}") - .toObject(ElasticVersionsListResponse.class); - Assertions.assertEquals("zndlikwy", model.value().get(0).properties().version()); - Assertions.assertEquals("qedqytbciqfoufl", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ElasticVersionsListResponse model = - new ElasticVersionsListResponse() - .withValue( - Arrays - .asList( - new ElasticVersionListFormatInner() - .withProperties(new ElasticVersionListProperties().withVersion("zndlikwy")), - new ElasticVersionListFormatInner() - .withProperties(new ElasticVersionListProperties().withVersion("fgibmadgakeq")), - new ElasticVersionListFormatInner() - .withProperties(new ElasticVersionListProperties().withVersion("yb")))) - .withNextLink("qedqytbciqfoufl"); - model = BinaryData.fromObject(model).toObject(ElasticVersionsListResponse.class); - Assertions.assertEquals("zndlikwy", model.value().get(0).properties().version()); - Assertions.assertEquals("qedqytbciqfoufl", model.nextLink()); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ExternalUserCreationResponseInnerTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ExternalUserCreationResponseInnerTests.java deleted file mode 100644 index 65bd448012b6..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ExternalUserCreationResponseInnerTests.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.elastic.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.elastic.fluent.models.ExternalUserCreationResponseInner; - -public final class ExternalUserCreationResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExternalUserCreationResponseInner model = - BinaryData.fromString("{\"created\":true}").toObject(ExternalUserCreationResponseInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExternalUserCreationResponseInner model = new ExternalUserCreationResponseInner(); - model = BinaryData.fromObject(model).toObject(ExternalUserCreationResponseInner.class); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/FilteringTagTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/FilteringTagTests.java deleted file mode 100644 index ded9ff037815..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/FilteringTagTests.java +++ /dev/null @@ -1,32 +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.elastic.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.elastic.models.FilteringTag; -import com.azure.resourcemanager.elastic.models.TagAction; -import org.junit.jupiter.api.Assertions; - -public final class FilteringTagTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FilteringTag model = - BinaryData - .fromString("{\"name\":\"r\",\"value\":\"djwzrlov\",\"action\":\"Exclude\"}") - .toObject(FilteringTag.class); - Assertions.assertEquals("r", model.name()); - Assertions.assertEquals("djwzrlov", model.value()); - Assertions.assertEquals(TagAction.EXCLUDE, model.action()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FilteringTag model = new FilteringTag().withName("r").withValue("djwzrlov").withAction(TagAction.EXCLUDE); - model = BinaryData.fromObject(model).toObject(FilteringTag.class); - Assertions.assertEquals("r", model.name()); - Assertions.assertEquals("djwzrlov", model.value()); - Assertions.assertEquals(TagAction.EXCLUDE, model.action()); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/IdentityPropertiesTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/IdentityPropertiesTests.java deleted file mode 100644 index d91f2721a52a..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/IdentityPropertiesTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.elastic.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.elastic.models.IdentityProperties; -import com.azure.resourcemanager.elastic.models.ManagedIdentityTypes; -import org.junit.jupiter.api.Assertions; - -public final class IdentityPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IdentityProperties model = - BinaryData - .fromString( - "{\"principalId\":\"kbasyypn\",\"tenantId\":\"hsgcbacphejkot\",\"type\":\"SystemAssigned\"}") - .toObject(IdentityProperties.class); - Assertions.assertEquals(ManagedIdentityTypes.SYSTEM_ASSIGNED, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IdentityProperties model = new IdentityProperties().withType(ManagedIdentityTypes.SYSTEM_ASSIGNED); - model = BinaryData.fromObject(model).toObject(IdentityProperties.class); - Assertions.assertEquals(ManagedIdentityTypes.SYSTEM_ASSIGNED, model.type()); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ListAssociatedTrafficFiltersListWithResponseMockTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ListAssociatedTrafficFiltersListWithResponseMockTests.java deleted file mode 100644 index 880035e412eb..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ListAssociatedTrafficFiltersListWithResponseMockTests.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.elastic.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.elastic.ElasticManager; -import com.azure.resourcemanager.elastic.models.ElasticTrafficFilterResponse; -import com.azure.resourcemanager.elastic.models.Type; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ListAssociatedTrafficFiltersListWithResponseMockTests { - @Test - public void testListWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"rulesets\":[{\"id\":\"hxw\",\"name\":\"tyq\",\"description\":\"lbbovplw\",\"region\":\"hvgyuguosvmk\",\"type\":\"ip\",\"includeByDefault\":false,\"rules\":[]}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ElasticManager manager = - ElasticManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ElasticTrafficFilterResponse response = - manager - .listAssociatedTrafficFilters() - .listWithResponse("ytxhp", "xbzpfzab", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("hxw", response.rulesets().get(0).id()); - Assertions.assertEquals("tyq", response.rulesets().get(0).name()); - Assertions.assertEquals("lbbovplw", response.rulesets().get(0).description()); - Assertions.assertEquals("hvgyuguosvmk", response.rulesets().get(0).region()); - Assertions.assertEquals(Type.IP, response.rulesets().get(0).type()); - Assertions.assertEquals(false, response.rulesets().get(0).includeByDefault()); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/LogRulesTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/LogRulesTests.java deleted file mode 100644 index 30060683b647..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/LogRulesTests.java +++ /dev/null @@ -1,47 +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.elastic.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.elastic.models.FilteringTag; -import com.azure.resourcemanager.elastic.models.LogRules; -import com.azure.resourcemanager.elastic.models.TagAction; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class LogRulesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LogRules model = - BinaryData - .fromString( - "{\"sendAadLogs\":true,\"sendSubscriptionLogs\":true,\"sendActivityLogs\":true,\"filteringTags\":[{\"name\":\"stxgc\",\"value\":\"dg\",\"action\":\"Exclude\"}]}") - .toObject(LogRules.class); - Assertions.assertEquals(true, model.sendAadLogs()); - Assertions.assertEquals(true, model.sendSubscriptionLogs()); - Assertions.assertEquals(true, model.sendActivityLogs()); - Assertions.assertEquals("stxgc", model.filteringTags().get(0).name()); - Assertions.assertEquals("dg", model.filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.EXCLUDE, model.filteringTags().get(0).action()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LogRules model = - new LogRules() - .withSendAadLogs(true) - .withSendSubscriptionLogs(true) - .withSendActivityLogs(true) - .withFilteringTags( - Arrays.asList(new FilteringTag().withName("stxgc").withValue("dg").withAction(TagAction.EXCLUDE))); - model = BinaryData.fromObject(model).toObject(LogRules.class); - Assertions.assertEquals(true, model.sendAadLogs()); - Assertions.assertEquals(true, model.sendSubscriptionLogs()); - Assertions.assertEquals(true, model.sendActivityLogs()); - Assertions.assertEquals("stxgc", model.filteringTags().get(0).name()); - Assertions.assertEquals("dg", model.filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.EXCLUDE, model.filteringTags().get(0).action()); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/MarketplaceSaaSInfoMarketplaceSubscriptionTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/MarketplaceSaaSInfoMarketplaceSubscriptionTests.java deleted file mode 100644 index 838fbefab847..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/MarketplaceSaaSInfoMarketplaceSubscriptionTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.elastic.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.elastic.models.MarketplaceSaaSInfoMarketplaceSubscription; -import org.junit.jupiter.api.Assertions; - -public final class MarketplaceSaaSInfoMarketplaceSubscriptionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MarketplaceSaaSInfoMarketplaceSubscription model = - BinaryData.fromString("{\"id\":\"xmnteiwaop\"}").toObject(MarketplaceSaaSInfoMarketplaceSubscription.class); - Assertions.assertEquals("xmnteiwaop", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MarketplaceSaaSInfoMarketplaceSubscription model = - new MarketplaceSaaSInfoMarketplaceSubscription().withId("xmnteiwaop"); - model = BinaryData.fromObject(model).toObject(MarketplaceSaaSInfoMarketplaceSubscription.class); - Assertions.assertEquals("xmnteiwaop", model.id()); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/MarketplaceSaaSInfoTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/MarketplaceSaaSInfoTests.java deleted file mode 100644 index aad573be0132..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/MarketplaceSaaSInfoTests.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.elastic.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.elastic.models.MarketplaceSaaSInfo; -import com.azure.resourcemanager.elastic.models.MarketplaceSaaSInfoMarketplaceSubscription; -import org.junit.jupiter.api.Assertions; - -public final class MarketplaceSaaSInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MarketplaceSaaSInfo model = - BinaryData - .fromString( - "{\"marketplaceSubscription\":{\"id\":\"fidfvzw\"},\"marketplaceName\":\"uht\",\"marketplaceResourceId\":\"wisdkft\"}") - .toObject(MarketplaceSaaSInfo.class); - Assertions.assertEquals("fidfvzw", model.marketplaceSubscription().id()); - Assertions.assertEquals("uht", model.marketplaceName()); - Assertions.assertEquals("wisdkft", model.marketplaceResourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MarketplaceSaaSInfo model = - new MarketplaceSaaSInfo() - .withMarketplaceSubscription(new MarketplaceSaaSInfoMarketplaceSubscription().withId("fidfvzw")) - .withMarketplaceName("uht") - .withMarketplaceResourceId("wisdkft"); - model = BinaryData.fromObject(model).toObject(MarketplaceSaaSInfo.class); - Assertions.assertEquals("fidfvzw", model.marketplaceSubscription().id()); - Assertions.assertEquals("uht", model.marketplaceName()); - Assertions.assertEquals("wisdkft", model.marketplaceResourceId()); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/MonitoredResourceInnerTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/MonitoredResourceInnerTests.java deleted file mode 100644 index 08254b75a52a..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/MonitoredResourceInnerTests.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.elastic.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.elastic.fluent.models.MonitoredResourceInner; -import com.azure.resourcemanager.elastic.models.SendingLogs; -import org.junit.jupiter.api.Assertions; - -public final class MonitoredResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitoredResourceInner model = - BinaryData - .fromString("{\"id\":\"kujysvlejuvfq\",\"sendingLogs\":\"False\",\"reasonForLogsStatus\":\"yxwjkcp\"}") - .toObject(MonitoredResourceInner.class); - Assertions.assertEquals("kujysvlejuvfq", model.id()); - Assertions.assertEquals(SendingLogs.FALSE, model.sendingLogs()); - Assertions.assertEquals("yxwjkcp", model.reasonForLogsStatus()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitoredResourceInner model = - new MonitoredResourceInner() - .withId("kujysvlejuvfq") - .withSendingLogs(SendingLogs.FALSE) - .withReasonForLogsStatus("yxwjkcp"); - model = BinaryData.fromObject(model).toObject(MonitoredResourceInner.class); - Assertions.assertEquals("kujysvlejuvfq", model.id()); - Assertions.assertEquals(SendingLogs.FALSE, model.sendingLogs()); - Assertions.assertEquals("yxwjkcp", model.reasonForLogsStatus()); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/MonitoredResourceListResponseTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/MonitoredResourceListResponseTests.java deleted file mode 100644 index a69edf32facd..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/MonitoredResourceListResponseTests.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.elastic.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.elastic.fluent.models.MonitoredResourceInner; -import com.azure.resourcemanager.elastic.models.MonitoredResourceListResponse; -import com.azure.resourcemanager.elastic.models.SendingLogs; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MonitoredResourceListResponseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitoredResourceListResponse model = - BinaryData - .fromString( - "{\"value\":[{\"id\":\"fpfpsalgbquxigj\",\"sendingLogs\":\"False\",\"reasonForLogsStatus\":\"jaoyfhrtx\"}],\"nextLink\":\"n\"}") - .toObject(MonitoredResourceListResponse.class); - Assertions.assertEquals("fpfpsalgbquxigj", model.value().get(0).id()); - Assertions.assertEquals(SendingLogs.FALSE, model.value().get(0).sendingLogs()); - Assertions.assertEquals("jaoyfhrtx", model.value().get(0).reasonForLogsStatus()); - Assertions.assertEquals("n", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitoredResourceListResponse model = - new MonitoredResourceListResponse() - .withValue( - Arrays - .asList( - new MonitoredResourceInner() - .withId("fpfpsalgbquxigj") - .withSendingLogs(SendingLogs.FALSE) - .withReasonForLogsStatus("jaoyfhrtx"))) - .withNextLink("n"); - model = BinaryData.fromObject(model).toObject(MonitoredResourceListResponse.class); - Assertions.assertEquals("fpfpsalgbquxigj", model.value().get(0).id()); - Assertions.assertEquals(SendingLogs.FALSE, model.value().get(0).sendingLogs()); - Assertions.assertEquals("jaoyfhrtx", model.value().get(0).reasonForLogsStatus()); - Assertions.assertEquals("n", model.nextLink()); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/MonitoredResourcesListMockTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/MonitoredResourcesListMockTests.java deleted file mode 100644 index 0c7342754d43..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/MonitoredResourcesListMockTests.java +++ /dev/null @@ -1,70 +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.elastic.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.elastic.ElasticManager; -import com.azure.resourcemanager.elastic.models.MonitoredResource; -import com.azure.resourcemanager.elastic.models.SendingLogs; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class MonitoredResourcesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"value\":[{\"id\":\"e\",\"sendingLogs\":\"False\",\"reasonForLogsStatus\":\"npc\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ElasticManager manager = - ElasticManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.monitoredResources().list("xieduugidyjrr", "byao", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("e", response.iterator().next().id()); - Assertions.assertEquals(SendingLogs.FALSE, response.iterator().next().sendingLogs()); - Assertions.assertEquals("npc", response.iterator().next().reasonForLogsStatus()); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/MonitoringTagRulesInnerTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/MonitoringTagRulesInnerTests.java deleted file mode 100644 index 03c7f757d8c9..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/MonitoringTagRulesInnerTests.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.elastic.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.elastic.fluent.models.MonitoringTagRulesInner; -import com.azure.resourcemanager.elastic.models.LogRules; -import com.azure.resourcemanager.elastic.models.MonitoringTagRulesProperties; -import com.azure.resourcemanager.elastic.models.ProvisioningState; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MonitoringTagRulesInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitoringTagRulesInner model = - BinaryData - .fromString( - "{\"properties\":{\"provisioningState\":\"Accepted\",\"logRules\":{\"sendAadLogs\":false,\"sendSubscriptionLogs\":false,\"sendActivityLogs\":false,\"filteringTags\":[]}},\"id\":\"cjxvsnbyxqab\",\"name\":\"mocpc\",\"type\":\"shurzafbljjgpbto\"}") - .toObject(MonitoringTagRulesInner.class); - Assertions.assertEquals(ProvisioningState.ACCEPTED, model.properties().provisioningState()); - Assertions.assertEquals(false, model.properties().logRules().sendAadLogs()); - Assertions.assertEquals(false, model.properties().logRules().sendSubscriptionLogs()); - Assertions.assertEquals(false, model.properties().logRules().sendActivityLogs()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitoringTagRulesInner model = - new MonitoringTagRulesInner() - .withProperties( - new MonitoringTagRulesProperties() - .withProvisioningState(ProvisioningState.ACCEPTED) - .withLogRules( - new LogRules() - .withSendAadLogs(false) - .withSendSubscriptionLogs(false) - .withSendActivityLogs(false) - .withFilteringTags(Arrays.asList()))); - model = BinaryData.fromObject(model).toObject(MonitoringTagRulesInner.class); - Assertions.assertEquals(ProvisioningState.ACCEPTED, model.properties().provisioningState()); - Assertions.assertEquals(false, model.properties().logRules().sendAadLogs()); - Assertions.assertEquals(false, model.properties().logRules().sendSubscriptionLogs()); - Assertions.assertEquals(false, model.properties().logRules().sendActivityLogs()); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/MonitoringTagRulesListResponseTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/MonitoringTagRulesListResponseTests.java deleted file mode 100644 index 9dc0749412a3..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/MonitoringTagRulesListResponseTests.java +++ /dev/null @@ -1,47 +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.elastic.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.elastic.fluent.models.MonitoringTagRulesInner; -import com.azure.resourcemanager.elastic.models.MonitoringTagRulesListResponse; -import com.azure.resourcemanager.elastic.models.MonitoringTagRulesProperties; -import com.azure.resourcemanager.elastic.models.ProvisioningState; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MonitoringTagRulesListResponseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitoringTagRulesListResponse model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"NotSpecified\"},\"id\":\"chboosflnrosf\",\"name\":\"pteehzzv\",\"type\":\"pyqr\"},{\"properties\":{\"provisioningState\":\"Updating\"},\"id\":\"vswjdk\",\"name\":\"rsoodqxhcrmnoh\",\"type\":\"t\"}],\"nextLink\":\"whdsoifiyip\"}") - .toObject(MonitoringTagRulesListResponse.class); - Assertions.assertEquals(ProvisioningState.NOT_SPECIFIED, model.value().get(0).properties().provisioningState()); - Assertions.assertEquals("whdsoifiyip", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitoringTagRulesListResponse model = - new MonitoringTagRulesListResponse() - .withValue( - Arrays - .asList( - new MonitoringTagRulesInner() - .withProperties( - new MonitoringTagRulesProperties() - .withProvisioningState(ProvisioningState.NOT_SPECIFIED)), - new MonitoringTagRulesInner() - .withProperties( - new MonitoringTagRulesProperties() - .withProvisioningState(ProvisioningState.UPDATING)))) - .withNextLink("whdsoifiyip"); - model = BinaryData.fromObject(model).toObject(MonitoringTagRulesListResponse.class); - Assertions.assertEquals(ProvisioningState.NOT_SPECIFIED, model.value().get(0).properties().provisioningState()); - Assertions.assertEquals("whdsoifiyip", model.nextLink()); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/MonitoringTagRulesPropertiesTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/MonitoringTagRulesPropertiesTests.java deleted file mode 100644 index d0717926eb44..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/MonitoringTagRulesPropertiesTests.java +++ /dev/null @@ -1,67 +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.elastic.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.elastic.models.FilteringTag; -import com.azure.resourcemanager.elastic.models.LogRules; -import com.azure.resourcemanager.elastic.models.MonitoringTagRulesProperties; -import com.azure.resourcemanager.elastic.models.ProvisioningState; -import com.azure.resourcemanager.elastic.models.TagAction; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MonitoringTagRulesPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitoringTagRulesProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"Deleting\",\"logRules\":{\"sendAadLogs\":false,\"sendSubscriptionLogs\":false,\"sendActivityLogs\":false,\"filteringTags\":[{\"name\":\"tqajzyulpkudjkrl\",\"value\":\"bzhfepgzgqexz\",\"action\":\"Include\"},{\"name\":\"scpai\",\"value\":\"hhbcsglummajtjao\",\"action\":\"Exclude\"},{\"name\":\"nbdxk\",\"value\":\"xo\",\"action\":\"Exclude\"}]}}") - .toObject(MonitoringTagRulesProperties.class); - Assertions.assertEquals(ProvisioningState.DELETING, model.provisioningState()); - Assertions.assertEquals(false, model.logRules().sendAadLogs()); - Assertions.assertEquals(false, model.logRules().sendSubscriptionLogs()); - Assertions.assertEquals(false, model.logRules().sendActivityLogs()); - Assertions.assertEquals("tqajzyulpkudjkrl", model.logRules().filteringTags().get(0).name()); - Assertions.assertEquals("bzhfepgzgqexz", model.logRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.INCLUDE, model.logRules().filteringTags().get(0).action()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitoringTagRulesProperties model = - new MonitoringTagRulesProperties() - .withProvisioningState(ProvisioningState.DELETING) - .withLogRules( - new LogRules() - .withSendAadLogs(false) - .withSendSubscriptionLogs(false) - .withSendActivityLogs(false) - .withFilteringTags( - Arrays - .asList( - new FilteringTag() - .withName("tqajzyulpkudjkrl") - .withValue("bzhfepgzgqexz") - .withAction(TagAction.INCLUDE), - new FilteringTag() - .withName("scpai") - .withValue("hhbcsglummajtjao") - .withAction(TagAction.EXCLUDE), - new FilteringTag() - .withName("nbdxk") - .withValue("xo") - .withAction(TagAction.EXCLUDE)))); - model = BinaryData.fromObject(model).toObject(MonitoringTagRulesProperties.class); - Assertions.assertEquals(ProvisioningState.DELETING, model.provisioningState()); - Assertions.assertEquals(false, model.logRules().sendAadLogs()); - Assertions.assertEquals(false, model.logRules().sendSubscriptionLogs()); - Assertions.assertEquals(false, model.logRules().sendActivityLogs()); - Assertions.assertEquals("tqajzyulpkudjkrl", model.logRules().filteringTags().get(0).name()); - Assertions.assertEquals("bzhfepgzgqexz", model.logRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.INCLUDE, model.logRules().filteringTags().get(0).action()); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/MonitorsDeleteMockTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/MonitorsDeleteMockTests.java deleted file mode 100644 index 9ae8957b3d82..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/MonitorsDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.elastic.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.elastic.ElasticManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class MonitorsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ElasticManager manager = - ElasticManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.monitors().delete("ys", "kiiuxhqyudxor", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/OperationDisplayTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/OperationDisplayTests.java deleted file mode 100644 index f5416a7ac635..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/OperationDisplayTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.elastic.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.elastic.models.OperationDisplay; -import org.junit.jupiter.api.Assertions; - -public final class OperationDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDisplay model = - BinaryData - .fromString( - "{\"provider\":\"cryuan\",\"resource\":\"uxzdxtay\",\"operation\":\"hmwhfpmrqo\",\"description\":\"tu\"}") - .toObject(OperationDisplay.class); - Assertions.assertEquals("cryuan", model.provider()); - Assertions.assertEquals("uxzdxtay", model.resource()); - Assertions.assertEquals("hmwhfpmrqo", model.operation()); - Assertions.assertEquals("tu", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = - new OperationDisplay() - .withProvider("cryuan") - .withResource("uxzdxtay") - .withOperation("hmwhfpmrqo") - .withDescription("tu"); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - Assertions.assertEquals("cryuan", model.provider()); - Assertions.assertEquals("uxzdxtay", model.resource()); - Assertions.assertEquals("hmwhfpmrqo", model.operation()); - Assertions.assertEquals("tu", model.description()); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/OperationListResultTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/OperationListResultTests.java deleted file mode 100644 index fbeeda9a2bf4..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/OperationListResultTests.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.elastic.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.elastic.fluent.models.OperationResultInner; -import com.azure.resourcemanager.elastic.models.OperationDisplay; -import com.azure.resourcemanager.elastic.models.OperationListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationListResult model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"quvgjxpybczme\",\"isDataAction\":true,\"display\":{\"provider\":\"pbsphrupidgs\",\"resource\":\"bejhphoycmsxa\",\"operation\":\"hdxbmtqio\",\"description\":\"zehtbmu\"},\"origin\":\"ownoizhw\"},{\"name\":\"xybqsoqij\",\"isDataAction\":true,\"display\":{\"provider\":\"pazlobcufpdz\",\"resource\":\"btcqq\",\"operation\":\"qglhq\",\"description\":\"ufo\"},\"origin\":\"jywif\"},{\"name\":\"esaagdfm\",\"isDataAction\":true,\"display\":{\"provider\":\"j\",\"resource\":\"ifkwmrvktsizntoc\",\"operation\":\"a\",\"description\":\"ajpsquc\"},\"origin\":\"o\"}],\"nextLink\":\"dkfo\"}") - .toObject(OperationListResult.class); - Assertions.assertEquals("quvgjxpybczme", model.value().get(0).name()); - Assertions.assertEquals(true, model.value().get(0).isDataAction()); - Assertions.assertEquals("pbsphrupidgs", model.value().get(0).display().provider()); - Assertions.assertEquals("bejhphoycmsxa", model.value().get(0).display().resource()); - Assertions.assertEquals("hdxbmtqio", model.value().get(0).display().operation()); - Assertions.assertEquals("zehtbmu", model.value().get(0).display().description()); - Assertions.assertEquals("ownoizhw", model.value().get(0).origin()); - Assertions.assertEquals("dkfo", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationListResult model = - new OperationListResult() - .withValue( - Arrays - .asList( - new OperationResultInner() - .withName("quvgjxpybczme") - .withIsDataAction(true) - .withDisplay( - new OperationDisplay() - .withProvider("pbsphrupidgs") - .withResource("bejhphoycmsxa") - .withOperation("hdxbmtqio") - .withDescription("zehtbmu")) - .withOrigin("ownoizhw"), - new OperationResultInner() - .withName("xybqsoqij") - .withIsDataAction(true) - .withDisplay( - new OperationDisplay() - .withProvider("pazlobcufpdz") - .withResource("btcqq") - .withOperation("qglhq") - .withDescription("ufo")) - .withOrigin("jywif"), - new OperationResultInner() - .withName("esaagdfm") - .withIsDataAction(true) - .withDisplay( - new OperationDisplay() - .withProvider("j") - .withResource("ifkwmrvktsizntoc") - .withOperation("a") - .withDescription("ajpsquc")) - .withOrigin("o"))) - .withNextLink("dkfo"); - model = BinaryData.fromObject(model).toObject(OperationListResult.class); - Assertions.assertEquals("quvgjxpybczme", model.value().get(0).name()); - Assertions.assertEquals(true, model.value().get(0).isDataAction()); - Assertions.assertEquals("pbsphrupidgs", model.value().get(0).display().provider()); - Assertions.assertEquals("bejhphoycmsxa", model.value().get(0).display().resource()); - Assertions.assertEquals("hdxbmtqio", model.value().get(0).display().operation()); - Assertions.assertEquals("zehtbmu", model.value().get(0).display().description()); - Assertions.assertEquals("ownoizhw", model.value().get(0).origin()); - Assertions.assertEquals("dkfo", model.nextLink()); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/OperationResultInnerTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/OperationResultInnerTests.java deleted file mode 100644 index 49a15086609d..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/OperationResultInnerTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.elastic.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.elastic.fluent.models.OperationResultInner; -import com.azure.resourcemanager.elastic.models.OperationDisplay; -import org.junit.jupiter.api.Assertions; - -public final class OperationResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationResultInner model = - BinaryData - .fromString( - "{\"name\":\"nygj\",\"isDataAction\":true,\"display\":{\"provider\":\"eqsrdeupewnwreit\",\"resource\":\"yflusarhmofc\",\"operation\":\"smy\",\"description\":\"kdtmlxhekuk\"},\"origin\":\"txukcdmp\"}") - .toObject(OperationResultInner.class); - Assertions.assertEquals("nygj", model.name()); - Assertions.assertEquals(true, model.isDataAction()); - Assertions.assertEquals("eqsrdeupewnwreit", model.display().provider()); - Assertions.assertEquals("yflusarhmofc", model.display().resource()); - Assertions.assertEquals("smy", model.display().operation()); - Assertions.assertEquals("kdtmlxhekuk", model.display().description()); - Assertions.assertEquals("txukcdmp", model.origin()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationResultInner model = - new OperationResultInner() - .withName("nygj") - .withIsDataAction(true) - .withDisplay( - new OperationDisplay() - .withProvider("eqsrdeupewnwreit") - .withResource("yflusarhmofc") - .withOperation("smy") - .withDescription("kdtmlxhekuk")) - .withOrigin("txukcdmp"); - model = BinaryData.fromObject(model).toObject(OperationResultInner.class); - Assertions.assertEquals("nygj", model.name()); - Assertions.assertEquals(true, model.isDataAction()); - Assertions.assertEquals("eqsrdeupewnwreit", model.display().provider()); - Assertions.assertEquals("yflusarhmofc", model.display().resource()); - Assertions.assertEquals("smy", model.display().operation()); - Assertions.assertEquals("kdtmlxhekuk", model.display().description()); - Assertions.assertEquals("txukcdmp", model.origin()); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/OperationsListMockTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/OperationsListMockTests.java deleted file mode 100644 index 4a1526801092..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/OperationsListMockTests.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.elastic.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.elastic.ElasticManager; -import com.azure.resourcemanager.elastic.models.OperationResult; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class OperationsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"name\":\"umasxazjpq\",\"isDataAction\":false,\"display\":{\"provider\":\"lhbxxhejjzzvdud\",\"resource\":\"dslfhotwmcy\",\"operation\":\"wlbjnpgacftade\",\"description\":\"nltyfsoppusuesnz\"},\"origin\":\"ej\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ElasticManager manager = - ElasticManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("umasxazjpq", response.iterator().next().name()); - Assertions.assertEquals(false, response.iterator().next().isDataAction()); - Assertions.assertEquals("lhbxxhejjzzvdud", response.iterator().next().display().provider()); - Assertions.assertEquals("dslfhotwmcy", response.iterator().next().display().resource()); - Assertions.assertEquals("wlbjnpgacftade", response.iterator().next().display().operation()); - Assertions.assertEquals("nltyfsoppusuesnz", response.iterator().next().display().description()); - Assertions.assertEquals("ej", response.iterator().next().origin()); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ResourceSkuTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ResourceSkuTests.java deleted file mode 100644 index 74f41f11c101..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/ResourceSkuTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.elastic.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.elastic.models.ResourceSku; -import org.junit.jupiter.api.Assertions; - -public final class ResourceSkuTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceSku model = BinaryData.fromString("{\"name\":\"joxzjnchgejspodm\"}").toObject(ResourceSku.class); - Assertions.assertEquals("joxzjnchgejspodm", model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceSku model = new ResourceSku().withName("joxzjnchgejspodm"); - model = BinaryData.fromObject(model).toObject(ResourceSku.class); - Assertions.assertEquals("joxzjnchgejspodm", model.name()); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/TagRulesCreateOrUpdateWithResponseMockTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/TagRulesCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 882fd2ef75bd..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/TagRulesCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,87 +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.elastic.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.elastic.ElasticManager; -import com.azure.resourcemanager.elastic.models.LogRules; -import com.azure.resourcemanager.elastic.models.MonitoringTagRules; -import com.azure.resourcemanager.elastic.models.MonitoringTagRulesProperties; -import com.azure.resourcemanager.elastic.models.ProvisioningState; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class TagRulesCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Creating\",\"logRules\":{\"sendAadLogs\":true,\"sendSubscriptionLogs\":true,\"sendActivityLogs\":false,\"filteringTags\":[]}},\"id\":\"fvjrbirphxepcy\",\"name\":\"ahfn\",\"type\":\"jky\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ElasticManager manager = - ElasticManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - MonitoringTagRules response = - manager - .tagRules() - .define("senhwlrs") - .withExistingMonitor("uconuqszfkbey", "ewrmjmwvvjektc") - .withProperties( - new MonitoringTagRulesProperties() - .withProvisioningState(ProvisioningState.ACCEPTED) - .withLogRules( - new LogRules() - .withSendAadLogs(false) - .withSendSubscriptionLogs(false) - .withSendActivityLogs(false) - .withFilteringTags(Arrays.asList()))) - .create(); - - Assertions.assertEquals(ProvisioningState.CREATING, response.properties().provisioningState()); - Assertions.assertEquals(true, response.properties().logRules().sendAadLogs()); - Assertions.assertEquals(true, response.properties().logRules().sendSubscriptionLogs()); - Assertions.assertEquals(false, response.properties().logRules().sendActivityLogs()); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/TagRulesDeleteMockTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/TagRulesDeleteMockTests.java deleted file mode 100644 index 551742b4cfc3..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/TagRulesDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.elastic.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.elastic.ElasticManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class TagRulesDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ElasticManager manager = - ElasticManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.tagRules().delete("yxzk", "noc", "koklya", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/TagRulesGetWithResponseMockTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/TagRulesGetWithResponseMockTests.java deleted file mode 100644 index ba2782fb2dac..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/TagRulesGetWithResponseMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.elastic.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.elastic.ElasticManager; -import com.azure.resourcemanager.elastic.models.MonitoringTagRules; -import com.azure.resourcemanager.elastic.models.ProvisioningState; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class TagRulesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"logRules\":{\"sendAadLogs\":false,\"sendSubscriptionLogs\":true,\"sendActivityLogs\":true,\"filteringTags\":[]}},\"id\":\"lwh\",\"name\":\"lsicohoqqnwv\",\"type\":\"ryavwhheunmmqh\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ElasticManager manager = - ElasticManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - MonitoringTagRules response = - manager - .tagRules() - .getWithResponse("kix", "bin", "eputtmrywnuzoqf", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(ProvisioningState.SUCCEEDED, response.properties().provisioningState()); - Assertions.assertEquals(false, response.properties().logRules().sendAadLogs()); - Assertions.assertEquals(true, response.properties().logRules().sendSubscriptionLogs()); - Assertions.assertEquals(true, response.properties().logRules().sendActivityLogs()); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/TagRulesListMockTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/TagRulesListMockTests.java deleted file mode 100644 index f2d0c4a3d314..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/TagRulesListMockTests.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.elastic.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.elastic.ElasticManager; -import com.azure.resourcemanager.elastic.models.MonitoringTagRules; -import com.azure.resourcemanager.elastic.models.ProvisioningState; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class TagRulesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"NotSpecified\",\"logRules\":{\"sendAadLogs\":false,\"sendSubscriptionLogs\":true,\"sendActivityLogs\":true,\"filteringTags\":[]}},\"id\":\"eamdp\",\"name\":\"agalpbuxwgipwhon\",\"type\":\"wkgshwa\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ElasticManager manager = - ElasticManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.tagRules().list("cwif", "jttgzf", com.azure.core.util.Context.NONE); - - Assertions - .assertEquals(ProvisioningState.NOT_SPECIFIED, response.iterator().next().properties().provisioningState()); - Assertions.assertEquals(false, response.iterator().next().properties().logRules().sendAadLogs()); - Assertions.assertEquals(true, response.iterator().next().properties().logRules().sendSubscriptionLogs()); - Assertions.assertEquals(true, response.iterator().next().properties().logRules().sendActivityLogs()); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/TrafficFiltersDeleteWithResponseMockTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/TrafficFiltersDeleteWithResponseMockTests.java deleted file mode 100644 index 54a7e0dea984..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/TrafficFiltersDeleteWithResponseMockTests.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.elastic.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.elastic.ElasticManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class TrafficFiltersDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ElasticManager manager = - ElasticManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .trafficFilters() - .deleteWithResponse("cwsvlxotog", "wrupqsxvnmicykvc", "o", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/UpgradableVersionsDetailsWithResponseMockTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/UpgradableVersionsDetailsWithResponseMockTests.java deleted file mode 100644 index f7d15620e1a0..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/UpgradableVersionsDetailsWithResponseMockTests.java +++ /dev/null @@ -1,70 +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.elastic.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.elastic.ElasticManager; -import com.azure.resourcemanager.elastic.models.UpgradableVersionsList; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class UpgradableVersionsDetailsWithResponseMockTests { - @Test - public void testDetailsWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"currentVersion\":\"gvtqagnbuynh\",\"upgradableVersions\":[\"gmebfsiarbutrcv\"]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ElasticManager manager = - ElasticManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - UpgradableVersionsList response = - manager - .upgradableVersions() - .detailsWithResponse("y", "hibnuqqkpika", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("gvtqagnbuynh", response.currentVersion()); - Assertions.assertEquals("gmebfsiarbutrcv", response.upgradableVersions().get(0)); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/UpgradableVersionsListInnerTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/UpgradableVersionsListInnerTests.java deleted file mode 100644 index 31183f882ead..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/UpgradableVersionsListInnerTests.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.elastic.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.elastic.fluent.models.UpgradableVersionsListInner; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class UpgradableVersionsListInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpgradableVersionsListInner model = - BinaryData - .fromString("{\"currentVersion\":\"eic\",\"upgradableVersions\":[\"npzaoq\"]}") - .toObject(UpgradableVersionsListInner.class); - Assertions.assertEquals("eic", model.currentVersion()); - Assertions.assertEquals("npzaoq", model.upgradableVersions().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpgradableVersionsListInner model = - new UpgradableVersionsListInner().withCurrentVersion("eic").withUpgradableVersions(Arrays.asList("npzaoq")); - model = BinaryData.fromObject(model).toObject(UpgradableVersionsListInner.class); - Assertions.assertEquals("eic", model.currentVersion()); - Assertions.assertEquals("npzaoq", model.upgradableVersions().get(0)); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/UserEmailIdTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/UserEmailIdTests.java deleted file mode 100644 index 77bd89ed1e9c..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/UserEmailIdTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.elastic.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.elastic.models.UserEmailId; -import org.junit.jupiter.api.Assertions; - -public final class UserEmailIdTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserEmailId model = BinaryData.fromString("{\"emailId\":\"rxnjeaseipheofl\"}").toObject(UserEmailId.class); - Assertions.assertEquals("rxnjeaseipheofl", model.emailId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserEmailId model = new UserEmailId().withEmailId("rxnjeaseipheofl"); - model = BinaryData.fromObject(model).toObject(UserEmailId.class); - Assertions.assertEquals("rxnjeaseipheofl", model.emailId()); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/UserInfoTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/UserInfoTests.java deleted file mode 100644 index ba4a3f5e5770..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/UserInfoTests.java +++ /dev/null @@ -1,57 +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.elastic.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.elastic.models.CompanyInfo; -import com.azure.resourcemanager.elastic.models.UserInfo; -import org.junit.jupiter.api.Assertions; - -public final class UserInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserInfo model = - BinaryData - .fromString( - "{\"firstName\":\"fmppe\",\"lastName\":\"vmgxsab\",\"companyName\":\"qduujitcjczdz\",\"emailAddress\":\"ndhkrw\",\"companyInfo\":{\"domain\":\"ppdsbdkvwrwj\",\"business\":\"usnhutje\",\"employeesNumber\":\"mrldhu\",\"state\":\"zzd\",\"country\":\"qxhocdgeablgphut\"}}") - .toObject(UserInfo.class); - Assertions.assertEquals("fmppe", model.firstName()); - Assertions.assertEquals("vmgxsab", model.lastName()); - Assertions.assertEquals("qduujitcjczdz", model.companyName()); - Assertions.assertEquals("ndhkrw", model.emailAddress()); - Assertions.assertEquals("ppdsbdkvwrwj", model.companyInfo().domain()); - Assertions.assertEquals("usnhutje", model.companyInfo().business()); - Assertions.assertEquals("mrldhu", model.companyInfo().employeesNumber()); - Assertions.assertEquals("zzd", model.companyInfo().state()); - Assertions.assertEquals("qxhocdgeablgphut", model.companyInfo().country()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserInfo model = - new UserInfo() - .withFirstName("fmppe") - .withLastName("vmgxsab") - .withCompanyName("qduujitcjczdz") - .withEmailAddress("ndhkrw") - .withCompanyInfo( - new CompanyInfo() - .withDomain("ppdsbdkvwrwj") - .withBusiness("usnhutje") - .withEmployeesNumber("mrldhu") - .withState("zzd") - .withCountry("qxhocdgeablgphut")); - model = BinaryData.fromObject(model).toObject(UserInfo.class); - Assertions.assertEquals("fmppe", model.firstName()); - Assertions.assertEquals("vmgxsab", model.lastName()); - Assertions.assertEquals("qduujitcjczdz", model.companyName()); - Assertions.assertEquals("ndhkrw", model.emailAddress()); - Assertions.assertEquals("ppdsbdkvwrwj", model.companyInfo().domain()); - Assertions.assertEquals("usnhutje", model.companyInfo().business()); - Assertions.assertEquals("mrldhu", model.companyInfo().employeesNumber()); - Assertions.assertEquals("zzd", model.companyInfo().state()); - Assertions.assertEquals("qxhocdgeablgphut", model.companyInfo().country()); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/VMCollectionUpdateTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/VMCollectionUpdateTests.java deleted file mode 100644 index 5afac7463f52..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/VMCollectionUpdateTests.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.elastic.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.elastic.models.OperationName; -import com.azure.resourcemanager.elastic.models.VMCollectionUpdate; -import org.junit.jupiter.api.Assertions; - -public final class VMCollectionUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VMCollectionUpdate model = - BinaryData - .fromString("{\"vmResourceId\":\"nxqbzvddn\",\"operationName\":\"Add\"}") - .toObject(VMCollectionUpdate.class); - Assertions.assertEquals("nxqbzvddn", model.vmResourceId()); - Assertions.assertEquals(OperationName.ADD, model.operationName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VMCollectionUpdate model = - new VMCollectionUpdate().withVmResourceId("nxqbzvddn").withOperationName(OperationName.ADD); - model = BinaryData.fromObject(model).toObject(VMCollectionUpdate.class); - Assertions.assertEquals("nxqbzvddn", model.vmResourceId()); - Assertions.assertEquals(OperationName.ADD, model.operationName()); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/VMCollectionsUpdateWithResponseMockTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/VMCollectionsUpdateWithResponseMockTests.java deleted file mode 100644 index fd9f8e5903e8..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/VMCollectionsUpdateWithResponseMockTests.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.elastic.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.elastic.ElasticManager; -import com.azure.resourcemanager.elastic.models.OperationName; -import com.azure.resourcemanager.elastic.models.VMCollectionUpdate; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class VMCollectionsUpdateWithResponseMockTests { - @Test - public void testUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ElasticManager manager = - ElasticManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .vMCollections() - .updateWithResponse( - "gr", - "wflzlfbxzpuzy", - new VMCollectionUpdate().withVmResourceId("spnqzahmgkb").withOperationName(OperationName.DELETE), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/VMHostListResponseTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/VMHostListResponseTests.java deleted file mode 100644 index 0608238042ad..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/VMHostListResponseTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.elastic.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.elastic.fluent.models.VMResourcesInner; -import com.azure.resourcemanager.elastic.models.VMHostListResponse; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class VMHostListResponseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VMHostListResponse model = - BinaryData - .fromString( - "{\"value\":[{\"vmResourceId\":\"j\"},{\"vmResourceId\":\"ejctbzaqsqsycb\"}],\"nextLink\":\"fkgukdkexxppof\"}") - .toObject(VMHostListResponse.class); - Assertions.assertEquals("j", model.value().get(0).vmResourceId()); - Assertions.assertEquals("fkgukdkexxppof", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VMHostListResponse model = - new VMHostListResponse() - .withValue( - Arrays - .asList( - new VMResourcesInner().withVmResourceId("j"), - new VMResourcesInner().withVmResourceId("ejctbzaqsqsycb"))) - .withNextLink("fkgukdkexxppof"); - model = BinaryData.fromObject(model).toObject(VMHostListResponse.class); - Assertions.assertEquals("j", model.value().get(0).vmResourceId()); - Assertions.assertEquals("fkgukdkexxppof", model.nextLink()); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/VMHostsListMockTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/VMHostsListMockTests.java deleted file mode 100644 index 1093dc0be876..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/VMHostsListMockTests.java +++ /dev/null @@ -1,67 +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.elastic.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.elastic.ElasticManager; -import com.azure.resourcemanager.elastic.models.VMResources; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class VMHostsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"value\":[{\"vmResourceId\":\"ncghkje\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ElasticManager manager = - ElasticManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.vMHosts().list("xjvuujqgidokg", "ljyoxgvcltb", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ncghkje", response.iterator().next().vmResourceId()); - } -} diff --git a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/VMResourcesInnerTests.java b/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/VMResourcesInnerTests.java deleted file mode 100644 index b830eb857de9..000000000000 --- a/sdk/elastic/azure-resourcemanager-elastic/src/test/java/com/azure/resourcemanager/elastic/generated/VMResourcesInnerTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.elastic.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.elastic.fluent.models.VMResourcesInner; -import org.junit.jupiter.api.Assertions; - -public final class VMResourcesInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VMResourcesInner model = - BinaryData.fromString("{\"vmResourceId\":\"axcfjpgddtocjjx\"}").toObject(VMResourcesInner.class); - Assertions.assertEquals("axcfjpgddtocjjx", model.vmResourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VMResourcesInner model = new VMResourcesInner().withVmResourceId("axcfjpgddtocjjx"); - model = BinaryData.fromObject(model).toObject(VMResourcesInner.class); - Assertions.assertEquals("axcfjpgddtocjjx", model.vmResourceId()); - } -}