diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 174e3e0a2ddc9..6deaa2509490e 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -334,7 +334,7 @@ com.azure.resourcemanager:azure-resourcemanager-synapse;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-resourcehealth;1.0.0;1.1.0-beta.4 com.azure.resourcemanager:azure-resourcemanager-databricks;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-databoxedge;1.0.0;1.1.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-frontdoor;1.1.0;1.2.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-frontdoor;1.1.0;1.2.0 com.azure.resourcemanager:azure-resourcemanager-automation;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-resourcemover;1.2.0;1.3.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-datafactory;1.2.0;1.3.0-beta.2 diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/CHANGELOG.md b/sdk/frontdoor/azure-resourcemanager-frontdoor/CHANGELOG.md index 9611fad694b50..e5eb4c4b838ac 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/CHANGELOG.md +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/CHANGELOG.md @@ -1,14 +1,316 @@ # Release History -## 1.2.0-beta.1 (Unreleased) +## 1.2.0 (2026-09-14) -### Features Added +- Azure Resource Manager Front Door client library for Java. This package contains Microsoft Azure SDK for Front Door Management SDK. APIs to manage web application firewall rules. Package api-version 2026-04-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Breaking Changes -### Bugs Fixed +#### `models.RulesEngineListResult` was removed + +#### `models.WebApplicationFirewallPolicyList` was removed + +#### `models.FrontDoorListResult` was removed + +#### `models.ManagedRuleSetDefinitionList` was removed + +#### `models.ExperimentList` was removed + +#### `models.FrontendEndpointsListResult` was removed + +#### `models.PreconfiguredEndpointList` was removed + +#### `models.ProfileList` was removed + +#### `models.ValidateCustomDomainInput` was modified + +* `validate()` was removed + +#### `models.LatencyMetric` was modified + +* `LatencyMetric()` was changed to private access +* `validate()` was removed + +#### `models.HealthProbeSettingsModel` was modified + +* `validate()` was removed + +#### `models.CheckNameAvailabilityInput` was modified + +* `validate()` was removed + +#### `models.RoutingRuleUpdateParameters` was modified + +* `validate()` was removed + +#### `models.FrontendEndpointUpdateParameters` was modified + +* `validate()` was removed + +#### `models.ManagedRuleExclusion` was modified + +* `validate()` was removed + +#### `models.RoutingRuleLink` was modified + +* `RoutingRuleLink()` was changed to private access +* `validate()` was removed +* `withId(java.lang.String)` was removed + +#### `models.RulesEngineUpdateParameters` was modified + +* `validate()` was removed + +#### `models.BackendPoolUpdateParameters` was modified + +* `validate()` was removed + +#### `models.KeyVaultCertificateSourceParametersVault` was modified + +* `validate()` was removed + +#### `models.HealthProbeSettingsUpdateParameters` was modified + +* `validate()` was removed + +#### `models.CustomHttpsConfiguration` was modified + +* `validate()` was removed + +#### `models.ManagedRuleSetList` was modified + +* `validate()` was removed + +#### `models.FrontendEndpointLink` was modified + +* `FrontendEndpointLink()` was changed to private access +* `validate()` was removed +* `withId(java.lang.String)` was removed + +#### `models.ManagedRuleGroupDefinition` was modified + +* `ManagedRuleGroupDefinition()` was changed to private access +* `validate()` was removed + +#### `models.ProfileUpdateModel` was modified + +* `validate()` was removed + +#### `models.Backend` was modified + +* `validate()` was removed + +#### `models.RedirectConfiguration` was modified + +* `validate()` was removed + +#### `models.GroupByVariable` was modified + +* `validate()` was removed + +#### `models.RoutingRule` was modified + +* `validate()` was removed + +#### `models.CustomRuleList` was modified + +* `validate()` was removed + +#### `models.Sku` was modified + +* `validate()` was removed + +#### `models.ManagedRuleDefinition` was modified + +* `ManagedRuleDefinition()` was changed to private access +* `validate()` was removed + +#### `models.LoadBalancingSettingsUpdateParameters` was modified + +* `validate()` was removed + +#### `models.ManagedRuleSet` was modified + +* `validate()` was removed + +#### `models.TimeseriesDataPoint` was modified + +* `TimeseriesDataPoint()` was changed to private access +* `withDateTimeUtc(java.lang.String)` was removed +* `withValue(java.lang.Float)` was removed +* `validate()` was removed + +#### `models.FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink` was modified + +* `validate()` was removed + +#### `models.CacheConfiguration` was modified + +* `validate()` was removed + +#### `models.RulesEngineAction` was modified + +* `validate()` was removed + +#### `models.HeaderAction` was modified + +* `validate()` was removed + +#### `models.ManagedRuleGroupOverride` was modified + +* `validate()` was removed + +#### `models.PurgeParameters` was modified + +* `validate()` was removed + +#### `models.Endpoint` was modified + +* `validate()` was removed + +#### `models.WebApplicationFirewallScrubbingRules` was modified + +* `validate()` was removed + +#### `models.BackendPool` was modified + +* `validate()` was removed + +#### `models.MatchCondition` was modified + +* `validate()` was removed + +#### `models.CustomRule` was modified + +* `validate()` was removed + +#### `models.RouteConfiguration` was modified + +* `validate()` was removed + +#### `models.PolicySettings` was modified + +* `validate()` was removed + +#### `models.LoadBalancingSettingsModel` was modified + +* `validate()` was removed + +#### `models.RulesEngineRule` was modified + +* `validate()` was removed + +#### `models.ExperimentUpdateModel` was modified + +* `validate()` was removed + +#### `models.ManagedRuleOverride` was modified + +* `validate()` was removed + +#### `models.RulesEngineMatchCondition` was modified + +* `validate()` was removed + +#### `models.BackendPoolsSettings` was modified + +* `validate()` was removed + +#### `models.TagsObject` was modified + +* `validate()` was removed + +#### `models.SecurityPolicyLink` was modified + +* `SecurityPolicyLink()` was changed to private access +* `withId(java.lang.String)` was removed +* `validate()` was removed + +#### `models.ForwardingConfiguration` was modified + +* `validate()` was removed + +#### `models.FrontDoorUpdateParameters` was modified + +* `validate()` was removed + +#### `models.RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink` was modified + +* `validate()` was removed + +### Features Added + +* `models.ExceptionMatchVariable` was added + +* `models.ExceptionSelectorMatchOperator` was added + +* `models.ManagedRuleSetExceptionList` was added + +* `models.BasicResource` was added + +* `models.RuleGroupScope` was added + +* `models.ManagedRuleSetException` was added + +* `models.ManagedRuleSetScope` was added + +* `models.RuleScope` was added + +* `models.ParanoiaLevel` was added + +* `models.ResourcewithSettableName` was added + +* `models.ExceptionValueMatchOperator` was added + +* `models.SensitivityType` was added + +* `models.ManagedRuleSetStatus` was added + +* `models.BasicResourceWithSettableIDName` was added + +#### `models.ManagedRuleSetList` was modified + +* `withExceptionsList(models.ManagedRuleSetExceptionList)` was added +* `exceptionsList()` was added + +#### `models.ManagedRuleDefinition` was modified + +* `paranoiaLevel()` was added +* `defaultSensitivity()` was added + +#### `models.ManagedRuleSetDefinition` was modified + +* `displayName()` was added +* `status()` was added + +#### `models.ActionType` was modified + +* `CAPTCHA` was added + +#### `models.MatchVariable` was modified + +* `JA4` was added + +#### `models.VariableName` was modified + +* `ASN` was added +* `JA4` was added + +#### `models.PolicySettings` was modified + +* `captchaExpirationInMinutes()` was added +* `withCaptchaExpirationInMinutes(java.lang.Integer)` was added + +#### `models.Operator` was modified + +* `ASN_MATCH` was added +* `CLIENT_FINGERPRINT` was added +* `SERVICE_TAG_MATCH` was added + +#### `models.ManagedRuleOverride` was modified -### Other Changes +* `sensitivity()` was added +* `withSensitivity(models.SensitivityType)` was added ## 1.1.0 (2024-12-19) diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/README.md b/sdk/frontdoor/azure-resourcemanager-frontdoor/README.md index a6b65a83ed013..d05eaab05b18f 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/README.md +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/README.md @@ -1,8 +1,8 @@ -# Azure Resource Manager FrontDoor client library for Java +# Azure Resource Manager Front Door client library for Java -Azure Resource Manager FrontDoor client library for Java. +Azure Resource Manager Front Door client library for Java. -This package contains Microsoft Azure SDK for FrontDoor Management SDK. FrontDoor Client. Package tag package-2024-02. 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 Front Door Management SDK. APIs to manage web application firewall rules. Package api-version 2026-04-01. 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-frontdoor - 1.2.0-beta.1 + 1.2.0 ``` [//]: # ({x-version-update-end}) @@ -52,7 +52,7 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code: ```java -AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); +AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD); TokenCredential credential = new DefaultAzureCredentialBuilder() .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) .build(); @@ -60,7 +60,7 @@ FrontDoorManager manager = FrontDoorManager .authenticate(credential, profile); ``` -The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. +The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise. See [Authentication][authenticate] for more options. @@ -70,71 +70,6 @@ See [API design][design] for general introduction on design and key concepts on ## Examples -```java -StorageAccount storageAccount = storageManager.storageAccounts() - .define(saName) - .withRegion(REGION) - .withExistingResourceGroup(resourceGroupName) - .create(); - -String backendAddress = fdName + ".blob.core.windows.net"; -String frontendName = "frontend1"; -String loadBalancingName = "loadbalancing1"; -String healthProbeName = "healthprobe1"; -String routingRuleName = "rule1"; -String backendPoolName = "backend1"; -subscriptionId = ResourceId.fromString(storageAccount.id()).subscriptionId(); -String frontendEndpointsId = getResourceId("frontendEndpoints", frontendName); -String loadBalancingSettingsId = getResourceId("loadBalancingSettings", loadBalancingName); -String healthProbeSettingsId = getResourceId("healthProbeSettings", healthProbeName); -String backendPoolsId = getResourceId("backendPools", backendPoolName); - -FrontDoor frontDoor = manager.frontDoors() - .define(fdName) - .withRegion("global") - .withExistingResourceGroup(resourceGroupName) - .withFrontendEndpoints(Collections.singletonList(new FrontendEndpointInner().withName(frontendName) - .withHostname(fdName + ".azurefd.net") - .withSessionAffinityEnabledState(SessionAffinityEnabledState.DISABLED))) - .withBackendPools(Collections.singletonList(new BackendPool().withName(backendPoolName) - .withBackends(Collections.singletonList(new Backend().withAddress(backendAddress) - .withEnabledState(BackendEnabledState.ENABLED) - .withBackendHostHeader(backendAddress) - .withHttpPort(80) - .withHttpsPort(443) - .withPriority(1) - .withWeight(50))) - .withLoadBalancingSettings(new SubResource().withId(loadBalancingSettingsId)) - .withHealthProbeSettings(new SubResource().withId(healthProbeSettingsId)))) - .withLoadBalancingSettings( - Collections.singletonList(new LoadBalancingSettingsModel().withName(loadBalancingName) - .withSampleSize(4) - .withSuccessfulSamplesRequired(2) - .withAdditionalLatencyMilliseconds(0))) - .withHealthProbeSettings( - Collections.singletonList(new HealthProbeSettingsModel().withName(healthProbeName) - .withEnabledState(HealthProbeEnabled.ENABLED) - .withPath("/") - .withProtocol(FrontDoorProtocol.HTTPS) - .withHealthProbeMethod(FrontDoorHealthProbeMethod.HEAD) - .withIntervalInSeconds(30))) - .withRoutingRules(Collections.singletonList(new RoutingRule().withName(routingRuleName) - .withEnabledState(RoutingRuleEnabledState.ENABLED) - .withFrontendEndpoints(Collections.singletonList(new SubResource().withId(frontendEndpointsId))) - .withAcceptedProtocols(Arrays.asList(FrontDoorProtocol.HTTP, FrontDoorProtocol.HTTPS)) - .withPatternsToMatch(Collections.singletonList("/*")) - .withRouteConfiguration( - new ForwardingConfiguration().withForwardingProtocol(FrontDoorForwardingProtocol.HTTPS_ONLY) - .withBackendPool(new SubResource().withId(backendPoolsId))))) - .create(); -``` -```java -policy = frontDoorManager.policies() - .define(policyName) - .withRegion(REGION) - .withExistingResourceGroup(resourceGroupName) - .create(); -``` [Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/frontdoor/azure-resourcemanager-frontdoor/SAMPLE.md) @@ -165,5 +100,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md [coc]: https://opensource.microsoft.com/codeofconduct/ [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ - - diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/SAMPLE.md b/sdk/frontdoor/azure-resourcemanager-frontdoor/SAMPLE.md index 74de4d770075b..ce470bef64359 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/SAMPLE.md +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/SAMPLE.md @@ -85,8 +85,7 @@ import java.util.Arrays; */ public final class EndpointsPurgeContentSamples { /* - * x-ms-original-file: - * specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/FrontdoorPurgeContent.json + * x-ms-original-file: 2026-04-01/FrontdoorPurgeContent.json */ /** * Sample code: Purge content from Front Door. @@ -113,8 +112,7 @@ import com.azure.resourcemanager.frontdoor.models.State; */ public final class ExperimentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/ - * NetworkExperimentCreateExperiment.json + * x-ms-original-file: 2026-04-01/NetworkExperimentCreateExperiment.json */ /** * Sample code: Creates an Experiment. @@ -143,8 +141,7 @@ public final class ExperimentsCreateOrUpdateSamples { */ public final class ExperimentsDeleteSamples { /* - * x-ms-original-file: specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/ - * NetworkExperimentDeleteExperiment.json + * x-ms-original-file: 2026-04-01/NetworkExperimentDeleteExperiment.json */ /** * Sample code: Deletes an Experiment. @@ -165,8 +162,7 @@ public final class ExperimentsDeleteSamples { */ public final class ExperimentsGetSamples { /* - * x-ms-original-file: specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/ - * NetworkExperimentGetExperiment.json + * x-ms-original-file: 2026-04-01/NetworkExperimentGetExperiment.json */ /** * Sample code: Gets an Experiment by ExperimentName. @@ -188,8 +184,7 @@ public final class ExperimentsGetSamples { */ public final class ExperimentsListByProfileSamples { /* - * x-ms-original-file: specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/ - * NetworkExperimentListExperiments.json + * x-ms-original-file: 2026-04-01/NetworkExperimentListExperiments.json */ /** * Sample code: Gets a list of Experiments. @@ -213,8 +208,7 @@ import com.azure.resourcemanager.frontdoor.models.State; */ public final class ExperimentsUpdateSamples { /* - * x-ms-original-file: specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/ - * NetworkExperimentUpdateExperiment.json + * x-ms-original-file: 2026-04-01/NetworkExperimentUpdateExperiment.json */ /** * Sample code: Updates an Experiment. @@ -241,8 +235,7 @@ import com.azure.resourcemanager.frontdoor.models.ResourceType; */ public final class FrontDoorNameAvailabilityCheckSamples { /* - * x-ms-original-file: specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/ - * CheckFrontdoorNameAvailability.json + * x-ms-original-file: 2026-04-01/CheckFrontdoorNameAvailability.json */ /** * Sample code: CheckNameAvailability. @@ -268,8 +261,7 @@ import com.azure.resourcemanager.frontdoor.models.ResourceType; */ public final class FrontDoorNameAvailabilityWithSubscriptionCheckSamples { /* - * x-ms-original-file: specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/ - * CheckFrontdoorNameAvailabilityWithSubscription.json + * x-ms-original-file: 2026-04-01/CheckFrontdoorNameAvailabilityWithSubscription.json */ /** * Sample code: CheckNameAvailabilityWithSubscription. @@ -317,8 +309,7 @@ import java.util.Map; */ public final class FrontDoorsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/FrontdoorCreate.json + * x-ms-original-file: 2026-04-01/FrontdoorCreate.json */ /** * Sample code: Create or update specific Front Door. @@ -420,8 +411,7 @@ public final class FrontDoorsCreateOrUpdateSamples { */ public final class FrontDoorsDeleteSamples { /* - * x-ms-original-file: - * specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/FrontdoorDelete.json + * x-ms-original-file: 2026-04-01/FrontdoorDelete.json */ /** * Sample code: Delete Front Door. @@ -442,8 +432,7 @@ public final class FrontDoorsDeleteSamples { */ public final class FrontDoorsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/FrontdoorGet.json + * x-ms-original-file: 2026-04-01/FrontdoorGet.json */ /** * Sample code: Get Front Door. @@ -464,8 +453,7 @@ public final class FrontDoorsGetByResourceGroupSamples { */ public final class FrontDoorsListSamples { /* - * x-ms-original-file: - * specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/FrontdoorListAll.json + * x-ms-original-file: 2026-04-01/FrontdoorListAll.json */ /** * Sample code: List all Front Doors. @@ -486,8 +474,7 @@ public final class FrontDoorsListSamples { */ public final class FrontDoorsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/FrontdoorList.json + * x-ms-original-file: 2026-04-01/FrontdoorList.json */ /** * Sample code: List Front Doors in a Resource Group. @@ -510,8 +497,7 @@ import com.azure.resourcemanager.frontdoor.models.ValidateCustomDomainInput; */ public final class FrontDoorsValidateCustomDomainSamples { /* - * x-ms-original-file: specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/ - * FrontdoorValidateCustomDomain.json + * x-ms-original-file: 2026-04-01/FrontdoorValidateCustomDomain.json */ /** * Sample code: FrontDoor_ValidateCustomDomain. @@ -534,8 +520,7 @@ public final class FrontDoorsValidateCustomDomainSamples { */ public final class FrontendEndpointsDisableHttpsSamples { /* - * x-ms-original-file: - * specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/FrontdoorDisableHttps.json + * x-ms-original-file: 2026-04-01/FrontdoorDisableHttps.json */ /** * Sample code: FrontendEndpoints_DisableHttps. @@ -563,8 +548,7 @@ import com.azure.resourcemanager.frontdoor.models.MinimumTlsVersion; */ public final class FrontendEndpointsEnableHttpsSamples { /* - * x-ms-original-file: - * specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/FrontdoorEnableHttps.json + * x-ms-original-file: 2026-04-01/FrontdoorEnableHttps.json */ /** * Sample code: FrontendEndpoints_EnableHttps. @@ -594,8 +578,7 @@ public final class FrontendEndpointsEnableHttpsSamples { */ public final class FrontendEndpointsGetSamples { /* - * x-ms-original-file: specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/ - * FrontdoorFrontendEndpointGet.json + * x-ms-original-file: 2026-04-01/FrontdoorFrontendEndpointGet.json */ /** * Sample code: Get Frontend Endpoint. @@ -617,8 +600,7 @@ public final class FrontendEndpointsGetSamples { */ public final class FrontendEndpointsListByFrontDoorSamples { /* - * x-ms-original-file: specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/ - * FrontdoorFrontendEndpointList.json + * x-ms-original-file: 2026-04-01/FrontdoorFrontendEndpointList.json */ /** * Sample code: List Frontend endpoints in a Front Door. @@ -639,8 +621,7 @@ public final class FrontendEndpointsListByFrontDoorSamples { */ public final class ManagedRuleSetsListSamples { /* - * x-ms-original-file: - * specification/frontdoor/resource-manager/Microsoft.Network/stable/2024-02-01/examples/WafListManagedRuleSets.json + * x-ms-original-file: 2026-04-01/WafListManagedRuleSets.json */ /** * Sample code: List Policies ManagedRuleSets in a Resource Group. @@ -664,8 +645,7 @@ import com.azure.resourcemanager.frontdoor.models.State; */ public final class NetworkExperimentProfilesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/ - * NetworkExperimentCreateProfile.json + * x-ms-original-file: 2026-04-01/NetworkExperimentCreateProfile.json */ /** * Sample code: Creates an NetworkExperiment Profile in a Resource Group. @@ -676,8 +656,8 @@ public final class NetworkExperimentProfilesCreateOrUpdateSamples { com.azure.resourcemanager.frontdoor.FrontDoorManager manager) { manager.networkExperimentProfiles() .define("MyProfile") - .withRegion("WestUs") .withExistingResourceGroup("MyResourceGroup") + .withRegion("WestUs") .withEnabledState(State.ENABLED) .create(); } @@ -692,8 +672,7 @@ public final class NetworkExperimentProfilesCreateOrUpdateSamples { */ public final class NetworkExperimentProfilesDeleteSamples { /* - * x-ms-original-file: specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/ - * NetworkExperimentDeleteProfile.json + * x-ms-original-file: 2026-04-01/NetworkExperimentDeleteProfile.json */ /** * Sample code: Deletes an NetworkExperiment Profile by ProfileName. @@ -715,9 +694,7 @@ public final class NetworkExperimentProfilesDeleteSamples { */ public final class NetworkExperimentProfilesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/NetworkExperimentGetProfile - * .json + * x-ms-original-file: 2026-04-01/NetworkExperimentGetProfile.json */ /** * Sample code: Gets an NetworkExperiment Profile by Profile Id. @@ -740,8 +717,7 @@ public final class NetworkExperimentProfilesGetByResourceGroupSamples { */ public final class NetworkExperimentProfilesListSamples { /* - * x-ms-original-file: specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/ - * NetworkExperimentListProfiles.json + * x-ms-original-file: 2026-04-01/NetworkExperimentListProfiles.json */ /** * Sample code: List NetworkExperiment Profiles in a Resource Group. @@ -763,8 +739,7 @@ public final class NetworkExperimentProfilesListSamples { */ public final class NetworkExperimentProfilesListByResourceGroupSamples { /* - * x-ms-original-file: specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/ - * NetworkExperimentListProfiles.json + * x-ms-original-file: 2026-04-01/NetworkExperimentListByResourceGroupProfiles.json */ /** * Sample code: List NetworkExperiment Profiles in a Resource Group. @@ -791,8 +766,7 @@ import java.util.Map; */ public final class NetworkExperimentProfilesUpdateSamples { /* - * x-ms-original-file: specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/ - * NetworkExperimentUpdateProfile.json + * x-ms-original-file: 2026-04-01/NetworkExperimentUpdateProfile.json */ /** * Sample code: Updates an Experiment. @@ -829,6 +803,9 @@ public final class NetworkExperimentProfilesUpdateSamples { import com.azure.resourcemanager.frontdoor.models.ActionType; import com.azure.resourcemanager.frontdoor.models.CustomRule; import com.azure.resourcemanager.frontdoor.models.CustomRuleList; +import com.azure.resourcemanager.frontdoor.models.ExceptionMatchVariable; +import com.azure.resourcemanager.frontdoor.models.ExceptionSelectorMatchOperator; +import com.azure.resourcemanager.frontdoor.models.ExceptionValueMatchOperator; import com.azure.resourcemanager.frontdoor.models.ManagedRuleEnabledState; import com.azure.resourcemanager.frontdoor.models.ManagedRuleExclusion; import com.azure.resourcemanager.frontdoor.models.ManagedRuleExclusionMatchVariable; @@ -837,7 +814,10 @@ import com.azure.resourcemanager.frontdoor.models.ManagedRuleGroupOverride; import com.azure.resourcemanager.frontdoor.models.ManagedRuleOverride; import com.azure.resourcemanager.frontdoor.models.ManagedRuleSet; import com.azure.resourcemanager.frontdoor.models.ManagedRuleSetActionType; +import com.azure.resourcemanager.frontdoor.models.ManagedRuleSetException; +import com.azure.resourcemanager.frontdoor.models.ManagedRuleSetExceptionList; import com.azure.resourcemanager.frontdoor.models.ManagedRuleSetList; +import com.azure.resourcemanager.frontdoor.models.ManagedRuleSetScope; import com.azure.resourcemanager.frontdoor.models.MatchCondition; import com.azure.resourcemanager.frontdoor.models.MatchVariable; import com.azure.resourcemanager.frontdoor.models.Operator; @@ -849,6 +829,7 @@ import com.azure.resourcemanager.frontdoor.models.RuleType; import com.azure.resourcemanager.frontdoor.models.ScrubbingRuleEntryMatchOperator; import com.azure.resourcemanager.frontdoor.models.ScrubbingRuleEntryMatchVariable; import com.azure.resourcemanager.frontdoor.models.ScrubbingRuleEntryState; +import com.azure.resourcemanager.frontdoor.models.SensitivityType; import com.azure.resourcemanager.frontdoor.models.Sku; import com.azure.resourcemanager.frontdoor.models.SkuName; import com.azure.resourcemanager.frontdoor.models.TransformType; @@ -861,9 +842,7 @@ import java.util.Arrays; */ public final class PoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/frontdoor/resource-manager/Microsoft.Network/stable/2024-02-01/examples/WafPolicyCreateOrUpdate. - * json + * x-ms-original-file: 2026-04-01/WafPolicyCreateOrUpdate.json */ /** * Sample code: Creates specific policy. @@ -884,6 +863,7 @@ public final class PoliciesCreateOrUpdateSamples { "PGh0bWw+CjxoZWFkZXI+PHRpdGxlPkhlbGxvPC90aXRsZT48L2hlYWRlcj4KPGJvZHk+CkhlbGxvIHdvcmxkCjwvYm9keT4KPC9odG1sPg==") .withRequestBodyCheck(PolicyRequestBodyCheck.DISABLED) .withJavascriptChallengeExpirationInMinutes(30) + .withCaptchaExpirationInMinutes(30) .withState(WebApplicationFirewallScrubbingState.ENABLED) .withScrubbingRules(Arrays.asList(new WebApplicationFirewallScrubbingRules() .withMatchVariable(ScrubbingRuleEntryMatchVariable.REQUEST_IPADDRESS) @@ -910,14 +890,22 @@ public final class PoliciesCreateOrUpdateSamples { .withOperator(Operator.CONTAINS) .withMatchValue(Arrays.asList("windows")) .withTransforms(Arrays.asList(TransformType.LOWERCASE)))) - .withAction(ActionType.BLOCK)))) + .withAction(ActionType.BLOCK), + new CustomRule().withName("Rule3") + .withPriority(1) + .withRuleType(RuleType.RATE_LIMIT_RULE) + .withRateLimitThreshold(1000) + .withMatchConditions(Arrays.asList(new MatchCondition().withMatchVariable(MatchVariable.REMOTE_ADDR) + .withOperator(Operator.SERVICE_TAG_MATCH) + .withMatchValue(Arrays.asList("AzureBackup", "AzureBotService")))) + .withAction(ActionType.CAPTCHA)))) .withManagedRules( new ManagedRuleSetList() .withManagedRuleSets( Arrays .asList( - new ManagedRuleSet().withRuleSetType("DefaultRuleSet") - .withRuleSetVersion("1.0") + new ManagedRuleSet().withRuleSetType("Microsoft_DefaultRuleSet") + .withRuleSetVersion("2.2") .withRuleSetAction(ManagedRuleSetActionType.BLOCK) .withExclusions(Arrays.asList(new ManagedRuleExclusion() .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_HEADER_NAMES) @@ -941,7 +929,26 @@ public final class PoliciesCreateOrUpdateSamples { ManagedRuleExclusionSelectorMatchOperator.EQUALS) .withSelector("query"))), new ManagedRuleOverride().withRuleId("942110") - .withEnabledState(ManagedRuleEnabledState.DISABLED)))))))) + .withEnabledState(ManagedRuleEnabledState.DISABLED))))), + new ManagedRuleSet().withRuleSetType("Microsoft_HTTPDDoSRuleSet") + .withRuleSetVersion("1.0") + .withRuleGroupOverrides(Arrays + .asList(new ManagedRuleGroupOverride().withRuleGroupName("ExcessiveRequests") + .withRules(Arrays.asList(new ManagedRuleOverride().withRuleId("500100") + .withEnabledState(ManagedRuleEnabledState.ENABLED) + .withAction(ActionType.BLOCK) + .withSensitivity(SensitivityType.HIGH))))))) + .withExceptionsList(new ManagedRuleSetExceptionList().withExceptions(Arrays.asList( + new ManagedRuleSetException().withMatchVariable(ExceptionMatchVariable.REQUEST_HEADER_NAMES) + .withSelectorMatchOperator(ExceptionSelectorMatchOperator.EQUALS) + .withSelector("User-Agent") + .withValueMatchOperator(ExceptionValueMatchOperator.CONTAINS) + .withMatchValues(Arrays.asList("Mozilla")) + .withScopes(Arrays.asList( + new ManagedRuleSetScope().withRuleSetType("Microsoft_DefaultRuleSet") + .withRuleSetVersion("2.2"), + new ManagedRuleSetScope().withRuleSetType("Microsoft_HTTPDDoSRuleSet") + .withRuleSetVersion("1.0"))))))) .create(); } } @@ -955,8 +962,7 @@ public final class PoliciesCreateOrUpdateSamples { */ public final class PoliciesDeleteSamples { /* - * x-ms-original-file: - * specification/frontdoor/resource-manager/Microsoft.Network/stable/2024-02-01/examples/WafPolicyDelete.json + * x-ms-original-file: 2026-04-01/WafPolicyDelete.json */ /** * Sample code: Delete protection policy. @@ -977,8 +983,7 @@ public final class PoliciesDeleteSamples { */ public final class PoliciesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/frontdoor/resource-manager/Microsoft.Network/stable/2024-02-01/examples/WafPolicyGet.json + * x-ms-original-file: 2026-04-01/WafPolicyGet.json */ /** * Sample code: Get Policy. @@ -999,8 +1004,7 @@ public final class PoliciesGetByResourceGroupSamples { */ public final class PoliciesListSamples { /* - * x-ms-original-file: specification/frontdoor/resource-manager/Microsoft.Network/stable/2024-02-01/examples/ - * WafListPoliciesUnderSubscription.json + * x-ms-original-file: 2026-04-01/WafListPoliciesUnderSubscription.json */ /** * Sample code: Get all Policies in a Resource Group. @@ -1021,8 +1025,7 @@ public final class PoliciesListSamples { */ public final class PoliciesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/frontdoor/resource-manager/Microsoft.Network/stable/2024-02-01/examples/WafListPolicies.json + * x-ms-original-file: 2026-04-01/WafListPolicies.json */ /** * Sample code: Get all Policies in a Resource Group. @@ -1047,8 +1050,7 @@ import java.util.Map; */ public final class PoliciesUpdateSamples { /* - * x-ms-original-file: - * specification/frontdoor/resource-manager/Microsoft.Network/stable/2024-02-01/examples/WafPolicyPatch.json + * x-ms-original-file: 2026-04-01/WafPolicyPatch.json */ /** * Sample code: Patches specific policy. @@ -1084,8 +1086,7 @@ public final class PoliciesUpdateSamples { */ public final class PreconfiguredEndpointsListSamples { /* - * x-ms-original-file: specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/ - * NetworkExperimentGetPreconfiguredEndpoints.json + * x-ms-original-file: 2026-04-01/NetworkExperimentGetPreconfiguredEndpoints.json */ /** * Sample code: Gets a list of Preconfigured Endpoints. @@ -1108,8 +1109,7 @@ import com.azure.resourcemanager.frontdoor.models.LatencyScorecardAggregationInt */ public final class ReportsGetLatencyScorecardsSamples { /* - * x-ms-original-file: specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/ - * NetworkExperimentGetLatencyScorecard.json + * x-ms-original-file: 2026-04-01/NetworkExperimentGetLatencyScorecard.json */ /** * Sample code: Gets a Latency Scorecard for a given Experiment. @@ -1137,8 +1137,7 @@ import java.time.OffsetDateTime; */ public final class ReportsGetTimeseriesSamples { /* - * x-ms-original-file: specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/ - * NetworkExperimentGetTimeseries.json + * x-ms-original-file: 2026-04-01/NetworkExperimentGetTimeseries.json */ /** * Sample code: Gets a Timeseries for a given Experiment. @@ -1185,9 +1184,7 @@ import java.util.Arrays; */ public final class RulesEnginesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/FrontdoorRulesEngineCreate. - * json + * x-ms-original-file: 2026-04-01/FrontdoorRulesEngineCreate.json */ /** * Sample code: Create or update a specific Rules Engine Configuration. @@ -1256,9 +1253,7 @@ public final class RulesEnginesCreateOrUpdateSamples { */ public final class RulesEnginesDeleteSamples { /* - * x-ms-original-file: - * specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/FrontdoorRulesEngineDelete. - * json + * x-ms-original-file: 2026-04-01/FrontdoorRulesEngineDelete.json */ /** * Sample code: Delete Rules Engine Configuration. @@ -1279,9 +1274,7 @@ public final class RulesEnginesDeleteSamples { */ public final class RulesEnginesGetSamples { /* - * x-ms-original-file: - * specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/FrontdoorRulesEngineGet. - * json + * x-ms-original-file: 2026-04-01/FrontdoorRulesEngineGet.json */ /** * Sample code: Get Rules Engine Configuration. @@ -1302,9 +1295,7 @@ public final class RulesEnginesGetSamples { */ public final class RulesEnginesListByFrontDoorSamples { /* - * x-ms-original-file: - * specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/FrontdoorRulesEngineList. - * json + * x-ms-original-file: 2026-04-01/FrontdoorRulesEngineList.json */ /** * Sample code: List Rules Engine Configurations in a Front Door. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/pom.xml b/sdk/frontdoor/azure-resourcemanager-frontdoor/pom.xml index 40bf1b77bd1f1..d91b32ae4bb8c 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/pom.xml +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/pom.xml @@ -1,9 +1,9 @@ - + 4.0.0 com.azure @@ -14,11 +14,11 @@ com.azure.resourcemanager azure-resourcemanager-frontdoor - 1.2.0-beta.1 + 1.2.0 jar - Microsoft Azure SDK for FrontDoor Management - This package contains Microsoft Azure SDK for FrontDoor Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. FrontDoor Client. Package tag package-2024-02. + Microsoft Azure SDK for Front Door Management + This package contains Microsoft Azure SDK for Front Door Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. APIs to manage web application firewall rules. Package api-version 2026-04-01. https://github.com/Azure/azure-sdk-for-java @@ -45,7 +45,7 @@ UTF-8 0 0 - false + true diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/FrontDoorManager.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/FrontDoorManager.java index 18adbada3126d..43572b7b53f94 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/FrontDoorManager.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/FrontDoorManager.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor; @@ -22,6 +22,7 @@ import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.frontdoor.fluent.FrontDoorManagementClient; import com.azure.resourcemanager.frontdoor.implementation.EndpointsImpl; @@ -53,38 +54,39 @@ import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.stream.Collectors; /** * Entry point to FrontDoorManager. - * FrontDoor Client. + * APIs to manage web application firewall rules. */ public final class FrontDoorManager { - private Policies policies; - - private ManagedRuleSets managedRuleSets; + private FrontDoors frontDoors; - private FrontDoorNameAvailabilities frontDoorNameAvailabilities; + private FrontendEndpoints frontendEndpoints; - private FrontDoorNameAvailabilityWithSubscriptions frontDoorNameAvailabilityWithSubscriptions; + private RulesEngines rulesEngines; - private FrontDoors frontDoors; + private Experiments experiments; - private FrontendEndpoints frontendEndpoints; + private Policies policies; private Endpoints endpoints; - private RulesEngines rulesEngines; - private NetworkExperimentProfiles networkExperimentProfiles; private PreconfiguredEndpoints preconfiguredEndpoints; - private Experiments experiments; - private Reports reports; + private ManagedRuleSets managedRuleSets; + + private FrontDoorNameAvailabilities frontDoorNameAvailabilities; + + private FrontDoorNameAvailabilityWithSubscriptions frontDoorNameAvailabilityWithSubscriptions; + private final FrontDoorManagementClient clientObject; private FrontDoorManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { @@ -98,11 +100,11 @@ private FrontDoorManager(HttpPipeline httpPipeline, AzureProfile profile, Durati } /** - * Creates an instance of FrontDoor service API entry point. + * Creates an instance of Front Door service API entry point. * * @param credential the credential to use. * @param profile the Azure profile for client. - * @return the FrontDoor service API instance. + * @return the Front Door service API instance. */ public static FrontDoorManager authenticate(TokenCredential credential, AzureProfile profile) { Objects.requireNonNull(credential, "'credential' cannot be null."); @@ -111,11 +113,11 @@ public static FrontDoorManager authenticate(TokenCredential credential, AzurePro } /** - * Creates an instance of FrontDoor service API entry point. + * Creates an instance of Front Door service API entry point. * * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. * @param profile the Azure profile for client. - * @return the FrontDoor service API instance. + * @return the Front Door service API instance. */ public static FrontDoorManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); @@ -137,6 +139,9 @@ public static Configurable configure() { */ public static final class Configurable { private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); + private static final String SDK_VERSION = "version"; + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-resourcemanager-frontdoor.properties"); private HttpClient httpClient; private HttpLogOptions httpLogOptions; @@ -234,22 +239,24 @@ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { } /** - * Creates an instance of FrontDoor service API entry point. + * Creates an instance of Front Door service API entry point. * * @param credential the credential to use. * @param profile the Azure profile for client. - * @return the FrontDoor service API instance. + * @return the Front Door service API instance. */ public FrontDoorManager authenticate(TokenCredential credential, AzureProfile profile) { Objects.requireNonNull(credential, "'credential' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + StringBuilder userAgentBuilder = new StringBuilder(); userAgentBuilder.append("azsdk-java") .append("-") .append("com.azure.resourcemanager.frontdoor") .append("/") - .append("1.1.0"); + .append(clientVersion); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) @@ -296,77 +303,63 @@ public FrontDoorManager authenticate(TokenCredential credential, AzureProfile pr } /** - * Gets the resource collection API of Policies. It manages WebApplicationFirewallPolicy. - * - * @return Resource collection API of Policies. - */ - public Policies policies() { - if (this.policies == null) { - this.policies = new PoliciesImpl(clientObject.getPolicies(), this); - } - return policies; - } - - /** - * Gets the resource collection API of ManagedRuleSets. + * Gets the resource collection API of FrontDoors. It manages FrontDoor. * - * @return Resource collection API of ManagedRuleSets. + * @return Resource collection API of FrontDoors. */ - public ManagedRuleSets managedRuleSets() { - if (this.managedRuleSets == null) { - this.managedRuleSets = new ManagedRuleSetsImpl(clientObject.getManagedRuleSets(), this); + public FrontDoors frontDoors() { + if (this.frontDoors == null) { + this.frontDoors = new FrontDoorsImpl(clientObject.getFrontDoors(), this); } - return managedRuleSets; + return frontDoors; } /** - * Gets the resource collection API of FrontDoorNameAvailabilities. + * Gets the resource collection API of FrontendEndpoints. * - * @return Resource collection API of FrontDoorNameAvailabilities. + * @return Resource collection API of FrontendEndpoints. */ - public FrontDoorNameAvailabilities frontDoorNameAvailabilities() { - if (this.frontDoorNameAvailabilities == null) { - this.frontDoorNameAvailabilities - = new FrontDoorNameAvailabilitiesImpl(clientObject.getFrontDoorNameAvailabilities(), this); + public FrontendEndpoints frontendEndpoints() { + if (this.frontendEndpoints == null) { + this.frontendEndpoints = new FrontendEndpointsImpl(clientObject.getFrontendEndpoints(), this); } - return frontDoorNameAvailabilities; + return frontendEndpoints; } /** - * Gets the resource collection API of FrontDoorNameAvailabilityWithSubscriptions. + * Gets the resource collection API of RulesEngines. It manages RulesEngine. * - * @return Resource collection API of FrontDoorNameAvailabilityWithSubscriptions. + * @return Resource collection API of RulesEngines. */ - public FrontDoorNameAvailabilityWithSubscriptions frontDoorNameAvailabilityWithSubscriptions() { - if (this.frontDoorNameAvailabilityWithSubscriptions == null) { - this.frontDoorNameAvailabilityWithSubscriptions = new FrontDoorNameAvailabilityWithSubscriptionsImpl( - clientObject.getFrontDoorNameAvailabilityWithSubscriptions(), this); + public RulesEngines rulesEngines() { + if (this.rulesEngines == null) { + this.rulesEngines = new RulesEnginesImpl(clientObject.getRulesEngines(), this); } - return frontDoorNameAvailabilityWithSubscriptions; + return rulesEngines; } /** - * Gets the resource collection API of FrontDoors. It manages FrontDoor. + * Gets the resource collection API of Experiments. It manages Experiment. * - * @return Resource collection API of FrontDoors. + * @return Resource collection API of Experiments. */ - public FrontDoors frontDoors() { - if (this.frontDoors == null) { - this.frontDoors = new FrontDoorsImpl(clientObject.getFrontDoors(), this); + public Experiments experiments() { + if (this.experiments == null) { + this.experiments = new ExperimentsImpl(clientObject.getExperiments(), this); } - return frontDoors; + return experiments; } /** - * Gets the resource collection API of FrontendEndpoints. + * Gets the resource collection API of Policies. It manages WebApplicationFirewallPolicy. * - * @return Resource collection API of FrontendEndpoints. + * @return Resource collection API of Policies. */ - public FrontendEndpoints frontendEndpoints() { - if (this.frontendEndpoints == null) { - this.frontendEndpoints = new FrontendEndpointsImpl(clientObject.getFrontendEndpoints(), this); + public Policies policies() { + if (this.policies == null) { + this.policies = new PoliciesImpl(clientObject.getPolicies(), this); } - return frontendEndpoints; + return policies; } /** @@ -381,18 +374,6 @@ public Endpoints endpoints() { return endpoints; } - /** - * Gets the resource collection API of RulesEngines. It manages RulesEngine. - * - * @return Resource collection API of RulesEngines. - */ - public RulesEngines rulesEngines() { - if (this.rulesEngines == null) { - this.rulesEngines = new RulesEnginesImpl(clientObject.getRulesEngines(), this); - } - return rulesEngines; - } - /** * Gets the resource collection API of NetworkExperimentProfiles. It manages Profile. * @@ -419,18 +400,6 @@ public PreconfiguredEndpoints preconfiguredEndpoints() { return preconfiguredEndpoints; } - /** - * Gets the resource collection API of Experiments. It manages Experiment. - * - * @return Resource collection API of Experiments. - */ - public Experiments experiments() { - if (this.experiments == null) { - this.experiments = new ExperimentsImpl(clientObject.getExperiments(), this); - } - return experiments; - } - /** * Gets the resource collection API of Reports. * @@ -443,6 +412,44 @@ public Reports reports() { return reports; } + /** + * Gets the resource collection API of ManagedRuleSets. + * + * @return Resource collection API of ManagedRuleSets. + */ + public ManagedRuleSets managedRuleSets() { + if (this.managedRuleSets == null) { + this.managedRuleSets = new ManagedRuleSetsImpl(clientObject.getManagedRuleSets(), this); + } + return managedRuleSets; + } + + /** + * Gets the resource collection API of FrontDoorNameAvailabilities. + * + * @return Resource collection API of FrontDoorNameAvailabilities. + */ + public FrontDoorNameAvailabilities frontDoorNameAvailabilities() { + if (this.frontDoorNameAvailabilities == null) { + this.frontDoorNameAvailabilities + = new FrontDoorNameAvailabilitiesImpl(clientObject.getFrontDoorNameAvailabilities(), this); + } + return frontDoorNameAvailabilities; + } + + /** + * Gets the resource collection API of FrontDoorNameAvailabilityWithSubscriptions. + * + * @return Resource collection API of FrontDoorNameAvailabilityWithSubscriptions. + */ + public FrontDoorNameAvailabilityWithSubscriptions frontDoorNameAvailabilityWithSubscriptions() { + if (this.frontDoorNameAvailabilityWithSubscriptions == null) { + this.frontDoorNameAvailabilityWithSubscriptions = new FrontDoorNameAvailabilityWithSubscriptionsImpl( + clientObject.getFrontDoorNameAvailabilityWithSubscriptions(), this); + } + return frontDoorNameAvailabilityWithSubscriptions; + } + /** * Gets wrapped service client FrontDoorManagementClient providing direct access to the underlying auto-generated * API implementation, based on Azure REST API. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/EndpointsClient.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/EndpointsClient.java index 830c5316b8936..24df7c8c532ec 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/EndpointsClient.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/EndpointsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.fluent; @@ -18,7 +18,7 @@ public interface EndpointsClient { /** * Removes a content from Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param contentFilePaths The path to the content to be purged. Path can be a full URL, e.g. '/pictures/city.png' * which removes a single file, or a directory with a wildcard, e.g. '/pictures/*' which removes all folders and @@ -35,7 +35,7 @@ SyncPoller, Void> beginPurgeContent(String resourceGroupName, S /** * Removes a content from Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param contentFilePaths The path to the content to be purged. Path can be a full URL, e.g. '/pictures/city.png' * which removes a single file, or a directory with a wildcard, e.g. '/pictures/*' which removes all folders and @@ -53,7 +53,7 @@ SyncPoller, Void> beginPurgeContent(String resourceGroupName, S /** * Removes a content from Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param contentFilePaths The path to the content to be purged. Path can be a full URL, e.g. '/pictures/city.png' * which removes a single file, or a directory with a wildcard, e.g. '/pictures/*' which removes all folders and @@ -68,7 +68,7 @@ SyncPoller, Void> beginPurgeContent(String resourceGroupName, S /** * Removes a content from Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param contentFilePaths The path to the content to be purged. Path can be a full URL, e.g. '/pictures/city.png' * which removes a single file, or a directory with a wildcard, e.g. '/pictures/*' which removes all folders and diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/ExperimentsClient.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/ExperimentsClient.java index 604d163438457..d226bc5d03adc 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/ExperimentsClient.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/ExperimentsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.fluent; @@ -18,37 +18,10 @@ * An instance of this class provides access to all the operations defined in ExperimentsClient. */ public interface ExperimentsClient { - /** - * Gets a list of Experiments. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName The Profile identifier associated with the Tenant and Partner. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Experiments as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByProfile(String resourceGroupName, String profileName); - - /** - * Gets a list of Experiments. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName The Profile identifier associated with the Tenant and Partner. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Experiments as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByProfile(String resourceGroupName, String profileName, Context context); - /** * Gets an Experiment by ExperimentName. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param context The context to associate with this operation. @@ -64,7 +37,7 @@ Response getWithResponse(String resourceGroupName, String profi /** * Gets an Experiment by ExperimentName. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -78,7 +51,7 @@ Response getWithResponse(String resourceGroupName, String profi /** * Creates or updates an Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param parameters The Experiment resource. @@ -94,7 +67,7 @@ SyncPoller, ExperimentInner> beginCreateOrUpdate(Str /** * Creates or updates an Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param parameters The Experiment resource. @@ -111,7 +84,7 @@ SyncPoller, ExperimentInner> beginCreateOrUpdate(Str /** * Creates or updates an Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param parameters The Experiment resource. @@ -127,7 +100,7 @@ ExperimentInner createOrUpdate(String resourceGroupName, String profileName, Str /** * Creates or updates an Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param parameters The Experiment resource. @@ -146,7 +119,7 @@ ExperimentInner createOrUpdate(String resourceGroupName, String profileName, Str * * Updates an Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param parameters The Experiment Update Model. @@ -164,7 +137,7 @@ SyncPoller, ExperimentInner> beginUpdate(String reso * * Updates an Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param parameters The Experiment Update Model. @@ -183,7 +156,7 @@ SyncPoller, ExperimentInner> beginUpdate(String reso * * Updates an Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param parameters The Experiment Update Model. @@ -201,7 +174,7 @@ ExperimentInner update(String resourceGroupName, String profileName, String expe * * Updates an Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param parameters The Experiment Update Model. @@ -218,7 +191,7 @@ ExperimentInner update(String resourceGroupName, String profileName, String expe /** * Deletes an Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -232,7 +205,7 @@ ExperimentInner update(String resourceGroupName, String profileName, String expe /** * Deletes an Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param context The context to associate with this operation. @@ -248,7 +221,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -261,7 +234,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param context The context to associate with this operation. @@ -271,4 +244,31 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String profileName, String experimentName, Context context); + + /** + * Gets a list of Experiments. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The Profile identifier associated with the Tenant and Partner. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Experiments as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByProfile(String resourceGroupName, String profileName); + + /** + * Gets a list of Experiments. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The Profile identifier associated with the Tenant and Partner. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Experiments as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByProfile(String resourceGroupName, String profileName, Context context); } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/FrontDoorManagementClient.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/FrontDoorManagementClient.java index ed0b45bae866c..553c53549b9a3 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/FrontDoorManagementClient.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/FrontDoorManagementClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.fluent; @@ -12,19 +12,25 @@ */ public interface FrontDoorManagementClient { /** - * Gets The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID - * forms part of the URI for every service call. + * Gets Service host. * - * @return the subscriptionId value. + * @return the endpoint value. */ - String getSubscriptionId(); + String getEndpoint(); /** - * Gets server parameter. + * Gets Version parameter. * - * @return the endpoint value. + * @return the apiVersion value. */ - String getEndpoint(); + String getApiVersion(); + + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); /** * Gets The HTTP pipeline to send requests through. @@ -41,46 +47,39 @@ public interface FrontDoorManagementClient { Duration getDefaultPollInterval(); /** - * Gets the PoliciesClient object to access its operations. - * - * @return the PoliciesClient object. - */ - PoliciesClient getPolicies(); - - /** - * Gets the ManagedRuleSetsClient object to access its operations. + * Gets the FrontDoorsClient object to access its operations. * - * @return the ManagedRuleSetsClient object. + * @return the FrontDoorsClient object. */ - ManagedRuleSetsClient getManagedRuleSets(); + FrontDoorsClient getFrontDoors(); /** - * Gets the FrontDoorNameAvailabilitiesClient object to access its operations. + * Gets the FrontendEndpointsClient object to access its operations. * - * @return the FrontDoorNameAvailabilitiesClient object. + * @return the FrontendEndpointsClient object. */ - FrontDoorNameAvailabilitiesClient getFrontDoorNameAvailabilities(); + FrontendEndpointsClient getFrontendEndpoints(); /** - * Gets the FrontDoorNameAvailabilityWithSubscriptionsClient object to access its operations. + * Gets the RulesEnginesClient object to access its operations. * - * @return the FrontDoorNameAvailabilityWithSubscriptionsClient object. + * @return the RulesEnginesClient object. */ - FrontDoorNameAvailabilityWithSubscriptionsClient getFrontDoorNameAvailabilityWithSubscriptions(); + RulesEnginesClient getRulesEngines(); /** - * Gets the FrontDoorsClient object to access its operations. + * Gets the ExperimentsClient object to access its operations. * - * @return the FrontDoorsClient object. + * @return the ExperimentsClient object. */ - FrontDoorsClient getFrontDoors(); + ExperimentsClient getExperiments(); /** - * Gets the FrontendEndpointsClient object to access its operations. + * Gets the PoliciesClient object to access its operations. * - * @return the FrontendEndpointsClient object. + * @return the PoliciesClient object. */ - FrontendEndpointsClient getFrontendEndpoints(); + PoliciesClient getPolicies(); /** * Gets the EndpointsClient object to access its operations. @@ -89,13 +88,6 @@ public interface FrontDoorManagementClient { */ EndpointsClient getEndpoints(); - /** - * Gets the RulesEnginesClient object to access its operations. - * - * @return the RulesEnginesClient object. - */ - RulesEnginesClient getRulesEngines(); - /** * Gets the NetworkExperimentProfilesClient object to access its operations. * @@ -111,16 +103,30 @@ public interface FrontDoorManagementClient { PreconfiguredEndpointsClient getPreconfiguredEndpoints(); /** - * Gets the ExperimentsClient object to access its operations. + * Gets the ReportsClient object to access its operations. * - * @return the ExperimentsClient object. + * @return the ReportsClient object. */ - ExperimentsClient getExperiments(); + ReportsClient getReports(); /** - * Gets the ReportsClient object to access its operations. + * Gets the ManagedRuleSetsClient object to access its operations. * - * @return the ReportsClient object. + * @return the ManagedRuleSetsClient object. */ - ReportsClient getReports(); + ManagedRuleSetsClient getManagedRuleSets(); + + /** + * Gets the FrontDoorNameAvailabilitiesClient object to access its operations. + * + * @return the FrontDoorNameAvailabilitiesClient object. + */ + FrontDoorNameAvailabilitiesClient getFrontDoorNameAvailabilities(); + + /** + * Gets the FrontDoorNameAvailabilityWithSubscriptionsClient object to access its operations. + * + * @return the FrontDoorNameAvailabilityWithSubscriptionsClient object. + */ + FrontDoorNameAvailabilityWithSubscriptionsClient getFrontDoorNameAvailabilityWithSubscriptions(); } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/FrontDoorNameAvailabilitiesClient.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/FrontDoorNameAvailabilitiesClient.java index b3435ff08675c..62526319b3e2a 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/FrontDoorNameAvailabilitiesClient.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/FrontDoorNameAvailabilitiesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.fluent; @@ -18,7 +18,7 @@ public interface FrontDoorNameAvailabilitiesClient { /** * Check the availability of a Front Door resource name. * - * @param checkFrontDoorNameAvailabilityInput Input to check. + * @param checkFrontDoorNameAvailabilityInput The request body. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -32,7 +32,7 @@ public interface FrontDoorNameAvailabilitiesClient { /** * Check the availability of a Front Door resource name. * - * @param checkFrontDoorNameAvailabilityInput Input to check. + * @param checkFrontDoorNameAvailabilityInput The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/FrontDoorNameAvailabilityWithSubscriptionsClient.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/FrontDoorNameAvailabilityWithSubscriptionsClient.java index 2f9534759bdaa..55d610581933a 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/FrontDoorNameAvailabilityWithSubscriptionsClient.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/FrontDoorNameAvailabilityWithSubscriptionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.fluent; @@ -19,7 +19,7 @@ public interface FrontDoorNameAvailabilityWithSubscriptionsClient { /** * Check the availability of a Front Door subdomain. * - * @param checkFrontDoorNameAvailabilityInput Input to check. + * @param checkFrontDoorNameAvailabilityInput The request body. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -33,7 +33,7 @@ public interface FrontDoorNameAvailabilityWithSubscriptionsClient { /** * Check the availability of a Front Door subdomain. * - * @param checkFrontDoorNameAvailabilityInput Input to check. + * @param checkFrontDoorNameAvailabilityInput The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/FrontDoorsClient.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/FrontDoorsClient.java index c7bffaccdaa74..9b1c3398e6921 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/FrontDoorsClient.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/FrontDoorsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.fluent; @@ -19,57 +19,10 @@ * An instance of this class provides access to all the operations defined in FrontDoorsClient. */ public interface FrontDoorsClient { - /** - * Lists all of the Front Doors within an Azure subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Front Doors as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Lists all of the Front Doors within an Azure subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Front Doors as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * Lists all of the Front Doors within a resource group under a subscription. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Front Doors as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Lists all of the Front Doors within a resource group under a subscription. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Front Doors as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - /** * Gets a Front Door with the specified Front Door name under the specified subscription and resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -85,7 +38,7 @@ Response getByResourceGroupWithResponse(String resourceGroupName /** * Gets a Front Door with the specified Front Door name under the specified subscription and resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -98,7 +51,7 @@ Response getByResourceGroupWithResponse(String resourceGroupName /** * Creates a new Front Door with a Front Door name under the specified subscription and resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param frontDoorParameters Front Door properties needed to create a new Front Door. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -114,7 +67,7 @@ SyncPoller, FrontDoorInner> beginCreateOrUpdate(Strin /** * Creates a new Front Door with a Front Door name under the specified subscription and resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param frontDoorParameters Front Door properties needed to create a new Front Door. * @param context The context to associate with this operation. @@ -131,7 +84,7 @@ SyncPoller, FrontDoorInner> beginCreateOrUpdate(Strin /** * Creates a new Front Door with a Front Door name under the specified subscription and resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param frontDoorParameters Front Door properties needed to create a new Front Door. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -146,7 +99,7 @@ SyncPoller, FrontDoorInner> beginCreateOrUpdate(Strin /** * Creates a new Front Door with a Front Door name under the specified subscription and resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param frontDoorParameters Front Door properties needed to create a new Front Door. * @param context The context to associate with this operation. @@ -163,7 +116,7 @@ FrontDoorInner createOrUpdate(String resourceGroupName, String frontDoorName, Fr /** * Deletes an existing Front Door with the specified parameters. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -176,7 +129,7 @@ FrontDoorInner createOrUpdate(String resourceGroupName, String frontDoorName, Fr /** * Deletes an existing Front Door with the specified parameters. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -190,7 +143,7 @@ FrontDoorInner createOrUpdate(String resourceGroupName, String frontDoorName, Fr /** * Deletes an existing Front Door with the specified parameters. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -202,7 +155,7 @@ FrontDoorInner createOrUpdate(String resourceGroupName, String frontDoorName, Fr /** * Deletes an existing Front Door with the specified parameters. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -212,10 +165,57 @@ FrontDoorInner createOrUpdate(String resourceGroupName, String frontDoorName, Fr @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String frontDoorName, Context context); + /** + * Lists all of the Front Doors within a resource group under a subscription. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of FrontDoor items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists all of the Front Doors within a resource group under a subscription. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of FrontDoor items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Lists all of the Front Doors within an Azure subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of FrontDoor items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Lists all of the Front Doors within an Azure subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of FrontDoor items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + /** * Validates the custom domain mapping to ensure it maps to the correct Front Door endpoint in DNS. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param customDomainProperties Custom domain to be validated. * @param context The context to associate with this operation. @@ -231,7 +231,7 @@ Response validateCustomDomainWithResponse(Strin /** * Validates the custom domain mapping to ensure it maps to the correct Front Door endpoint in DNS. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param customDomainProperties Custom domain to be validated. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/FrontendEndpointsClient.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/FrontendEndpointsClient.java index 4c5cd2c533661..29412bc819256 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/FrontendEndpointsClient.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/FrontendEndpointsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.fluent; @@ -19,67 +19,67 @@ */ public interface FrontendEndpointsClient { /** - * Lists all of the frontend endpoints within a Front Door. + * Gets a Frontend endpoint with the specified name within the specified Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. + * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. + * @param context The context to associate with this 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 result of the request to list frontend endpoints as paginated response with {@link PagedIterable}. + * @return a Frontend endpoint with the specified name within the specified Front Door along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByFrontDoor(String resourceGroupName, String frontDoorName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String frontDoorName, + String frontendEndpointName, Context context); /** - * Lists all of the frontend endpoints within a Front Door. + * Gets a Frontend endpoint with the specified name within the specified Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. - * @param context The context to associate with this operation. + * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list frontend endpoints as paginated response with {@link PagedIterable}. + * @return a Frontend endpoint with the specified name within the specified Front Door. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByFrontDoor(String resourceGroupName, String frontDoorName, - Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + FrontendEndpointInner get(String resourceGroupName, String frontDoorName, String frontendEndpointName); /** - * Gets a Frontend endpoint with the specified name within the specified Front Door. + * Lists all of the frontend endpoints within a Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. - * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Frontend endpoint with the specified name within the specified Front Door along with {@link Response}. + * @return paged collection of FrontendEndpoint items as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String frontDoorName, - String frontendEndpointName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByFrontDoor(String resourceGroupName, String frontDoorName); /** - * Gets a Frontend endpoint with the specified name within the specified Front Door. + * Lists all of the frontend endpoints within a Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. - * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Frontend endpoint with the specified name within the specified Front Door. + * @return paged collection of FrontendEndpoint items as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - FrontendEndpointInner get(String resourceGroupName, String frontDoorName, String frontendEndpointName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByFrontDoor(String resourceGroupName, String frontDoorName, + Context context); /** * Enables a frontendEndpoint for HTTPS traffic. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. * @param customHttpsConfiguration The configuration specifying how to enable HTTPS. @@ -95,7 +95,7 @@ SyncPoller, Void> beginEnableHttps(String resourceGroupName, St /** * Enables a frontendEndpoint for HTTPS traffic. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. * @param customHttpsConfiguration The configuration specifying how to enable HTTPS. @@ -112,7 +112,7 @@ SyncPoller, Void> beginEnableHttps(String resourceGroupName, St /** * Enables a frontendEndpoint for HTTPS traffic. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. * @param customHttpsConfiguration The configuration specifying how to enable HTTPS. @@ -127,7 +127,7 @@ void enableHttps(String resourceGroupName, String frontDoorName, String frontend /** * Enables a frontendEndpoint for HTTPS traffic. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. * @param customHttpsConfiguration The configuration specifying how to enable HTTPS. @@ -143,7 +143,7 @@ void enableHttps(String resourceGroupName, String frontDoorName, String frontend /** * Disables a frontendEndpoint for HTTPS traffic. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -158,7 +158,7 @@ SyncPoller, Void> beginDisableHttps(String resourceGroupName, S /** * Disables a frontendEndpoint for HTTPS traffic. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. * @param context The context to associate with this operation. @@ -174,7 +174,7 @@ SyncPoller, Void> beginDisableHttps(String resourceGroupName, S /** * Disables a frontendEndpoint for HTTPS traffic. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -187,7 +187,7 @@ SyncPoller, Void> beginDisableHttps(String resourceGroupName, S /** * Disables a frontendEndpoint for HTTPS traffic. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. * @param context The context to associate with this operation. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/ManagedRuleSetsClient.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/ManagedRuleSetsClient.java index cc3d5b1939432..ad2667df8c0c7 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/ManagedRuleSetsClient.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/ManagedRuleSetsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.fluent; diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/NetworkExperimentProfilesClient.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/NetworkExperimentProfilesClient.java index b6cd330d07539..6f2645d880160 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/NetworkExperimentProfilesClient.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/NetworkExperimentProfilesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.fluent; @@ -18,61 +18,10 @@ * An instance of this class provides access to all the operations defined in NetworkExperimentProfilesClient. */ public interface NetworkExperimentProfilesClient { - /** - * Gets a list of Network Experiment Profiles under a subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Network Experiment Profiles under a subscription as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Gets a list of Network Experiment Profiles under a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Network Experiment Profiles under a subscription as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * Gets a list of Network Experiment Profiles within a resource group under a subscription. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Network Experiment Profiles within a resource group under a subscription as paginated response - * with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Gets a list of Network Experiment Profiles within a resource group under a subscription. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Network Experiment Profiles within a resource group under a subscription as paginated response - * with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - /** * Gets an NetworkExperiment Profile by ProfileName. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -87,7 +36,7 @@ Response getByResourceGroupWithResponse(String resourceGroupName, /** * Gets an NetworkExperiment Profile by ProfileName. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -100,8 +49,8 @@ Response getByResourceGroupWithResponse(String resourceGroupName, /** * Creates an NetworkExperiment Profile. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. - * @param resourceGroupName Name of the Resource group within the Azure subscription. * @param parameters An Network Experiment Profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -109,14 +58,14 @@ Response getByResourceGroupWithResponse(String resourceGroupName, * @return the {@link SyncPoller} for polling of defines an Network Experiment Profile and lists of Experiments. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ProfileInner> beginCreateOrUpdate(String profileName, String resourceGroupName, + SyncPoller, ProfileInner> beginCreateOrUpdate(String resourceGroupName, String profileName, ProfileInner parameters); /** * Creates an NetworkExperiment Profile. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. - * @param resourceGroupName Name of the Resource group within the Azure subscription. * @param parameters An Network Experiment Profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -125,14 +74,14 @@ SyncPoller, ProfileInner> beginCreateOrUpdate(String pr * @return the {@link SyncPoller} for polling of defines an Network Experiment Profile and lists of Experiments. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ProfileInner> beginCreateOrUpdate(String profileName, String resourceGroupName, + SyncPoller, ProfileInner> beginCreateOrUpdate(String resourceGroupName, String profileName, ProfileInner parameters, Context context); /** * Creates an NetworkExperiment Profile. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. - * @param resourceGroupName Name of the Resource group within the Azure subscription. * @param parameters An Network Experiment Profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -140,13 +89,13 @@ SyncPoller, ProfileInner> beginCreateOrUpdate(String pr * @return defines an Network Experiment Profile and lists of Experiments. */ @ServiceMethod(returns = ReturnType.SINGLE) - ProfileInner createOrUpdate(String profileName, String resourceGroupName, ProfileInner parameters); + ProfileInner createOrUpdate(String resourceGroupName, String profileName, ProfileInner parameters); /** * Creates an NetworkExperiment Profile. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. - * @param resourceGroupName Name of the Resource group within the Azure subscription. * @param parameters An Network Experiment Profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -155,14 +104,14 @@ SyncPoller, ProfileInner> beginCreateOrUpdate(String pr * @return defines an Network Experiment Profile and lists of Experiments. */ @ServiceMethod(returns = ReturnType.SINGLE) - ProfileInner createOrUpdate(String profileName, String resourceGroupName, ProfileInner parameters, Context context); + ProfileInner createOrUpdate(String resourceGroupName, String profileName, ProfileInner parameters, Context context); /** * Updates an NetworkExperimentProfiles by NetworkExperimentProfile name * * Updates an NetworkExperimentProfiles. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param parameters The Profile Update Model. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -179,7 +128,7 @@ SyncPoller, ProfileInner> beginUpdate(String resourceGr * * Updates an NetworkExperimentProfiles. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param parameters The Profile Update Model. * @param context The context to associate with this operation. @@ -197,7 +146,7 @@ SyncPoller, ProfileInner> beginUpdate(String resourceGr * * Updates an NetworkExperimentProfiles. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param parameters The Profile Update Model. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -213,7 +162,7 @@ SyncPoller, ProfileInner> beginUpdate(String resourceGr * * Updates an NetworkExperimentProfiles. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param parameters The Profile Update Model. * @param context The context to associate with this operation. @@ -228,7 +177,7 @@ SyncPoller, ProfileInner> beginUpdate(String resourceGr /** * Deletes an NetworkExperiment Profile by ProfileName. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -241,7 +190,7 @@ SyncPoller, ProfileInner> beginUpdate(String resourceGr /** * Deletes an NetworkExperiment Profile by ProfileName. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -255,7 +204,7 @@ SyncPoller, ProfileInner> beginUpdate(String resourceGr /** * Deletes an NetworkExperiment Profile by ProfileName. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -267,7 +216,7 @@ SyncPoller, ProfileInner> beginUpdate(String resourceGr /** * Deletes an NetworkExperiment Profile by ProfileName. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -276,4 +225,55 @@ SyncPoller, ProfileInner> beginUpdate(String resourceGr */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String profileName, Context context); + + /** + * Gets a list of Network Experiment Profiles within a resource group under a subscription. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Network Experiment Profiles within a resource group under a subscription as paginated response + * with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Gets a list of Network Experiment Profiles within a resource group under a subscription. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Network Experiment Profiles within a resource group under a subscription as paginated response + * with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Gets a list of Network Experiment Profiles under a subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Network Experiment Profiles under a subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Gets a list of Network Experiment Profiles under a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Network Experiment Profiles under a subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/PoliciesClient.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/PoliciesClient.java index f27febc482ad1..e8a5fa3e16e44 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/PoliciesClient.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/PoliciesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.fluent; @@ -18,57 +18,10 @@ * An instance of this class provides access to all the operations defined in PoliciesClient. */ public interface PoliciesClient { - /** - * Lists all of the protection policies within a resource group. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines a list of WebApplicationFirewallPolicies as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Lists all of the protection policies within a resource group. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines a list of WebApplicationFirewallPolicies as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Lists all of the protection policies within a subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines a list of WebApplicationFirewallPolicies as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Lists all of the protection policies within a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines a list of WebApplicationFirewallPolicies as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - /** * Retrieve protection policy with specified name within a resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -83,7 +36,7 @@ Response getByResourceGroupWithResponse(Strin /** * Retrieve protection policy with specified name within a resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -96,7 +49,7 @@ Response getByResourceGroupWithResponse(Strin /** * Create or update policy with specified rule set name within a resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. * @param parameters Policy to be created. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -111,7 +64,7 @@ Response getByResourceGroupWithResponse(Strin /** * Create or update policy with specified rule set name within a resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. * @param parameters Policy to be created. * @param context The context to associate with this operation. @@ -127,7 +80,7 @@ SyncPoller, WebApplicationFirewall /** * Create or update policy with specified rule set name within a resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. * @param parameters Policy to be created. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -142,7 +95,7 @@ WebApplicationFirewallPolicyInner createOrUpdate(String resourceGroupName, Strin /** * Create or update policy with specified rule set name within a resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. * @param parameters Policy to be created. * @param context The context to associate with this operation. @@ -159,7 +112,7 @@ WebApplicationFirewallPolicyInner createOrUpdate(String resourceGroupName, Strin * Patch a specific frontdoor webApplicationFirewall policy for tags update under the specified subscription and * resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. * @param parameters FrontdoorWebApplicationFirewallPolicy parameters to be patched. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -175,7 +128,7 @@ WebApplicationFirewallPolicyInner createOrUpdate(String resourceGroupName, Strin * Patch a specific frontdoor webApplicationFirewall policy for tags update under the specified subscription and * resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. * @param parameters FrontdoorWebApplicationFirewallPolicy parameters to be patched. * @param context The context to associate with this operation. @@ -192,7 +145,7 @@ WebApplicationFirewallPolicyInner createOrUpdate(String resourceGroupName, Strin * Patch a specific frontdoor webApplicationFirewall policy for tags update under the specified subscription and * resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. * @param parameters FrontdoorWebApplicationFirewallPolicy parameters to be patched. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -207,7 +160,7 @@ WebApplicationFirewallPolicyInner createOrUpdate(String resourceGroupName, Strin * Patch a specific frontdoor webApplicationFirewall policy for tags update under the specified subscription and * resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. * @param parameters FrontdoorWebApplicationFirewallPolicy parameters to be patched. * @param context The context to associate with this operation. @@ -223,7 +176,7 @@ WebApplicationFirewallPolicyInner update(String resourceGroupName, String policy /** * Deletes Policy. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -236,7 +189,7 @@ WebApplicationFirewallPolicyInner update(String resourceGroupName, String policy /** * Deletes Policy. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -250,7 +203,7 @@ WebApplicationFirewallPolicyInner update(String resourceGroupName, String policy /** * Deletes Policy. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -262,7 +215,7 @@ WebApplicationFirewallPolicyInner update(String resourceGroupName, String policy /** * Deletes Policy. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -271,4 +224,51 @@ WebApplicationFirewallPolicyInner update(String resourceGroupName, String policy */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String policyName, Context context); + + /** + * Lists all of the protection policies within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines a list of WebApplicationFirewallPolicies as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists all of the protection policies within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines a list of WebApplicationFirewallPolicies as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Lists all of the protection policies within a subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines a list of WebApplicationFirewallPolicies as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Lists all of the protection policies within a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines a list of WebApplicationFirewallPolicies as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/PreconfiguredEndpointsClient.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/PreconfiguredEndpointsClient.java index e555412d82db3..b23d6e5c78f44 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/PreconfiguredEndpointsClient.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/PreconfiguredEndpointsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.fluent; @@ -17,7 +17,7 @@ public interface PreconfiguredEndpointsClient { /** * Gets a list of Preconfigured Endpoints. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -30,7 +30,7 @@ public interface PreconfiguredEndpointsClient { /** * Gets a list of Preconfigured Endpoints. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/ReportsClient.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/ReportsClient.java index 6df3920639609..d6b258b503f67 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/ReportsClient.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/ReportsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.fluent; @@ -22,7 +22,7 @@ public interface ReportsClient { /** * Gets a Latency Scorecard for a given Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param aggregationInterval The aggregation interval of the Latency Scorecard. @@ -43,7 +43,7 @@ Response getLatencyScorecardsWithResponse(String resource /** * Gets a Latency Scorecard for a given Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param aggregationInterval The aggregation interval of the Latency Scorecard. @@ -59,7 +59,7 @@ LatencyScorecardInner getLatencyScorecards(String resourceGroupName, String prof /** * Gets a Timeseries for a given Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param startDateTimeUtc The start DateTime of the Timeseries in UTC. @@ -84,7 +84,7 @@ Response getTimeseriesWithResponse(String resourceGroupName, St /** * Gets a Timeseries for a given Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param startDateTimeUtc The start DateTime of the Timeseries in UTC. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/RulesEnginesClient.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/RulesEnginesClient.java index d0c36f0216282..32abde3f4cee4 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/RulesEnginesClient.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/RulesEnginesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.fluent; @@ -17,39 +17,10 @@ * An instance of this class provides access to all the operations defined in RulesEnginesClient. */ public interface RulesEnginesClient { - /** - * Lists all of the Rules Engine Configurations within a Front Door. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param frontDoorName Name of the Front Door which is globally unique. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Rules Engine Configurations as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByFrontDoor(String resourceGroupName, String frontDoorName); - - /** - * Lists all of the Rules Engine Configurations within a Front Door. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param frontDoorName Name of the Front Door which is globally unique. - * @param context The context to associate with this 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 result of the request to list Rules Engine Configurations as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByFrontDoor(String resourceGroupName, String frontDoorName, Context context); - /** * Gets a Rules Engine Configuration with the specified name within the specified Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param rulesEngineName Name of the Rules Engine which is unique within the Front Door. * @param context The context to associate with this operation. @@ -66,7 +37,7 @@ Response getWithResponse(String resourceGroupName, String fron /** * Gets a Rules Engine Configuration with the specified name within the specified Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param rulesEngineName Name of the Rules Engine which is unique within the Front Door. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -80,7 +51,7 @@ Response getWithResponse(String resourceGroupName, String fron /** * Creates a new Rules Engine Configuration with the specified name within the specified Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param rulesEngineName Name of the Rules Engine which is unique within the Front Door. * @param rulesEngineParameters Rules Engine Configuration properties needed to create a new Rules Engine @@ -98,7 +69,7 @@ SyncPoller, RulesEngineInner> beginCreateOrUpdate(S /** * Creates a new Rules Engine Configuration with the specified name within the specified Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param rulesEngineName Name of the Rules Engine which is unique within the Front Door. * @param rulesEngineParameters Rules Engine Configuration properties needed to create a new Rules Engine @@ -117,7 +88,7 @@ SyncPoller, RulesEngineInner> beginCreateOrUpdate(S /** * Creates a new Rules Engine Configuration with the specified name within the specified Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param rulesEngineName Name of the Rules Engine which is unique within the Front Door. * @param rulesEngineParameters Rules Engine Configuration properties needed to create a new Rules Engine @@ -135,7 +106,7 @@ RulesEngineInner createOrUpdate(String resourceGroupName, String frontDoorName, /** * Creates a new Rules Engine Configuration with the specified name within the specified Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param rulesEngineName Name of the Rules Engine which is unique within the Front Door. * @param rulesEngineParameters Rules Engine Configuration properties needed to create a new Rules Engine @@ -154,7 +125,7 @@ RulesEngineInner createOrUpdate(String resourceGroupName, String frontDoorName, /** * Deletes an existing Rules Engine Configuration with the specified parameters. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param rulesEngineName Name of the Rules Engine which is unique within the Front Door. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -169,7 +140,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an existing Rules Engine Configuration with the specified parameters. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param rulesEngineName Name of the Rules Engine which is unique within the Front Door. * @param context The context to associate with this operation. @@ -185,7 +156,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an existing Rules Engine Configuration with the specified parameters. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param rulesEngineName Name of the Rules Engine which is unique within the Front Door. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -198,7 +169,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an existing Rules Engine Configuration with the specified parameters. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param rulesEngineName Name of the Rules Engine which is unique within the Front Door. * @param context The context to associate with this operation. @@ -208,4 +179,31 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String frontDoorName, String rulesEngineName, Context context); + + /** + * Lists all of the Rules Engine Configurations within a Front Door. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param frontDoorName Name of the Front Door which is globally unique. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of RulesEngine items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByFrontDoor(String resourceGroupName, String frontDoorName); + + /** + * Lists all of the Rules Engine Configurations within a Front Door. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param frontDoorName Name of the Front Door which is globally unique. + * @param context The context to associate with this 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 paged collection of RulesEngine items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByFrontDoor(String resourceGroupName, String frontDoorName, Context context); } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/BackendPoolProperties.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/BackendPoolProperties.java index fec8e5d458c76..b75b992252e22 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/BackendPoolProperties.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/BackendPoolProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.fluent.models; @@ -21,6 +21,8 @@ @Fluent public final class BackendPoolProperties extends BackendPoolUpdateParameters { /* + * Resource status of the Front Door or Front Door SubResource. + * * Resource status. */ private FrontDoorResourceState resourceState; @@ -32,7 +34,9 @@ public BackendPoolProperties() { } /** - * Get the resourceState property: Resource status. + * Get the resourceState property: Resource status of the Front Door or Front Door SubResource. + * + * Resource status. * * @return the resourceState value. */ @@ -67,18 +71,6 @@ public BackendPoolProperties withHealthProbeSettings(SubResource healthProbeSett return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (backends() != null) { - backends().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/CheckNameAvailabilityOutputInner.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/CheckNameAvailabilityOutputInner.java index 3edef3a84f6da..4207e6b0eb8d9 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/CheckNameAvailabilityOutputInner.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/CheckNameAvailabilityOutputInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.fluent.models; @@ -35,7 +35,7 @@ public final class CheckNameAvailabilityOutputInner implements JsonSerializable< /** * Creates an instance of CheckNameAvailabilityOutputInner class. */ - public CheckNameAvailabilityOutputInner() { + private CheckNameAvailabilityOutputInner() { } /** @@ -65,14 +65,6 @@ public String message() { return this.message; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/ExperimentInner.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/ExperimentInner.java index a0352975532cc..92d271d300fc3 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/ExperimentInner.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/ExperimentInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.fluent.models; @@ -222,17 +222,6 @@ public String scriptFileUri() { return this.innerProperties() == null ? null : this.innerProperties().scriptFileUri(); } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/ExperimentProperties.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/ExperimentProperties.java index 45a9d8585a2fe..6866f0f1907d5 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/ExperimentProperties.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/ExperimentProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.fluent.models; @@ -167,20 +167,6 @@ public String scriptFileUri() { return this.scriptFileUri; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (endpointA() != null) { - endpointA().validate(); - } - if (endpointB() != null) { - endpointB().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/ExperimentUpdateProperties.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/ExperimentUpdateProperties.java index 2cc48f9055ca3..0cdcd90bde6c6 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/ExperimentUpdateProperties.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/ExperimentUpdateProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.fluent.models; @@ -73,14 +73,6 @@ public ExperimentUpdateProperties withEnabledState(State enabledState) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/FrontDoorCertificateSourceParameters.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/FrontDoorCertificateSourceParameters.java index 3c3c7474db28e..2dd768415cc9c 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/FrontDoorCertificateSourceParameters.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/FrontDoorCertificateSourceParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.fluent.models; @@ -51,14 +51,6 @@ public FrontDoorCertificateSourceParameters withCertificateType(FrontDoorCertifi return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/FrontDoorInner.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/FrontDoorInner.java index 3f4f0518f1400..660a80012cc1e 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/FrontDoorInner.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/FrontDoorInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.fluent.models; @@ -110,7 +110,9 @@ public FrontDoorInner withTags(Map tags) { } /** - * Get the resourceState property: Resource status of the Front Door. + * Get the resourceState property: Resource status of the Front Door or Front Door SubResource. + * + * Resource status of the Front Door. * * @return the resourceState value. */ @@ -349,17 +351,6 @@ public FrontDoorInner withEnabledState(FrontDoorEnabledState enabledState) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/FrontDoorProperties.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/FrontDoorProperties.java index 8755ed752fa87..5e98c75ee4377 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/FrontDoorProperties.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/FrontDoorProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.fluent.models; @@ -26,6 +26,8 @@ @Fluent public final class FrontDoorProperties extends FrontDoorUpdateParameters { /* + * Resource status of the Front Door or Front Door SubResource. + * * Resource status of the Front Door. */ private FrontDoorResourceState resourceState; @@ -62,7 +64,9 @@ public FrontDoorProperties() { } /** - * Get the resourceState property: Resource status of the Front Door. + * Get the resourceState property: Resource status of the Front Door or Front Door SubResource. + * + * Resource status of the Front Door. * * @return the resourceState value. */ @@ -187,36 +191,6 @@ public FrontDoorProperties withEnabledState(FrontDoorEnabledState enabledState) return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (rulesEngines() != null) { - rulesEngines().forEach(e -> e.validate()); - } - if (routingRules() != null) { - routingRules().forEach(e -> e.validate()); - } - if (loadBalancingSettings() != null) { - loadBalancingSettings().forEach(e -> e.validate()); - } - if (healthProbeSettings() != null) { - healthProbeSettings().forEach(e -> e.validate()); - } - if (backendPools() != null) { - backendPools().forEach(e -> e.validate()); - } - if (frontendEndpoints() != null) { - frontendEndpoints().forEach(e -> e.validate()); - } - if (backendPoolsSettings() != null) { - backendPoolsSettings().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/FrontendEndpointInner.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/FrontendEndpointInner.java index 49912ea617cb8..638a45c41915a 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/FrontendEndpointInner.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/FrontendEndpointInner.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.management.SubResource; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.frontdoor.models.BasicResourceWithSettableIDName; import com.azure.resourcemanager.frontdoor.models.CustomHttpsConfiguration; import com.azure.resourcemanager.frontdoor.models.CustomHttpsProvisioningState; import com.azure.resourcemanager.frontdoor.models.CustomHttpsProvisioningSubstate; @@ -21,17 +21,12 @@ * A frontend endpoint used for routing. */ @Fluent -public final class FrontendEndpointInner extends SubResource { +public final class FrontendEndpointInner extends BasicResourceWithSettableIDName { /* * Properties of the Frontend endpoint */ private FrontendEndpointProperties innerProperties; - /* - * Resource name. - */ - private String name; - /* * Resource type. */ @@ -52,31 +47,12 @@ private FrontendEndpointProperties innerProperties() { return this.innerProperties; } - /** - * Get the name property: Resource name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Resource name. - * - * @param name the name value to set. - * @return the FrontendEndpointInner object itself. - */ - public FrontendEndpointInner withName(String name) { - this.name = name; - return this; - } - /** * Get the type property: Resource type. * * @return the type value. */ + @Override public String type() { return this.type; } @@ -91,7 +67,18 @@ public FrontendEndpointInner withId(String id) { } /** - * Get the resourceState property: Resource status. + * {@inheritDoc} + */ + @Override + public FrontendEndpointInner withName(String name) { + super.withName(name); + return this; + } + + /** + * Get the resourceState property: Resource status of the Front Door or Front Door SubResource. + * + * Resource status. * * @return the resourceState value. */ @@ -227,17 +214,6 @@ public FrontendEndpointInner withWebApplicationFirewallPolicyLink( return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ @@ -245,8 +221,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("id", id()); + jsonWriter.writeStringField("name", name()); jsonWriter.writeJsonField("properties", this.innerProperties); - jsonWriter.writeStringField("name", this.name); return jsonWriter.writeEndObject(); } @@ -267,12 +243,12 @@ public static FrontendEndpointInner fromJson(JsonReader jsonReader) throws IOExc if ("id".equals(fieldName)) { deserializedFrontendEndpointInner.withId(reader.getString()); - } else if ("properties".equals(fieldName)) { - deserializedFrontendEndpointInner.innerProperties = FrontendEndpointProperties.fromJson(reader); } else if ("name".equals(fieldName)) { - deserializedFrontendEndpointInner.name = reader.getString(); + deserializedFrontendEndpointInner.withName(reader.getString()); } else if ("type".equals(fieldName)) { deserializedFrontendEndpointInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedFrontendEndpointInner.innerProperties = FrontendEndpointProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/FrontendEndpointProperties.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/FrontendEndpointProperties.java index e1fab1708a2e6..6fa6abdeb2336 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/FrontendEndpointProperties.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/FrontendEndpointProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.fluent.models; @@ -23,6 +23,8 @@ @Fluent public final class FrontendEndpointProperties extends FrontendEndpointUpdateParameters { /* + * Resource status of the Front Door or Front Door SubResource. + * * Resource status. */ private FrontDoorResourceState resourceState; @@ -49,7 +51,9 @@ public FrontendEndpointProperties() { } /** - * Get the resourceState property: Resource status. + * Get the resourceState property: Resource status of the Front Door or Front Door SubResource. + * + * Resource status. * * @return the resourceState value. */ @@ -123,21 +127,6 @@ public FrontendEndpointProperties withWebApplicationFirewallPolicyLink( return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (customHttpsConfiguration() != null) { - customHttpsConfiguration().validate(); - } - if (webApplicationFirewallPolicyLink() != null) { - webApplicationFirewallPolicyLink().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/HealthProbeSettingsProperties.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/HealthProbeSettingsProperties.java index 0f6ea12d0b840..a1eafa292e872 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/HealthProbeSettingsProperties.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/HealthProbeSettingsProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.fluent.models; @@ -21,6 +21,8 @@ @Fluent public final class HealthProbeSettingsProperties extends HealthProbeSettingsUpdateParameters { /* + * Resource status of the Front Door or Front Door SubResource. + * * Resource status. */ private FrontDoorResourceState resourceState; @@ -32,7 +34,9 @@ public HealthProbeSettingsProperties() { } /** - * Get the resourceState property: Resource status. + * Get the resourceState property: Resource status of the Front Door or Front Door SubResource. + * + * Resource status. * * @return the resourceState value. */ @@ -85,15 +89,6 @@ public HealthProbeSettingsProperties withEnabledState(HealthProbeEnabled enabled return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/KeyVaultCertificateSourceParameters.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/KeyVaultCertificateSourceParameters.java index 02ac5b6c69c53..fba7179c52f24 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/KeyVaultCertificateSourceParameters.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/KeyVaultCertificateSourceParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.fluent.models; @@ -99,17 +99,6 @@ public KeyVaultCertificateSourceParameters withSecretVersion(String secretVersio return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (vault() != null) { - vault().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/LatencyScorecardInner.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/LatencyScorecardInner.java index 1bd723ba62236..7fb1e57e845be 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/LatencyScorecardInner.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/LatencyScorecardInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.Resource; import com.azure.json.JsonReader; import com.azure.json.JsonToken; @@ -18,7 +18,7 @@ /** * Defines the LatencyScorecard. */ -@Fluent +@Immutable public final class LatencyScorecardInner extends Resource { /* * The properties of a latency scorecard @@ -43,7 +43,7 @@ public final class LatencyScorecardInner extends Resource { /** * Creates an instance of LatencyScorecardInner class. */ - public LatencyScorecardInner() { + private LatencyScorecardInner() { } /** @@ -85,24 +85,6 @@ public String id() { return this.id; } - /** - * {@inheritDoc} - */ - @Override - public LatencyScorecardInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public LatencyScorecardInner withTags(Map tags) { - super.withTags(tags); - return this; - } - /** * Get the id property: The unique identifier of the Latency Scorecard. * @@ -185,31 +167,6 @@ public List latencyMetrics() { return this.innerProperties() == null ? null : this.innerProperties().latencyMetrics(); } - /** - * Set the latencyMetrics property: The latency metrics of the Latency Scorecard. - * - * @param latencyMetrics the latencyMetrics value to set. - * @return the LatencyScorecardInner object itself. - */ - public LatencyScorecardInner withLatencyMetrics(List latencyMetrics) { - if (this.innerProperties() == null) { - this.innerProperties = new LatencyScorecardProperties(); - } - this.innerProperties().withLatencyMetrics(latencyMetrics); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/LatencyScorecardProperties.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/LatencyScorecardProperties.java index 2f765dea378a0..ac6ca77b4e9fd 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/LatencyScorecardProperties.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/LatencyScorecardProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -18,7 +18,7 @@ /** * Defines a the properties of a Latency Scorecard. */ -@Fluent +@Immutable public final class LatencyScorecardProperties implements JsonSerializable { /* * The unique identifier of the Latency Scorecard @@ -69,7 +69,7 @@ public final class LatencyScorecardProperties implements JsonSerializable latencyMetrics() { return this.latencyMetrics; } - /** - * Set the latencyMetrics property: The latency metrics of the Latency Scorecard. - * - * @param latencyMetrics the latencyMetrics value to set. - * @return the LatencyScorecardProperties object itself. - */ - public LatencyScorecardProperties withLatencyMetrics(List latencyMetrics) { - this.latencyMetrics = latencyMetrics; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (latencyMetrics() != null) { - latencyMetrics().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/LoadBalancingSettingsProperties.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/LoadBalancingSettingsProperties.java index f0eac5f88bdd3..ef23106724125 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/LoadBalancingSettingsProperties.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/LoadBalancingSettingsProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.fluent.models; @@ -18,6 +18,8 @@ @Fluent public final class LoadBalancingSettingsProperties extends LoadBalancingSettingsUpdateParameters { /* + * Resource status of the Front Door or Front Door SubResource. + * * Resource status. */ private FrontDoorResourceState resourceState; @@ -29,7 +31,9 @@ public LoadBalancingSettingsProperties() { } /** - * Get the resourceState property: Resource status. + * Get the resourceState property: Resource status of the Front Door or Front Door SubResource. + * + * Resource status. * * @return the resourceState value. */ @@ -64,15 +68,6 @@ public LoadBalancingSettingsProperties withAdditionalLatencyMilliseconds(Integer return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/ManagedRuleSetDefinitionInner.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/ManagedRuleSetDefinitionInner.java index 25265f2dac5bb..11325f462968b 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/ManagedRuleSetDefinitionInner.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/ManagedRuleSetDefinitionInner.java @@ -1,15 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.Resource; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.frontdoor.models.ManagedRuleGroupDefinition; +import com.azure.resourcemanager.frontdoor.models.ManagedRuleSetStatus; import java.io.IOException; import java.util.List; import java.util.Map; @@ -17,7 +18,7 @@ /** * Describes the a managed rule set definition. */ -@Fluent +@Immutable public final class ManagedRuleSetDefinitionInner extends Resource { /* * Properties for a managed rule set definition. @@ -42,7 +43,7 @@ public final class ManagedRuleSetDefinitionInner extends Resource { /** * Creates an instance of ManagedRuleSetDefinitionInner class. */ - public ManagedRuleSetDefinitionInner() { + private ManagedRuleSetDefinitionInner() { } /** @@ -84,24 +85,6 @@ public String id() { return this.id; } - /** - * {@inheritDoc} - */ - @Override - public ManagedRuleSetDefinitionInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedRuleSetDefinitionInner withTags(Map tags) { - super.withTags(tags); - return this; - } - /** * Get the provisioningState property: Provisioning state of the managed rule set. * @@ -148,14 +131,22 @@ public List ruleGroups() { } /** - * Validates the instance. + * Get the displayName property: Human-readable display name for the managed rule set version (e.g., 'Default + * Ruleset 2.2 (Latest, Recommended)'). + * + * @return the displayName value. + */ + public String displayName() { + return this.innerProperties() == null ? null : this.innerProperties().displayName(); + } + + /** + * Get the status property: Describes the lifecycle status of the managed rule set version. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the status value. */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } + public ManagedRuleSetStatus status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); } /** diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/ManagedRuleSetDefinitionProperties.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/ManagedRuleSetDefinitionProperties.java index f462341c22b6d..e9e42085151cf 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/ManagedRuleSetDefinitionProperties.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/ManagedRuleSetDefinitionProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.fluent.models; @@ -10,6 +10,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.frontdoor.models.ManagedRuleGroupDefinition; +import com.azure.resourcemanager.frontdoor.models.ManagedRuleSetStatus; import java.io.IOException; import java.util.List; @@ -43,10 +44,20 @@ public final class ManagedRuleSetDefinitionProperties implements JsonSerializabl */ private List ruleGroups; + /* + * Human-readable display name for the managed rule set version (e.g., 'Default Ruleset 2.2 (Latest, Recommended)'). + */ + private String displayName; + + /* + * Describes the lifecycle status of the managed rule set version. + */ + private ManagedRuleSetStatus status; + /** * Creates an instance of ManagedRuleSetDefinitionProperties class. */ - public ManagedRuleSetDefinitionProperties() { + private ManagedRuleSetDefinitionProperties() { } /** @@ -95,14 +106,22 @@ public List ruleGroups() { } /** - * Validates the instance. + * Get the displayName property: Human-readable display name for the managed rule set version (e.g., 'Default + * Ruleset 2.2 (Latest, Recommended)'). + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Get the status property: Describes the lifecycle status of the managed rule set version. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the status value. */ - public void validate() { - if (ruleGroups() != null) { - ruleGroups().forEach(e -> e.validate()); - } + public ManagedRuleSetStatus status() { + return this.status; } /** @@ -142,6 +161,11 @@ public static ManagedRuleSetDefinitionProperties fromJson(JsonReader jsonReader) List ruleGroups = reader.readArray(reader1 -> ManagedRuleGroupDefinition.fromJson(reader1)); deserializedManagedRuleSetDefinitionProperties.ruleGroups = ruleGroups; + } else if ("displayName".equals(fieldName)) { + deserializedManagedRuleSetDefinitionProperties.displayName = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedManagedRuleSetDefinitionProperties.status + = ManagedRuleSetStatus.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/PolicySettingsLogScrubbing.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/PolicySettingsLogScrubbing.java index 6b6fb18509cc2..664904b77566f 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/PolicySettingsLogScrubbing.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/PolicySettingsLogScrubbing.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.fluent.models; @@ -75,17 +75,6 @@ public PolicySettingsLogScrubbing withScrubbingRules(List e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/PreconfiguredEndpointInner.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/PreconfiguredEndpointInner.java index 0bd7e0de5359c..40f30279c69a7 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/PreconfiguredEndpointInner.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/PreconfiguredEndpointInner.java @@ -1,47 +1,47 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.fluent.models; -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.frontdoor.models.EndpointType; +import com.azure.resourcemanager.frontdoor.models.ResourcewithSettableName; import java.io.IOException; import java.util.Map; /** * Defines the properties of a preconfigured endpoint. */ -@Fluent -public final class PreconfiguredEndpointInner extends Resource { +@Immutable +public final class PreconfiguredEndpointInner extends ResourcewithSettableName { /* * The properties of a preconfiguredEndpoint */ private PreconfiguredEndpointProperties innerProperties; /* - * The type of the resource. + * Resource type. */ private String type; /* - * The name of the resource. + * Resource name. */ private String name; /* - * Fully qualified resource Id for the resource. + * Resource ID. */ private String id; /** * Creates an instance of PreconfiguredEndpointInner class. */ - public PreconfiguredEndpointInner() { + private PreconfiguredEndpointInner() { } /** @@ -54,7 +54,7 @@ private PreconfiguredEndpointProperties innerProperties() { } /** - * Get the type property: The type of the resource. + * Get the type property: Resource type. * * @return the type value. */ @@ -64,7 +64,7 @@ public String type() { } /** - * Get the name property: The name of the resource. + * Get the name property: Resource name. * * @return the name value. */ @@ -74,7 +74,7 @@ public String name() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the id property: Resource ID. * * @return the id value. */ @@ -83,24 +83,6 @@ public String id() { return this.id; } - /** - * {@inheritDoc} - */ - @Override - public PreconfiguredEndpointInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public PreconfiguredEndpointInner withTags(Map tags) { - super.withTags(tags); - return this; - } - /** * Get the description property: The description of the endpoint. * @@ -110,20 +92,6 @@ public String description() { return this.innerProperties() == null ? null : this.innerProperties().description(); } - /** - * Set the description property: The description of the endpoint. - * - * @param description the description value to set. - * @return the PreconfiguredEndpointInner object itself. - */ - public PreconfiguredEndpointInner withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new PreconfiguredEndpointProperties(); - } - this.innerProperties().withDescription(description); - return this; - } - /** * Get the endpoint property: The endpoint that is preconfigured. * @@ -133,20 +101,6 @@ public String endpoint() { return this.innerProperties() == null ? null : this.innerProperties().endpoint(); } - /** - * Set the endpoint property: The endpoint that is preconfigured. - * - * @param endpoint the endpoint value to set. - * @return the PreconfiguredEndpointInner object itself. - */ - public PreconfiguredEndpointInner withEndpoint(String endpoint) { - if (this.innerProperties() == null) { - this.innerProperties = new PreconfiguredEndpointProperties(); - } - this.innerProperties().withEndpoint(endpoint); - return this; - } - /** * Get the endpointType property: The type of endpoint. * @@ -156,20 +110,6 @@ public EndpointType endpointType() { return this.innerProperties() == null ? null : this.innerProperties().endpointType(); } - /** - * Set the endpointType property: The type of endpoint. - * - * @param endpointType the endpointType value to set. - * @return the PreconfiguredEndpointInner object itself. - */ - public PreconfiguredEndpointInner withEndpointType(EndpointType endpointType) { - if (this.innerProperties() == null) { - this.innerProperties = new PreconfiguredEndpointProperties(); - } - this.innerProperties().withEndpointType(endpointType); - return this; - } - /** * Get the backend property: The preconfigured endpoint backend. * @@ -179,31 +119,6 @@ public String backend() { return this.innerProperties() == null ? null : this.innerProperties().backend(); } - /** - * Set the backend property: The preconfigured endpoint backend. - * - * @param backend the backend value to set. - * @return the PreconfiguredEndpointInner object itself. - */ - public PreconfiguredEndpointInner withBackend(String backend) { - if (this.innerProperties() == null) { - this.innerProperties = new PreconfiguredEndpointProperties(); - } - this.innerProperties().withBackend(backend); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ @@ -222,7 +137,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of PreconfiguredEndpointInner if the JsonReader was pointing to an instance of it, or null if * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the PreconfiguredEndpointInner. */ public static PreconfiguredEndpointInner fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/PreconfiguredEndpointProperties.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/PreconfiguredEndpointProperties.java index d111c544f253b..d029d2a38ff16 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/PreconfiguredEndpointProperties.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/PreconfiguredEndpointProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * Defines the properties of a preconfigured endpoint. */ -@Fluent +@Immutable public final class PreconfiguredEndpointProperties implements JsonSerializable { /* * The description of the endpoint @@ -40,7 +40,7 @@ public final class PreconfiguredEndpointProperties implements JsonSerializable

rules) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ @@ -144,7 +135,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of RulesEngineInner if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the RulesEngineInner. */ public static RulesEngineInner fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/RulesEngineProperties.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/RulesEngineProperties.java index 9261c0cff01c1..f8d1f3ce1e626 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/RulesEngineProperties.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/RulesEngineProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.fluent.models; @@ -20,6 +20,8 @@ @Fluent public final class RulesEngineProperties extends RulesEngineUpdateParameters { /* + * Resource status of the Front Door or Front Door SubResource. + * * Resource status. */ private FrontDoorResourceState resourceState; @@ -31,7 +33,9 @@ public RulesEngineProperties() { } /** - * Get the resourceState property: Resource status. + * Get the resourceState property: Resource status of the Front Door or Front Door SubResource. + * + * Resource status. * * @return the resourceState value. */ @@ -48,18 +52,6 @@ public RulesEngineProperties withRules(List rules) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (rules() != null) { - rules().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/TimeseriesInner.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/TimeseriesInner.java index 591894210148c..fe614687011cd 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/TimeseriesInner.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/TimeseriesInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.Resource; import com.azure.json.JsonReader; import com.azure.json.JsonToken; @@ -19,7 +19,7 @@ /** * Defines the Timeseries. */ -@Fluent +@Immutable public final class TimeseriesInner extends Resource { /* * The properties of a Timeseries @@ -44,7 +44,7 @@ public final class TimeseriesInner extends Resource { /** * Creates an instance of TimeseriesInner class. */ - public TimeseriesInner() { + private TimeseriesInner() { } /** @@ -86,24 +86,6 @@ public String id() { return this.id; } - /** - * {@inheritDoc} - */ - @Override - public TimeseriesInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public TimeseriesInner withTags(Map tags) { - super.withTags(tags); - return this; - } - /** * Get the endpoint property: The endpoint associated with the Timeseries data point. * @@ -113,20 +95,6 @@ public String endpoint() { return this.innerProperties() == null ? null : this.innerProperties().endpoint(); } - /** - * Set the endpoint property: The endpoint associated with the Timeseries data point. - * - * @param endpoint the endpoint value to set. - * @return the TimeseriesInner object itself. - */ - public TimeseriesInner withEndpoint(String endpoint) { - if (this.innerProperties() == null) { - this.innerProperties = new TimeseriesProperties(); - } - this.innerProperties().withEndpoint(endpoint); - return this; - } - /** * Get the startDateTimeUtc property: The start DateTime of the Timeseries in UTC. * @@ -136,20 +104,6 @@ public String startDateTimeUtc() { return this.innerProperties() == null ? null : this.innerProperties().startDateTimeUtc(); } - /** - * Set the startDateTimeUtc property: The start DateTime of the Timeseries in UTC. - * - * @param startDateTimeUtc the startDateTimeUtc value to set. - * @return the TimeseriesInner object itself. - */ - public TimeseriesInner withStartDateTimeUtc(String startDateTimeUtc) { - if (this.innerProperties() == null) { - this.innerProperties = new TimeseriesProperties(); - } - this.innerProperties().withStartDateTimeUtc(startDateTimeUtc); - return this; - } - /** * Get the endDateTimeUtc property: The end DateTime of the Timeseries in UTC. * @@ -159,20 +113,6 @@ public String endDateTimeUtc() { return this.innerProperties() == null ? null : this.innerProperties().endDateTimeUtc(); } - /** - * Set the endDateTimeUtc property: The end DateTime of the Timeseries in UTC. - * - * @param endDateTimeUtc the endDateTimeUtc value to set. - * @return the TimeseriesInner object itself. - */ - public TimeseriesInner withEndDateTimeUtc(String endDateTimeUtc) { - if (this.innerProperties() == null) { - this.innerProperties = new TimeseriesProperties(); - } - this.innerProperties().withEndDateTimeUtc(endDateTimeUtc); - return this; - } - /** * Get the aggregationInterval property: The aggregation interval of the Timeseries. * @@ -182,20 +122,6 @@ public AggregationInterval aggregationInterval() { return this.innerProperties() == null ? null : this.innerProperties().aggregationInterval(); } - /** - * Set the aggregationInterval property: The aggregation interval of the Timeseries. - * - * @param aggregationInterval the aggregationInterval value to set. - * @return the TimeseriesInner object itself. - */ - public TimeseriesInner withAggregationInterval(AggregationInterval aggregationInterval) { - if (this.innerProperties() == null) { - this.innerProperties = new TimeseriesProperties(); - } - this.innerProperties().withAggregationInterval(aggregationInterval); - return this; - } - /** * Get the timeseriesType property: The type of Timeseries. * @@ -205,20 +131,6 @@ public TimeseriesType timeseriesType() { return this.innerProperties() == null ? null : this.innerProperties().timeseriesType(); } - /** - * Set the timeseriesType property: The type of Timeseries. - * - * @param timeseriesType the timeseriesType value to set. - * @return the TimeseriesInner object itself. - */ - public TimeseriesInner withTimeseriesType(TimeseriesType timeseriesType) { - if (this.innerProperties() == null) { - this.innerProperties = new TimeseriesProperties(); - } - this.innerProperties().withTimeseriesType(timeseriesType); - return this; - } - /** * Get the country property: The country associated with the Timeseries. Values are country ISO codes as specified * here- https://www.iso.org/iso-3166-country-codes.html. @@ -229,21 +141,6 @@ public String country() { return this.innerProperties() == null ? null : this.innerProperties().country(); } - /** - * Set the country property: The country associated with the Timeseries. Values are country ISO codes as specified - * here- https://www.iso.org/iso-3166-country-codes.html. - * - * @param country the country value to set. - * @return the TimeseriesInner object itself. - */ - public TimeseriesInner withCountry(String country) { - if (this.innerProperties() == null) { - this.innerProperties = new TimeseriesProperties(); - } - this.innerProperties().withCountry(country); - return this; - } - /** * Get the timeseriesData property: The set of data points for the timeseries. * @@ -253,31 +150,6 @@ public List timeseriesData() { return this.innerProperties() == null ? null : this.innerProperties().timeseriesData(); } - /** - * Set the timeseriesData property: The set of data points for the timeseries. - * - * @param timeseriesData the timeseriesData value to set. - * @return the TimeseriesInner object itself. - */ - public TimeseriesInner withTimeseriesData(List timeseriesData) { - if (this.innerProperties() == null) { - this.innerProperties = new TimeseriesProperties(); - } - this.innerProperties().withTimeseriesData(timeseriesData); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/TimeseriesProperties.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/TimeseriesProperties.java index e9f51886cc843..7c7bd9ad03380 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/TimeseriesProperties.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/TimeseriesProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -18,7 +18,7 @@ /** * Defines the properties of a timeseries. */ -@Fluent +@Immutable public final class TimeseriesProperties implements JsonSerializable { /* * The endpoint associated with the Timeseries data point @@ -59,7 +59,7 @@ public final class TimeseriesProperties implements JsonSerializable timeseriesData() { return this.timeseriesData; } - /** - * Set the timeseriesData property: The set of data points for the timeseries. - * - * @param timeseriesData the timeseriesData value to set. - * @return the TimeseriesProperties object itself. - */ - public TimeseriesProperties withTimeseriesData(List timeseriesData) { - this.timeseriesData = timeseriesData; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (timeseriesData() != null) { - timeseriesData().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/ValidateCustomDomainOutputInner.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/ValidateCustomDomainOutputInner.java index 8b5f35a53f0df..1baf86102f50d 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/ValidateCustomDomainOutputInner.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/ValidateCustomDomainOutputInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.fluent.models; @@ -34,7 +34,7 @@ public final class ValidateCustomDomainOutputInner implements JsonSerializable e.validate()); - } - if (routingRuleLinks() != null) { - routingRuleLinks().forEach(e -> e.validate()); - } - if (securityPolicyLinks() != null) { - securityPolicyLinks().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/package-info.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/package-info.java index 39c72a9711105..1420eadf7bdf4 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/package-info.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** * Package containing the inner data models for FrontDoorManagementClient. - * FrontDoor Client. + * APIs to manage web application firewall rules. */ package com.azure.resourcemanager.frontdoor.fluent.models; diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/package-info.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/package-info.java index 712cd55c5b522..48a08233b3032 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/package-info.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** * Package containing the service clients for FrontDoorManagementClient. - * FrontDoor Client. + * APIs to manage web application firewall rules. */ package com.azure.resourcemanager.frontdoor.fluent; diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/CheckNameAvailabilityOutputImpl.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/CheckNameAvailabilityOutputImpl.java index 7ce76e9305ef3..724bf9d404204 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/CheckNameAvailabilityOutputImpl.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/CheckNameAvailabilityOutputImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.implementation; diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/EndpointsClientImpl.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/EndpointsClientImpl.java index fcda0078ce2e4..57feb4b6fba80 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/EndpointsClientImpl.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/EndpointsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.implementation; @@ -21,6 +21,7 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; @@ -60,25 +61,34 @@ public final class EndpointsClientImpl implements EndpointsClient { * The interface defining all the services for FrontDoorManagementClientEndpoints to be used by the proxy service to * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "FrontDoorManagementC") + @Host("{endpoint}") + @ServiceInterface(name = "FrontDoorManagementClientEndpoints") public interface EndpointsService { - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/purge") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> purgeContent(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> purgeContent(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("frontDoorName") String frontDoorName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PurgeParameters contentFilePaths, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") PurgeParameters contentFilePaths, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/purge") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response purgeContentSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("frontDoorName") String frontDoorName, + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") PurgeParameters contentFilePaths, Context context); } /** * Removes a content from Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param contentFilePaths The path to the content to be purged. Path can be a full URL, e.g. '/pictures/city.png' * which removes a single file, or a directory with a wildcard, e.g. '/pictures/*' which removes all folders and @@ -91,111 +101,66 @@ Mono>> purgeContent(@HostParam("$host") String endpoin @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> purgeContentWithResponseAsync(String resourceGroupName, String frontDoorName, PurgeParameters contentFilePaths) { - 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 (frontDoorName == null) { - return Mono.error(new IllegalArgumentException("Parameter frontDoorName is required and cannot be null.")); - } - if (contentFilePaths == null) { - return Mono - .error(new IllegalArgumentException("Parameter contentFilePaths is required and cannot be null.")); - } else { - contentFilePaths.validate(); - } - final String apiVersion = "2021-06-01"; - final String accept = "application/json"; + final String contentType = "application/json"; return FluxUtil - .withContext(context -> service.purgeContent(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, frontDoorName, apiVersion, contentFilePaths, accept, context)) + .withContext(context -> service.purgeContent(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, frontDoorName, contentType, contentFilePaths, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Removes a content from Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param contentFilePaths The path to the content to be purged. Path can be a full URL, e.g. '/pictures/city.png' * which removes a single file, or a directory with a wildcard, e.g. '/pictures/*' which removes all folders and * files in the directory. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> purgeContentWithResponseAsync(String resourceGroupName, - String frontDoorName, PurgeParameters contentFilePaths, 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 (frontDoorName == null) { - return Mono.error(new IllegalArgumentException("Parameter frontDoorName is required and cannot be null.")); - } - if (contentFilePaths == null) { - return Mono - .error(new IllegalArgumentException("Parameter contentFilePaths is required and cannot be null.")); - } else { - contentFilePaths.validate(); - } - final String apiVersion = "2021-06-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.purgeContent(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - frontDoorName, apiVersion, contentFilePaths, accept, context); + private Response purgeContentWithResponse(String resourceGroupName, String frontDoorName, + PurgeParameters contentFilePaths) { + final String contentType = "application/json"; + return service.purgeContentSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, frontDoorName, contentType, contentFilePaths, + Context.NONE); } /** * Removes a content from Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param contentFilePaths The path to the content to be purged. Path can be a full URL, e.g. '/pictures/city.png' * which removes a single file, or a directory with a wildcard, e.g. '/pictures/*' which removes all folders and * files in the directory. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginPurgeContentAsync(String resourceGroupName, String frontDoorName, - PurgeParameters contentFilePaths) { - Mono>> mono - = purgeContentWithResponseAsync(resourceGroupName, frontDoorName, contentFilePaths); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response purgeContentWithResponse(String resourceGroupName, String frontDoorName, + PurgeParameters contentFilePaths, Context context) { + final String contentType = "application/json"; + return service.purgeContentSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, frontDoorName, contentType, contentFilePaths, context); } /** * Removes a content from Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param contentFilePaths The path to the content to be purged. Path can be a full URL, e.g. '/pictures/city.png' * which removes a single file, or a directory with a wildcard, e.g. '/pictures/*' which removes all folders and * files in the directory. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -203,18 +168,17 @@ private PollerFlux, Void> beginPurgeContentAsync(String resourc */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginPurgeContentAsync(String resourceGroupName, String frontDoorName, - PurgeParameters contentFilePaths, Context context) { - context = this.client.mergeContext(context); + PurgeParameters contentFilePaths) { Mono>> mono - = purgeContentWithResponseAsync(resourceGroupName, frontDoorName, contentFilePaths, context); + = purgeContentWithResponseAsync(resourceGroupName, frontDoorName, contentFilePaths); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** * Removes a content from Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param contentFilePaths The path to the content to be purged. Path can be a full URL, e.g. '/pictures/city.png' * which removes a single file, or a directory with a wildcard, e.g. '/pictures/*' which removes all folders and @@ -227,13 +191,14 @@ private PollerFlux, Void> beginPurgeContentAsync(String resourc @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginPurgeContent(String resourceGroupName, String frontDoorName, PurgeParameters contentFilePaths) { - return this.beginPurgeContentAsync(resourceGroupName, frontDoorName, contentFilePaths).getSyncPoller(); + Response response = purgeContentWithResponse(resourceGroupName, frontDoorName, contentFilePaths); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** * Removes a content from Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param contentFilePaths The path to the content to be purged. Path can be a full URL, e.g. '/pictures/city.png' * which removes a single file, or a directory with a wildcard, e.g. '/pictures/*' which removes all folders and @@ -247,13 +212,15 @@ public SyncPoller, Void> beginPurgeContent(String resourceGroup @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginPurgeContent(String resourceGroupName, String frontDoorName, PurgeParameters contentFilePaths, Context context) { - return this.beginPurgeContentAsync(resourceGroupName, frontDoorName, contentFilePaths, context).getSyncPoller(); + Response response + = purgeContentWithResponse(resourceGroupName, frontDoorName, contentFilePaths, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** * Removes a content from Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param contentFilePaths The path to the content to be purged. Path can be a full URL, e.g. '/pictures/city.png' * which removes a single file, or a directory with a wildcard, e.g. '/pictures/*' which removes all folders and @@ -273,28 +240,7 @@ private Mono purgeContentAsync(String resourceGroupName, String frontDoorN /** * Removes a content from Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param frontDoorName Name of the Front Door which is globally unique. - * @param contentFilePaths The path to the content to be purged. Path can be a full URL, e.g. '/pictures/city.png' - * which removes a single file, or a directory with a wildcard, e.g. '/pictures/*' which removes all folders and - * files in the directory. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono purgeContentAsync(String resourceGroupName, String frontDoorName, - PurgeParameters contentFilePaths, Context context) { - return beginPurgeContentAsync(resourceGroupName, frontDoorName, contentFilePaths, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Removes a content from Front Door. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param contentFilePaths The path to the content to be purged. Path can be a full URL, e.g. '/pictures/city.png' * which removes a single file, or a directory with a wildcard, e.g. '/pictures/*' which removes all folders and @@ -305,13 +251,13 @@ private Mono purgeContentAsync(String resourceGroupName, String frontDoorN */ @ServiceMethod(returns = ReturnType.SINGLE) public void purgeContent(String resourceGroupName, String frontDoorName, PurgeParameters contentFilePaths) { - purgeContentAsync(resourceGroupName, frontDoorName, contentFilePaths).block(); + beginPurgeContent(resourceGroupName, frontDoorName, contentFilePaths).getFinalResult(); } /** * Removes a content from Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param contentFilePaths The path to the content to be purged. Path can be a full URL, e.g. '/pictures/city.png' * which removes a single file, or a directory with a wildcard, e.g. '/pictures/*' which removes all folders and @@ -324,6 +270,6 @@ public void purgeContent(String resourceGroupName, String frontDoorName, PurgePa @ServiceMethod(returns = ReturnType.SINGLE) public void purgeContent(String resourceGroupName, String frontDoorName, PurgeParameters contentFilePaths, Context context) { - purgeContentAsync(resourceGroupName, frontDoorName, contentFilePaths, context).block(); + beginPurgeContent(resourceGroupName, frontDoorName, contentFilePaths, context).getFinalResult(); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/EndpointsImpl.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/EndpointsImpl.java index 0f7e0ab4352de..b5cc84914c65a 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/EndpointsImpl.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/EndpointsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.implementation; diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ExperimentImpl.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ExperimentImpl.java index 59343792d24f4..6fc43f3779abe 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ExperimentImpl.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ExperimentImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.implementation; @@ -221,6 +221,6 @@ public ExperimentImpl withEnabledState(State enabledState) { } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ExperimentsClientImpl.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ExperimentsClientImpl.java index 39b8b879d7462..66c0c0ebdbca4 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ExperimentsClientImpl.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ExperimentsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.implementation; @@ -28,13 +28,14 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.frontdoor.fluent.ExperimentsClient; import com.azure.resourcemanager.frontdoor.fluent.models.ExperimentInner; -import com.azure.resourcemanager.frontdoor.models.ExperimentList; +import com.azure.resourcemanager.frontdoor.implementation.models.ExperimentList; import com.azure.resourcemanager.frontdoor.models.ExperimentUpdateModel; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -69,212 +70,122 @@ public final class ExperimentsClientImpl implements ExperimentsClient { * The interface defining all the services for FrontDoorManagementClientExperiments to be used by the proxy service * to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "FrontDoorManagementC") + @Host("{endpoint}") + @ServiceInterface(name = "FrontDoorManagementClientExperiments") public interface ExperimentsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByProfile(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("experimentName") String experimentName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, @PathParam("experimentName") String experimentName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("experimentName") String experimentName, - @BodyParam("application/json") ExperimentInner parameters, @HeaderParam("Accept") String accept, + @PathParam("experimentName") String experimentName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ExperimentInner parameters, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}") + @ExpectedResponses({ 200, 201, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, + @PathParam("experimentName") String experimentName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ExperimentInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("experimentName") String experimentName, - @BodyParam("application/json") ExperimentUpdateModel parameters, @HeaderParam("Accept") String accept, + @PathParam("experimentName") String experimentName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ExperimentUpdateModel parameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, + @PathParam("experimentName") String experimentName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ExperimentUpdateModel parameters, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("experimentName") String experimentName, @HeaderParam("Accept") String accept, Context context); + @PathParam("experimentName") String experimentName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, + @PathParam("experimentName") String experimentName, Context context); @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByProfileNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets a list of Experiments. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName The Profile identifier associated with the Tenant and Partner. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Experiments along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByProfileSinglePageAsync(String resourceGroupName, - String profileName) { - 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 (profileName == null) { - return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); - } - final String apiVersion = "2019-11-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByProfile(this.client.getEndpoint(), this.client.getSubscriptionId(), - apiVersion, resourceGroupName, profileName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of Experiments. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName The Profile identifier associated with the Tenant and Partner. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Experiments along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByProfileSinglePageAsync(String resourceGroupName, - String profileName, 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 (profileName == null) { - return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); - } - final String apiVersion = "2019-11-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByProfile(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, resourceGroupName, - profileName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of Experiments. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName The Profile identifier associated with the Tenant and Partner. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Experiments as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByProfileAsync(String resourceGroupName, String profileName) { - return new PagedFlux<>(() -> listByProfileSinglePageAsync(resourceGroupName, profileName), - nextLink -> listByProfileNextSinglePageAsync(nextLink)); - } + Mono> listByProfile(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, + @HeaderParam("Accept") String accept, Context context); - /** - * Gets a list of Experiments. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName The Profile identifier associated with the Tenant and Partner. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Experiments as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByProfileAsync(String resourceGroupName, String profileName, - Context context) { - return new PagedFlux<>(() -> listByProfileSinglePageAsync(resourceGroupName, profileName, context), - nextLink -> listByProfileNextSinglePageAsync(nextLink, context)); - } + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByProfileSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, + @HeaderParam("Accept") String accept, Context context); - /** - * Gets a list of Experiments. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName The Profile identifier associated with the Tenant and Partner. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Experiments as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByProfile(String resourceGroupName, String profileName) { - return new PagedIterable<>(listByProfileAsync(resourceGroupName, profileName)); - } + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByProfileNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - /** - * Gets a list of Experiments. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName The Profile identifier associated with the Tenant and Partner. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Experiments as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByProfile(String resourceGroupName, String profileName, Context context) { - return new PagedIterable<>(listByProfileAsync(resourceGroupName, profileName, context)); + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByProfileNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Gets an Experiment by ExperimentName. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -285,76 +196,17 @@ public PagedIterable listByProfile(String resourceGroupName, St @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String profileName, String experimentName) { - 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 (profileName == null) { - return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); - } - if (experimentName == null) { - return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null.")); - } - final String apiVersion = "2019-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, - resourceGroupName, profileName, experimentName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, experimentName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets an Experiment by ExperimentName. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName The Profile identifier associated with the Tenant and Partner. - * @param experimentName The Experiment identifier associated with the Experiment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Experiment by ExperimentName along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String profileName, - String experimentName, 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 (profileName == null) { - return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); - } - if (experimentName == null) { - return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null.")); - } - final String apiVersion = "2019-11-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, resourceGroupName, - profileName, experimentName, accept, context); - } - - /** - * Gets an Experiment by ExperimentName. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -371,7 +223,7 @@ private Mono getAsync(String resourceGroupName, String profileN /** * Gets an Experiment by ExperimentName. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param context The context to associate with this operation. @@ -383,13 +235,15 @@ private Mono getAsync(String resourceGroupName, String profileN @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String profileName, String experimentName, Context context) { - return getWithResponseAsync(resourceGroupName, profileName, experimentName, context).block(); + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, experimentName, accept, context); } /** * Gets an Experiment by ExperimentName. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -405,7 +259,7 @@ public ExperimentInner get(String resourceGroupName, String profileName, String /** * Creates or updates an Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param parameters The Experiment resource. @@ -418,113 +272,67 @@ public ExperimentInner get(String resourceGroupName, String profileName, String @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String profileName, String experimentName, ExperimentInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (profileName == null) { - return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); - } - if (experimentName == null) { - return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2019-11-01"; + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - apiVersion, resourceGroupName, profileName, experimentName, parameters, accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, experimentName, contentType, accept, + parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates an Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param parameters The Experiment resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the properties of an Experiment along with {@link Response} on successful completion of - * {@link Mono}. + * @return defines the properties of an Experiment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String profileName, String experimentName, ExperimentInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (profileName == null) { - return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); - } - if (experimentName == null) { - return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2019-11-01"; + private Response createOrUpdateWithResponse(String resourceGroupName, String profileName, + String experimentName, ExperimentInner parameters) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, - resourceGroupName, profileName, experimentName, parameters, accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, experimentName, contentType, accept, + parameters, Context.NONE); } /** * Creates or updates an Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param parameters The Experiment resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of defines the properties of an Experiment. + * @return defines the properties of an Experiment along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ExperimentInner> beginCreateOrUpdateAsync(String resourceGroupName, - String profileName, String experimentName, ExperimentInner parameters) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, profileName, experimentName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ExperimentInner.class, ExperimentInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String profileName, + String experimentName, ExperimentInner parameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, experimentName, contentType, accept, + parameters, context); } /** * Creates or updates an Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param parameters The Experiment resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -532,18 +340,17 @@ private PollerFlux, ExperimentInner> beginCreateOrUp */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ExperimentInner> beginCreateOrUpdateAsync(String resourceGroupName, - String profileName, String experimentName, ExperimentInner parameters, Context context) { - context = this.client.mergeContext(context); + String profileName, String experimentName, ExperimentInner parameters) { Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, profileName, experimentName, parameters, context); + = createOrUpdateWithResponseAsync(resourceGroupName, profileName, experimentName, parameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ExperimentInner.class, ExperimentInner.class, context); + ExperimentInner.class, ExperimentInner.class, this.client.getContext()); } /** * Creates or updates an Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param parameters The Experiment resource. @@ -555,14 +362,16 @@ private PollerFlux, ExperimentInner> beginCreateOrUp @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ExperimentInner> beginCreateOrUpdate(String resourceGroupName, String profileName, String experimentName, ExperimentInner parameters) { - return this.beginCreateOrUpdateAsync(resourceGroupName, profileName, experimentName, parameters) - .getSyncPoller(); + Response response + = createOrUpdateWithResponse(resourceGroupName, profileName, experimentName, parameters); + return this.client.getLroResult(response, ExperimentInner.class, + ExperimentInner.class, Context.NONE); } /** * Creates or updates an Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param parameters The Experiment resource. @@ -575,14 +384,16 @@ public SyncPoller, ExperimentInner> beginCreateOrUpd @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ExperimentInner> beginCreateOrUpdate(String resourceGroupName, String profileName, String experimentName, ExperimentInner parameters, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, profileName, experimentName, parameters, context) - .getSyncPoller(); + Response response + = createOrUpdateWithResponse(resourceGroupName, profileName, experimentName, parameters, context); + return this.client.getLroResult(response, ExperimentInner.class, + ExperimentInner.class, context); } /** * Creates or updates an Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param parameters The Experiment resource. @@ -601,27 +412,7 @@ private Mono createOrUpdateAsync(String resourceGroupName, Stri /** * Creates or updates an Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName The Profile identifier associated with the Tenant and Partner. - * @param experimentName The Experiment identifier associated with the Experiment. - * @param parameters The Experiment resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the properties of an Experiment on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String profileName, - String experimentName, ExperimentInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, profileName, experimentName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates an Experiment. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param parameters The Experiment resource. @@ -633,13 +424,13 @@ private Mono createOrUpdateAsync(String resourceGroupName, Stri @ServiceMethod(returns = ReturnType.SINGLE) public ExperimentInner createOrUpdate(String resourceGroupName, String profileName, String experimentName, ExperimentInner parameters) { - return createOrUpdateAsync(resourceGroupName, profileName, experimentName, parameters).block(); + return beginCreateOrUpdate(resourceGroupName, profileName, experimentName, parameters).getFinalResult(); } /** * Creates or updates an Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param parameters The Experiment resource. @@ -652,7 +443,8 @@ public ExperimentInner createOrUpdate(String resourceGroupName, String profileNa @ServiceMethod(returns = ReturnType.SINGLE) public ExperimentInner createOrUpdate(String resourceGroupName, String profileName, String experimentName, ExperimentInner parameters, Context context) { - return createOrUpdateAsync(resourceGroupName, profileName, experimentName, parameters, context).block(); + return beginCreateOrUpdate(resourceGroupName, profileName, experimentName, parameters, context) + .getFinalResult(); } /** @@ -660,7 +452,7 @@ public ExperimentInner createOrUpdate(String resourceGroupName, String profileNa * * Updates an Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param parameters The Experiment Update Model. @@ -673,34 +465,12 @@ public ExperimentInner createOrUpdate(String resourceGroupName, String profileNa @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String profileName, String experimentName, ExperimentUpdateModel parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (profileName == null) { - return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); - } - if (experimentName == null) { - return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2019-11-01"; + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - apiVersion, resourceGroupName, profileName, experimentName, parameters, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, experimentName, contentType, accept, + parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -709,48 +479,23 @@ private Mono>> updateWithResponseAsync(String resource * * Updates an Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param parameters The Experiment Update Model. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the properties of an Experiment along with {@link Response} on successful completion of - * {@link Mono}. + * @return defines the properties of an Experiment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String profileName, - String experimentName, ExperimentUpdateModel parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (profileName == null) { - return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); - } - if (experimentName == null) { - return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2019-11-01"; + private Response updateWithResponse(String resourceGroupName, String profileName, String experimentName, + ExperimentUpdateModel parameters) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, resourceGroupName, - profileName, experimentName, parameters, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, experimentName, contentType, accept, + parameters, Context.NONE); } /** @@ -758,22 +503,24 @@ private Mono>> updateWithResponseAsync(String resource * * Updates an Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param parameters The Experiment Update Model. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of defines the properties of an Experiment. + * @return defines the properties of an Experiment along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ExperimentInner> beginUpdateAsync(String resourceGroupName, - String profileName, String experimentName, ExperimentUpdateModel parameters) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, profileName, experimentName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ExperimentInner.class, ExperimentInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String profileName, String experimentName, + ExperimentUpdateModel parameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, experimentName, contentType, accept, + parameters, context); } /** @@ -781,11 +528,10 @@ private PollerFlux, ExperimentInner> beginUpdateAsyn * * Updates an Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param parameters The Experiment Update Model. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -793,12 +539,11 @@ private PollerFlux, ExperimentInner> beginUpdateAsyn */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ExperimentInner> beginUpdateAsync(String resourceGroupName, - String profileName, String experimentName, ExperimentUpdateModel parameters, Context context) { - context = this.client.mergeContext(context); + String profileName, String experimentName, ExperimentUpdateModel parameters) { Mono>> mono - = updateWithResponseAsync(resourceGroupName, profileName, experimentName, parameters, context); + = updateWithResponseAsync(resourceGroupName, profileName, experimentName, parameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ExperimentInner.class, ExperimentInner.class, context); + ExperimentInner.class, ExperimentInner.class, this.client.getContext()); } /** @@ -806,7 +551,7 @@ private PollerFlux, ExperimentInner> beginUpdateAsyn * * Updates an Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param parameters The Experiment Update Model. @@ -818,7 +563,9 @@ private PollerFlux, ExperimentInner> beginUpdateAsyn @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ExperimentInner> beginUpdate(String resourceGroupName, String profileName, String experimentName, ExperimentUpdateModel parameters) { - return this.beginUpdateAsync(resourceGroupName, profileName, experimentName, parameters).getSyncPoller(); + Response response = updateWithResponse(resourceGroupName, profileName, experimentName, parameters); + return this.client.getLroResult(response, ExperimentInner.class, + ExperimentInner.class, Context.NONE); } /** @@ -826,7 +573,7 @@ public SyncPoller, ExperimentInner> beginUpdate(Stri * * Updates an Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param parameters The Experiment Update Model. @@ -839,8 +586,10 @@ public SyncPoller, ExperimentInner> beginUpdate(Stri @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ExperimentInner> beginUpdate(String resourceGroupName, String profileName, String experimentName, ExperimentUpdateModel parameters, Context context) { - return this.beginUpdateAsync(resourceGroupName, profileName, experimentName, parameters, context) - .getSyncPoller(); + Response response + = updateWithResponse(resourceGroupName, profileName, experimentName, parameters, context); + return this.client.getLroResult(response, ExperimentInner.class, + ExperimentInner.class, context); } /** @@ -848,7 +597,7 @@ public SyncPoller, ExperimentInner> beginUpdate(Stri * * Updates an Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param parameters The Experiment Update Model. @@ -869,29 +618,7 @@ private Mono updateAsync(String resourceGroupName, String profi * * Updates an Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName The Profile identifier associated with the Tenant and Partner. - * @param experimentName The Experiment identifier associated with the Experiment. - * @param parameters The Experiment Update Model. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the properties of an Experiment on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String profileName, String experimentName, - ExperimentUpdateModel parameters, Context context) { - return beginUpdateAsync(resourceGroupName, profileName, experimentName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates an Experiment by Experiment id - * - * Updates an Experiment. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param parameters The Experiment Update Model. @@ -903,7 +630,7 @@ private Mono updateAsync(String resourceGroupName, String profi @ServiceMethod(returns = ReturnType.SINGLE) public ExperimentInner update(String resourceGroupName, String profileName, String experimentName, ExperimentUpdateModel parameters) { - return updateAsync(resourceGroupName, profileName, experimentName, parameters).block(); + return beginUpdate(resourceGroupName, profileName, experimentName, parameters).getFinalResult(); } /** @@ -911,7 +638,7 @@ public ExperimentInner update(String resourceGroupName, String profileName, Stri * * Updates an Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param parameters The Experiment Update Model. @@ -924,13 +651,13 @@ public ExperimentInner update(String resourceGroupName, String profileName, Stri @ServiceMethod(returns = ReturnType.SINGLE) public ExperimentInner update(String resourceGroupName, String profileName, String experimentName, ExperimentUpdateModel parameters, Context context) { - return updateAsync(resourceGroupName, profileName, experimentName, parameters, context).block(); + return beginUpdate(resourceGroupName, profileName, experimentName, parameters, context).getFinalResult(); } /** * Deletes an Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -941,98 +668,55 @@ public ExperimentInner update(String resourceGroupName, String profileName, Stri @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String profileName, String experimentName) { - 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 (profileName == null) { - return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); - } - if (experimentName == null) { - return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null.")); - } - final String apiVersion = "2019-11-01"; - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - apiVersion, resourceGroupName, profileName, experimentName, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, experimentName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes an Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String profileName, - String experimentName, 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 (profileName == null) { - return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); - } - if (experimentName == null) { - return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null.")); - } - final String apiVersion = "2019-11-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, resourceGroupName, - profileName, experimentName, accept, context); + private Response deleteWithResponse(String resourceGroupName, String profileName, + String experimentName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, experimentName, Context.NONE); } /** * Deletes an Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String profileName, - String experimentName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, profileName, experimentName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String profileName, String experimentName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, experimentName, context); } /** * Deletes an Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1040,18 +724,16 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String profileName, - String experimentName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, profileName, experimentName, context); + String experimentName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, profileName, experimentName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** * Deletes an Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1062,13 +744,14 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String profileName, String experimentName) { - return this.beginDeleteAsync(resourceGroupName, profileName, experimentName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, profileName, experimentName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** * Deletes an Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param context The context to associate with this operation. @@ -1080,13 +763,14 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String profileName, String experimentName, Context context) { - return this.beginDeleteAsync(resourceGroupName, profileName, experimentName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, profileName, experimentName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** * Deletes an Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1103,71 +787,158 @@ private Mono deleteAsync(String resourceGroupName, String profileName, Str /** * Deletes an Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String profileName, String experimentName, - Context context) { - return beginDeleteAsync(resourceGroupName, profileName, experimentName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public void delete(String resourceGroupName, String profileName, String experimentName) { + beginDelete(resourceGroupName, profileName, experimentName).getFinalResult(); } /** * Deletes an Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String profileName, String experimentName) { - deleteAsync(resourceGroupName, profileName, experimentName).block(); + public void delete(String resourceGroupName, String profileName, String experimentName, Context context) { + beginDelete(resourceGroupName, profileName, experimentName, context).getFinalResult(); } /** - * Deletes an Experiment. + * Gets a list of Experiments. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The Profile identifier associated with the Tenant and Partner. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Experiments along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByProfileSinglePageAsync(String resourceGroupName, + String profileName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByProfile(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of Experiments. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The Profile identifier associated with the Tenant and Partner. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Experiments as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByProfileAsync(String resourceGroupName, String profileName) { + return new PagedFlux<>(() -> listByProfileSinglePageAsync(resourceGroupName, profileName), + nextLink -> listByProfileNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of Experiments. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The Profile identifier associated with the Tenant and Partner. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Experiments along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByProfileSinglePage(String resourceGroupName, String profileName) { + final String accept = "application/json"; + Response res = service.listByProfileSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Gets a list of Experiments. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. - * @param experimentName The Experiment identifier associated with the Experiment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Experiments along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String profileName, String experimentName, Context context) { - deleteAsync(resourceGroupName, profileName, experimentName, context).block(); + private PagedResponse listByProfileSinglePage(String resourceGroupName, String profileName, + Context context) { + final String accept = "application/json"; + Response res = service.listByProfileSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Gets a list of Experiments. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The Profile identifier associated with the Tenant and Partner. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Experiments as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByProfile(String resourceGroupName, String profileName) { + return new PagedIterable<>(() -> listByProfileSinglePage(resourceGroupName, profileName), + nextLink -> listByProfileNextSinglePage(nextLink)); + } + + /** + * Gets a list of Experiments. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The Profile identifier associated with the Tenant and Partner. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Experiments as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByProfile(String resourceGroupName, String profileName, Context context) { + return new PagedIterable<>(() -> listByProfileSinglePage(resourceGroupName, profileName, context), + nextLink -> listByProfileNextSinglePage(nextLink, context)); } /** + * Gets a list of Experiments + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines a list of Experiments along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return a list of Experiments along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByProfileNextSinglePageAsync(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.listByProfileNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -1177,6 +948,28 @@ private Mono> listByProfileNextSinglePageAsync(St } /** + * Gets a list of Experiments + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Experiments along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByProfileNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByProfileNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Gets a list of Experiments + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1184,21 +977,14 @@ private Mono> listByProfileNextSinglePageAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines a list of Experiments along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return a list of Experiments along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByProfileNextSinglePageAsync(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.")); - } + private PagedResponse listByProfileNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByProfileNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByProfileNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ExperimentsImpl.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ExperimentsImpl.java index 5536417e7ad80..f782070c31536 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ExperimentsImpl.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ExperimentsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.implementation; @@ -27,27 +27,12 @@ public ExperimentsImpl(ExperimentsClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable listByProfile(String resourceGroupName, String profileName) { - PagedIterable inner = this.serviceClient().listByProfile(resourceGroupName, profileName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ExperimentImpl(inner1, this.manager())); - } - - public PagedIterable listByProfile(String resourceGroupName, String profileName, Context context) { - PagedIterable inner - = this.serviceClient().listByProfile(resourceGroupName, profileName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ExperimentImpl(inner1, this.manager())); - } - public Response getWithResponse(String resourceGroupName, String profileName, String experimentName, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, profileName, experimentName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ExperimentImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ExperimentImpl(inner.getValue(), this.manager())); } public Experiment get(String resourceGroupName, String profileName, String experimentName) { @@ -67,6 +52,17 @@ public void delete(String resourceGroupName, String profileName, String experime this.serviceClient().delete(resourceGroupName, profileName, experimentName, context); } + public PagedIterable listByProfile(String resourceGroupName, String profileName) { + PagedIterable inner = this.serviceClient().listByProfile(resourceGroupName, profileName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExperimentImpl(inner1, this.manager())); + } + + public PagedIterable listByProfile(String resourceGroupName, String profileName, Context context) { + PagedIterable inner + = this.serviceClient().listByProfile(resourceGroupName, profileName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExperimentImpl(inner1, this.manager())); + } + public Experiment getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorImpl.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorImpl.java index 3b5719f88190e..9bdfa15a7aa28 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorImpl.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.implementation; diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorManagementClientBuilder.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorManagementClientBuilder.java index 5e35228fcbe1e..7757e1e62c96e 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorManagementClientBuilder.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorManagementClientBuilder.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.implementation; @@ -20,36 +20,34 @@ @ServiceClientBuilder(serviceClients = { FrontDoorManagementClientImpl.class }) public final class FrontDoorManagementClientBuilder { /* - * The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms - * part of the URI for every service call. + * Service host */ - private String subscriptionId; + private String endpoint; /** - * Sets The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID - * forms part of the URI for every service call. + * Sets Service host. * - * @param subscriptionId the subscriptionId value. + * @param endpoint the endpoint value. * @return the FrontDoorManagementClientBuilder. */ - public FrontDoorManagementClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; + public FrontDoorManagementClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; return this; } /* - * server parameter + * The ID of the target subscription. The value must be an UUID. */ - private String endpoint; + private String subscriptionId; /** - * Sets server parameter. + * Sets The ID of the target subscription. The value must be an UUID. * - * @param endpoint the endpoint value. + * @param subscriptionId the subscriptionId value. * @return the FrontDoorManagementClientBuilder. */ - public FrontDoorManagementClientBuilder endpoint(String endpoint) { - this.endpoint = endpoint; + public FrontDoorManagementClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; return this; } @@ -134,7 +132,7 @@ public FrontDoorManagementClientImpl buildClient() { ? serializerAdapter : SerializerFactory.createDefaultManagementSerializerAdapter(); FrontDoorManagementClientImpl client = new FrontDoorManagementClientImpl(localPipeline, localSerializerAdapter, - localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); + localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId); return client; } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorManagementClientImpl.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorManagementClientImpl.java index 499db4c7248ef..e63cee1640d49 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorManagementClientImpl.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorManagementClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.implementation; @@ -15,12 +15,15 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; import com.azure.core.management.polling.PollerFactory; +import com.azure.core.management.polling.SyncPollerFactory; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.AsyncPollResponse; import com.azure.core.util.polling.LongRunningOperationStatus; import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.frontdoor.fluent.EndpointsClient; @@ -51,33 +54,45 @@ @ServiceClient(builder = FrontDoorManagementClientBuilder.class) public final class FrontDoorManagementClientImpl implements FrontDoorManagementClient { /** - * The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms - * part of the URI for every service call. + * Service host. */ - private final String subscriptionId; + private final String endpoint; /** - * Gets The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID - * forms part of the URI for every service call. + * Gets Service host. * - * @return the subscriptionId value. + * @return the endpoint value. */ - public String getSubscriptionId() { - return this.subscriptionId; + public String getEndpoint() { + return this.endpoint; } /** - * server parameter. + * Version parameter. */ - private final String endpoint; + private final String apiVersion; /** - * Gets server parameter. + * Gets Version parameter. * - * @return the endpoint value. + * @return the apiVersion value. */ - public String getEndpoint() { - return this.endpoint; + public String getApiVersion() { + return this.apiVersion; + } + + /** + * The ID of the target subscription. The value must be an UUID. + */ + private final String subscriptionId; + + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; } /** @@ -123,87 +138,73 @@ public Duration getDefaultPollInterval() { } /** - * The PoliciesClient object to access its operations. - */ - private final PoliciesClient policies; - - /** - * Gets the PoliciesClient object to access its operations. - * - * @return the PoliciesClient object. - */ - public PoliciesClient getPolicies() { - return this.policies; - } - - /** - * The ManagedRuleSetsClient object to access its operations. + * The FrontDoorsClient object to access its operations. */ - private final ManagedRuleSetsClient managedRuleSets; + private final FrontDoorsClient frontDoors; /** - * Gets the ManagedRuleSetsClient object to access its operations. + * Gets the FrontDoorsClient object to access its operations. * - * @return the ManagedRuleSetsClient object. + * @return the FrontDoorsClient object. */ - public ManagedRuleSetsClient getManagedRuleSets() { - return this.managedRuleSets; + public FrontDoorsClient getFrontDoors() { + return this.frontDoors; } /** - * The FrontDoorNameAvailabilitiesClient object to access its operations. + * The FrontendEndpointsClient object to access its operations. */ - private final FrontDoorNameAvailabilitiesClient frontDoorNameAvailabilities; + private final FrontendEndpointsClient frontendEndpoints; /** - * Gets the FrontDoorNameAvailabilitiesClient object to access its operations. + * Gets the FrontendEndpointsClient object to access its operations. * - * @return the FrontDoorNameAvailabilitiesClient object. + * @return the FrontendEndpointsClient object. */ - public FrontDoorNameAvailabilitiesClient getFrontDoorNameAvailabilities() { - return this.frontDoorNameAvailabilities; + public FrontendEndpointsClient getFrontendEndpoints() { + return this.frontendEndpoints; } /** - * The FrontDoorNameAvailabilityWithSubscriptionsClient object to access its operations. + * The RulesEnginesClient object to access its operations. */ - private final FrontDoorNameAvailabilityWithSubscriptionsClient frontDoorNameAvailabilityWithSubscriptions; + private final RulesEnginesClient rulesEngines; /** - * Gets the FrontDoorNameAvailabilityWithSubscriptionsClient object to access its operations. + * Gets the RulesEnginesClient object to access its operations. * - * @return the FrontDoorNameAvailabilityWithSubscriptionsClient object. + * @return the RulesEnginesClient object. */ - public FrontDoorNameAvailabilityWithSubscriptionsClient getFrontDoorNameAvailabilityWithSubscriptions() { - return this.frontDoorNameAvailabilityWithSubscriptions; + public RulesEnginesClient getRulesEngines() { + return this.rulesEngines; } /** - * The FrontDoorsClient object to access its operations. + * The ExperimentsClient object to access its operations. */ - private final FrontDoorsClient frontDoors; + private final ExperimentsClient experiments; /** - * Gets the FrontDoorsClient object to access its operations. + * Gets the ExperimentsClient object to access its operations. * - * @return the FrontDoorsClient object. + * @return the ExperimentsClient object. */ - public FrontDoorsClient getFrontDoors() { - return this.frontDoors; + public ExperimentsClient getExperiments() { + return this.experiments; } /** - * The FrontendEndpointsClient object to access its operations. + * The PoliciesClient object to access its operations. */ - private final FrontendEndpointsClient frontendEndpoints; + private final PoliciesClient policies; /** - * Gets the FrontendEndpointsClient object to access its operations. + * Gets the PoliciesClient object to access its operations. * - * @return the FrontendEndpointsClient object. + * @return the PoliciesClient object. */ - public FrontendEndpointsClient getFrontendEndpoints() { - return this.frontendEndpoints; + public PoliciesClient getPolicies() { + return this.policies; } /** @@ -220,20 +221,6 @@ public EndpointsClient getEndpoints() { return this.endpoints; } - /** - * The RulesEnginesClient object to access its operations. - */ - private final RulesEnginesClient rulesEngines; - - /** - * Gets the RulesEnginesClient object to access its operations. - * - * @return the RulesEnginesClient object. - */ - public RulesEnginesClient getRulesEngines() { - return this.rulesEngines; - } - /** * The NetworkExperimentProfilesClient object to access its operations. */ @@ -263,31 +250,59 @@ public PreconfiguredEndpointsClient getPreconfiguredEndpoints() { } /** - * The ExperimentsClient object to access its operations. + * The ReportsClient object to access its operations. */ - private final ExperimentsClient experiments; + private final ReportsClient reports; /** - * Gets the ExperimentsClient object to access its operations. + * Gets the ReportsClient object to access its operations. * - * @return the ExperimentsClient object. + * @return the ReportsClient object. */ - public ExperimentsClient getExperiments() { - return this.experiments; + public ReportsClient getReports() { + return this.reports; } /** - * The ReportsClient object to access its operations. + * The ManagedRuleSetsClient object to access its operations. */ - private final ReportsClient reports; + private final ManagedRuleSetsClient managedRuleSets; /** - * Gets the ReportsClient object to access its operations. + * Gets the ManagedRuleSetsClient object to access its operations. * - * @return the ReportsClient object. + * @return the ManagedRuleSetsClient object. */ - public ReportsClient getReports() { - return this.reports; + public ManagedRuleSetsClient getManagedRuleSets() { + return this.managedRuleSets; + } + + /** + * The FrontDoorNameAvailabilitiesClient object to access its operations. + */ + private final FrontDoorNameAvailabilitiesClient frontDoorNameAvailabilities; + + /** + * Gets the FrontDoorNameAvailabilitiesClient object to access its operations. + * + * @return the FrontDoorNameAvailabilitiesClient object. + */ + public FrontDoorNameAvailabilitiesClient getFrontDoorNameAvailabilities() { + return this.frontDoorNameAvailabilities; + } + + /** + * The FrontDoorNameAvailabilityWithSubscriptionsClient object to access its operations. + */ + private final FrontDoorNameAvailabilityWithSubscriptionsClient frontDoorNameAvailabilityWithSubscriptions; + + /** + * Gets the FrontDoorNameAvailabilityWithSubscriptionsClient object to access its operations. + * + * @return the FrontDoorNameAvailabilityWithSubscriptionsClient object. + */ + public FrontDoorNameAvailabilityWithSubscriptionsClient getFrontDoorNameAvailabilityWithSubscriptions() { + return this.frontDoorNameAvailabilityWithSubscriptions; } /** @@ -297,30 +312,30 @@ public ReportsClient getReports() { * @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 subscription credentials which uniquely identify the Microsoft Azure subscription. The - * subscription ID forms part of the URI for every service call. - * @param endpoint server parameter. + * @param endpoint Service host. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. */ FrontDoorManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, - Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { + Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; - this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.policies = new PoliciesClientImpl(this); - this.managedRuleSets = new ManagedRuleSetsClientImpl(this); - this.frontDoorNameAvailabilities = new FrontDoorNameAvailabilitiesClientImpl(this); - this.frontDoorNameAvailabilityWithSubscriptions - = new FrontDoorNameAvailabilityWithSubscriptionsClientImpl(this); + this.subscriptionId = subscriptionId; + this.apiVersion = "2026-04-01"; this.frontDoors = new FrontDoorsClientImpl(this); this.frontendEndpoints = new FrontendEndpointsClientImpl(this); - this.endpoints = new EndpointsClientImpl(this); this.rulesEngines = new RulesEnginesClientImpl(this); + this.experiments = new ExperimentsClientImpl(this); + this.policies = new PoliciesClientImpl(this); + this.endpoints = new EndpointsClientImpl(this); this.networkExperimentProfiles = new NetworkExperimentProfilesClientImpl(this); this.preconfiguredEndpoints = new PreconfiguredEndpointsClientImpl(this); - this.experiments = new ExperimentsClientImpl(this); this.reports = new ReportsClientImpl(this); + this.managedRuleSets = new ManagedRuleSetsClientImpl(this); + this.frontDoorNameAvailabilities = new FrontDoorNameAvailabilitiesClientImpl(this); + this.frontDoorNameAvailabilityWithSubscriptions + = new FrontDoorNameAvailabilityWithSubscriptionsClientImpl(this); } /** @@ -360,6 +375,23 @@ public PollerFlux, U> getLroResult(Mono type of poll result. + * @param type of final result. + * @return SyncPoller for poll result and final result. + */ + public SyncPoller, U> getLroResult(Response activationResponse, + Type pollResultType, Type finalResultType, Context context) { + return SyncPollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, () -> activationResponse, context); + } + /** * Gets the final result, or an error, based on last async poll response. * @@ -417,7 +449,7 @@ private static final class HttpResponseImpl extends HttpResponse { super(null); this.statusCode = statusCode; this.httpHeaders = httpHeaders; - this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8); + this.responseBody = responseBody == null ? new byte[0] : responseBody.getBytes(StandardCharsets.UTF_8); } public int getStatusCode() { diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorNameAvailabilitiesClientImpl.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorNameAvailabilitiesClientImpl.java index b20e4b3178b84..63419b6f2f598 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorNameAvailabilitiesClientImpl.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorNameAvailabilitiesClientImpl.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.implementation; import com.azure.core.annotation.BodyParam; 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.Post; @@ -55,23 +54,32 @@ public final class FrontDoorNameAvailabilitiesClientImpl implements FrontDoorNam * The interface defining all the services for FrontDoorManagementClientFrontDoorNameAvailabilities to be used by * the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "FrontDoorManagementC") + @Host("{endpoint}") + @ServiceInterface(name = "FrontDoorManagementClientFrontDoorNameAvailabilities") public interface FrontDoorNameAvailabilitiesService { - @Headers({ "Content-Type: application/json" }) @Post("/providers/Microsoft.Network/checkFrontDoorNameAvailability") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> check(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + Mono> check(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") CheckNameAvailabilityInput checkFrontDoorNameAvailabilityInput, - @HeaderParam("Accept") String accept, Context context); + Context context); + + @Post("/providers/Microsoft.Network/checkFrontDoorNameAvailability") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response checkSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") CheckNameAvailabilityInput checkFrontDoorNameAvailabilityInput, + Context context); } /** * Check the availability of a Front Door resource name. * - * @param checkFrontDoorNameAvailabilityInput Input to check. + * @param checkFrontDoorNameAvailabilityInput The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -81,59 +89,18 @@ Mono> check(@HostParam("$host") Strin @ServiceMethod(returns = ReturnType.SINGLE) private Mono> checkWithResponseAsync(CheckNameAvailabilityInput checkFrontDoorNameAvailabilityInput) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (checkFrontDoorNameAvailabilityInput == null) { - return Mono.error(new IllegalArgumentException( - "Parameter checkFrontDoorNameAvailabilityInput is required and cannot be null.")); - } else { - checkFrontDoorNameAvailabilityInput.validate(); - } - final String apiVersion = "2021-06-01"; + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.check(this.client.getEndpoint(), apiVersion, - checkFrontDoorNameAvailabilityInput, accept, context)) + .withContext(context -> service.check(this.client.getEndpoint(), this.client.getApiVersion(), contentType, + accept, checkFrontDoorNameAvailabilityInput, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Check the availability of a Front Door resource name. * - * @param checkFrontDoorNameAvailabilityInput Input to check. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return output of check name availability API along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - checkWithResponseAsync(CheckNameAvailabilityInput checkFrontDoorNameAvailabilityInput, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (checkFrontDoorNameAvailabilityInput == null) { - return Mono.error(new IllegalArgumentException( - "Parameter checkFrontDoorNameAvailabilityInput is required and cannot be null.")); - } else { - checkFrontDoorNameAvailabilityInput.validate(); - } - final String apiVersion = "2021-06-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.check(this.client.getEndpoint(), apiVersion, checkFrontDoorNameAvailabilityInput, accept, - context); - } - - /** - * Check the availability of a Front Door resource name. - * - * @param checkFrontDoorNameAvailabilityInput Input to check. + * @param checkFrontDoorNameAvailabilityInput The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -149,7 +116,7 @@ Mono> check(@HostParam("$host") Strin /** * Check the availability of a Front Door resource name. * - * @param checkFrontDoorNameAvailabilityInput Input to check. + * @param checkFrontDoorNameAvailabilityInput The request body. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -159,13 +126,16 @@ Mono> check(@HostParam("$host") Strin @ServiceMethod(returns = ReturnType.SINGLE) public Response checkWithResponse(CheckNameAvailabilityInput checkFrontDoorNameAvailabilityInput, Context context) { - return checkWithResponseAsync(checkFrontDoorNameAvailabilityInput, context).block(); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.checkSync(this.client.getEndpoint(), this.client.getApiVersion(), contentType, accept, + checkFrontDoorNameAvailabilityInput, context); } /** * Check the availability of a Front Door resource name. * - * @param checkFrontDoorNameAvailabilityInput Input to check. + * @param checkFrontDoorNameAvailabilityInput The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorNameAvailabilitiesImpl.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorNameAvailabilitiesImpl.java index 200cd4bc2c40f..d48db96ff8330 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorNameAvailabilitiesImpl.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorNameAvailabilitiesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.implementation; @@ -31,12 +31,8 @@ public FrontDoorNameAvailabilitiesImpl(FrontDoorNameAvailabilitiesClient innerCl checkWithResponse(CheckNameAvailabilityInput checkFrontDoorNameAvailabilityInput, Context context) { Response inner = this.serviceClient().checkWithResponse(checkFrontDoorNameAvailabilityInput, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new CheckNameAvailabilityOutputImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new CheckNameAvailabilityOutputImpl(inner.getValue(), this.manager())); } public CheckNameAvailabilityOutput check(CheckNameAvailabilityInput checkFrontDoorNameAvailabilityInput) { diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorNameAvailabilityWithSubscriptionsClientImpl.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorNameAvailabilityWithSubscriptionsClientImpl.java index f2ac216acc53e..e9d3138cd48a1 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorNameAvailabilityWithSubscriptionsClientImpl.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorNameAvailabilityWithSubscriptionsClientImpl.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.implementation; import com.azure.core.annotation.BodyParam; 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; @@ -58,23 +57,32 @@ public final class FrontDoorNameAvailabilityWithSubscriptionsClientImpl * The interface defining all the services for FrontDoorManagementClientFrontDoorNameAvailabilityWithSubscriptions * to be used by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "FrontDoorManagementC") + @Host("{endpoint}") + @ServiceInterface(name = "FrontDoorManagementClientFrontDoorNameAvailabilityWithSubscriptions") public interface FrontDoorNameAvailabilityWithSubscriptionsService { - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Network/checkFrontDoorNameAvailability") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> check(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Mono> check(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("application/json") CheckNameAvailabilityInput checkFrontDoorNameAvailabilityInput, - @HeaderParam("Accept") String accept, Context context); + Context context); + + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Network/checkFrontDoorNameAvailability") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response checkSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") CheckNameAvailabilityInput checkFrontDoorNameAvailabilityInput, + Context context); } /** * Check the availability of a Front Door subdomain. * - * @param checkFrontDoorNameAvailabilityInput Input to check. + * @param checkFrontDoorNameAvailabilityInput The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -84,67 +92,18 @@ Mono> check(@HostParam("$host") Strin @ServiceMethod(returns = ReturnType.SINGLE) private Mono> checkWithResponseAsync(CheckNameAvailabilityInput checkFrontDoorNameAvailabilityInput) { - 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 (checkFrontDoorNameAvailabilityInput == null) { - return Mono.error(new IllegalArgumentException( - "Parameter checkFrontDoorNameAvailabilityInput is required and cannot be null.")); - } else { - checkFrontDoorNameAvailabilityInput.validate(); - } - final String apiVersion = "2021-06-01"; + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.check(this.client.getEndpoint(), this.client.getSubscriptionId(), - apiVersion, checkFrontDoorNameAvailabilityInput, accept, context)) + .withContext(context -> service.check(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), contentType, accept, checkFrontDoorNameAvailabilityInput, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Check the availability of a Front Door subdomain. * - * @param checkFrontDoorNameAvailabilityInput Input to check. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return output of check name availability API along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - checkWithResponseAsync(CheckNameAvailabilityInput checkFrontDoorNameAvailabilityInput, 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 (checkFrontDoorNameAvailabilityInput == null) { - return Mono.error(new IllegalArgumentException( - "Parameter checkFrontDoorNameAvailabilityInput is required and cannot be null.")); - } else { - checkFrontDoorNameAvailabilityInput.validate(); - } - final String apiVersion = "2021-06-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.check(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, - checkFrontDoorNameAvailabilityInput, accept, context); - } - - /** - * Check the availability of a Front Door subdomain. - * - * @param checkFrontDoorNameAvailabilityInput Input to check. + * @param checkFrontDoorNameAvailabilityInput The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -160,7 +119,7 @@ Mono> check(@HostParam("$host") Strin /** * Check the availability of a Front Door subdomain. * - * @param checkFrontDoorNameAvailabilityInput Input to check. + * @param checkFrontDoorNameAvailabilityInput The request body. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -170,13 +129,16 @@ Mono> check(@HostParam("$host") Strin @ServiceMethod(returns = ReturnType.SINGLE) public Response checkWithResponse(CheckNameAvailabilityInput checkFrontDoorNameAvailabilityInput, Context context) { - return checkWithResponseAsync(checkFrontDoorNameAvailabilityInput, context).block(); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.checkSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), contentType, accept, checkFrontDoorNameAvailabilityInput, context); } /** * Check the availability of a Front Door subdomain. * - * @param checkFrontDoorNameAvailabilityInput Input to check. + * @param checkFrontDoorNameAvailabilityInput The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorNameAvailabilityWithSubscriptionsImpl.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorNameAvailabilityWithSubscriptionsImpl.java index 59a70f60e8e01..7fc08adad943d 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorNameAvailabilityWithSubscriptionsImpl.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorNameAvailabilityWithSubscriptionsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.implementation; @@ -32,12 +32,8 @@ public FrontDoorNameAvailabilityWithSubscriptionsImpl(FrontDoorNameAvailabilityW checkWithResponse(CheckNameAvailabilityInput checkFrontDoorNameAvailabilityInput, Context context) { Response inner = this.serviceClient().checkWithResponse(checkFrontDoorNameAvailabilityInput, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new CheckNameAvailabilityOutputImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new CheckNameAvailabilityOutputImpl(inner.getValue(), this.manager())); } public CheckNameAvailabilityOutput check(CheckNameAvailabilityInput checkFrontDoorNameAvailabilityInput) { diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorsClientImpl.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorsClientImpl.java index 00926989c27b5..24c00347f4c2d 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorsClientImpl.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.implementation; @@ -28,6 +28,7 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; @@ -35,7 +36,7 @@ import com.azure.resourcemanager.frontdoor.fluent.FrontDoorsClient; import com.azure.resourcemanager.frontdoor.fluent.models.FrontDoorInner; import com.azure.resourcemanager.frontdoor.fluent.models.ValidateCustomDomainOutputInner; -import com.azure.resourcemanager.frontdoor.models.FrontDoorListResult; +import com.azure.resourcemanager.frontdoor.implementation.models.FrontDoorListResult; import com.azure.resourcemanager.frontdoor.models.ValidateCustomDomainInput; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -70,325 +71,150 @@ public final class FrontDoorsClientImpl implements FrontDoorsClient { * The interface defining all the services for FrontDoorManagementClientFrontDoors to be used by the proxy service * to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "FrontDoorManagementC") + @Host("{endpoint}") + @ServiceInterface(name = "FrontDoorManagementClientFrontDoors") public interface FrontDoorsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Network/frontDoors") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("frontDoorName") String frontDoorName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("frontDoorName") String frontDoorName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("frontDoorName") String frontDoorName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") FrontDoorInner frontDoorParameters, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("frontDoorName") String frontDoorName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") FrontDoorInner frontDoorParameters, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("frontDoorName") String frontDoorName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") FrontDoorInner frontDoorParameters, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("frontDoorName") String frontDoorName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/validateCustomDomain") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> validateCustomDomain(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("frontDoorName") String frontDoorName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ValidateCustomDomainInput customDomainProperties, - @HeaderParam("Accept") String accept, Context context); + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Network/frontDoors") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Lists all of the Front Doors within an Azure subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Front Doors along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2021-06-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, - accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - /** - * Lists all of the Front Doors within an Azure subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Front Doors along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2021-06-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all of the Front Doors within an Azure subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Front Doors as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists all of the Front Doors within an Azure subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Front Doors as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all of the Front Doors within an Azure subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Front Doors as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Lists all of the Front Doors within an Azure subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Front Doors as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Network/frontDoors") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); - /** - * Lists all of the Front Doors within a resource group under a subscription. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Front Doors along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String apiVersion = "2021-06-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, apiVersion, 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())); - } + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/validateCustomDomain") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> validateCustomDomain(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("frontDoorName") String frontDoorName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ValidateCustomDomainInput customDomainProperties, Context context); - /** - * Lists all of the Front Doors within a resource group under a subscription. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Front Doors along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String apiVersion = "2021-06-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - apiVersion, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/validateCustomDomain") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response validateCustomDomainSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("frontDoorName") String frontDoorName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ValidateCustomDomainInput customDomainProperties, Context context); - /** - * Lists all of the Front Doors within a resource group under a subscription. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Front Doors as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); - /** - * Lists all of the Front Doors within a resource group under a subscription. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Front Doors as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); - } + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); - /** - * Lists all of the Front Doors within a resource group under a subscription. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Front Doors as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); - } + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - /** - * Lists all of the Front Doors within a resource group under a subscription. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Front Doors as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Gets a Front Door with the specified Front Door name under the specified subscription and resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -399,70 +225,17 @@ public PagedIterable listByResourceGroup(String resourceGroupNam @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String frontDoorName) { - 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 (frontDoorName == null) { - return Mono.error(new IllegalArgumentException("Parameter frontDoorName is required and cannot be null.")); - } - final String apiVersion = "2021-06-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, frontDoorName, apiVersion, accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, frontDoorName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a Front Door with the specified Front Door name under the specified subscription and resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param frontDoorName Name of the Front Door which is globally unique. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Front Door with the specified Front Door name under the specified subscription and resource group along - * with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String frontDoorName, 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 (frontDoorName == null) { - return Mono.error(new IllegalArgumentException("Parameter frontDoorName is required and cannot be null.")); - } - final String apiVersion = "2021-06-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - frontDoorName, apiVersion, accept, context); - } - - /** - * Gets a Front Door with the specified Front Door name under the specified subscription and resource group. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -479,7 +252,7 @@ private Mono getByResourceGroupAsync(String resourceGroupName, S /** * Gets a Front Door with the specified Front Door name under the specified subscription and resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -491,13 +264,15 @@ private Mono getByResourceGroupAsync(String resourceGroupName, S @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse(String resourceGroupName, String frontDoorName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, frontDoorName, context).block(); + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, frontDoorName, accept, context); } /** * Gets a Front Door with the specified Front Door name under the specified subscription and resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -512,7 +287,7 @@ public FrontDoorInner getByResourceGroup(String resourceGroupName, String frontD /** * Creates a new Front Door with a Front Door name under the specified subscription and resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param frontDoorParameters Front Door properties needed to create a new Front Door. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -524,107 +299,66 @@ public FrontDoorInner getByResourceGroup(String resourceGroupName, String frontD @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String frontDoorName, FrontDoorInner frontDoorParameters) { - 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 (frontDoorName == null) { - return Mono.error(new IllegalArgumentException("Parameter frontDoorName is required and cannot be null.")); - } - if (frontDoorParameters == null) { - return Mono - .error(new IllegalArgumentException("Parameter frontDoorParameters is required and cannot be null.")); - } else { - frontDoorParameters.validate(); - } - final String apiVersion = "2021-06-01"; + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, frontDoorName, apiVersion, frontDoorParameters, accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, frontDoorName, contentType, accept, + frontDoorParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates a new Front Door with a Front Door name under the specified subscription and resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param frontDoorParameters Front Door properties needed to create a new Front Door. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return front Door represents a collection of backend endpoints to route traffic to along with rules that specify - * how traffic is sent there along with {@link Response} on successful completion of {@link Mono}. + * how traffic is sent there along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String frontDoorName, FrontDoorInner frontDoorParameters, 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 (frontDoorName == null) { - return Mono.error(new IllegalArgumentException("Parameter frontDoorName is required and cannot be null.")); - } - if (frontDoorParameters == null) { - return Mono - .error(new IllegalArgumentException("Parameter frontDoorParameters is required and cannot be null.")); - } else { - frontDoorParameters.validate(); - } - final String apiVersion = "2021-06-01"; + private Response createOrUpdateWithResponse(String resourceGroupName, String frontDoorName, + FrontDoorInner frontDoorParameters) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - frontDoorName, apiVersion, frontDoorParameters, accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, frontDoorName, contentType, accept, frontDoorParameters, + Context.NONE); } /** * Creates a new Front Door with a Front Door name under the specified subscription and resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param frontDoorParameters Front Door properties needed to create a new Front Door. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of front Door represents a collection of backend endpoints to route - * traffic to along with rules that specify how traffic is sent there. + * @return front Door represents a collection of backend endpoints to route traffic to along with rules that specify + * how traffic is sent there along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FrontDoorInner> beginCreateOrUpdateAsync(String resourceGroupName, - String frontDoorName, FrontDoorInner frontDoorParameters) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, frontDoorName, frontDoorParameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - FrontDoorInner.class, FrontDoorInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String frontDoorName, + FrontDoorInner frontDoorParameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, frontDoorName, contentType, accept, frontDoorParameters, + context); } /** * Creates a new Front Door with a Front Door name under the specified subscription and resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param frontDoorParameters Front Door properties needed to create a new Front Door. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -633,18 +367,17 @@ private PollerFlux, FrontDoorInner> beginCreateOrUpda */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, FrontDoorInner> beginCreateOrUpdateAsync(String resourceGroupName, - String frontDoorName, FrontDoorInner frontDoorParameters, Context context) { - context = this.client.mergeContext(context); + String frontDoorName, FrontDoorInner frontDoorParameters) { Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, frontDoorName, frontDoorParameters, context); + = createOrUpdateWithResponseAsync(resourceGroupName, frontDoorName, frontDoorParameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - FrontDoorInner.class, FrontDoorInner.class, context); + FrontDoorInner.class, FrontDoorInner.class, this.client.getContext()); } /** * Creates a new Front Door with a Front Door name under the specified subscription and resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param frontDoorParameters Front Door properties needed to create a new Front Door. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -656,13 +389,16 @@ private PollerFlux, FrontDoorInner> beginCreateOrUpda @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, FrontDoorInner> beginCreateOrUpdate(String resourceGroupName, String frontDoorName, FrontDoorInner frontDoorParameters) { - return this.beginCreateOrUpdateAsync(resourceGroupName, frontDoorName, frontDoorParameters).getSyncPoller(); + Response response + = createOrUpdateWithResponse(resourceGroupName, frontDoorName, frontDoorParameters); + return this.client.getLroResult(response, FrontDoorInner.class, + FrontDoorInner.class, Context.NONE); } /** * Creates a new Front Door with a Front Door name under the specified subscription and resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param frontDoorParameters Front Door properties needed to create a new Front Door. * @param context The context to associate with this operation. @@ -675,14 +411,16 @@ public SyncPoller, FrontDoorInner> beginCreateOrUpdat @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, FrontDoorInner> beginCreateOrUpdate(String resourceGroupName, String frontDoorName, FrontDoorInner frontDoorParameters, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, frontDoorName, frontDoorParameters, context) - .getSyncPoller(); + Response response + = createOrUpdateWithResponse(resourceGroupName, frontDoorName, frontDoorParameters, context); + return this.client.getLroResult(response, FrontDoorInner.class, + FrontDoorInner.class, context); } /** * Creates a new Front Door with a Front Door name under the specified subscription and resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param frontDoorParameters Front Door properties needed to create a new Front Door. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -701,27 +439,7 @@ private Mono createOrUpdateAsync(String resourceGroupName, Strin /** * Creates a new Front Door with a Front Door name under the specified subscription and resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param frontDoorName Name of the Front Door which is globally unique. - * @param frontDoorParameters Front Door properties needed to create a new Front Door. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return front Door represents a collection of backend endpoints to route traffic to along with rules that specify - * how traffic is sent there on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String frontDoorName, - FrontDoorInner frontDoorParameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, frontDoorName, frontDoorParameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates a new Front Door with a Front Door name under the specified subscription and resource group. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param frontDoorParameters Front Door properties needed to create a new Front Door. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -733,13 +451,13 @@ private Mono createOrUpdateAsync(String resourceGroupName, Strin @ServiceMethod(returns = ReturnType.SINGLE) public FrontDoorInner createOrUpdate(String resourceGroupName, String frontDoorName, FrontDoorInner frontDoorParameters) { - return createOrUpdateAsync(resourceGroupName, frontDoorName, frontDoorParameters).block(); + return beginCreateOrUpdate(resourceGroupName, frontDoorName, frontDoorParameters).getFinalResult(); } /** * Creates a new Front Door with a Front Door name under the specified subscription and resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param frontDoorParameters Front Door properties needed to create a new Front Door. * @param context The context to associate with this operation. @@ -752,13 +470,13 @@ public FrontDoorInner createOrUpdate(String resourceGroupName, String frontDoorN @ServiceMethod(returns = ReturnType.SINGLE) public FrontDoorInner createOrUpdate(String resourceGroupName, String frontDoorName, FrontDoorInner frontDoorParameters, Context context) { - return createOrUpdateAsync(resourceGroupName, frontDoorName, frontDoorParameters, context).block(); + return beginCreateOrUpdate(resourceGroupName, frontDoorName, frontDoorParameters, context).getFinalResult(); } /** * Deletes an existing Front Door with the specified parameters. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -767,106 +485,66 @@ public FrontDoorInner createOrUpdate(String resourceGroupName, String frontDoorN */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String frontDoorName) { - 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 (frontDoorName == null) { - return Mono.error(new IllegalArgumentException("Parameter frontDoorName is required and cannot be null.")); - } - final String apiVersion = "2021-06-01"; - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, frontDoorName, apiVersion, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, frontDoorName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes an existing Front Door with the specified parameters. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String frontDoorName, - 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 (frontDoorName == null) { - return Mono.error(new IllegalArgumentException("Parameter frontDoorName is required and cannot be null.")); - } - final String apiVersion = "2021-06-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - frontDoorName, apiVersion, accept, context); + private Response deleteWithResponse(String resourceGroupName, String frontDoorName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, frontDoorName, Context.NONE); } /** * Deletes an existing Front Door with the specified parameters. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String frontDoorName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, frontDoorName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String frontDoorName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, frontDoorName, context); } /** * Deletes an existing Front Door with the specified parameters. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String frontDoorName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, frontDoorName, context); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String frontDoorName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, frontDoorName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** * Deletes an existing Front Door with the specified parameters. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -875,13 +553,14 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String frontDoorName) { - return this.beginDeleteAsync(resourceGroupName, frontDoorName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, frontDoorName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** * Deletes an existing Front Door with the specified parameters. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -892,13 +571,14 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String frontDoorName, Context context) { - return this.beginDeleteAsync(resourceGroupName, frontDoorName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, frontDoorName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** * Deletes an existing Front Door with the specified parameters. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -913,100 +593,233 @@ private Mono deleteAsync(String resourceGroupName, String frontDoorName) { /** * Deletes an existing Front Door with the specified parameters. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String frontDoorName, Context context) { - return beginDeleteAsync(resourceGroupName, frontDoorName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public void delete(String resourceGroupName, String frontDoorName) { + beginDelete(resourceGroupName, frontDoorName).getFinalResult(); } /** * Deletes an existing Front Door with the specified parameters. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String frontDoorName) { - deleteAsync(resourceGroupName, frontDoorName).block(); + public void delete(String resourceGroupName, String frontDoorName, Context context) { + beginDelete(resourceGroupName, frontDoorName, context).getFinalResult(); } /** - * Deletes an existing Front Door with the specified parameters. + * Lists all of the Front Doors within a resource group under a subscription. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param frontDoorName Name of the Front Door which is globally unique. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of FrontDoor items along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all of the Front Doors within a resource group under a subscription. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of FrontDoor items as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Lists all of the Front Doors within a resource group under a subscription. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of FrontDoor items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all of the Front Doors within a resource group under a subscription. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of FrontDoor items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String frontDoorName, Context context) { - deleteAsync(resourceGroupName, frontDoorName, context).block(); + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Validates the custom domain mapping to ensure it maps to the correct Front Door endpoint in DNS. + * Lists all of the Front Doors within a resource group under a subscription. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param frontDoorName Name of the Front Door which is globally unique. - * @param customDomainProperties Custom domain to be validated. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return output of custom domain validation along with {@link Response} on successful completion of {@link Mono}. + * @return paged collection of FrontDoor items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); + } + + /** + * Lists all of the Front Doors within a resource group under a subscription. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of FrontDoor items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + } + + /** + * Lists all of the Front Doors within an Azure subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of FrontDoor items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> validateCustomDomainWithResponseAsync( - String resourceGroupName, String frontDoorName, ValidateCustomDomainInput customDomainProperties) { - 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 (frontDoorName == null) { - return Mono.error(new IllegalArgumentException("Parameter frontDoorName is required and cannot be null.")); - } - if (customDomainProperties == null) { - return Mono.error( - new IllegalArgumentException("Parameter customDomainProperties is required and cannot be null.")); - } else { - customDomainProperties.validate(); - } - final String apiVersion = "2021-06-01"; + private Mono> listSinglePageAsync() { final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.validateCustomDomain(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, frontDoorName, apiVersion, customDomainProperties, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Lists all of the Front Doors within an Azure subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of FrontDoor items as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists all of the Front Doors within an Azure subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of FrontDoor items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all of the Front Doors within an Azure subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of FrontDoor items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all of the Front Doors within an Azure subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of FrontDoor items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink)); + } + + /** + * Lists all of the Front Doors within an Azure subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of FrontDoor items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context)); + } + /** * Validates the custom domain mapping to ensure it maps to the correct Front Door endpoint in DNS. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param customDomainProperties Custom domain to be validated. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1014,40 +827,20 @@ private Mono> validateCustomDomainWith */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> validateCustomDomainWithResponseAsync( - String resourceGroupName, String frontDoorName, ValidateCustomDomainInput customDomainProperties, - 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 (frontDoorName == null) { - return Mono.error(new IllegalArgumentException("Parameter frontDoorName is required and cannot be null.")); - } - if (customDomainProperties == null) { - return Mono.error( - new IllegalArgumentException("Parameter customDomainProperties is required and cannot be null.")); - } else { - customDomainProperties.validate(); - } - final String apiVersion = "2021-06-01"; + String resourceGroupName, String frontDoorName, ValidateCustomDomainInput customDomainProperties) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.validateCustomDomain(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, frontDoorName, apiVersion, customDomainProperties, accept, context); + return FluxUtil + .withContext(context -> service.validateCustomDomain(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, frontDoorName, contentType, accept, + customDomainProperties, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Validates the custom domain mapping to ensure it maps to the correct Front Door endpoint in DNS. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param customDomainProperties Custom domain to be validated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1065,7 +858,7 @@ private Mono validateCustomDomainAsync(String r /** * Validates the custom domain mapping to ensure it maps to the correct Front Door endpoint in DNS. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param customDomainProperties Custom domain to be validated. * @param context The context to associate with this operation. @@ -1077,14 +870,17 @@ private Mono validateCustomDomainAsync(String r @ServiceMethod(returns = ReturnType.SINGLE) public Response validateCustomDomainWithResponse(String resourceGroupName, String frontDoorName, ValidateCustomDomainInput customDomainProperties, Context context) { - return validateCustomDomainWithResponseAsync(resourceGroupName, frontDoorName, customDomainProperties, context) - .block(); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.validateCustomDomainSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, frontDoorName, contentType, accept, + customDomainProperties, context); } /** * Validates the custom domain mapping to ensure it maps to the correct Front Door endpoint in DNS. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param customDomainProperties Custom domain to be validated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1106,25 +902,38 @@ public ValidateCustomDomainOutputInner validateCustomDomain(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Front Doors along with {@link PagedResponse} on successful completion of + * @return paged collection of FrontDoor items 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.")); - } + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of FrontDoor items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1133,23 +942,15 @@ private Mono> listNextSinglePageAsync(String nextL * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Front Doors along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return paged collection of FrontDoor items along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -1159,27 +960,36 @@ private Mono> listNextSinglePageAsync(String nextL * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Front Doors along with {@link PagedResponse} on successful completion of + * @return paged collection of FrontDoor items along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listNextSinglePageAsync(String nextLink) { final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of FrontDoor items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1188,23 +998,13 @@ private Mono> listByResourceGroupNextSinglePageAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Front Doors along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return paged collection of FrontDoor items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorsImpl.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorsImpl.java index 0a9599ee0d535..c343d90520c84 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorsImpl.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.implementation; @@ -30,36 +30,12 @@ public FrontDoorsImpl(FrontDoorsClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new FrontDoorImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new FrontDoorImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new FrontDoorImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new FrontDoorImpl(inner1, this.manager())); - } - public Response getByResourceGroupWithResponse(String resourceGroupName, String frontDoorName, Context context) { Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, frontDoorName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new FrontDoorImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new FrontDoorImpl(inner.getValue(), this.manager())); } public FrontDoor getByResourceGroup(String resourceGroupName, String frontDoorName) { @@ -79,16 +55,32 @@ public void delete(String resourceGroupName, String frontDoorName, Context conte this.serviceClient().delete(resourceGroupName, frontDoorName, context); } + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new FrontDoorImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new FrontDoorImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new FrontDoorImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new FrontDoorImpl(inner1, this.manager())); + } + public Response validateCustomDomainWithResponse(String resourceGroupName, String frontDoorName, ValidateCustomDomainInput customDomainProperties, Context context) { Response inner = this.serviceClient() .validateCustomDomainWithResponse(resourceGroupName, frontDoorName, customDomainProperties, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ValidateCustomDomainOutputImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ValidateCustomDomainOutputImpl(inner.getValue(), this.manager())); } public ValidateCustomDomainOutput validateCustomDomain(String resourceGroupName, String frontDoorName, diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontendEndpointImpl.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontendEndpointImpl.java index 1646e6104a5d6..4c2af3d856214 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontendEndpointImpl.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontendEndpointImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.implementation; diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontendEndpointsClientImpl.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontendEndpointsClientImpl.java index 014baae447ef2..8cff8f883ed9d 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontendEndpointsClientImpl.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontendEndpointsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.implementation; @@ -26,14 +26,15 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.frontdoor.fluent.FrontendEndpointsClient; import com.azure.resourcemanager.frontdoor.fluent.models.FrontendEndpointInner; +import com.azure.resourcemanager.frontdoor.implementation.models.FrontendEndpointsListResult; import com.azure.resourcemanager.frontdoor.models.CustomHttpsConfiguration; -import com.azure.resourcemanager.frontdoor.models.FrontendEndpointsListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -67,345 +68,300 @@ public final class FrontendEndpointsClientImpl implements FrontendEndpointsClien * The interface defining all the services for FrontDoorManagementClientFrontendEndpoints to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "FrontDoorManagementC") + @Host("{endpoint}") + @ServiceInterface(name = "FrontDoorManagementClientFrontendEndpoints") public interface FrontendEndpointsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints/{frontendEndpointName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByFrontDoor(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("frontDoorName") String frontDoorName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("frontendEndpointName") String frontendEndpointName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints/{frontendEndpointName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("frontDoorName") String frontDoorName, - @PathParam("frontendEndpointName") String frontendEndpointName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("frontendEndpointName") String frontendEndpointName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByFrontDoor(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("frontDoorName") String frontDoorName, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByFrontDoorSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("frontDoorName") String frontDoorName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints/{frontendEndpointName}/enableHttps") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> enableHttps(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> enableHttps(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("frontDoorName") String frontDoorName, @PathParam("frontendEndpointName") String frontendEndpointName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CustomHttpsConfiguration customHttpsConfiguration, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") CustomHttpsConfiguration customHttpsConfiguration, Context context); - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints/{frontendEndpointName}/disableHttps") + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints/{frontendEndpointName}/enableHttps") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> disableHttps(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response enableHttpsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("frontDoorName") String frontDoorName, @PathParam("frontendEndpointName") String frontendEndpointName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") CustomHttpsConfiguration customHttpsConfiguration, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints/{frontendEndpointName}/disableHttps") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> disableHttps(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("frontDoorName") String frontDoorName, + @PathParam("frontendEndpointName") String frontendEndpointName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints/{frontendEndpointName}/disableHttps") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response disableHttpsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("frontDoorName") String frontDoorName, + @PathParam("frontendEndpointName") String frontendEndpointName, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByFrontDoorNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByFrontDoorNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Lists all of the frontend endpoints within a Front Door. + * Gets a Frontend endpoint with the specified name within the specified Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. + * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list frontend endpoints along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a Frontend endpoint with the specified name within the specified Front Door along with {@link Response} + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByFrontDoorSinglePageAsync(String resourceGroupName, - String frontDoorName) { - 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 (frontDoorName == null) { - return Mono.error(new IllegalArgumentException("Parameter frontDoorName is required and cannot be null.")); - } - final String apiVersion = "2021-06-01"; + private Mono> getWithResponseAsync(String resourceGroupName, String frontDoorName, + String frontendEndpointName) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByFrontDoor(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, frontDoorName, apiVersion, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, frontDoorName, frontendEndpointName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists all of the frontend endpoints within a Front Door. + * Gets a Frontend endpoint with the specified name within the specified Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. - * @param context The context to associate with this operation. + * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list frontend endpoints along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a Frontend endpoint with the specified name within the specified Front Door on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByFrontDoorSinglePageAsync(String resourceGroupName, - String frontDoorName, 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 (frontDoorName == null) { - return Mono.error(new IllegalArgumentException("Parameter frontDoorName is required and cannot be null.")); - } - final String apiVersion = "2021-06-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByFrontDoor(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - frontDoorName, apiVersion, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + private Mono getAsync(String resourceGroupName, String frontDoorName, + String frontendEndpointName) { + return getWithResponseAsync(resourceGroupName, frontDoorName, frontendEndpointName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Lists all of the frontend endpoints within a Front Door. + * Gets a Frontend endpoint with the specified name within the specified Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. + * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list frontend endpoints as paginated response with {@link PagedFlux}. + * @return a Frontend endpoint with the specified name within the specified Front Door along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByFrontDoorAsync(String resourceGroupName, String frontDoorName) { - return new PagedFlux<>(() -> listByFrontDoorSinglePageAsync(resourceGroupName, frontDoorName), - nextLink -> listByFrontDoorNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String frontDoorName, + String frontendEndpointName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, frontDoorName, frontendEndpointName, accept, context); } /** - * Lists all of the frontend endpoints within a Front Door. + * Gets a Frontend endpoint with the specified name within the specified Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. - * @param context The context to associate with this operation. + * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list frontend endpoints as paginated response with {@link PagedFlux}. + * @return a Frontend endpoint with the specified name within the specified Front Door. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByFrontDoorAsync(String resourceGroupName, String frontDoorName, - Context context) { - return new PagedFlux<>(() -> listByFrontDoorSinglePageAsync(resourceGroupName, frontDoorName, context), - nextLink -> listByFrontDoorNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public FrontendEndpointInner get(String resourceGroupName, String frontDoorName, String frontendEndpointName) { + return getWithResponse(resourceGroupName, frontDoorName, frontendEndpointName, Context.NONE).getValue(); } /** * Lists all of the frontend endpoints within a Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list frontend endpoints as paginated response with {@link PagedIterable}. + * @return paged collection of FrontendEndpoint items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByFrontDoor(String resourceGroupName, String frontDoorName) { - return new PagedIterable<>(listByFrontDoorAsync(resourceGroupName, frontDoorName)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByFrontDoorSinglePageAsync(String resourceGroupName, + String frontDoorName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByFrontDoor(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, frontDoorName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists all of the frontend endpoints within a Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list frontend endpoints as paginated response with {@link PagedIterable}. + * @return paged collection of FrontendEndpoint items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByFrontDoor(String resourceGroupName, String frontDoorName, - Context context) { - return new PagedIterable<>(listByFrontDoorAsync(resourceGroupName, frontDoorName, context)); + private PagedFlux listByFrontDoorAsync(String resourceGroupName, String frontDoorName) { + return new PagedFlux<>(() -> listByFrontDoorSinglePageAsync(resourceGroupName, frontDoorName), + nextLink -> listByFrontDoorNextSinglePageAsync(nextLink)); } /** - * Gets a Frontend endpoint with the specified name within the specified Front Door. + * Lists all of the frontend endpoints within a Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. - * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Frontend endpoint with the specified name within the specified Front Door along with {@link Response} - * on successful completion of {@link Mono}. + * @return paged collection of FrontendEndpoint items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String frontDoorName, - String frontendEndpointName) { - 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 (frontDoorName == null) { - return Mono.error(new IllegalArgumentException("Parameter frontDoorName is required and cannot be null.")); - } - if (frontendEndpointName == null) { - return Mono - .error(new IllegalArgumentException("Parameter frontendEndpointName is required and cannot be null.")); - } - final String apiVersion = "2021-06-01"; + private PagedResponse listByFrontDoorSinglePage(String resourceGroupName, + String frontDoorName) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, frontDoorName, frontendEndpointName, apiVersion, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res + = service.listByFrontDoorSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, frontDoorName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Gets a Frontend endpoint with the specified name within the specified Front Door. + * Lists all of the frontend endpoints within a Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. - * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Frontend endpoint with the specified name within the specified Front Door along with {@link Response} - * on successful completion of {@link Mono}. + * @return paged collection of FrontendEndpoint items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String frontDoorName, - String frontendEndpointName, 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 (frontDoorName == null) { - return Mono.error(new IllegalArgumentException("Parameter frontDoorName is required and cannot be null.")); - } - if (frontendEndpointName == null) { - return Mono - .error(new IllegalArgumentException("Parameter frontendEndpointName is required and cannot be null.")); - } - final String apiVersion = "2021-06-01"; + private PagedResponse listByFrontDoorSinglePage(String resourceGroupName, + String frontDoorName, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, frontDoorName, - frontendEndpointName, apiVersion, accept, context); + Response res + = service.listByFrontDoorSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, frontDoorName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Gets a Frontend endpoint with the specified name within the specified Front Door. + * Lists all of the frontend endpoints within a Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. - * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Frontend endpoint with the specified name within the specified Front Door on successful completion of - * {@link Mono}. + * @return paged collection of FrontendEndpoint items as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String frontDoorName, - String frontendEndpointName) { - return getWithResponseAsync(resourceGroupName, frontDoorName, frontendEndpointName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByFrontDoor(String resourceGroupName, String frontDoorName) { + return new PagedIterable<>(() -> listByFrontDoorSinglePage(resourceGroupName, frontDoorName), + nextLink -> listByFrontDoorNextSinglePage(nextLink)); } /** - * Gets a Frontend endpoint with the specified name within the specified Front Door. + * Lists all of the frontend endpoints within a Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. - * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Frontend endpoint with the specified name within the specified Front Door along with {@link Response}. + * @return paged collection of FrontendEndpoint items as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String frontDoorName, - String frontendEndpointName, Context context) { - return getWithResponseAsync(resourceGroupName, frontDoorName, frontendEndpointName, context).block(); - } - - /** - * Gets a Frontend endpoint with the specified name within the specified Front Door. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param frontDoorName Name of the Front Door which is globally unique. - * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Frontend endpoint with the specified name within the specified Front Door. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FrontendEndpointInner get(String resourceGroupName, String frontDoorName, String frontendEndpointName) { - return getWithResponse(resourceGroupName, frontDoorName, frontendEndpointName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByFrontDoor(String resourceGroupName, String frontDoorName, + Context context) { + return new PagedIterable<>(() -> listByFrontDoorSinglePage(resourceGroupName, frontDoorName, context), + nextLink -> listByFrontDoorNextSinglePage(nextLink, context)); } /** * Enables a frontendEndpoint for HTTPS traffic. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. * @param customHttpsConfiguration The configuration specifying how to enable HTTPS. @@ -417,118 +373,64 @@ public FrontendEndpointInner get(String resourceGroupName, String frontDoorName, @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> enableHttpsWithResponseAsync(String resourceGroupName, String frontDoorName, String frontendEndpointName, CustomHttpsConfiguration customHttpsConfiguration) { - 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 (frontDoorName == null) { - return Mono.error(new IllegalArgumentException("Parameter frontDoorName is required and cannot be null.")); - } - if (frontendEndpointName == null) { - return Mono - .error(new IllegalArgumentException("Parameter frontendEndpointName is required and cannot be null.")); - } - if (customHttpsConfiguration == null) { - return Mono.error( - new IllegalArgumentException("Parameter customHttpsConfiguration is required and cannot be null.")); - } else { - customHttpsConfiguration.validate(); - } - final String apiVersion = "2021-06-01"; - final String accept = "application/json"; + final String contentType = "application/json"; return FluxUtil - .withContext(context -> service.enableHttps(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, frontDoorName, frontendEndpointName, apiVersion, customHttpsConfiguration, accept, - context)) + .withContext(context -> service.enableHttps(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, frontDoorName, frontendEndpointName, contentType, + customHttpsConfiguration, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Enables a frontendEndpoint for HTTPS traffic. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. * @param customHttpsConfiguration The configuration specifying how to enable HTTPS. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> enableHttpsWithResponseAsync(String resourceGroupName, - String frontDoorName, String frontendEndpointName, CustomHttpsConfiguration customHttpsConfiguration, - 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 (frontDoorName == null) { - return Mono.error(new IllegalArgumentException("Parameter frontDoorName is required and cannot be null.")); - } - if (frontendEndpointName == null) { - return Mono - .error(new IllegalArgumentException("Parameter frontendEndpointName is required and cannot be null.")); - } - if (customHttpsConfiguration == null) { - return Mono.error( - new IllegalArgumentException("Parameter customHttpsConfiguration is required and cannot be null.")); - } else { - customHttpsConfiguration.validate(); - } - final String apiVersion = "2021-06-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.enableHttps(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - frontDoorName, frontendEndpointName, apiVersion, customHttpsConfiguration, accept, context); + private Response enableHttpsWithResponse(String resourceGroupName, String frontDoorName, + String frontendEndpointName, CustomHttpsConfiguration customHttpsConfiguration) { + final String contentType = "application/json"; + return service.enableHttpsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, frontDoorName, frontendEndpointName, contentType, + customHttpsConfiguration, Context.NONE); } /** * Enables a frontendEndpoint for HTTPS traffic. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. * @param customHttpsConfiguration The configuration specifying how to enable HTTPS. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginEnableHttpsAsync(String resourceGroupName, String frontDoorName, - String frontendEndpointName, CustomHttpsConfiguration customHttpsConfiguration) { - Mono>> mono = enableHttpsWithResponseAsync(resourceGroupName, frontDoorName, - frontendEndpointName, customHttpsConfiguration); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response enableHttpsWithResponse(String resourceGroupName, String frontDoorName, + String frontendEndpointName, CustomHttpsConfiguration customHttpsConfiguration, Context context) { + final String contentType = "application/json"; + return service.enableHttpsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, frontDoorName, frontendEndpointName, contentType, + customHttpsConfiguration, context); } /** * Enables a frontendEndpoint for HTTPS traffic. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. * @param customHttpsConfiguration The configuration specifying how to enable HTTPS. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -536,18 +438,17 @@ private PollerFlux, Void> beginEnableHttpsAsync(String resource */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginEnableHttpsAsync(String resourceGroupName, String frontDoorName, - String frontendEndpointName, CustomHttpsConfiguration customHttpsConfiguration, Context context) { - context = this.client.mergeContext(context); + String frontendEndpointName, CustomHttpsConfiguration customHttpsConfiguration) { Mono>> mono = enableHttpsWithResponseAsync(resourceGroupName, frontDoorName, - frontendEndpointName, customHttpsConfiguration, context); + frontendEndpointName, customHttpsConfiguration); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** * Enables a frontendEndpoint for HTTPS traffic. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. * @param customHttpsConfiguration The configuration specifying how to enable HTTPS. @@ -559,15 +460,15 @@ private PollerFlux, Void> beginEnableHttpsAsync(String resource @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginEnableHttps(String resourceGroupName, String frontDoorName, String frontendEndpointName, CustomHttpsConfiguration customHttpsConfiguration) { - return this - .beginEnableHttpsAsync(resourceGroupName, frontDoorName, frontendEndpointName, customHttpsConfiguration) - .getSyncPoller(); + Response response + = enableHttpsWithResponse(resourceGroupName, frontDoorName, frontendEndpointName, customHttpsConfiguration); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** * Enables a frontendEndpoint for HTTPS traffic. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. * @param customHttpsConfiguration The configuration specifying how to enable HTTPS. @@ -580,16 +481,15 @@ public SyncPoller, Void> beginEnableHttps(String resourceGroupN @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginEnableHttps(String resourceGroupName, String frontDoorName, String frontendEndpointName, CustomHttpsConfiguration customHttpsConfiguration, Context context) { - return this - .beginEnableHttpsAsync(resourceGroupName, frontDoorName, frontendEndpointName, customHttpsConfiguration, - context) - .getSyncPoller(); + Response response = enableHttpsWithResponse(resourceGroupName, frontDoorName, frontendEndpointName, + customHttpsConfiguration, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** * Enables a frontendEndpoint for HTTPS traffic. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. * @param customHttpsConfiguration The configuration specifying how to enable HTTPS. @@ -609,27 +509,7 @@ private Mono enableHttpsAsync(String resourceGroupName, String frontDoorNa /** * Enables a frontendEndpoint for HTTPS traffic. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param frontDoorName Name of the Front Door which is globally unique. - * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. - * @param customHttpsConfiguration The configuration specifying how to enable HTTPS. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono enableHttpsAsync(String resourceGroupName, String frontDoorName, String frontendEndpointName, - CustomHttpsConfiguration customHttpsConfiguration, Context context) { - return beginEnableHttpsAsync(resourceGroupName, frontDoorName, frontendEndpointName, customHttpsConfiguration, - context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Enables a frontendEndpoint for HTTPS traffic. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. * @param customHttpsConfiguration The configuration specifying how to enable HTTPS. @@ -640,13 +520,14 @@ private Mono enableHttpsAsync(String resourceGroupName, String frontDoorNa @ServiceMethod(returns = ReturnType.SINGLE) public void enableHttps(String resourceGroupName, String frontDoorName, String frontendEndpointName, CustomHttpsConfiguration customHttpsConfiguration) { - enableHttpsAsync(resourceGroupName, frontDoorName, frontendEndpointName, customHttpsConfiguration).block(); + beginEnableHttps(resourceGroupName, frontDoorName, frontendEndpointName, customHttpsConfiguration) + .getFinalResult(); } /** * Enables a frontendEndpoint for HTTPS traffic. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. * @param customHttpsConfiguration The configuration specifying how to enable HTTPS. @@ -658,14 +539,14 @@ public void enableHttps(String resourceGroupName, String frontDoorName, String f @ServiceMethod(returns = ReturnType.SINGLE) public void enableHttps(String resourceGroupName, String frontDoorName, String frontendEndpointName, CustomHttpsConfiguration customHttpsConfiguration, Context context) { - enableHttpsAsync(resourceGroupName, frontDoorName, frontendEndpointName, customHttpsConfiguration, context) - .block(); + beginEnableHttps(resourceGroupName, frontDoorName, frontendEndpointName, customHttpsConfiguration, context) + .getFinalResult(); } /** * Disables a frontendEndpoint for HTTPS traffic. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -676,101 +557,55 @@ public void enableHttps(String resourceGroupName, String frontDoorName, String f @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> disableHttpsWithResponseAsync(String resourceGroupName, String frontDoorName, String frontendEndpointName) { - 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 (frontDoorName == null) { - return Mono.error(new IllegalArgumentException("Parameter frontDoorName is required and cannot be null.")); - } - if (frontendEndpointName == null) { - return Mono - .error(new IllegalArgumentException("Parameter frontendEndpointName is required and cannot be null.")); - } - final String apiVersion = "2021-06-01"; - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.disableHttps(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, frontDoorName, frontendEndpointName, apiVersion, accept, context)) + .withContext(context -> service.disableHttps(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, frontDoorName, frontendEndpointName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Disables a frontendEndpoint for HTTPS traffic. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> disableHttpsWithResponseAsync(String resourceGroupName, - String frontDoorName, String frontendEndpointName, 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 (frontDoorName == null) { - return Mono.error(new IllegalArgumentException("Parameter frontDoorName is required and cannot be null.")); - } - if (frontendEndpointName == null) { - return Mono - .error(new IllegalArgumentException("Parameter frontendEndpointName is required and cannot be null.")); - } - final String apiVersion = "2021-06-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.disableHttps(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - frontDoorName, frontendEndpointName, apiVersion, accept, context); + private Response disableHttpsWithResponse(String resourceGroupName, String frontDoorName, + String frontendEndpointName) { + return service.disableHttpsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, frontDoorName, frontendEndpointName, Context.NONE); } /** * Disables a frontendEndpoint for HTTPS traffic. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDisableHttpsAsync(String resourceGroupName, String frontDoorName, - String frontendEndpointName) { - Mono>> mono - = disableHttpsWithResponseAsync(resourceGroupName, frontDoorName, frontendEndpointName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response disableHttpsWithResponse(String resourceGroupName, String frontDoorName, + String frontendEndpointName, Context context) { + return service.disableHttpsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, frontDoorName, frontendEndpointName, context); } /** * Disables a frontendEndpoint for HTTPS traffic. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -778,18 +613,17 @@ private PollerFlux, Void> beginDisableHttpsAsync(String resourc */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDisableHttpsAsync(String resourceGroupName, String frontDoorName, - String frontendEndpointName, Context context) { - context = this.client.mergeContext(context); + String frontendEndpointName) { Mono>> mono - = disableHttpsWithResponseAsync(resourceGroupName, frontDoorName, frontendEndpointName, context); + = disableHttpsWithResponseAsync(resourceGroupName, frontDoorName, frontendEndpointName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** * Disables a frontendEndpoint for HTTPS traffic. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -800,13 +634,15 @@ private PollerFlux, Void> beginDisableHttpsAsync(String resourc @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDisableHttps(String resourceGroupName, String frontDoorName, String frontendEndpointName) { - return this.beginDisableHttpsAsync(resourceGroupName, frontDoorName, frontendEndpointName).getSyncPoller(); + Response response + = disableHttpsWithResponse(resourceGroupName, frontDoorName, frontendEndpointName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** * Disables a frontendEndpoint for HTTPS traffic. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. * @param context The context to associate with this operation. @@ -818,14 +654,15 @@ public SyncPoller, Void> beginDisableHttps(String resourceGroup @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDisableHttps(String resourceGroupName, String frontDoorName, String frontendEndpointName, Context context) { - return this.beginDisableHttpsAsync(resourceGroupName, frontDoorName, frontendEndpointName, context) - .getSyncPoller(); + Response response + = disableHttpsWithResponse(resourceGroupName, frontDoorName, frontendEndpointName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** * Disables a frontendEndpoint for HTTPS traffic. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -842,26 +679,7 @@ private Mono disableHttpsAsync(String resourceGroupName, String frontDoorN /** * Disables a frontendEndpoint for HTTPS traffic. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param frontDoorName Name of the Front Door which is globally unique. - * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono disableHttpsAsync(String resourceGroupName, String frontDoorName, String frontendEndpointName, - Context context) { - return beginDisableHttpsAsync(resourceGroupName, frontDoorName, frontendEndpointName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Disables a frontendEndpoint for HTTPS traffic. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -870,13 +688,13 @@ private Mono disableHttpsAsync(String resourceGroupName, String frontDoorN */ @ServiceMethod(returns = ReturnType.SINGLE) public void disableHttps(String resourceGroupName, String frontDoorName, String frontendEndpointName) { - disableHttpsAsync(resourceGroupName, frontDoorName, frontendEndpointName).block(); + beginDisableHttps(resourceGroupName, frontDoorName, frontendEndpointName).getFinalResult(); } /** * Disables a frontendEndpoint for HTTPS traffic. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. * @param context The context to associate with this operation. @@ -887,7 +705,7 @@ public void disableHttps(String resourceGroupName, String frontDoorName, String @ServiceMethod(returns = ReturnType.SINGLE) public void disableHttps(String resourceGroupName, String frontDoorName, String frontendEndpointName, Context context) { - disableHttpsAsync(resourceGroupName, frontDoorName, frontendEndpointName, context).block(); + beginDisableHttps(resourceGroupName, frontDoorName, frontendEndpointName, context).getFinalResult(); } /** @@ -897,18 +715,11 @@ public void disableHttps(String resourceGroupName, String frontDoorName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list frontend endpoints along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return paged collection of FrontendEndpoint items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByFrontDoorNextSinglePageAsync(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.listByFrontDoorNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -917,6 +728,24 @@ private Mono> listByFrontDoorNextSinglePage .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of FrontendEndpoint items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByFrontDoorNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByFrontDoorNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -925,23 +754,14 @@ private Mono> listByFrontDoorNextSinglePage * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list frontend endpoints along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return paged collection of FrontendEndpoint items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByFrontDoorNextSinglePageAsync(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.")); - } + private PagedResponse listByFrontDoorNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByFrontDoorNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByFrontDoorNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontendEndpointsImpl.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontendEndpointsImpl.java index 8dd44fe9d2626..b9176a98a78df 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontendEndpointsImpl.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontendEndpointsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.implementation; @@ -28,29 +28,12 @@ public FrontendEndpointsImpl(FrontendEndpointsClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable listByFrontDoor(String resourceGroupName, String frontDoorName) { - PagedIterable inner - = this.serviceClient().listByFrontDoor(resourceGroupName, frontDoorName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new FrontendEndpointImpl(inner1, this.manager())); - } - - public PagedIterable listByFrontDoor(String resourceGroupName, String frontDoorName, - Context context) { - PagedIterable inner - = this.serviceClient().listByFrontDoor(resourceGroupName, frontDoorName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new FrontendEndpointImpl(inner1, this.manager())); - } - public Response getWithResponse(String resourceGroupName, String frontDoorName, String frontendEndpointName, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, frontDoorName, frontendEndpointName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new FrontendEndpointImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new FrontendEndpointImpl(inner.getValue(), this.manager())); } public FrontendEndpoint get(String resourceGroupName, String frontDoorName, String frontendEndpointName) { @@ -62,6 +45,19 @@ public FrontendEndpoint get(String resourceGroupName, String frontDoorName, Stri } } + public PagedIterable listByFrontDoor(String resourceGroupName, String frontDoorName) { + PagedIterable inner + = this.serviceClient().listByFrontDoor(resourceGroupName, frontDoorName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new FrontendEndpointImpl(inner1, this.manager())); + } + + public PagedIterable listByFrontDoor(String resourceGroupName, String frontDoorName, + Context context) { + PagedIterable inner + = this.serviceClient().listByFrontDoor(resourceGroupName, frontDoorName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new FrontendEndpointImpl(inner1, this.manager())); + } + public void enableHttps(String resourceGroupName, String frontDoorName, String frontendEndpointName, CustomHttpsConfiguration customHttpsConfiguration) { this.serviceClient() diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/LatencyScorecardImpl.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/LatencyScorecardImpl.java index ad6b7843bf418..027e9ae374076 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/LatencyScorecardImpl.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/LatencyScorecardImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.implementation; diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ManagedRuleSetDefinitionImpl.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ManagedRuleSetDefinitionImpl.java index 85c35f2420b87..cbad7685c97ef 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ManagedRuleSetDefinitionImpl.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ManagedRuleSetDefinitionImpl.java @@ -1,12 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.implementation; import com.azure.resourcemanager.frontdoor.fluent.models.ManagedRuleSetDefinitionInner; import com.azure.resourcemanager.frontdoor.models.ManagedRuleGroupDefinition; import com.azure.resourcemanager.frontdoor.models.ManagedRuleSetDefinition; +import com.azure.resourcemanager.frontdoor.models.ManagedRuleSetStatus; import java.util.Collections; import java.util.List; import java.util.Map; @@ -72,6 +73,14 @@ public List ruleGroups() { } } + public String displayName() { + return this.innerModel().displayName(); + } + + public ManagedRuleSetStatus status() { + return this.innerModel().status(); + } + public ManagedRuleSetDefinitionInner innerModel() { return this.innerObject; } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ManagedRuleSetsClientImpl.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ManagedRuleSetsClientImpl.java index a3e88605a4ffb..9719a8cb7e1d2 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ManagedRuleSetsClientImpl.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ManagedRuleSetsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.frontdoor.fluent.ManagedRuleSetsClient; import com.azure.resourcemanager.frontdoor.fluent.models.ManagedRuleSetDefinitionInner; -import com.azure.resourcemanager.frontdoor.models.ManagedRuleSetDefinitionList; +import com.azure.resourcemanager.frontdoor.implementation.models.ManagedRuleSetDefinitionList; import reactor.core.publisher.Mono; /** @@ -59,15 +59,23 @@ public final class ManagedRuleSetsClientImpl implements ManagedRuleSetsClient { * The interface defining all the services for FrontDoorManagementClientManagedRuleSets to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "FrontDoorManagementC") + @Host("{endpoint}") + @ServiceInterface(name = "FrontDoorManagementClientManagedRuleSets") public interface ManagedRuleSetsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallManagedRuleSets") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Network/frontDoorWebApplicationFirewallManagedRuleSets") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Network/frontDoorWebApplicationFirewallManagedRuleSets") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -75,7 +83,15 @@ Mono> list(@HostParam("$host") String end @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -89,19 +105,10 @@ Mono> listNext( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2024-02-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, - accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -110,29 +117,14 @@ private Mono> listSinglePageAsync() /** * Lists all available managed rule sets. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 managed rule set definitions available for use in a policy along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return list of managed rule set definitions available for use in a policy as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2024-02-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); } /** @@ -140,12 +132,15 @@ private Mono> listSinglePageAsync(C * * @throws 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 managed rule set definitions available for use in a policy as paginated response with - * {@link PagedFlux}. + * @return list of managed rule set definitions available for use in a policy along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -155,13 +150,15 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of managed rule set definitions available for use in a policy as paginated response with - * {@link PagedFlux}. + * @return list of managed rule set definitions available for use in a policy along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -174,7 +171,7 @@ private PagedFlux listAsync(Context context) { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink)); } /** @@ -189,7 +186,7 @@ public PagedIterable list() { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context)); } /** @@ -204,13 +201,6 @@ public PagedIterable list(Context context) { */ @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(), @@ -218,6 +208,24 @@ private Mono> listNextSinglePageAsy .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 managed rule set definitions available for use in a policy along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -226,23 +234,14 @@ private Mono> listNextSinglePageAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 managed rule set definitions available for use in a policy along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return list of managed rule set definitions available for use in a policy along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ManagedRuleSetsImpl.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ManagedRuleSetsImpl.java index 8c94d3c6f60a8..5bd9a97acba70 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ManagedRuleSetsImpl.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ManagedRuleSetsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.implementation; diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/NetworkExperimentProfilesClientImpl.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/NetworkExperimentProfilesClientImpl.java index a67aeeef41b5f..b909a8da60c4c 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/NetworkExperimentProfilesClientImpl.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/NetworkExperimentProfilesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.implementation; @@ -28,13 +28,14 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.frontdoor.fluent.NetworkExperimentProfilesClient; import com.azure.resourcemanager.frontdoor.fluent.models.ProfileInner; -import com.azure.resourcemanager.frontdoor.models.ProfileList; +import com.azure.resourcemanager.frontdoor.implementation.models.ProfileList; import com.azure.resourcemanager.frontdoor.models.ProfileUpdateModel; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -69,329 +70,150 @@ public final class NetworkExperimentProfilesClientImpl implements NetworkExperim * The interface defining all the services for FrontDoorManagementClientNetworkExperimentProfiles to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "FrontDoorManagementC") + @Host("{endpoint}") + @ServiceInterface(name = "FrontDoorManagementClientNetworkExperimentProfiles") public interface NetworkExperimentProfilesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Network/NetworkExperimentProfiles") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, - Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("profileName") String profileName, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, - @BodyParam("application/json") ProfileInner parameters, @HeaderParam("Accept") String accept, - Context context); + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ProfileInner parameters, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}") + @ExpectedResponses({ 200, 201, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ProfileInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ProfileUpdateModel parameters, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ProfileUpdateModel parameters, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @BodyParam("application/json") ProfileUpdateModel parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Network/NetworkExperimentProfiles") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Network/NetworkExperimentProfiles") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets a list of Network Experiment Profiles under a subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Network Experiment Profiles under a subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-11-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, - accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of Network Experiment Profiles under a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Network Experiment Profiles under a subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2019-11-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of Network Experiment Profiles under a subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Network Experiment Profiles under a subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of Network Experiment Profiles under a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Network Experiment Profiles under a subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of Network Experiment Profiles under a subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Network Experiment Profiles under a subscription as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Gets a list of Network Experiment Profiles under a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Network Experiment Profiles under a subscription as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * Gets a list of Network Experiment Profiles within a resource group under a subscription. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Network Experiment Profiles within a resource group under a subscription along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String apiVersion = "2019-11-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), - this.client.getSubscriptionId(), apiVersion, resourceGroupName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of Network Experiment Profiles within a resource group under a subscription. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Network Experiment Profiles within a resource group under a subscription along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String apiVersion = "2019-11-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, - resourceGroupName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - /** - * Gets a list of Network Experiment Profiles within a resource group under a subscription. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Network Experiment Profiles within a resource group under a subscription as paginated response - * with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of Network Experiment Profiles within a resource group under a subscription. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Network Experiment Profiles within a resource group under a subscription as paginated response - * with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); - } + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); - /** - * Gets a list of Network Experiment Profiles within a resource group under a subscription. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Network Experiment Profiles within a resource group under a subscription as paginated response - * with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); - } + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - /** - * Gets a list of Network Experiment Profiles within a resource group under a subscription. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Network Experiment Profiles within a resource group under a subscription as paginated response - * with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Gets an NetworkExperiment Profile by ProfileName. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -402,70 +224,17 @@ public PagedIterable listByResourceGroup(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String profileName) { - 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 (profileName == null) { - return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); - } - final String apiVersion = "2019-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), - this.client.getSubscriptionId(), apiVersion, resourceGroupName, profileName, accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets an NetworkExperiment Profile by ProfileName. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName The Profile identifier associated with the Tenant and Partner. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an NetworkExperiment Profile by ProfileName along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String profileName, 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 (profileName == null) { - return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); - } - final String apiVersion = "2019-11-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, - resourceGroupName, profileName, accept, context); - } - - /** - * Gets an NetworkExperiment Profile by ProfileName. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -481,7 +250,7 @@ private Mono getByResourceGroupAsync(String resourceGroupName, Str /** * Gets an NetworkExperiment Profile by ProfileName. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -492,13 +261,15 @@ private Mono getByResourceGroupAsync(String resourceGroupName, Str @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse(String resourceGroupName, String profileName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, profileName, context).block(); + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, accept, context); } /** * Gets an NetworkExperiment Profile by ProfileName. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -513,8 +284,8 @@ public ProfileInner getByResourceGroup(String resourceGroupName, String profileN /** * Creates an NetworkExperiment Profile. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. - * @param resourceGroupName Name of the Resource group within the Azure subscription. * @param parameters An Network Experiment Profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -523,126 +294,84 @@ public ProfileInner getByResourceGroup(String resourceGroupName, String profileN * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String profileName, - String resourceGroupName, ProfileInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (profileName == null) { - return Mono.error(new IllegalArgumentException("Parameter profileName 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 (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2019-11-01"; + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String profileName, ProfileInner parameters) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), profileName, - this.client.getSubscriptionId(), apiVersion, resourceGroupName, parameters, accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, contentType, accept, parameters, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates an NetworkExperiment Profile. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. - * @param resourceGroupName Name of the Resource group within the Azure subscription. * @param parameters An Network Experiment Profile. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines an Network Experiment Profile and lists of Experiments along with {@link Response} on successful - * completion of {@link Mono}. + * @return defines an Network Experiment Profile and lists of Experiments along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String profileName, - String resourceGroupName, ProfileInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (profileName == null) { - return Mono.error(new IllegalArgumentException("Parameter profileName 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 (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2019-11-01"; + private Response createOrUpdateWithResponse(String resourceGroupName, String profileName, + ProfileInner parameters) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), profileName, this.client.getSubscriptionId(), - apiVersion, resourceGroupName, parameters, accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, contentType, accept, parameters, + Context.NONE); } /** * Creates an NetworkExperiment Profile. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. - * @param resourceGroupName Name of the Resource group within the Azure subscription. * @param parameters An Network Experiment Profile. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of defines an Network Experiment Profile and lists of Experiments. + * @return defines an Network Experiment Profile and lists of Experiments along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ProfileInner> beginCreateOrUpdateAsync(String profileName, - String resourceGroupName, ProfileInner parameters) { - Mono>> mono - = createOrUpdateWithResponseAsync(profileName, resourceGroupName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ProfileInner.class, ProfileInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String profileName, + ProfileInner parameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, contentType, accept, parameters, context); } /** * Creates an NetworkExperiment Profile. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. - * @param resourceGroupName Name of the Resource group within the Azure subscription. * @param parameters An Network Experiment Profile. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of defines an Network Experiment Profile and lists of Experiments. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ProfileInner> beginCreateOrUpdateAsync(String profileName, - String resourceGroupName, ProfileInner parameters, Context context) { - context = this.client.mergeContext(context); + private PollerFlux, ProfileInner> beginCreateOrUpdateAsync(String resourceGroupName, + String profileName, ProfileInner parameters) { Mono>> mono - = createOrUpdateWithResponseAsync(profileName, resourceGroupName, parameters, context); + = createOrUpdateWithResponseAsync(resourceGroupName, profileName, parameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ProfileInner.class, ProfileInner.class, context); + ProfileInner.class, ProfileInner.class, this.client.getContext()); } /** * Creates an NetworkExperiment Profile. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. - * @param resourceGroupName Name of the Resource group within the Azure subscription. * @param parameters An Network Experiment Profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -650,16 +379,18 @@ private PollerFlux, ProfileInner> beginCreateOrUpdateAs * @return the {@link SyncPoller} for polling of defines an Network Experiment Profile and lists of Experiments. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ProfileInner> beginCreateOrUpdate(String profileName, - String resourceGroupName, ProfileInner parameters) { - return this.beginCreateOrUpdateAsync(profileName, resourceGroupName, parameters).getSyncPoller(); + public SyncPoller, ProfileInner> beginCreateOrUpdate(String resourceGroupName, + String profileName, ProfileInner parameters) { + Response response = createOrUpdateWithResponse(resourceGroupName, profileName, parameters); + return this.client.getLroResult(response, ProfileInner.class, ProfileInner.class, + Context.NONE); } /** * Creates an NetworkExperiment Profile. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. - * @param resourceGroupName Name of the Resource group within the Azure subscription. * @param parameters An Network Experiment Profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -668,16 +399,18 @@ public SyncPoller, ProfileInner> beginCreateOrUpdate(St * @return the {@link SyncPoller} for polling of defines an Network Experiment Profile and lists of Experiments. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ProfileInner> beginCreateOrUpdate(String profileName, - String resourceGroupName, ProfileInner parameters, Context context) { - return this.beginCreateOrUpdateAsync(profileName, resourceGroupName, parameters, context).getSyncPoller(); + public SyncPoller, ProfileInner> beginCreateOrUpdate(String resourceGroupName, + String profileName, ProfileInner parameters, Context context) { + Response response = createOrUpdateWithResponse(resourceGroupName, profileName, parameters, context); + return this.client.getLroResult(response, ProfileInner.class, ProfileInner.class, + context); } /** * Creates an NetworkExperiment Profile. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. - * @param resourceGroupName Name of the Resource group within the Azure subscription. * @param parameters An Network Experiment Profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -685,36 +418,17 @@ public SyncPoller, ProfileInner> beginCreateOrUpdate(St * @return defines an Network Experiment Profile and lists of Experiments on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String profileName, String resourceGroupName, + private Mono createOrUpdateAsync(String resourceGroupName, String profileName, ProfileInner parameters) { - return beginCreateOrUpdateAsync(profileName, resourceGroupName, parameters).last() + return beginCreateOrUpdateAsync(resourceGroupName, profileName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates an NetworkExperiment Profile. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param parameters An Network Experiment Profile. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines an Network Experiment Profile and lists of Experiments on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String profileName, String resourceGroupName, - ProfileInner parameters, Context context) { - return beginCreateOrUpdateAsync(profileName, resourceGroupName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates an NetworkExperiment Profile. - * - * @param profileName The Profile identifier associated with the Tenant and Partner. - * @param resourceGroupName Name of the Resource group within the Azure subscription. * @param parameters An Network Experiment Profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -722,15 +436,15 @@ private Mono createOrUpdateAsync(String profileName, String resour * @return defines an Network Experiment Profile and lists of Experiments. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ProfileInner createOrUpdate(String profileName, String resourceGroupName, ProfileInner parameters) { - return createOrUpdateAsync(profileName, resourceGroupName, parameters).block(); + public ProfileInner createOrUpdate(String resourceGroupName, String profileName, ProfileInner parameters) { + return beginCreateOrUpdate(resourceGroupName, profileName, parameters).getFinalResult(); } /** * Creates an NetworkExperiment Profile. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. - * @param resourceGroupName Name of the Resource group within the Azure subscription. * @param parameters An Network Experiment Profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -739,9 +453,9 @@ public ProfileInner createOrUpdate(String profileName, String resourceGroupName, * @return defines an Network Experiment Profile and lists of Experiments. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ProfileInner createOrUpdate(String profileName, String resourceGroupName, ProfileInner parameters, + public ProfileInner createOrUpdate(String resourceGroupName, String profileName, ProfileInner parameters, Context context) { - return createOrUpdateAsync(profileName, resourceGroupName, parameters, context).block(); + return beginCreateOrUpdate(resourceGroupName, profileName, parameters, context).getFinalResult(); } /** @@ -749,7 +463,7 @@ public ProfileInner createOrUpdate(String profileName, String resourceGroupName, * * Updates an NetworkExperimentProfiles. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param parameters The Profile Update Model. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -761,31 +475,10 @@ public ProfileInner createOrUpdate(String profileName, String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String profileName, ProfileUpdateModel parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (profileName == null) { - return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2019-11-01"; + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - apiVersion, resourceGroupName, profileName, parameters, accept, context)) + return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -794,44 +487,22 @@ private Mono>> updateWithResponseAsync(String resource * * Updates an NetworkExperimentProfiles. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param parameters The Profile Update Model. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines an Network Experiment Profile and lists of Experiments along with {@link Response} on successful - * completion of {@link Mono}. + * @return defines an Network Experiment Profile and lists of Experiments along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String profileName, - ProfileUpdateModel parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (profileName == null) { - return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2019-11-01"; + private Response updateWithResponse(String resourceGroupName, String profileName, + ProfileUpdateModel parameters) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, resourceGroupName, - profileName, parameters, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, contentType, accept, parameters, + Context.NONE); } /** @@ -839,20 +510,22 @@ private Mono>> updateWithResponseAsync(String resource * * Updates an NetworkExperimentProfiles. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param parameters The Profile Update Model. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of defines an Network Experiment Profile and lists of Experiments. + * @return defines an Network Experiment Profile and lists of Experiments along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ProfileInner> beginUpdateAsync(String resourceGroupName, - String profileName, ProfileUpdateModel parameters) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, profileName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ProfileInner.class, ProfileInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String profileName, + ProfileUpdateModel parameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, contentType, accept, parameters, context); } /** @@ -860,10 +533,9 @@ private PollerFlux, ProfileInner> beginUpdateAsync(Stri * * Updates an NetworkExperimentProfiles. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param parameters The Profile Update Model. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -871,12 +543,10 @@ private PollerFlux, ProfileInner> beginUpdateAsync(Stri */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ProfileInner> beginUpdateAsync(String resourceGroupName, - String profileName, ProfileUpdateModel parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, profileName, parameters, context); + String profileName, ProfileUpdateModel parameters) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, profileName, parameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ProfileInner.class, ProfileInner.class, context); + ProfileInner.class, ProfileInner.class, this.client.getContext()); } /** @@ -884,7 +554,7 @@ private PollerFlux, ProfileInner> beginUpdateAsync(Stri * * Updates an NetworkExperimentProfiles. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param parameters The Profile Update Model. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -895,7 +565,9 @@ private PollerFlux, ProfileInner> beginUpdateAsync(Stri @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ProfileInner> beginUpdate(String resourceGroupName, String profileName, ProfileUpdateModel parameters) { - return this.beginUpdateAsync(resourceGroupName, profileName, parameters).getSyncPoller(); + Response response = updateWithResponse(resourceGroupName, profileName, parameters); + return this.client.getLroResult(response, ProfileInner.class, ProfileInner.class, + Context.NONE); } /** @@ -903,7 +575,7 @@ public SyncPoller, ProfileInner> beginUpdate(String res * * Updates an NetworkExperimentProfiles. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param parameters The Profile Update Model. * @param context The context to associate with this operation. @@ -915,7 +587,9 @@ public SyncPoller, ProfileInner> beginUpdate(String res @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ProfileInner> beginUpdate(String resourceGroupName, String profileName, ProfileUpdateModel parameters, Context context) { - return this.beginUpdateAsync(resourceGroupName, profileName, parameters, context).getSyncPoller(); + Response response = updateWithResponse(resourceGroupName, profileName, parameters, context); + return this.client.getLroResult(response, ProfileInner.class, ProfileInner.class, + context); } /** @@ -923,7 +597,7 @@ public SyncPoller, ProfileInner> beginUpdate(String res * * Updates an NetworkExperimentProfiles. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param parameters The Profile Update Model. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -943,28 +617,7 @@ private Mono updateAsync(String resourceGroupName, String profileN * * Updates an NetworkExperimentProfiles. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName The Profile identifier associated with the Tenant and Partner. - * @param parameters The Profile Update Model. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines an Network Experiment Profile and lists of Experiments on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String profileName, ProfileUpdateModel parameters, - Context context) { - return beginUpdateAsync(resourceGroupName, profileName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates an NetworkExperimentProfiles by NetworkExperimentProfile name - * - * Updates an NetworkExperimentProfiles. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param parameters The Profile Update Model. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -974,7 +627,7 @@ private Mono updateAsync(String resourceGroupName, String profileN */ @ServiceMethod(returns = ReturnType.SINGLE) public ProfileInner update(String resourceGroupName, String profileName, ProfileUpdateModel parameters) { - return updateAsync(resourceGroupName, profileName, parameters).block(); + return beginUpdate(resourceGroupName, profileName, parameters).getFinalResult(); } /** @@ -982,7 +635,7 @@ public ProfileInner update(String resourceGroupName, String profileName, Profile * * Updates an NetworkExperimentProfiles. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param parameters The Profile Update Model. * @param context The context to associate with this operation. @@ -994,13 +647,13 @@ public ProfileInner update(String resourceGroupName, String profileName, Profile @ServiceMethod(returns = ReturnType.SINGLE) public ProfileInner update(String resourceGroupName, String profileName, ProfileUpdateModel parameters, Context context) { - return updateAsync(resourceGroupName, profileName, parameters, context).block(); + return beginUpdate(resourceGroupName, profileName, parameters, context).getFinalResult(); } /** * Deletes an NetworkExperiment Profile by ProfileName. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1009,106 +662,66 @@ public ProfileInner update(String resourceGroupName, String profileName, Profile */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String profileName) { - 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 (profileName == null) { - return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); - } - final String apiVersion = "2019-11-01"; - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - apiVersion, resourceGroupName, profileName, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes an NetworkExperiment Profile by ProfileName. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String profileName, - 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 (profileName == null) { - return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); - } - final String apiVersion = "2019-11-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, resourceGroupName, - profileName, accept, context); + private Response deleteWithResponse(String resourceGroupName, String profileName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, Context.NONE); } /** * Deletes an NetworkExperiment Profile by ProfileName. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String profileName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, profileName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String profileName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, context); } /** * Deletes an NetworkExperiment Profile by ProfileName. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String profileName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, profileName, context); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String profileName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, profileName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** * Deletes an NetworkExperiment Profile by ProfileName. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1117,13 +730,14 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String profileName) { - return this.beginDeleteAsync(resourceGroupName, profileName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, profileName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** * Deletes an NetworkExperiment Profile by ProfileName. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1134,13 +748,14 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String profileName, Context context) { - return this.beginDeleteAsync(resourceGroupName, profileName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, profileName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** * Deletes an NetworkExperiment Profile by ProfileName. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1155,118 +770,248 @@ private Mono deleteAsync(String resourceGroupName, String profileName) { /** * Deletes an NetworkExperiment Profile by ProfileName. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String profileName, Context context) { - return beginDeleteAsync(resourceGroupName, profileName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public void delete(String resourceGroupName, String profileName) { + beginDelete(resourceGroupName, profileName).getFinalResult(); } /** * Deletes an NetworkExperiment Profile by ProfileName. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String profileName) { - deleteAsync(resourceGroupName, profileName).block(); + public void delete(String resourceGroupName, String profileName, Context context) { + beginDelete(resourceGroupName, profileName, context).getFinalResult(); } /** - * Deletes an NetworkExperiment Profile by ProfileName. + * Gets a list of Network Experiment Profiles within a resource group under a subscription. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName The Profile identifier associated with the Tenant and Partner. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Network Experiment Profiles within a resource group under a subscription along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of Network Experiment Profiles within a resource group under a subscription. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Network Experiment Profiles within a resource group under a subscription as paginated response + * with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of Network Experiment Profiles within a resource group under a subscription. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Network Experiment Profiles within a resource group under a subscription along with + * {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Gets a list of Network Experiment Profiles within a resource group under a subscription. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Network Experiment Profiles within a resource group under a subscription along with + * {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String profileName, Context context) { - deleteAsync(resourceGroupName, profileName, context).block(); + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get the next page of items. + * Gets a list of Network Experiment Profiles within a resource group under a subscription. * - * @param nextLink The URL to get the next list of items. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Network Experiment Profiles within a resource group under a subscription as paginated response + * with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); + } + + /** + * Gets a list of Network Experiment Profiles within a resource group under a subscription. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines a list of Profiles along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return a list of Network Experiment Profiles within a resource group under a subscription as paginated response + * with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + } + + /** + * Gets a list of Network Experiment Profiles under a subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Network Experiment Profiles under a subscription 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.")); - } + private Mono> listSinglePageAsync() { final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get the next page of items. + * Gets a list of Network Experiment Profiles under a subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Network Experiment Profiles under a subscription as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of Network Experiment Profiles under a subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Network Experiment Profiles under a subscription along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Gets a list of Network Experiment Profiles under a subscription. * - * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines a list of Profiles along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return a list of Network Experiment Profiles under a subscription along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listSinglePage(Context context) { 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)); + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Gets a list of Network Experiment Profiles under a subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Network Experiment Profiles under a subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink)); } /** + * Gets a list of Network Experiment Profiles under a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Network Experiment Profiles under a subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context)); + } + + /** + * Gets a list of Network Experiment Profiles within a resource group under a subscription + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines a list of Profiles along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return a list of Network Experiment Profiles within a resource group under a subscription along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -1277,6 +1022,91 @@ private Mono> listByResourceGroupNextSinglePageAsync } /** + * Gets a list of Network Experiment Profiles within a resource group under a subscription + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Network Experiment Profiles within a resource group under a subscription along with + * {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Gets a list of Network Experiment Profiles within a resource group under a subscription + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Network Experiment Profiles within a resource group under a subscription along with + * {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Gets a list of Network Experiment Profiles under a subscription + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Network Experiment Profiles under a subscription along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + 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())); + } + + /** + * Gets a list of Network Experiment Profiles under a subscription + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Network Experiment Profiles under a subscription along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Gets a list of Network Experiment Profiles under a subscription + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1284,21 +1114,13 @@ private Mono> listByResourceGroupNextSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines a list of Profiles along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return a list of Network Experiment Profiles under a subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/NetworkExperimentProfilesImpl.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/NetworkExperimentProfilesImpl.java index 72828dc267f9e..6edd1c3ff76f0 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/NetworkExperimentProfilesImpl.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/NetworkExperimentProfilesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.implementation; @@ -27,36 +27,12 @@ public NetworkExperimentProfilesImpl(NetworkExperimentProfilesClient innerClient this.serviceManager = serviceManager; } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ProfileImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ProfileImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ProfileImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ProfileImpl(inner1, this.manager())); - } - public Response getByResourceGroupWithResponse(String resourceGroupName, String profileName, Context context) { Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, profileName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ProfileImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ProfileImpl(inner.getValue(), this.manager())); } public Profile getByResourceGroup(String resourceGroupName, String profileName) { @@ -76,6 +52,26 @@ public void delete(String resourceGroupName, String profileName, Context context this.serviceClient().delete(resourceGroupName, profileName, context); } + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ProfileImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ProfileImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ProfileImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ProfileImpl(inner1, this.manager())); + } + public Profile getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/PoliciesClientImpl.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/PoliciesClientImpl.java index 5b3d99f4fbb51..382bc741120d2 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/PoliciesClientImpl.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/PoliciesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.implementation; @@ -28,14 +28,15 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.frontdoor.fluent.PoliciesClient; import com.azure.resourcemanager.frontdoor.fluent.models.WebApplicationFirewallPolicyInner; +import com.azure.resourcemanager.frontdoor.implementation.models.WebApplicationFirewallPolicyList; import com.azure.resourcemanager.frontdoor.models.TagsObject; -import com.azure.resourcemanager.frontdoor.models.WebApplicationFirewallPolicyList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -68,328 +69,152 @@ public final class PoliciesClientImpl implements PoliciesClient { * The interface defining all the services for FrontDoorManagementClientPolicies to be used by the proxy service to * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "FrontDoorManagementC") + @Host("{endpoint}") + @ServiceInterface(name = "FrontDoorManagementClientPolicies") public interface PoliciesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoorWebApplicationFirewallPolicies") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/{policyName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("policyName") String policyName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Network/frontDoorWebApplicationFirewallPolicies") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/{policyName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("policyName") String policyName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/{policyName}") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/{policyName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("policyName") String policyName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") WebApplicationFirewallPolicyInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/{policyName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("policyName") String policyName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") WebApplicationFirewallPolicyInner parameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") WebApplicationFirewallPolicyInner parameters, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/{policyName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("policyName") String policyName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") TagsObject parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/{policyName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("policyName") String policyName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") TagsObject parameters, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/{policyName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("policyName") String policyName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") TagsObject parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/{policyName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("policyName") String policyName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Lists all of the protection policies within a resource group. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines a list of WebApplicationFirewallPolicies along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2024-02-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, - this.client.getSubscriptionId(), apiVersion, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists all of the protection policies within a resource group. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines a list of WebApplicationFirewallPolicies along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByResourceGroupSinglePageAsync(String resourceGroupName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2024-02-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - apiVersion, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all of the protection policies within a resource group. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines a list of WebApplicationFirewallPolicies as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists all of the protection policies within a resource group. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines a list of WebApplicationFirewallPolicies as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, - Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all of the protection policies within a resource group. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines a list of WebApplicationFirewallPolicies as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); - } - - /** - * Lists all of the protection policies within a resource group. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines a list of WebApplicationFirewallPolicies as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, - Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); - } - - /** - * Lists all of the protection policies within a subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines a list of WebApplicationFirewallPolicies along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2024-02-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, - accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists all of the protection policies within a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines a list of WebApplicationFirewallPolicies along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2024-02-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all of the protection policies within a subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines a list of WebApplicationFirewallPolicies as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - /** - * Lists all of the protection policies within a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines a list of WebApplicationFirewallPolicies as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all of the protection policies within a subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines a list of WebApplicationFirewallPolicies as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); - /** - * Lists all of the protection policies within a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines a list of WebApplicationFirewallPolicies as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Retrieve protection policy with specified name within a resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -400,70 +225,17 @@ public PagedIterable list(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String policyName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (policyName == null) { - return Mono.error(new IllegalArgumentException("Parameter policyName 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 apiVersion = "2024-02-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, policyName, - this.client.getSubscriptionId(), apiVersion, accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, policyName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Retrieve protection policy with specified name within a resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param policyName The name of the Web Application Firewall Policy. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines web application firewall policy along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - getByResourceGroupWithResponseAsync(String resourceGroupName, String policyName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (policyName == null) { - return Mono.error(new IllegalArgumentException("Parameter policyName 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 apiVersion = "2024-02-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, policyName, - this.client.getSubscriptionId(), apiVersion, accept, context); - } - - /** - * Retrieve protection policy with specified name within a resource group. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -480,7 +252,7 @@ private Mono getByResourceGroupAsync(String r /** * Retrieve protection policy with specified name within a resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -491,13 +263,15 @@ private Mono getByResourceGroupAsync(String r @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse(String resourceGroupName, String policyName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, policyName, context).block(); + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, policyName, accept, context); } /** * Retrieve protection policy with specified name within a resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -512,7 +286,7 @@ public WebApplicationFirewallPolicyInner getByResourceGroup(String resourceGroup /** * Create or update policy with specified rule set name within a resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. * @param parameters Policy to be created. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -524,106 +298,63 @@ public WebApplicationFirewallPolicyInner getByResourceGroup(String resourceGroup @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String policyName, WebApplicationFirewallPolicyInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (policyName == null) { - return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2024-02-01"; + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, policyName, - this.client.getSubscriptionId(), apiVersion, parameters, accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, policyName, contentType, accept, parameters, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create or update policy with specified rule set name within a resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. * @param parameters Policy to be created. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines web application firewall policy along with {@link Response} on successful completion of - * {@link Mono}. + * @return defines web application firewall policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String policyName, WebApplicationFirewallPolicyInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (policyName == null) { - return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2024-02-01"; + private Response createOrUpdateWithResponse(String resourceGroupName, String policyName, + WebApplicationFirewallPolicyInner parameters) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, policyName, - this.client.getSubscriptionId(), apiVersion, parameters, accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, policyName, contentType, accept, parameters, + Context.NONE); } /** * Create or update policy with specified rule set name within a resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. * @param parameters Policy to be created. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of defines web application firewall policy. + * @return defines web application firewall policy along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WebApplicationFirewallPolicyInner> - beginCreateOrUpdateAsync(String resourceGroupName, String policyName, - WebApplicationFirewallPolicyInner parameters) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, policyName, parameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), WebApplicationFirewallPolicyInner.class, - WebApplicationFirewallPolicyInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String policyName, + WebApplicationFirewallPolicyInner parameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, policyName, contentType, accept, parameters, context); } /** * Create or update policy with specified rule set name within a resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. * @param parameters Policy to be created. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -632,19 +363,18 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WebApplicationFirewallPolicyInner> beginCreateOrUpdateAsync(String resourceGroupName, String policyName, - WebApplicationFirewallPolicyInner parameters, Context context) { - context = this.client.mergeContext(context); + WebApplicationFirewallPolicyInner parameters) { Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, policyName, parameters, context); + = createOrUpdateWithResponseAsync(resourceGroupName, policyName, parameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WebApplicationFirewallPolicyInner.class, - WebApplicationFirewallPolicyInner.class, context); + WebApplicationFirewallPolicyInner.class, this.client.getContext()); } /** * Create or update policy with specified rule set name within a resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. * @param parameters Policy to be created. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -655,13 +385,15 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WebApplicationFirewallPolicyInner> beginCreateOrUpdate(String resourceGroupName, String policyName, WebApplicationFirewallPolicyInner parameters) { - return this.beginCreateOrUpdateAsync(resourceGroupName, policyName, parameters).getSyncPoller(); + Response response = createOrUpdateWithResponse(resourceGroupName, policyName, parameters); + return this.client.getLroResult(response, + WebApplicationFirewallPolicyInner.class, WebApplicationFirewallPolicyInner.class, Context.NONE); } /** * Create or update policy with specified rule set name within a resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. * @param parameters Policy to be created. * @param context The context to associate with this operation. @@ -670,38 +402,21 @@ private Mono>> createOrUpdateWithResponseAsync(String * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of defines web application firewall policy. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WebApplicationFirewallPolicyInner> - beginCreateOrUpdate(String resourceGroupName, String policyName, WebApplicationFirewallPolicyInner parameters, - Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, policyName, parameters, context).getSyncPoller(); - } - - /** - * Create or update policy with specified rule set name within a resource group. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param policyName The name of the Web Application Firewall Policy. - * @param parameters Policy to be created. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines web application firewall policy on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String policyName, - WebApplicationFirewallPolicyInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, policyName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WebApplicationFirewallPolicyInner> + beginCreateOrUpdate(String resourceGroupName, String policyName, WebApplicationFirewallPolicyInner parameters, + Context context) { + Response response = createOrUpdateWithResponse(resourceGroupName, policyName, parameters, context); + return this.client.getLroResult(response, + WebApplicationFirewallPolicyInner.class, WebApplicationFirewallPolicyInner.class, context); } /** * Create or update policy with specified rule set name within a resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. * @param parameters Policy to be created. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -709,15 +424,15 @@ private Mono createOrUpdateAsync(String resou */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String resourceGroupName, String policyName, - WebApplicationFirewallPolicyInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, policyName, parameters, context).last() + WebApplicationFirewallPolicyInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, policyName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Create or update policy with specified rule set name within a resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. * @param parameters Policy to be created. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -728,13 +443,13 @@ private Mono createOrUpdateAsync(String resou @ServiceMethod(returns = ReturnType.SINGLE) public WebApplicationFirewallPolicyInner createOrUpdate(String resourceGroupName, String policyName, WebApplicationFirewallPolicyInner parameters) { - return createOrUpdateAsync(resourceGroupName, policyName, parameters).block(); + return beginCreateOrUpdate(resourceGroupName, policyName, parameters).getFinalResult(); } /** * Create or update policy with specified rule set name within a resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. * @param parameters Policy to be created. * @param context The context to associate with this operation. @@ -746,14 +461,14 @@ public WebApplicationFirewallPolicyInner createOrUpdate(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) public WebApplicationFirewallPolicyInner createOrUpdate(String resourceGroupName, String policyName, WebApplicationFirewallPolicyInner parameters, Context context) { - return createOrUpdateAsync(resourceGroupName, policyName, parameters, context).block(); + return beginCreateOrUpdate(resourceGroupName, policyName, parameters, context).getFinalResult(); } /** * Patch a specific frontdoor webApplicationFirewall policy for tags update under the specified subscription and * resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. * @param parameters FrontdoorWebApplicationFirewallPolicy parameters to be patched. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -765,31 +480,10 @@ public WebApplicationFirewallPolicyInner createOrUpdate(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String policyName, TagsObject parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (policyName == null) { - return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2024-02-01"; + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, policyName, - this.client.getSubscriptionId(), apiVersion, parameters, accept, context)) + return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, policyName, contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -797,75 +491,53 @@ private Mono>> updateWithResponseAsync(String resource * Patch a specific frontdoor webApplicationFirewall policy for tags update under the specified subscription and * resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. * @param parameters FrontdoorWebApplicationFirewallPolicy parameters to be patched. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines web application firewall policy along with {@link Response} on successful completion of - * {@link Mono}. + * @return defines web application firewall policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String policyName, - TagsObject parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (policyName == null) { - return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2024-02-01"; + private Response updateWithResponse(String resourceGroupName, String policyName, + TagsObject parameters) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), resourceGroupName, policyName, this.client.getSubscriptionId(), - apiVersion, parameters, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, policyName, contentType, accept, parameters, + Context.NONE); } /** * Patch a specific frontdoor webApplicationFirewall policy for tags update under the specified subscription and * resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. * @param parameters FrontdoorWebApplicationFirewallPolicy parameters to be patched. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of defines web application firewall policy. + * @return defines web application firewall policy along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WebApplicationFirewallPolicyInner> - beginUpdateAsync(String resourceGroupName, String policyName, TagsObject parameters) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, policyName, parameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), WebApplicationFirewallPolicyInner.class, - WebApplicationFirewallPolicyInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String policyName, TagsObject parameters, + Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, policyName, contentType, accept, parameters, context); } /** * Patch a specific frontdoor webApplicationFirewall policy for tags update under the specified subscription and * resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. * @param parameters FrontdoorWebApplicationFirewallPolicy parameters to be patched. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -873,20 +545,18 @@ private Mono>> updateWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WebApplicationFirewallPolicyInner> - beginUpdateAsync(String resourceGroupName, String policyName, TagsObject parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, policyName, parameters, context); + beginUpdateAsync(String resourceGroupName, String policyName, TagsObject parameters) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, policyName, parameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WebApplicationFirewallPolicyInner.class, - WebApplicationFirewallPolicyInner.class, context); + WebApplicationFirewallPolicyInner.class, this.client.getContext()); } /** * Patch a specific frontdoor webApplicationFirewall policy for tags update under the specified subscription and * resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. * @param parameters FrontdoorWebApplicationFirewallPolicy parameters to be patched. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -897,14 +567,16 @@ private Mono>> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WebApplicationFirewallPolicyInner> beginUpdate(String resourceGroupName, String policyName, TagsObject parameters) { - return this.beginUpdateAsync(resourceGroupName, policyName, parameters).getSyncPoller(); + Response response = updateWithResponse(resourceGroupName, policyName, parameters); + return this.client.getLroResult(response, + WebApplicationFirewallPolicyInner.class, WebApplicationFirewallPolicyInner.class, Context.NONE); } /** * Patch a specific frontdoor webApplicationFirewall policy for tags update under the specified subscription and * resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. * @param parameters FrontdoorWebApplicationFirewallPolicy parameters to be patched. * @param context The context to associate with this operation. @@ -916,14 +588,16 @@ private Mono>> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WebApplicationFirewallPolicyInner> beginUpdate(String resourceGroupName, String policyName, TagsObject parameters, Context context) { - return this.beginUpdateAsync(resourceGroupName, policyName, parameters, context).getSyncPoller(); + Response response = updateWithResponse(resourceGroupName, policyName, parameters, context); + return this.client.getLroResult(response, + WebApplicationFirewallPolicyInner.class, WebApplicationFirewallPolicyInner.class, context); } /** * Patch a specific frontdoor webApplicationFirewall policy for tags update under the specified subscription and * resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. * @param parameters FrontdoorWebApplicationFirewallPolicy parameters to be patched. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -942,27 +616,7 @@ private Mono updateAsync(String resourceGroup * Patch a specific frontdoor webApplicationFirewall policy for tags update under the specified subscription and * resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param policyName The name of the Web Application Firewall Policy. - * @param parameters FrontdoorWebApplicationFirewallPolicy parameters to be patched. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines web application firewall policy on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String policyName, - TagsObject parameters, Context context) { - return beginUpdateAsync(resourceGroupName, policyName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Patch a specific frontdoor webApplicationFirewall policy for tags update under the specified subscription and - * resource group. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. * @param parameters FrontdoorWebApplicationFirewallPolicy parameters to be patched. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -973,14 +627,14 @@ private Mono updateAsync(String resourceGroup @ServiceMethod(returns = ReturnType.SINGLE) public WebApplicationFirewallPolicyInner update(String resourceGroupName, String policyName, TagsObject parameters) { - return updateAsync(resourceGroupName, policyName, parameters).block(); + return beginUpdate(resourceGroupName, policyName, parameters).getFinalResult(); } /** * Patch a specific frontdoor webApplicationFirewall policy for tags update under the specified subscription and * resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. * @param parameters FrontdoorWebApplicationFirewallPolicy parameters to be patched. * @param context The context to associate with this operation. @@ -992,13 +646,13 @@ public WebApplicationFirewallPolicyInner update(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) public WebApplicationFirewallPolicyInner update(String resourceGroupName, String policyName, TagsObject parameters, Context context) { - return updateAsync(resourceGroupName, policyName, parameters, context).block(); + return beginUpdate(resourceGroupName, policyName, parameters, context).getFinalResult(); } /** * Deletes Policy. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1007,104 +661,66 @@ public WebApplicationFirewallPolicyInner update(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String policyName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (policyName == null) { - return Mono.error(new IllegalArgumentException("Parameter policyName 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 apiVersion = "2024-02-01"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, policyName, - this.client.getSubscriptionId(), apiVersion, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, policyName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes Policy. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String policyName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (policyName == null) { - return Mono.error(new IllegalArgumentException("Parameter policyName 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 apiVersion = "2024-02-01"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), resourceGroupName, policyName, this.client.getSubscriptionId(), - apiVersion, context); + private Response deleteWithResponse(String resourceGroupName, String policyName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, policyName, Context.NONE); } /** * Deletes Policy. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String policyName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, policyName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String policyName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, policyName, context); } /** * Deletes Policy. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String policyName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, policyName, context); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String policyName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, policyName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** * Deletes Policy. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1113,13 +729,14 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String policyName) { - return this.beginDeleteAsync(resourceGroupName, policyName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, policyName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** * Deletes Policy. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1130,13 +747,14 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String policyName, Context context) { - return this.beginDeleteAsync(resourceGroupName, policyName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, policyName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** * Deletes Policy. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1151,47 +769,230 @@ private Mono deleteAsync(String resourceGroupName, String policyName) { /** * Deletes Policy. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String policyName, Context context) { - return beginDeleteAsync(resourceGroupName, policyName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public void delete(String resourceGroupName, String policyName) { + beginDelete(resourceGroupName, policyName).getFinalResult(); } /** * Deletes Policy. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the Web Application Firewall Policy. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String policyName) { - deleteAsync(resourceGroupName, policyName).block(); + public void delete(String resourceGroupName, String policyName, Context context) { + beginDelete(resourceGroupName, policyName, context).getFinalResult(); } /** - * Deletes Policy. + * Lists all of the protection policies within a resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param policyName The name of the Web Application Firewall Policy. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines a list of WebApplicationFirewallPolicies along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all of the protection policies within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines a list of WebApplicationFirewallPolicies as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists all of the protection policies within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines a list of WebApplicationFirewallPolicies along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all of the protection policies within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines a list of WebApplicationFirewallPolicies along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String policyName, Context context) { - deleteAsync(resourceGroupName, policyName, context).block(); + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all of the protection policies within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines a list of WebApplicationFirewallPolicies as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * Lists all of the protection policies within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines a list of WebApplicationFirewallPolicies as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, + Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listNextSinglePage(nextLink, context)); + } + + /** + * Lists all of the protection policies within a subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines a list of WebApplicationFirewallPolicies along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all of the protection policies within a subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines a list of WebApplicationFirewallPolicies as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * Lists all of the protection policies within a subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines a list of WebApplicationFirewallPolicies along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all of the protection policies within a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines a list of WebApplicationFirewallPolicies along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all of the protection policies within a subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines a list of WebApplicationFirewallPolicies as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); + } + + /** + * Lists all of the protection policies within a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines a list of WebApplicationFirewallPolicies as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** @@ -1206,13 +1007,6 @@ public void delete(String resourceGroupName, String policyName, Context context) */ @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(), @@ -1220,6 +1014,24 @@ private Mono> listNextSinglePag .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines a list of WebApplicationFirewallPolicies along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1228,24 +1040,15 @@ private Mono> listNextSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines a list of WebApplicationFirewallPolicies along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return defines a list of WebApplicationFirewallPolicies along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -1261,13 +1064,6 @@ private Mono> listNextSinglePag @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -1277,6 +1073,24 @@ private Mono> listNextSinglePag .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines a list of WebApplicationFirewallPolicies along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1285,23 +1099,15 @@ private Mono> listNextSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines a list of WebApplicationFirewallPolicies along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return defines a list of WebApplicationFirewallPolicies along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listBySubscriptionNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, + Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/PoliciesImpl.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/PoliciesImpl.java index cf87ed6725494..2140415f897a0 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/PoliciesImpl.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/PoliciesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.implementation; @@ -27,6 +27,32 @@ public PoliciesImpl(PoliciesClient innerClient, this.serviceManager = serviceManager; } + public Response getByResourceGroupWithResponse(String resourceGroupName, + String policyName, Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, policyName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WebApplicationFirewallPolicyImpl(inner.getValue(), this.manager())); + } + + public WebApplicationFirewallPolicy getByResourceGroup(String resourceGroupName, String policyName) { + WebApplicationFirewallPolicyInner inner + = this.serviceClient().getByResourceGroup(resourceGroupName, policyName); + if (inner != null) { + return new WebApplicationFirewallPolicyImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String policyName) { + this.serviceClient().delete(resourceGroupName, policyName); + } + + public void delete(String resourceGroupName, String policyName, Context context) { + this.serviceClient().delete(resourceGroupName, policyName, context); + } + public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); @@ -53,36 +79,6 @@ public PagedIterable list(Context context) { inner1 -> new WebApplicationFirewallPolicyImpl(inner1, this.manager())); } - public Response getByResourceGroupWithResponse(String resourceGroupName, - String policyName, Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, policyName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new WebApplicationFirewallPolicyImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public WebApplicationFirewallPolicy getByResourceGroup(String resourceGroupName, String policyName) { - WebApplicationFirewallPolicyInner inner - = this.serviceClient().getByResourceGroup(resourceGroupName, policyName); - if (inner != null) { - return new WebApplicationFirewallPolicyImpl(inner, this.manager()); - } else { - return null; - } - } - - public void deleteByResourceGroup(String resourceGroupName, String policyName) { - this.serviceClient().delete(resourceGroupName, policyName); - } - - public void delete(String resourceGroupName, String policyName, Context context) { - this.serviceClient().delete(resourceGroupName, policyName, context); - } - public WebApplicationFirewallPolicy getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/PreconfiguredEndpointImpl.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/PreconfiguredEndpointImpl.java index be4d188cdd45f..a746641fff998 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/PreconfiguredEndpointImpl.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/PreconfiguredEndpointImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.implementation; diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/PreconfiguredEndpointsClientImpl.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/PreconfiguredEndpointsClientImpl.java index 262480d6178de..adc72b092ebaa 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/PreconfiguredEndpointsClientImpl.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/PreconfiguredEndpointsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.frontdoor.fluent.PreconfiguredEndpointsClient; import com.azure.resourcemanager.frontdoor.fluent.models.PreconfiguredEndpointInner; -import com.azure.resourcemanager.frontdoor.models.PreconfiguredEndpointList; +import com.azure.resourcemanager.frontdoor.implementation.models.PreconfiguredEndpointList; import reactor.core.publisher.Mono; /** @@ -59,15 +59,24 @@ public final class PreconfiguredEndpointsClientImpl implements PreconfiguredEndp * The interface defining all the services for FrontDoorManagementClientPreconfiguredEndpoints to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "FrontDoorManagementC") + @Host("{endpoint}") + @ServiceInterface(name = "FrontDoorManagementClientPreconfiguredEndpoints") public interface PreconfiguredEndpointsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/PreconfiguredEndpoints") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/preconfiguredEndpoints") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/preconfiguredEndpoints") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, @HeaderParam("Accept") String accept, Context context); @@ -76,14 +85,21 @@ Mono> list(@HostParam("$host") String endpoi @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of Preconfigured Endpoints. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -94,26 +110,10 @@ Mono> listNext( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceGroupName, String profileName) { - 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 (profileName == null) { - return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); - } - final String apiVersion = "2019-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, - resourceGroupName, profileName, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, 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())); @@ -122,81 +122,65 @@ private Mono> listSinglePageAsync(Stri /** * Gets a list of Preconfigured Endpoints. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Preconfigured Endpoints along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of Preconfigured Endpoints as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String profileName, 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 (profileName == null) { - return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); - } - final String apiVersion = "2019-11-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, resourceGroupName, - profileName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String profileName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, profileName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** * Gets a list of Preconfigured Endpoints. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Preconfigured Endpoints as paginated response with {@link PagedFlux}. + * @return a list of Preconfigured Endpoints along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String profileName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, profileName), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, String profileName) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** * Gets a list of Preconfigured Endpoints. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Preconfigured Endpoints as paginated response with {@link PagedFlux}. + * @return a list of Preconfigured Endpoints along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String profileName, + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, String profileName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, profileName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** * Gets a list of Preconfigured Endpoints. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -205,13 +189,14 @@ private PagedFlux listAsync(String resourceGroupName */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String profileName) { - return new PagedIterable<>(listAsync(resourceGroupName, profileName)); + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, profileName), + nextLink -> listNextSinglePage(nextLink)); } /** * Gets a list of Preconfigured Endpoints. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -222,28 +207,24 @@ public PagedIterable list(String resourceGroupName, @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String profileName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, profileName, context)); + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, profileName, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** + * Gets a list of Preconfigured Endpoints + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines a list of preconfigured endpoints along with {@link PagedResponse} on successful completion of + * @return a list of Preconfigured Endpoints 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(), @@ -252,6 +233,28 @@ private Mono> listNextSinglePageAsync( } /** + * Gets a list of Preconfigured Endpoints + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Preconfigured Endpoints along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Gets a list of Preconfigured Endpoints + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -259,22 +262,14 @@ private Mono> listNextSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines a list of preconfigured endpoints along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of Preconfigured Endpoints along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/PreconfiguredEndpointsImpl.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/PreconfiguredEndpointsImpl.java index d63c4b2c69d05..1520f8076ff60 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/PreconfiguredEndpointsImpl.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/PreconfiguredEndpointsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.implementation; diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ProfileImpl.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ProfileImpl.java index e8f45db522764..3e43d3b996f6f 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ProfileImpl.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ProfileImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.implementation; @@ -76,10 +76,10 @@ private com.azure.resourcemanager.frontdoor.FrontDoorManager manager() { return this.serviceManager; } - private String profileName; - private String resourceGroupName; + private String profileName; + private ProfileUpdateModel updateParameters; public ProfileImpl withExistingResourceGroup(String resourceGroupName) { @@ -90,14 +90,14 @@ public ProfileImpl withExistingResourceGroup(String resourceGroupName) { public Profile create() { this.innerObject = serviceManager.serviceClient() .getNetworkExperimentProfiles() - .createOrUpdate(profileName, resourceGroupName, this.innerModel(), Context.NONE); + .createOrUpdate(resourceGroupName, profileName, this.innerModel(), Context.NONE); return this; } public Profile create(Context context) { this.innerObject = serviceManager.serviceClient() .getNetworkExperimentProfiles() - .createOrUpdate(profileName, resourceGroupName, this.innerModel(), context); + .createOrUpdate(resourceGroupName, profileName, this.innerModel(), context); return this; } @@ -185,6 +185,6 @@ public ProfileImpl withEnabledState(State enabledState) { } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ReportsClientImpl.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ReportsClientImpl.java index ea02aa386ec56..2deb10db17674 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ReportsClientImpl.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ReportsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.implementation; @@ -58,15 +58,15 @@ public final class ReportsClientImpl implements ReportsClient { * The interface defining all the services for FrontDoorManagementClientReports to be used by the proxy service to * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "FrontDoorManagementC") + @Host("{endpoint}") + @ServiceInterface(name = "FrontDoorManagementClientReports") public interface ReportsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}/LatencyScorecard") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}/latencyScorecard") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getLatencyScorecards(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Mono> getLatencyScorecards(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, @PathParam("experimentName") String experimentName, @QueryParam("endDateTimeUTC") String endDateTimeUtc, @QueryParam("country") String country, @@ -74,11 +74,37 @@ Mono> getLatencyScorecards(@HostParam("$host") S @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}/Timeseries") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}/latencyScorecard") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getTimeseries(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Response getLatencyScorecardsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, + @PathParam("experimentName") String experimentName, @QueryParam("endDateTimeUTC") String endDateTimeUtc, + @QueryParam("country") String country, + @QueryParam("aggregationInterval") LatencyScorecardAggregationInterval aggregationInterval, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}/timeseries") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getTimeseries(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, + @PathParam("experimentName") String experimentName, + @QueryParam("startDateTimeUTC") OffsetDateTime startDateTimeUtc, + @QueryParam("endDateTimeUTC") OffsetDateTime endDateTimeUtc, + @QueryParam("aggregationInterval") TimeseriesAggregationInterval aggregationInterval, + @QueryParam("timeseriesType") TimeseriesType timeseriesType, @QueryParam("endpoint") String endpointParam, + @QueryParam("country") String country, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}/timeseries") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getTimeseriesSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, @PathParam("experimentName") String experimentName, @QueryParam("startDateTimeUTC") OffsetDateTime startDateTimeUtc, @@ -91,7 +117,7 @@ Mono> getTimeseries(@HostParam("$host") String endpoin /** * Gets a Latency Scorecard for a given Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param aggregationInterval The aggregation interval of the Latency Scorecard. @@ -108,92 +134,18 @@ Mono> getTimeseries(@HostParam("$host") String endpoin private Mono> getLatencyScorecardsWithResponseAsync(String resourceGroupName, String profileName, String experimentName, LatencyScorecardAggregationInterval aggregationInterval, String endDateTimeUtc, String country) { - 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 (profileName == null) { - return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); - } - if (experimentName == null) { - return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null.")); - } - if (aggregationInterval == null) { - return Mono - .error(new IllegalArgumentException("Parameter aggregationInterval is required and cannot be null.")); - } - final String apiVersion = "2019-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getLatencyScorecards(this.client.getEndpoint(), - this.client.getSubscriptionId(), apiVersion, resourceGroupName, profileName, experimentName, - endDateTimeUtc, country, aggregationInterval, accept, context)) + .withContext(context -> service.getLatencyScorecards(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, experimentName, endDateTimeUtc, + country, aggregationInterval, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a Latency Scorecard for a given Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName The Profile identifier associated with the Tenant and Partner. - * @param experimentName The Experiment identifier associated with the Experiment. - * @param aggregationInterval The aggregation interval of the Latency Scorecard. - * @param endDateTimeUtc The end DateTime of the Latency Scorecard in UTC. - * @param country The country associated with the Latency Scorecard. Values are country ISO codes as specified here- - * https://www.iso.org/iso-3166-country-codes.html. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Latency Scorecard for a given Experiment along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getLatencyScorecardsWithResponseAsync(String resourceGroupName, - String profileName, String experimentName, LatencyScorecardAggregationInterval aggregationInterval, - String endDateTimeUtc, String country, 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 (profileName == null) { - return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); - } - if (experimentName == null) { - return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null.")); - } - if (aggregationInterval == null) { - return Mono - .error(new IllegalArgumentException("Parameter aggregationInterval is required and cannot be null.")); - } - final String apiVersion = "2019-11-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getLatencyScorecards(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, - resourceGroupName, profileName, experimentName, endDateTimeUtc, country, aggregationInterval, accept, - context); - } - - /** - * Gets a Latency Scorecard for a given Experiment. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param aggregationInterval The aggregation interval of the Latency Scorecard. @@ -214,7 +166,7 @@ private Mono getLatencyScorecardsAsync(String resourceGro /** * Gets a Latency Scorecard for a given Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param aggregationInterval The aggregation interval of the Latency Scorecard. @@ -231,14 +183,16 @@ private Mono getLatencyScorecardsAsync(String resourceGro public Response getLatencyScorecardsWithResponse(String resourceGroupName, String profileName, String experimentName, LatencyScorecardAggregationInterval aggregationInterval, String endDateTimeUtc, String country, Context context) { - return getLatencyScorecardsWithResponseAsync(resourceGroupName, profileName, experimentName, - aggregationInterval, endDateTimeUtc, country, context).block(); + final String accept = "application/json"; + return service.getLatencyScorecardsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, experimentName, endDateTimeUtc, country, + aggregationInterval, accept, context); } /** * Gets a Latency Scorecard for a given Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param aggregationInterval The aggregation interval of the Latency Scorecard. @@ -259,7 +213,7 @@ public LatencyScorecardInner getLatencyScorecards(String resourceGroupName, Stri /** * Gets a Timeseries for a given Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param startDateTimeUtc The start DateTime of the Timeseries in UTC. @@ -279,115 +233,18 @@ private Mono> getTimeseriesWithResponseAsync(String re String experimentName, OffsetDateTime startDateTimeUtc, OffsetDateTime endDateTimeUtc, TimeseriesAggregationInterval aggregationInterval, TimeseriesType timeseriesType, String endpointParam, String country) { - 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 (profileName == null) { - return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); - } - if (experimentName == null) { - return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null.")); - } - if (startDateTimeUtc == null) { - return Mono - .error(new IllegalArgumentException("Parameter startDateTimeUtc is required and cannot be null.")); - } - if (endDateTimeUtc == null) { - return Mono.error(new IllegalArgumentException("Parameter endDateTimeUtc is required and cannot be null.")); - } - if (aggregationInterval == null) { - return Mono - .error(new IllegalArgumentException("Parameter aggregationInterval is required and cannot be null.")); - } - if (timeseriesType == null) { - return Mono.error(new IllegalArgumentException("Parameter timeseriesType is required and cannot be null.")); - } - final String apiVersion = "2019-11-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getTimeseries(this.client.getEndpoint(), this.client.getSubscriptionId(), - apiVersion, resourceGroupName, profileName, experimentName, startDateTimeUtc, endDateTimeUtc, - aggregationInterval, timeseriesType, endpointParam, country, accept, context)) + .withContext(context -> service.getTimeseries(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, experimentName, startDateTimeUtc, + endDateTimeUtc, aggregationInterval, timeseriesType, endpointParam, country, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a Timeseries for a given Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName The Profile identifier associated with the Tenant and Partner. - * @param experimentName The Experiment identifier associated with the Experiment. - * @param startDateTimeUtc The start DateTime of the Timeseries in UTC. - * @param endDateTimeUtc The end DateTime of the Timeseries in UTC. - * @param aggregationInterval The aggregation interval of the Timeseries. - * @param timeseriesType The type of Timeseries. - * @param endpointParam The specific endpoint. - * @param country The country associated with the Timeseries. Values are country ISO codes as specified here- - * https://www.iso.org/iso-3166-country-codes.html. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Timeseries for a given Experiment along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getTimeseriesWithResponseAsync(String resourceGroupName, String profileName, - String experimentName, OffsetDateTime startDateTimeUtc, OffsetDateTime endDateTimeUtc, - TimeseriesAggregationInterval aggregationInterval, TimeseriesType timeseriesType, String endpointParam, - String country, 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 (profileName == null) { - return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); - } - if (experimentName == null) { - return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null.")); - } - if (startDateTimeUtc == null) { - return Mono - .error(new IllegalArgumentException("Parameter startDateTimeUtc is required and cannot be null.")); - } - if (endDateTimeUtc == null) { - return Mono.error(new IllegalArgumentException("Parameter endDateTimeUtc is required and cannot be null.")); - } - if (aggregationInterval == null) { - return Mono - .error(new IllegalArgumentException("Parameter aggregationInterval is required and cannot be null.")); - } - if (timeseriesType == null) { - return Mono.error(new IllegalArgumentException("Parameter timeseriesType is required and cannot be null.")); - } - final String apiVersion = "2019-11-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getTimeseries(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, - resourceGroupName, profileName, experimentName, startDateTimeUtc, endDateTimeUtc, aggregationInterval, - timeseriesType, endpointParam, country, accept, context); - } - - /** - * Gets a Timeseries for a given Experiment. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param startDateTimeUtc The start DateTime of the Timeseries in UTC. @@ -413,7 +270,7 @@ private Mono getTimeseriesAsync(String resourceGroupName, Strin /** * Gets a Timeseries for a given Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param startDateTimeUtc The start DateTime of the Timeseries in UTC. @@ -434,14 +291,16 @@ public Response getTimeseriesWithResponse(String resourceGroupN String experimentName, OffsetDateTime startDateTimeUtc, OffsetDateTime endDateTimeUtc, TimeseriesAggregationInterval aggregationInterval, TimeseriesType timeseriesType, String endpointParam, String country, Context context) { - return getTimeseriesWithResponseAsync(resourceGroupName, profileName, experimentName, startDateTimeUtc, - endDateTimeUtc, aggregationInterval, timeseriesType, endpointParam, country, context).block(); + final String accept = "application/json"; + return service.getTimeseriesSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, experimentName, startDateTimeUtc, + endDateTimeUtc, aggregationInterval, timeseriesType, endpointParam, country, accept, context); } /** * Gets a Timeseries for a given Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param startDateTimeUtc The start DateTime of the Timeseries in UTC. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ReportsImpl.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ReportsImpl.java index 6a327b80fb158..072c3cddce260 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ReportsImpl.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ReportsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.implementation; @@ -37,12 +37,8 @@ public Response getLatencyScorecardsWithResponse(String resour Response inner = this.serviceClient() .getLatencyScorecardsWithResponse(resourceGroupName, profileName, experimentName, aggregationInterval, endDateTimeUtc, country, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new LatencyScorecardImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new LatencyScorecardImpl(inner.getValue(), this.manager())); } public LatencyScorecard getLatencyScorecards(String resourceGroupName, String profileName, String experimentName, @@ -63,12 +59,8 @@ public Response getTimeseriesWithResponse(String resourceGroupName, Response inner = this.serviceClient() .getTimeseriesWithResponse(resourceGroupName, profileName, experimentName, startDateTimeUtc, endDateTimeUtc, aggregationInterval, timeseriesType, endpointParam, country, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new TimeseriesImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new TimeseriesImpl(inner.getValue(), this.manager())); } public Timeseries getTimeseries(String resourceGroupName, String profileName, String experimentName, diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ResourceManagerUtils.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ResourceManagerUtils.java index e507d5166aa90..2a57618dfad3f 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ResourceManagerUtils.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ResourceManagerUtils.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.implementation; diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/RulesEngineImpl.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/RulesEngineImpl.java index 12ba3371dd120..0f015fe8d42ce 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/RulesEngineImpl.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/RulesEngineImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.implementation; diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/RulesEnginesClientImpl.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/RulesEnginesClientImpl.java index b833ecf7a31fb..f796445613132 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/RulesEnginesClientImpl.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/RulesEnginesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.implementation; @@ -27,13 +27,14 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.frontdoor.fluent.RulesEnginesClient; import com.azure.resourcemanager.frontdoor.fluent.models.RulesEngineInner; -import com.azure.resourcemanager.frontdoor.models.RulesEngineListResult; +import com.azure.resourcemanager.frontdoor.implementation.models.RulesEngineListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -67,47 +68,83 @@ public final class RulesEnginesClientImpl implements RulesEnginesClient { * The interface defining all the services for FrontDoorManagementClientRulesEngines to be used by the proxy service * to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "FrontDoorManagementC") + @Host("{endpoint}") + @ServiceInterface(name = "FrontDoorManagementClientRulesEngines") public interface RulesEnginesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/rulesEngines") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/rulesEngines/{rulesEngineName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByFrontDoor(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("frontDoorName") String frontDoorName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("rulesEngineName") String rulesEngineName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/rulesEngines/{rulesEngineName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("frontDoorName") String frontDoorName, - @PathParam("rulesEngineName") String rulesEngineName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("rulesEngineName") String rulesEngineName, @HeaderParam("Accept") String accept, + Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/rulesEngines/{rulesEngineName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("frontDoorName") String frontDoorName, - @PathParam("rulesEngineName") String rulesEngineName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") RulesEngineInner rulesEngineParameters, @HeaderParam("Accept") String accept, + @PathParam("rulesEngineName") String rulesEngineName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") RulesEngineInner rulesEngineParameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/rulesEngines/{rulesEngineName}") + @ExpectedResponses({ 200, 201, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("frontDoorName") String frontDoorName, + @PathParam("rulesEngineName") String rulesEngineName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") RulesEngineInner rulesEngineParameters, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/rulesEngines/{rulesEngineName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("frontDoorName") String frontDoorName, + @PathParam("rulesEngineName") String rulesEngineName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/rulesEngines/{rulesEngineName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("frontDoorName") String frontDoorName, + @PathParam("rulesEngineName") String rulesEngineName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/rulesEngines") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByFrontDoor(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("frontDoorName") String frontDoorName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/rulesEngines") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByFrontDoorSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("frontDoorName") String frontDoorName, - @PathParam("rulesEngineName") String rulesEngineName, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -115,161 +152,22 @@ Mono>> delete(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByFrontDoorNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Lists all of the Rules Engine Configurations within a Front Door. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param frontDoorName Name of the Front Door which is globally unique. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Rules Engine Configurations along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByFrontDoorSinglePageAsync(String resourceGroupName, - String frontDoorName) { - 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 (frontDoorName == null) { - return Mono.error(new IllegalArgumentException("Parameter frontDoorName is required and cannot be null.")); - } - final String apiVersion = "2021-06-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByFrontDoor(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, frontDoorName, apiVersion, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists all of the Rules Engine Configurations within a Front Door. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param frontDoorName Name of the Front Door which is globally unique. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Rules Engine Configurations along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByFrontDoorSinglePageAsync(String resourceGroupName, - String frontDoorName, 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 (frontDoorName == null) { - return Mono.error(new IllegalArgumentException("Parameter frontDoorName is required and cannot be null.")); - } - final String apiVersion = "2021-06-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByFrontDoor(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - frontDoorName, apiVersion, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all of the Rules Engine Configurations within a Front Door. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param frontDoorName Name of the Front Door which is globally unique. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Rules Engine Configurations as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByFrontDoorAsync(String resourceGroupName, String frontDoorName) { - return new PagedFlux<>(() -> listByFrontDoorSinglePageAsync(resourceGroupName, frontDoorName), - nextLink -> listByFrontDoorNextSinglePageAsync(nextLink)); - } - - /** - * Lists all of the Rules Engine Configurations within a Front Door. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param frontDoorName Name of the Front Door which is globally unique. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Rules Engine Configurations as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByFrontDoorAsync(String resourceGroupName, String frontDoorName, - Context context) { - return new PagedFlux<>(() -> listByFrontDoorSinglePageAsync(resourceGroupName, frontDoorName, context), - nextLink -> listByFrontDoorNextSinglePageAsync(nextLink, context)); - } - /** - * Lists all of the Rules Engine Configurations within a Front Door. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param frontDoorName Name of the Front Door which is globally unique. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Rules Engine Configurations as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByFrontDoor(String resourceGroupName, String frontDoorName) { - return new PagedIterable<>(listByFrontDoorAsync(resourceGroupName, frontDoorName)); - } - - /** - * Lists all of the Rules Engine Configurations within a Front Door. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param frontDoorName Name of the Front Door which is globally unique. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Rules Engine Configurations as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByFrontDoor(String resourceGroupName, String frontDoorName, - Context context) { - return new PagedIterable<>(listByFrontDoorAsync(resourceGroupName, frontDoorName, context)); + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByFrontDoorNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a Rules Engine Configuration with the specified name within the specified Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param rulesEngineName Name of the Rules Engine which is unique within the Front Door. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -281,79 +179,17 @@ public PagedIterable listByFrontDoor(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String frontDoorName, String rulesEngineName) { - 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 (frontDoorName == null) { - return Mono.error(new IllegalArgumentException("Parameter frontDoorName is required and cannot be null.")); - } - if (rulesEngineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter rulesEngineName is required and cannot be null.")); - } - final String apiVersion = "2021-06-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, frontDoorName, rulesEngineName, apiVersion, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, frontDoorName, rulesEngineName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a Rules Engine Configuration with the specified name within the specified Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param frontDoorName Name of the Front Door which is globally unique. - * @param rulesEngineName Name of the Rules Engine which is unique within the Front Door. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Rules Engine Configuration with the specified name within the specified Front Door along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String frontDoorName, - String rulesEngineName, 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 (frontDoorName == null) { - return Mono.error(new IllegalArgumentException("Parameter frontDoorName is required and cannot be null.")); - } - if (rulesEngineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter rulesEngineName is required and cannot be null.")); - } - final String apiVersion = "2021-06-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, frontDoorName, - rulesEngineName, apiVersion, accept, context); - } - - /** - * Gets a Rules Engine Configuration with the specified name within the specified Front Door. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param rulesEngineName Name of the Rules Engine which is unique within the Front Door. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -371,7 +207,7 @@ private Mono getAsync(String resourceGroupName, String frontDo /** * Gets a Rules Engine Configuration with the specified name within the specified Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param rulesEngineName Name of the Rules Engine which is unique within the Front Door. * @param context The context to associate with this operation. @@ -384,13 +220,15 @@ private Mono getAsync(String resourceGroupName, String frontDo @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String frontDoorName, String rulesEngineName, Context context) { - return getWithResponseAsync(resourceGroupName, frontDoorName, rulesEngineName, context).block(); + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, frontDoorName, rulesEngineName, accept, context); } /** * Gets a Rules Engine Configuration with the specified name within the specified Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param rulesEngineName Name of the Rules Engine which is unique within the Front Door. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -406,7 +244,7 @@ public RulesEngineInner get(String resourceGroupName, String frontDoorName, Stri /** * Creates a new Rules Engine Configuration with the specified name within the specified Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param rulesEngineName Name of the Rules Engine which is unique within the Front Door. * @param rulesEngineParameters Rules Engine Configuration properties needed to create a new Rules Engine @@ -420,122 +258,72 @@ public RulesEngineInner get(String resourceGroupName, String frontDoorName, Stri @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String frontDoorName, String rulesEngineName, RulesEngineInner rulesEngineParameters) { - 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 (frontDoorName == null) { - return Mono.error(new IllegalArgumentException("Parameter frontDoorName is required and cannot be null.")); - } - if (rulesEngineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter rulesEngineName is required and cannot be null.")); - } - if (rulesEngineParameters == null) { - return Mono - .error(new IllegalArgumentException("Parameter rulesEngineParameters is required and cannot be null.")); - } else { - rulesEngineParameters.validate(); - } - final String apiVersion = "2021-06-01"; + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, frontDoorName, rulesEngineName, apiVersion, rulesEngineParameters, accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, frontDoorName, rulesEngineName, contentType, accept, + rulesEngineParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates a new Rules Engine Configuration with the specified name within the specified Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param rulesEngineName Name of the Rules Engine which is unique within the Front Door. * @param rulesEngineParameters Rules Engine Configuration properties needed to create a new Rules Engine * Configuration. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a rules engine configuration containing a list of rules that will run to modify the runtime behavior of - * the request and response along with {@link Response} on successful completion of {@link Mono}. + * the request and response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String frontDoorName, String rulesEngineName, RulesEngineInner rulesEngineParameters, 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 (frontDoorName == null) { - return Mono.error(new IllegalArgumentException("Parameter frontDoorName is required and cannot be null.")); - } - if (rulesEngineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter rulesEngineName is required and cannot be null.")); - } - if (rulesEngineParameters == null) { - return Mono - .error(new IllegalArgumentException("Parameter rulesEngineParameters is required and cannot be null.")); - } else { - rulesEngineParameters.validate(); - } - final String apiVersion = "2021-06-01"; + private Response createOrUpdateWithResponse(String resourceGroupName, String frontDoorName, + String rulesEngineName, RulesEngineInner rulesEngineParameters) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - frontDoorName, rulesEngineName, apiVersion, rulesEngineParameters, accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, frontDoorName, rulesEngineName, contentType, accept, + rulesEngineParameters, Context.NONE); } /** * Creates a new Rules Engine Configuration with the specified name within the specified Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param rulesEngineName Name of the Rules Engine which is unique within the Front Door. * @param rulesEngineParameters Rules Engine Configuration properties needed to create a new Rules Engine * Configuration. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of a rules engine configuration containing a list of rules that will - * run to modify the runtime behavior of the request and response. + * @return a rules engine configuration containing a list of rules that will run to modify the runtime behavior of + * the request and response along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RulesEngineInner> beginCreateOrUpdateAsync( - String resourceGroupName, String frontDoorName, String rulesEngineName, - RulesEngineInner rulesEngineParameters) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, frontDoorName, rulesEngineName, rulesEngineParameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - RulesEngineInner.class, RulesEngineInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String frontDoorName, + String rulesEngineName, RulesEngineInner rulesEngineParameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, frontDoorName, rulesEngineName, contentType, accept, + rulesEngineParameters, context); } /** * Creates a new Rules Engine Configuration with the specified name within the specified Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param rulesEngineName Name of the Rules Engine which is unique within the Front Door. * @param rulesEngineParameters Rules Engine Configuration properties needed to create a new Rules Engine * Configuration. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -544,19 +332,18 @@ private PollerFlux, RulesEngineInner> beginCreateOr */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, RulesEngineInner> beginCreateOrUpdateAsync( - String resourceGroupName, String frontDoorName, String rulesEngineName, RulesEngineInner rulesEngineParameters, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, frontDoorName, - rulesEngineName, rulesEngineParameters, context); + String resourceGroupName, String frontDoorName, String rulesEngineName, + RulesEngineInner rulesEngineParameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, frontDoorName, rulesEngineName, rulesEngineParameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - RulesEngineInner.class, RulesEngineInner.class, context); + RulesEngineInner.class, RulesEngineInner.class, this.client.getContext()); } /** * Creates a new Rules Engine Configuration with the specified name within the specified Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param rulesEngineName Name of the Rules Engine which is unique within the Front Door. * @param rulesEngineParameters Rules Engine Configuration properties needed to create a new Rules Engine @@ -570,14 +357,16 @@ private PollerFlux, RulesEngineInner> beginCreateOr @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, RulesEngineInner> beginCreateOrUpdate(String resourceGroupName, String frontDoorName, String rulesEngineName, RulesEngineInner rulesEngineParameters) { - return this.beginCreateOrUpdateAsync(resourceGroupName, frontDoorName, rulesEngineName, rulesEngineParameters) - .getSyncPoller(); + Response response + = createOrUpdateWithResponse(resourceGroupName, frontDoorName, rulesEngineName, rulesEngineParameters); + return this.client.getLroResult(response, RulesEngineInner.class, + RulesEngineInner.class, Context.NONE); } /** * Creates a new Rules Engine Configuration with the specified name within the specified Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param rulesEngineName Name of the Rules Engine which is unique within the Front Door. * @param rulesEngineParameters Rules Engine Configuration properties needed to create a new Rules Engine @@ -592,15 +381,16 @@ public SyncPoller, RulesEngineInner> beginCreateOrU @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, RulesEngineInner> beginCreateOrUpdate(String resourceGroupName, String frontDoorName, String rulesEngineName, RulesEngineInner rulesEngineParameters, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, frontDoorName, rulesEngineName, rulesEngineParameters, context) - .getSyncPoller(); + Response response = createOrUpdateWithResponse(resourceGroupName, frontDoorName, rulesEngineName, + rulesEngineParameters, context); + return this.client.getLroResult(response, RulesEngineInner.class, + RulesEngineInner.class, context); } /** * Creates a new Rules Engine Configuration with the specified name within the specified Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param rulesEngineName Name of the Rules Engine which is unique within the Front Door. * @param rulesEngineParameters Rules Engine Configuration properties needed to create a new Rules Engine @@ -621,29 +411,7 @@ private Mono createOrUpdateAsync(String resourceGroupName, Str /** * Creates a new Rules Engine Configuration with the specified name within the specified Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param frontDoorName Name of the Front Door which is globally unique. - * @param rulesEngineName Name of the Rules Engine which is unique within the Front Door. - * @param rulesEngineParameters Rules Engine Configuration properties needed to create a new Rules Engine - * Configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a rules engine configuration containing a list of rules that will run to modify the runtime behavior of - * the request and response on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String frontDoorName, - String rulesEngineName, RulesEngineInner rulesEngineParameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, frontDoorName, rulesEngineName, rulesEngineParameters, - context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates a new Rules Engine Configuration with the specified name within the specified Front Door. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param rulesEngineName Name of the Rules Engine which is unique within the Front Door. * @param rulesEngineParameters Rules Engine Configuration properties needed to create a new Rules Engine @@ -657,13 +425,14 @@ private Mono createOrUpdateAsync(String resourceGroupName, Str @ServiceMethod(returns = ReturnType.SINGLE) public RulesEngineInner createOrUpdate(String resourceGroupName, String frontDoorName, String rulesEngineName, RulesEngineInner rulesEngineParameters) { - return createOrUpdateAsync(resourceGroupName, frontDoorName, rulesEngineName, rulesEngineParameters).block(); + return beginCreateOrUpdate(resourceGroupName, frontDoorName, rulesEngineName, rulesEngineParameters) + .getFinalResult(); } /** * Creates a new Rules Engine Configuration with the specified name within the specified Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param rulesEngineName Name of the Rules Engine which is unique within the Front Door. * @param rulesEngineParameters Rules Engine Configuration properties needed to create a new Rules Engine @@ -678,14 +447,14 @@ public RulesEngineInner createOrUpdate(String resourceGroupName, String frontDoo @ServiceMethod(returns = ReturnType.SINGLE) public RulesEngineInner createOrUpdate(String resourceGroupName, String frontDoorName, String rulesEngineName, RulesEngineInner rulesEngineParameters, Context context) { - return createOrUpdateAsync(resourceGroupName, frontDoorName, rulesEngineName, rulesEngineParameters, context) - .block(); + return beginCreateOrUpdate(resourceGroupName, frontDoorName, rulesEngineName, rulesEngineParameters, context) + .getFinalResult(); } /** * Deletes an existing Rules Engine Configuration with the specified parameters. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param rulesEngineName Name of the Rules Engine which is unique within the Front Door. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -696,101 +465,55 @@ public RulesEngineInner createOrUpdate(String resourceGroupName, String frontDoo @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String frontDoorName, String rulesEngineName) { - 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 (frontDoorName == null) { - return Mono.error(new IllegalArgumentException("Parameter frontDoorName is required and cannot be null.")); - } - if (rulesEngineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter rulesEngineName is required and cannot be null.")); - } - final String apiVersion = "2021-06-01"; - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, frontDoorName, rulesEngineName, apiVersion, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, frontDoorName, rulesEngineName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes an existing Rules Engine Configuration with the specified parameters. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param rulesEngineName Name of the Rules Engine which is unique within the Front Door. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String frontDoorName, - String rulesEngineName, 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 (frontDoorName == null) { - return Mono.error(new IllegalArgumentException("Parameter frontDoorName is required and cannot be null.")); - } - if (rulesEngineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter rulesEngineName is required and cannot be null.")); - } - final String apiVersion = "2021-06-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - frontDoorName, rulesEngineName, apiVersion, accept, context); + private Response deleteWithResponse(String resourceGroupName, String frontDoorName, + String rulesEngineName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, frontDoorName, rulesEngineName, Context.NONE); } /** * Deletes an existing Rules Engine Configuration with the specified parameters. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param rulesEngineName Name of the Rules Engine which is unique within the Front Door. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String frontDoorName, - String rulesEngineName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, frontDoorName, rulesEngineName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String frontDoorName, + String rulesEngineName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, frontDoorName, rulesEngineName, context); } /** * Deletes an existing Rules Engine Configuration with the specified parameters. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param rulesEngineName Name of the Rules Engine which is unique within the Front Door. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -798,18 +521,17 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String frontDoorName, - String rulesEngineName, Context context) { - context = this.client.mergeContext(context); + String rulesEngineName) { Mono>> mono - = deleteWithResponseAsync(resourceGroupName, frontDoorName, rulesEngineName, context); + = deleteWithResponseAsync(resourceGroupName, frontDoorName, rulesEngineName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** * Deletes an existing Rules Engine Configuration with the specified parameters. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param rulesEngineName Name of the Rules Engine which is unique within the Front Door. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -820,13 +542,14 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String frontDoorName, String rulesEngineName) { - return this.beginDeleteAsync(resourceGroupName, frontDoorName, rulesEngineName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, frontDoorName, rulesEngineName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** * Deletes an existing Rules Engine Configuration with the specified parameters. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param rulesEngineName Name of the Rules Engine which is unique within the Front Door. * @param context The context to associate with this operation. @@ -838,13 +561,14 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String frontDoorName, String rulesEngineName, Context context) { - return this.beginDeleteAsync(resourceGroupName, frontDoorName, rulesEngineName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, frontDoorName, rulesEngineName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** * Deletes an existing Rules Engine Configuration with the specified parameters. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param rulesEngineName Name of the Rules Engine which is unique within the Front Door. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -861,51 +585,147 @@ private Mono deleteAsync(String resourceGroupName, String frontDoorName, S /** * Deletes an existing Rules Engine Configuration with the specified parameters. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param rulesEngineName Name of the Rules Engine which is unique within the Front Door. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String frontDoorName, String rulesEngineName, - Context context) { - return beginDeleteAsync(resourceGroupName, frontDoorName, rulesEngineName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public void delete(String resourceGroupName, String frontDoorName, String rulesEngineName) { + beginDelete(resourceGroupName, frontDoorName, rulesEngineName).getFinalResult(); } /** * Deletes an existing Rules Engine Configuration with the specified parameters. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param rulesEngineName Name of the Rules Engine which is unique within the Front Door. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String frontDoorName, String rulesEngineName) { - deleteAsync(resourceGroupName, frontDoorName, rulesEngineName).block(); + public void delete(String resourceGroupName, String frontDoorName, String rulesEngineName, Context context) { + beginDelete(resourceGroupName, frontDoorName, rulesEngineName, context).getFinalResult(); } /** - * Deletes an existing Rules Engine Configuration with the specified parameters. + * Lists all of the Rules Engine Configurations within a Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param frontDoorName Name of the Front Door which is globally unique. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of RulesEngine items along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByFrontDoorSinglePageAsync(String resourceGroupName, + String frontDoorName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByFrontDoor(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, frontDoorName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all of the Rules Engine Configurations within a Front Door. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param frontDoorName Name of the Front Door which is globally unique. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of RulesEngine items as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByFrontDoorAsync(String resourceGroupName, String frontDoorName) { + return new PagedFlux<>(() -> listByFrontDoorSinglePageAsync(resourceGroupName, frontDoorName), + nextLink -> listByFrontDoorNextSinglePageAsync(nextLink)); + } + + /** + * Lists all of the Rules Engine Configurations within a Front Door. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param frontDoorName Name of the Front Door which is globally unique. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of RulesEngine items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByFrontDoorSinglePage(String resourceGroupName, String frontDoorName) { + final String accept = "application/json"; + Response res + = service.listByFrontDoorSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, frontDoorName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all of the Rules Engine Configurations within a Front Door. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. - * @param rulesEngineName Name of the Rules Engine which is unique within the Front Door. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of RulesEngine items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String frontDoorName, String rulesEngineName, Context context) { - deleteAsync(resourceGroupName, frontDoorName, rulesEngineName, context).block(); + private PagedResponse listByFrontDoorSinglePage(String resourceGroupName, String frontDoorName, + Context context) { + final String accept = "application/json"; + Response res + = service.listByFrontDoorSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, frontDoorName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all of the Rules Engine Configurations within a Front Door. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param frontDoorName Name of the Front Door which is globally unique. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of RulesEngine items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByFrontDoor(String resourceGroupName, String frontDoorName) { + return new PagedIterable<>(() -> listByFrontDoorSinglePage(resourceGroupName, frontDoorName), + nextLink -> listByFrontDoorNextSinglePage(nextLink)); + } + + /** + * Lists all of the Rules Engine Configurations within a Front Door. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param frontDoorName Name of the Front Door which is globally unique. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of RulesEngine items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByFrontDoor(String resourceGroupName, String frontDoorName, + Context context) { + return new PagedIterable<>(() -> listByFrontDoorSinglePage(resourceGroupName, frontDoorName, context), + nextLink -> listByFrontDoorNextSinglePage(nextLink, context)); } /** @@ -915,18 +735,11 @@ public void delete(String resourceGroupName, String frontDoorName, String rulesE * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Rules Engine Configurations along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return paged collection of RulesEngine items along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByFrontDoorNextSinglePageAsync(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.listByFrontDoorNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -935,6 +748,24 @@ private Mono> listByFrontDoorNextSinglePageAsync .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of RulesEngine items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByFrontDoorNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByFrontDoorNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -943,22 +774,14 @@ private Mono> listByFrontDoorNextSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Rules Engine Configurations along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return paged collection of RulesEngine items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByFrontDoorNextSinglePageAsync(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.")); - } + private PagedResponse listByFrontDoorNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByFrontDoorNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByFrontDoorNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/RulesEnginesImpl.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/RulesEnginesImpl.java index 93bc5ada3ce68..bfec1baa8e87c 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/RulesEnginesImpl.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/RulesEnginesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.implementation; @@ -27,27 +27,12 @@ public RulesEnginesImpl(RulesEnginesClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable listByFrontDoor(String resourceGroupName, String frontDoorName) { - PagedIterable inner = this.serviceClient().listByFrontDoor(resourceGroupName, frontDoorName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new RulesEngineImpl(inner1, this.manager())); - } - - public PagedIterable listByFrontDoor(String resourceGroupName, String frontDoorName, Context context) { - PagedIterable inner - = this.serviceClient().listByFrontDoor(resourceGroupName, frontDoorName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new RulesEngineImpl(inner1, this.manager())); - } - public Response getWithResponse(String resourceGroupName, String frontDoorName, String rulesEngineName, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, frontDoorName, rulesEngineName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new RulesEngineImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new RulesEngineImpl(inner.getValue(), this.manager())); } public RulesEngine get(String resourceGroupName, String frontDoorName, String rulesEngineName) { @@ -67,6 +52,17 @@ public void delete(String resourceGroupName, String frontDoorName, String rulesE this.serviceClient().delete(resourceGroupName, frontDoorName, rulesEngineName, context); } + public PagedIterable listByFrontDoor(String resourceGroupName, String frontDoorName) { + PagedIterable inner = this.serviceClient().listByFrontDoor(resourceGroupName, frontDoorName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new RulesEngineImpl(inner1, this.manager())); + } + + public PagedIterable listByFrontDoor(String resourceGroupName, String frontDoorName, Context context) { + PagedIterable inner + = this.serviceClient().listByFrontDoor(resourceGroupName, frontDoorName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new RulesEngineImpl(inner1, this.manager())); + } + public RulesEngine getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/TimeseriesImpl.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/TimeseriesImpl.java index 8349c8f85a197..a4493c62e18d6 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/TimeseriesImpl.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/TimeseriesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.implementation; diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ValidateCustomDomainOutputImpl.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ValidateCustomDomainOutputImpl.java index 177edb8e3b747..ac70e16b2ac01 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ValidateCustomDomainOutputImpl.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/ValidateCustomDomainOutputImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.implementation; diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/WebApplicationFirewallPolicyImpl.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/WebApplicationFirewallPolicyImpl.java index 8243f9661647b..ab9ca30264ff7 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/WebApplicationFirewallPolicyImpl.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/WebApplicationFirewallPolicyImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.implementation; @@ -248,6 +248,6 @@ public WebApplicationFirewallPolicyImpl withManagedRules(ManagedRuleSetList mana } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ExperimentList.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/models/ExperimentList.java similarity index 70% rename from sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ExperimentList.java rename to sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/models/ExperimentList.java index b873e4facbd13..3287a0eaf4d21 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ExperimentList.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/models/ExperimentList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.frontdoor.models; +package com.azure.resourcemanager.frontdoor.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -17,26 +17,26 @@ * Defines a list of Experiments. It contains a list of Experiment objects and a URL link to get the next set of * results. */ -@Fluent +@Immutable public final class ExperimentList implements JsonSerializable { /* - * List of Experiments within a resource group. + * The Experiment items on this page */ private List value; /* - * URL to get the next set of Experiment objects if there are any. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of ExperimentList class. */ - public ExperimentList() { + private ExperimentList() { } /** - * Get the value property: List of Experiments within a resource group. + * Get the value property: The Experiment items on this page. * * @return the value value. */ @@ -45,7 +45,7 @@ public List value() { } /** - * Get the nextLink property: URL to get the next set of Experiment objects if there are any. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -53,28 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: URL to get the next set of Experiment objects if there are any. - * - * @param nextLink the nextLink value to set. - * @return the ExperimentList object itself. - */ - public ExperimentList 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()); - } - } - /** * {@inheritDoc} */ @@ -91,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ExperimentList if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the ExperimentList. */ public static ExperimentList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorListResult.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/models/FrontDoorListResult.java similarity index 66% rename from sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorListResult.java rename to sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/models/FrontDoorListResult.java index df048840e5d67..fee64e25e85cc 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorListResult.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/models/FrontDoorListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.frontdoor.models; +package com.azure.resourcemanager.frontdoor.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,29 +14,28 @@ import java.util.List; /** - * Result of the request to list Front Doors. It contains a list of Front Door objects and a URL link to get the next - * set of results. + * Paged collection of FrontDoor items. */ -@Fluent +@Immutable public final class FrontDoorListResult implements JsonSerializable { /* - * List of Front Doors within a resource group. + * The FrontDoor items on this page */ private List value; /* - * URL to get the next set of Front Door objects if there are any. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of FrontDoorListResult class. */ - public FrontDoorListResult() { + private FrontDoorListResult() { } /** - * Get the value property: List of Front Doors within a resource group. + * Get the value property: The FrontDoor items on this page. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: URL to get the next set of Front Door objects if there are any. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -53,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: URL to get the next set of Front Door objects if there are any. - * - * @param nextLink the nextLink value to set. - * @return the FrontDoorListResult object itself. - */ - public FrontDoorListResult 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()); - } - } - /** * {@inheritDoc} */ @@ -91,6 +68,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of FrontDoorListResult if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the FrontDoorListResult. */ public static FrontDoorListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontendEndpointsListResult.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/models/FrontendEndpointsListResult.java similarity index 67% rename from sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontendEndpointsListResult.java rename to sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/models/FrontendEndpointsListResult.java index 303b2657d47c0..edac7c8d5e6b5 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontendEndpointsListResult.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/models/FrontendEndpointsListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.frontdoor.models; +package com.azure.resourcemanager.frontdoor.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,29 +14,28 @@ import java.util.List; /** - * Result of the request to list frontend endpoints. It contains a list of Frontend endpoint objects and a URL link to - * get the next set of results. + * Paged collection of FrontendEndpoint items. */ -@Fluent +@Immutable public final class FrontendEndpointsListResult implements JsonSerializable { /* - * List of Frontend endpoints within a Front Door. + * The FrontendEndpoint items on this page */ private List value; /* - * URL to get the next set of frontend endpoints if there are any. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of FrontendEndpointsListResult class. */ - public FrontendEndpointsListResult() { + private FrontendEndpointsListResult() { } /** - * Get the value property: List of Frontend endpoints within a Front Door. + * Get the value property: The FrontendEndpoint items on this page. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: URL to get the next set of frontend endpoints if there are any. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -53,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: URL to get the next set of frontend endpoints if there are any. - * - * @param nextLink the nextLink value to set. - * @return the FrontendEndpointsListResult object itself. - */ - public FrontendEndpointsListResult 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()); - } - } - /** * {@inheritDoc} */ @@ -91,6 +68,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of FrontendEndpointsListResult if the JsonReader was pointing to an instance of it, or null * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the FrontendEndpointsListResult. */ public static FrontendEndpointsListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSetDefinitionList.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/models/ManagedRuleSetDefinitionList.java similarity index 71% rename from sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSetDefinitionList.java rename to sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/models/ManagedRuleSetDefinitionList.java index df0e44ec04049..8544819e220f8 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSetDefinitionList.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/models/ManagedRuleSetDefinitionList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.frontdoor.models; +package com.azure.resourcemanager.frontdoor.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * List of managed rule set definitions available for use in a policy. */ -@Fluent +@Immutable public final class ManagedRuleSetDefinitionList implements JsonSerializable { /* - * List of managed rule set definitions. + * The ManagedRuleSetDefinition items on this page */ private List value; /* - * URL to retrieve next set of managed rule set definitions. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of ManagedRuleSetDefinitionList class. */ - public ManagedRuleSetDefinitionList() { + private ManagedRuleSetDefinitionList() { } /** - * Get the value property: List of managed rule set definitions. + * Get the value property: The ManagedRuleSetDefinition items on this page. * * @return the value value. */ @@ -44,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: URL to retrieve next set of managed rule set definitions. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -52,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: URL to retrieve next set of managed rule set definitions. - * - * @param nextLink the nextLink value to set. - * @return the ManagedRuleSetDefinitionList object itself. - */ - public ManagedRuleSetDefinitionList 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()); - } - } - /** * {@inheritDoc} */ @@ -90,6 +68,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ManagedRuleSetDefinitionList if the JsonReader was pointing to an instance of it, or null * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the ManagedRuleSetDefinitionList. */ public static ManagedRuleSetDefinitionList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/PreconfiguredEndpointList.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/models/PreconfiguredEndpointList.java similarity index 69% rename from sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/PreconfiguredEndpointList.java rename to sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/models/PreconfiguredEndpointList.java index db93dca953d19..f07ef262b9db6 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/PreconfiguredEndpointList.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/models/PreconfiguredEndpointList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.frontdoor.models; +package com.azure.resourcemanager.frontdoor.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * Defines a list of preconfigured endpoints. */ -@Fluent +@Immutable public final class PreconfiguredEndpointList implements JsonSerializable { /* - * List of PreconfiguredEndpoints supported by NetworkExperiment. + * The PreconfiguredEndpoint items on this page */ private List value; /* - * URL to get the next set of PreconfiguredEndpoints if there are any. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of PreconfiguredEndpointList class. */ - public PreconfiguredEndpointList() { + private PreconfiguredEndpointList() { } /** - * Get the value property: List of PreconfiguredEndpoints supported by NetworkExperiment. + * Get the value property: The PreconfiguredEndpoint items on this page. * * @return the value value. */ @@ -44,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: URL to get the next set of PreconfiguredEndpoints if there are any. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -52,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: URL to get the next set of PreconfiguredEndpoints if there are any. - * - * @param nextLink the nextLink value to set. - * @return the PreconfiguredEndpointList object itself. - */ - public PreconfiguredEndpointList 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()); - } - } - /** * {@inheritDoc} */ @@ -90,6 +68,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of PreconfiguredEndpointList if the JsonReader was pointing to an instance of it, or null if * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the PreconfiguredEndpointList. */ public static PreconfiguredEndpointList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ProfileList.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/models/ProfileList.java similarity index 70% rename from sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ProfileList.java rename to sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/models/ProfileList.java index 733cf324d0d9e..63f9d64a9112a 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ProfileList.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/models/ProfileList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.frontdoor.models; +package com.azure.resourcemanager.frontdoor.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * Defines a list of Profiles. It contains a list of Profile objects and a URL link to get the next set of results. */ -@Fluent +@Immutable public final class ProfileList implements JsonSerializable { /* - * List of Profiles within a resource group. + * The Profile items on this page */ private List value; /* - * URL to get the next set of Profile objects if there are any. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of ProfileList class. */ - public ProfileList() { + private ProfileList() { } /** - * Get the value property: List of Profiles within a resource group. + * Get the value property: The Profile items on this page. * * @return the value value. */ @@ -44,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: URL to get the next set of Profile objects if there are any. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -52,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: URL to get the next set of Profile objects if there are any. - * - * @param nextLink the nextLink value to set. - * @return the ProfileList object itself. - */ - public ProfileList 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()); - } - } - /** * {@inheritDoc} */ @@ -90,6 +68,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ProfileList if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the ProfileList. */ public static ProfileList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RulesEngineListResult.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/models/RulesEngineListResult.java similarity index 66% rename from sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RulesEngineListResult.java rename to sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/models/RulesEngineListResult.java index 9a1bd69d471b4..56b4622ebcfb3 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RulesEngineListResult.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/models/RulesEngineListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.frontdoor.models; +package com.azure.resourcemanager.frontdoor.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,29 +14,28 @@ import java.util.List; /** - * Result of the request to list Rules Engine Configurations. It contains a list of RulesEngine objects and a URL link - * to get the next set of results. + * Paged collection of RulesEngine items. */ -@Fluent +@Immutable public final class RulesEngineListResult implements JsonSerializable { /* - * List of rulesEngines within a Front Door. + * The RulesEngine items on this page */ private List value; /* - * URL to get the next set of RulesEngine objects if there are any. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of RulesEngineListResult class. */ - public RulesEngineListResult() { + private RulesEngineListResult() { } /** - * Get the value property: List of rulesEngines within a Front Door. + * Get the value property: The RulesEngine items on this page. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: URL to get the next set of RulesEngine objects if there are any. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -53,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: URL to get the next set of RulesEngine objects if there are any. - * - * @param nextLink the nextLink value to set. - * @return the RulesEngineListResult object itself. - */ - public RulesEngineListResult 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()); - } - } - /** * {@inheritDoc} */ @@ -91,6 +68,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of RulesEngineListResult if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the RulesEngineListResult. */ public static RulesEngineListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/WebApplicationFirewallPolicyList.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/models/WebApplicationFirewallPolicyList.java similarity index 70% rename from sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/WebApplicationFirewallPolicyList.java rename to sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/models/WebApplicationFirewallPolicyList.java index d877633d03451..c923e5b296fce 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/WebApplicationFirewallPolicyList.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/models/WebApplicationFirewallPolicyList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.frontdoor.models; +package com.azure.resourcemanager.frontdoor.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -17,26 +17,26 @@ * Defines a list of WebApplicationFirewallPolicies. It contains a list of WebApplicationFirewallPolicy objects and a * URL link to get the next set of results. */ -@Fluent +@Immutable public final class WebApplicationFirewallPolicyList implements JsonSerializable { /* - * List of WebApplicationFirewallPolicies within a resource group. + * The WebApplicationFirewallPolicy items on this page */ private List value; /* - * URL to get the next set of WebApplicationFirewallPolicy objects if there are any. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of WebApplicationFirewallPolicyList class. */ - public WebApplicationFirewallPolicyList() { + private WebApplicationFirewallPolicyList() { } /** - * Get the value property: List of WebApplicationFirewallPolicies within a resource group. + * Get the value property: The WebApplicationFirewallPolicy items on this page. * * @return the value value. */ @@ -45,7 +45,7 @@ public List value() { } /** - * Get the nextLink property: URL to get the next set of WebApplicationFirewallPolicy objects if there are any. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -53,28 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: URL to get the next set of WebApplicationFirewallPolicy objects if there are any. - * - * @param nextLink the nextLink value to set. - * @return the WebApplicationFirewallPolicyList object itself. - */ - public WebApplicationFirewallPolicyList 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()); - } - } - /** * {@inheritDoc} */ @@ -91,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of WebApplicationFirewallPolicyList if the JsonReader was pointing to an instance of it, or * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the WebApplicationFirewallPolicyList. */ public static WebApplicationFirewallPolicyList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/package-info.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/package-info.java index 69d9aeb2f8a62..59234696724b7 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/package-info.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** * Package containing the implementations for FrontDoorManagementClient. - * FrontDoor Client. + * APIs to manage web application firewall rules. */ package com.azure.resourcemanager.frontdoor.implementation; diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ActionType.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ActionType.java index 7daf16f31553c..4cd6a5c276704 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ActionType.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ActionType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,35 +12,40 @@ */ public final class ActionType extends ExpandableStringEnum { /** - * Static value Allow for ActionType. + * Allow. */ public static final ActionType ALLOW = fromString("Allow"); /** - * Static value Block for ActionType. + * Block. */ public static final ActionType BLOCK = fromString("Block"); /** - * Static value Log for ActionType. + * Log. */ public static final ActionType LOG = fromString("Log"); /** - * Static value Redirect for ActionType. + * Redirect. */ public static final ActionType REDIRECT = fromString("Redirect"); /** - * Static value AnomalyScoring for ActionType. + * AnomalyScoring. */ public static final ActionType ANOMALY_SCORING = fromString("AnomalyScoring"); /** - * Static value JSChallenge for ActionType. + * JSChallenge. */ public static final ActionType JSCHALLENGE = fromString("JSChallenge"); + /** + * CAPTCHA. + */ + public static final ActionType CAPTCHA = fromString("CAPTCHA"); + /** * Creates a new instance of ActionType value. * diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/AggregationInterval.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/AggregationInterval.java index b3d4e69be20c9..74846bf7d6a7e 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/AggregationInterval.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/AggregationInterval.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,12 +12,12 @@ */ public final class AggregationInterval extends ExpandableStringEnum { /** - * Static value Hourly for AggregationInterval. + * Hourly. */ public static final AggregationInterval HOURLY = fromString("Hourly"); /** - * Static value Daily for AggregationInterval. + * Daily. */ public static final AggregationInterval DAILY = fromString("Daily"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Availability.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Availability.java index 9ebb357dadbd4..25331d368db89 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Availability.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Availability.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,12 +12,12 @@ */ public final class Availability extends ExpandableStringEnum { /** - * Static value Available for Availability. + * Available. */ public static final Availability AVAILABLE = fromString("Available"); /** - * Static value Unavailable for Availability. + * Unavailable. */ public static final Availability UNAVAILABLE = fromString("Unavailable"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Backend.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Backend.java index 451a622d0fcf8..fe5823c426e7a 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Backend.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Backend.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -328,14 +328,6 @@ public Backend withBackendHostHeader(String backendHostHeader) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/BackendEnabledState.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/BackendEnabledState.java index 4249686106417..9e5efeed3f42a 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/BackendEnabledState.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/BackendEnabledState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,12 +12,12 @@ */ public final class BackendEnabledState extends ExpandableStringEnum { /** - * Static value Enabled for BackendEnabledState. + * Enabled. */ public static final BackendEnabledState ENABLED = fromString("Enabled"); /** - * Static value Disabled for BackendEnabledState. + * Disabled. */ public static final BackendEnabledState DISABLED = fromString("Disabled"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/BackendPool.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/BackendPool.java index 745499166a6c4..b1ae3238b2918 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/BackendPool.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/BackendPool.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -87,7 +87,9 @@ public BackendPool withId(String id) { } /** - * Get the resourceState property: Resource status. + * Get the resourceState property: Resource status of the Front Door or Front Door SubResource. + * + * Resource status. * * @return the resourceState value. */ @@ -164,17 +166,6 @@ public BackendPool withHealthProbeSettings(SubResource healthProbeSettings) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/BackendPoolUpdateParameters.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/BackendPoolUpdateParameters.java index 7acebead69b42..bebdd8cedc5ed 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/BackendPoolUpdateParameters.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/BackendPoolUpdateParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -99,17 +99,6 @@ public BackendPoolUpdateParameters withHealthProbeSettings(SubResource healthPro return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (backends() != null) { - backends().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/BackendPoolsSettings.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/BackendPoolsSettings.java index 94029e091947f..ecec4fd39d7f3 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/BackendPoolsSettings.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/BackendPoolsSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -79,14 +79,6 @@ public BackendPoolsSettings withSendRecvTimeoutSeconds(Integer sendRecvTimeoutSe return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/BasicResource.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/BasicResource.java new file mode 100644 index 0000000000000..9fbb7230f71d2 --- /dev/null +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/BasicResource.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.frontdoor.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Common resource representation. + */ +@Immutable +public class BasicResource implements JsonSerializable { + /* + * Resource ID. + */ + private String id; + + /* + * Resource name. + */ + private String name; + + /* + * Resource type. + */ + private String type; + + /** + * Creates an instance of BasicResource class. + */ + public BasicResource() { + } + + /** + * Get the id property: Resource ID. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Resource ID. + * + * @param id the id value to set. + * @return the BasicResource object itself. + */ + BasicResource withId(String id) { + this.id = id; + return this; + } + + /** + * Get the name property: Resource name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Resource name. + * + * @param name the name value to set. + * @return the BasicResource object itself. + */ + BasicResource withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type property: Resource type. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Set the type property: Resource type. + * + * @param type the type value to set. + * @return the BasicResource object itself. + */ + BasicResource withType(String type) { + this.type = type; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BasicResource from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BasicResource if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the BasicResource. + */ + public static BasicResource fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BasicResource deserializedBasicResource = new BasicResource(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedBasicResource.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedBasicResource.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedBasicResource.type = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedBasicResource; + }); + } +} diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/BasicResourceWithSettableIDName.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/BasicResourceWithSettableIDName.java new file mode 100644 index 0000000000000..d108d581a7b5b --- /dev/null +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/BasicResourceWithSettableIDName.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.frontdoor.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Common resource representation. + */ +@Fluent +public class BasicResourceWithSettableIDName implements JsonSerializable { + /* + * Resource ID. + */ + private String id; + + /* + * Resource name. + */ + private String name; + + /* + * Resource type. + */ + private String type; + + /** + * Creates an instance of BasicResourceWithSettableIDName class. + */ + public BasicResourceWithSettableIDName() { + } + + /** + * Get the id property: Resource ID. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Resource ID. + * + * @param id the id value to set. + * @return the BasicResourceWithSettableIDName object itself. + */ + public BasicResourceWithSettableIDName withId(String id) { + this.id = id; + return this; + } + + /** + * Get the name property: Resource name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Resource name. + * + * @param name the name value to set. + * @return the BasicResourceWithSettableIDName object itself. + */ + public BasicResourceWithSettableIDName withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type property: Resource type. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Set the type property: Resource type. + * + * @param type the type value to set. + * @return the BasicResourceWithSettableIDName object itself. + */ + BasicResourceWithSettableIDName withType(String type) { + this.type = type; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BasicResourceWithSettableIDName from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BasicResourceWithSettableIDName if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the BasicResourceWithSettableIDName. + */ + public static BasicResourceWithSettableIDName fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BasicResourceWithSettableIDName deserializedBasicResourceWithSettableIDName + = new BasicResourceWithSettableIDName(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedBasicResourceWithSettableIDName.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedBasicResourceWithSettableIDName.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedBasicResourceWithSettableIDName.type = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedBasicResourceWithSettableIDName; + }); + } +} diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/CacheConfiguration.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/CacheConfiguration.java index 2acdd16a6b637..95adcd4b239c5 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/CacheConfiguration.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/CacheConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -127,14 +127,6 @@ public CacheConfiguration withCacheDuration(Duration cacheDuration) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/CheckNameAvailabilityInput.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/CheckNameAvailabilityInput.java index a916197547276..3db25cb323e1e 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/CheckNameAvailabilityInput.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/CheckNameAvailabilityInput.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -73,26 +72,6 @@ public CheckNameAvailabilityInput withType(ResourceType type) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property name in model CheckNameAvailabilityInput")); - } - if (type() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property type in model CheckNameAvailabilityInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CheckNameAvailabilityInput.class); - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/CheckNameAvailabilityOutput.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/CheckNameAvailabilityOutput.java index f03aacf9192d0..f5fd50fc5ca7b 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/CheckNameAvailabilityOutput.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/CheckNameAvailabilityOutput.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/CustomHttpsConfiguration.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/CustomHttpsConfiguration.java index d48be57aedf09..8f8f73542eed9 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/CustomHttpsConfiguration.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/CustomHttpsConfiguration.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -234,37 +233,6 @@ public CustomHttpsConfiguration withCertificateType(FrontDoorCertificateType cer return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (certificateSource() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property certificateSource in model CustomHttpsConfiguration")); - } - if (protocolType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property protocolType in model CustomHttpsConfiguration")); - } - if (minimumTlsVersion() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property minimumTlsVersion in model CustomHttpsConfiguration")); - } - if (innerKeyVaultCertificateSourceParameters() != null) { - innerKeyVaultCertificateSourceParameters().validate(); - } - if (innerFrontDoorCertificateSourceParameters() != null) { - innerFrontDoorCertificateSourceParameters().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CustomHttpsConfiguration.class); - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/CustomHttpsProvisioningState.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/CustomHttpsProvisioningState.java index 98db2f7799ca7..22abad546ff8b 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/CustomHttpsProvisioningState.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/CustomHttpsProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,27 +12,27 @@ */ public final class CustomHttpsProvisioningState extends ExpandableStringEnum { /** - * Static value Enabling for CustomHttpsProvisioningState. + * Enabling. */ public static final CustomHttpsProvisioningState ENABLING = fromString("Enabling"); /** - * Static value Enabled for CustomHttpsProvisioningState. + * Enabled. */ public static final CustomHttpsProvisioningState ENABLED = fromString("Enabled"); /** - * Static value Disabling for CustomHttpsProvisioningState. + * Disabling. */ public static final CustomHttpsProvisioningState DISABLING = fromString("Disabling"); /** - * Static value Disabled for CustomHttpsProvisioningState. + * Disabled. */ public static final CustomHttpsProvisioningState DISABLED = fromString("Disabled"); /** - * Static value Failed for CustomHttpsProvisioningState. + * Failed. */ public static final CustomHttpsProvisioningState FAILED = fromString("Failed"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/CustomHttpsProvisioningSubstate.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/CustomHttpsProvisioningSubstate.java index 0b0efd1f7fafe..3a70cdb4d680c 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/CustomHttpsProvisioningSubstate.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/CustomHttpsProvisioningSubstate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,57 +12,57 @@ */ public final class CustomHttpsProvisioningSubstate extends ExpandableStringEnum { /** - * Static value SubmittingDomainControlValidationRequest for CustomHttpsProvisioningSubstate. + * SubmittingDomainControlValidationRequest. */ public static final CustomHttpsProvisioningSubstate SUBMITTING_DOMAIN_CONTROL_VALIDATION_REQUEST = fromString("SubmittingDomainControlValidationRequest"); /** - * Static value PendingDomainControlValidationREquestApproval for CustomHttpsProvisioningSubstate. + * PendingDomainControlValidationREquestApproval. */ public static final CustomHttpsProvisioningSubstate PENDING_DOMAIN_CONTROL_VALIDATION_REQUEST_APPROVAL = fromString("PendingDomainControlValidationREquestApproval"); /** - * Static value DomainControlValidationRequestApproved for CustomHttpsProvisioningSubstate. + * DomainControlValidationRequestApproved. */ public static final CustomHttpsProvisioningSubstate DOMAIN_CONTROL_VALIDATION_REQUEST_APPROVED = fromString("DomainControlValidationRequestApproved"); /** - * Static value DomainControlValidationRequestRejected for CustomHttpsProvisioningSubstate. + * DomainControlValidationRequestRejected. */ public static final CustomHttpsProvisioningSubstate DOMAIN_CONTROL_VALIDATION_REQUEST_REJECTED = fromString("DomainControlValidationRequestRejected"); /** - * Static value DomainControlValidationRequestTimedOut for CustomHttpsProvisioningSubstate. + * DomainControlValidationRequestTimedOut. */ public static final CustomHttpsProvisioningSubstate DOMAIN_CONTROL_VALIDATION_REQUEST_TIMED_OUT = fromString("DomainControlValidationRequestTimedOut"); /** - * Static value IssuingCertificate for CustomHttpsProvisioningSubstate. + * IssuingCertificate. */ public static final CustomHttpsProvisioningSubstate ISSUING_CERTIFICATE = fromString("IssuingCertificate"); /** - * Static value DeployingCertificate for CustomHttpsProvisioningSubstate. + * DeployingCertificate. */ public static final CustomHttpsProvisioningSubstate DEPLOYING_CERTIFICATE = fromString("DeployingCertificate"); /** - * Static value CertificateDeployed for CustomHttpsProvisioningSubstate. + * CertificateDeployed. */ public static final CustomHttpsProvisioningSubstate CERTIFICATE_DEPLOYED = fromString("CertificateDeployed"); /** - * Static value DeletingCertificate for CustomHttpsProvisioningSubstate. + * DeletingCertificate. */ public static final CustomHttpsProvisioningSubstate DELETING_CERTIFICATE = fromString("DeletingCertificate"); /** - * Static value CertificateDeleted for CustomHttpsProvisioningSubstate. + * CertificateDeleted. */ public static final CustomHttpsProvisioningSubstate CERTIFICATE_DELETED = fromString("CertificateDeleted"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/CustomRule.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/CustomRule.java index 14c68d0304d10..9ee5938b36f23 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/CustomRule.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/CustomRule.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -253,33 +252,6 @@ public CustomRule withAction(ActionType action) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (ruleType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property ruleType in model CustomRule")); - } - if (groupBy() != null) { - groupBy().forEach(e -> e.validate()); - } - if (matchConditions() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property matchConditions in model CustomRule")); - } else { - matchConditions().forEach(e -> e.validate()); - } - if (action() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property action in model CustomRule")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CustomRule.class); - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/CustomRuleEnabledState.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/CustomRuleEnabledState.java index b816e274d96ca..bd895a38e2b1e 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/CustomRuleEnabledState.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/CustomRuleEnabledState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,12 +12,12 @@ */ public final class CustomRuleEnabledState extends ExpandableStringEnum { /** - * Static value Disabled for CustomRuleEnabledState. + * Disabled. */ public static final CustomRuleEnabledState DISABLED = fromString("Disabled"); /** - * Static value Enabled for CustomRuleEnabledState. + * Enabled. */ public static final CustomRuleEnabledState ENABLED = fromString("Enabled"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/CustomRuleList.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/CustomRuleList.java index 056579b013d80..ec7b720700290 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/CustomRuleList.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/CustomRuleList.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -48,17 +48,6 @@ public CustomRuleList withRules(List rules) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (rules() != null) { - rules().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/DynamicCompressionEnabled.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/DynamicCompressionEnabled.java index 1d3b83b3e8ff9..acadeb1d0e1a7 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/DynamicCompressionEnabled.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/DynamicCompressionEnabled.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,12 +12,12 @@ */ public final class DynamicCompressionEnabled extends ExpandableStringEnum { /** - * Static value Enabled for DynamicCompressionEnabled. + * Enabled. */ public static final DynamicCompressionEnabled ENABLED = fromString("Enabled"); /** - * Static value Disabled for DynamicCompressionEnabled. + * Disabled. */ public static final DynamicCompressionEnabled DISABLED = fromString("Disabled"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Endpoint.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Endpoint.java index e3c79f7ecb477..013c772066f9a 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Endpoint.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Endpoint.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -72,14 +72,6 @@ public Endpoint withEndpoint(String endpoint) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/EndpointType.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/EndpointType.java index a1059ace9dc04..5ef53ffb3f4ba 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/EndpointType.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/EndpointType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,22 +12,22 @@ */ public final class EndpointType extends ExpandableStringEnum { /** - * Static value AFD for EndpointType. + * AFD. */ public static final EndpointType AFD = fromString("AFD"); /** - * Static value AzureRegion for EndpointType. + * AzureRegion. */ public static final EndpointType AZURE_REGION = fromString("AzureRegion"); /** - * Static value CDN for EndpointType. + * CDN. */ public static final EndpointType CDN = fromString("CDN"); /** - * Static value ATM for EndpointType. + * ATM. */ public static final EndpointType ATM = fromString("ATM"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Endpoints.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Endpoints.java index ad54bf0a46cb7..4cf6ef324731e 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Endpoints.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Endpoints.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -13,7 +13,7 @@ public interface Endpoints { /** * Removes a content from Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param contentFilePaths The path to the content to be purged. Path can be a full URL, e.g. '/pictures/city.png' * which removes a single file, or a directory with a wildcard, e.g. '/pictures/*' which removes all folders and @@ -27,7 +27,7 @@ public interface Endpoints { /** * Removes a content from Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param contentFilePaths The path to the content to be purged. Path can be a full URL, e.g. '/pictures/city.png' * which removes a single file, or a directory with a wildcard, e.g. '/pictures/*' which removes all folders and diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/EnforceCertificateNameCheckEnabledState.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/EnforceCertificateNameCheckEnabledState.java index d520257491e73..724a382c30f0a 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/EnforceCertificateNameCheckEnabledState.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/EnforceCertificateNameCheckEnabledState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -13,12 +13,12 @@ public final class EnforceCertificateNameCheckEnabledState extends ExpandableStringEnum { /** - * Static value Enabled for EnforceCertificateNameCheckEnabledState. + * Enabled. */ public static final EnforceCertificateNameCheckEnabledState ENABLED = fromString("Enabled"); /** - * Static value Disabled for EnforceCertificateNameCheckEnabledState. + * Disabled. */ public static final EnforceCertificateNameCheckEnabledState DISABLED = fromString("Disabled"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ExceptionMatchVariable.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ExceptionMatchVariable.java new file mode 100644 index 0000000000000..075c263b77308 --- /dev/null +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ExceptionMatchVariable.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.frontdoor.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The variable to be evaluated for excluding the request. + */ +public final class ExceptionMatchVariable extends ExpandableStringEnum { + /** + * Request Uri Exception Match Variable. + */ + public static final ExceptionMatchVariable REQUEST_URI = fromString("RequestUri"); + + /** + * Socket Address Exception Match Variable. + */ + public static final ExceptionMatchVariable SOCKET_ADDR = fromString("SocketAddr"); + + /** + * Request Header Names Exception Match Variable. + */ + public static final ExceptionMatchVariable REQUEST_HEADER_NAMES = fromString("RequestHeaderNames"); + + /** + * Creates a new instance of ExceptionMatchVariable value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ExceptionMatchVariable() { + } + + /** + * Creates or finds a ExceptionMatchVariable from its string representation. + * + * @param name a name to look for. + * @return the corresponding ExceptionMatchVariable. + */ + public static ExceptionMatchVariable fromString(String name) { + return fromString(name, ExceptionMatchVariable.class); + } + + /** + * Gets known ExceptionMatchVariable values. + * + * @return known ExceptionMatchVariable values. + */ + public static Collection values() { + return values(ExceptionMatchVariable.class); + } +} diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ExceptionSelectorMatchOperator.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ExceptionSelectorMatchOperator.java new file mode 100644 index 0000000000000..6a7a815f5378a --- /dev/null +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ExceptionSelectorMatchOperator.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.frontdoor.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Comparison operator to apply to the selector when specifying which elements in the collection this exception applies + * to.. + */ +public final class ExceptionSelectorMatchOperator extends ExpandableStringEnum { + /** + * Equals Selector Match Operator. + */ + public static final ExceptionSelectorMatchOperator EQUALS = fromString("Equals"); + + /** + * Creates a new instance of ExceptionSelectorMatchOperator value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ExceptionSelectorMatchOperator() { + } + + /** + * Creates or finds a ExceptionSelectorMatchOperator from its string representation. + * + * @param name a name to look for. + * @return the corresponding ExceptionSelectorMatchOperator. + */ + public static ExceptionSelectorMatchOperator fromString(String name) { + return fromString(name, ExceptionSelectorMatchOperator.class); + } + + /** + * Gets known ExceptionSelectorMatchOperator values. + * + * @return known ExceptionSelectorMatchOperator values. + */ + public static Collection values() { + return values(ExceptionSelectorMatchOperator.class); + } +} diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ExceptionValueMatchOperator.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ExceptionValueMatchOperator.java new file mode 100644 index 0000000000000..7ec3ad643d66d --- /dev/null +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ExceptionValueMatchOperator.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.frontdoor.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Comparison operator to apply to the value to be matched.. + */ +public final class ExceptionValueMatchOperator extends ExpandableStringEnum { + /** + * Equals Exception Value Match Operator. + */ + public static final ExceptionValueMatchOperator EQUALS = fromString("Equals"); + + /** + * Contains Exception Value Match Operator. + */ + public static final ExceptionValueMatchOperator CONTAINS = fromString("Contains"); + + /** + * StartsWith Exception Value Match Operator. + */ + public static final ExceptionValueMatchOperator STARTS_WITH = fromString("StartsWith"); + + /** + * EndsWith Exception Value Match Operator. + */ + public static final ExceptionValueMatchOperator ENDS_WITH = fromString("EndsWith"); + + /** + * EqualsAny Exception Value Match Operator. + */ + public static final ExceptionValueMatchOperator EQUALS_ANY = fromString("EqualsAny"); + + /** + * IPMatch Exception Value Match Operator. + */ + public static final ExceptionValueMatchOperator IPMATCH = fromString("IPMatch"); + + /** + * Creates a new instance of ExceptionValueMatchOperator value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ExceptionValueMatchOperator() { + } + + /** + * Creates or finds a ExceptionValueMatchOperator from its string representation. + * + * @param name a name to look for. + * @return the corresponding ExceptionValueMatchOperator. + */ + public static ExceptionValueMatchOperator fromString(String name) { + return fromString(name, ExceptionValueMatchOperator.class); + } + + /** + * Gets known ExceptionValueMatchOperator values. + * + * @return known ExceptionValueMatchOperator values. + */ + public static Collection values() { + return values(ExceptionValueMatchOperator.class); + } +} diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Experiment.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Experiment.java index 3b249e0a0fed1..5052b5e0dcad8 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Experiment.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Experiment.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -170,7 +170,7 @@ interface WithParentResource { /** * Specifies resourceGroupName, profileName. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @return the next definition stage. */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ExperimentUpdateModel.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ExperimentUpdateModel.java index a81354cdb174d..e87d6211ba8c1 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ExperimentUpdateModel.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ExperimentUpdateModel.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -109,17 +109,6 @@ public ExperimentUpdateModel withEnabledState(State enabledState) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Experiments.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Experiments.java index 98d312a733734..0b885d5ac1e50 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Experiments.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Experiments.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -13,82 +13,82 @@ */ public interface Experiments { /** - * Gets a list of Experiments. + * Gets an Experiment by ExperimentName. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. + * @param experimentName The Experiment identifier associated with the Experiment. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Experiments as paginated response with {@link PagedIterable}. + * @return an Experiment by ExperimentName along with {@link Response}. */ - PagedIterable listByProfile(String resourceGroupName, String profileName); + Response getWithResponse(String resourceGroupName, String profileName, String experimentName, + Context context); /** - * Gets a list of Experiments. + * Gets an Experiment by ExperimentName. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. - * @param context The context to associate with this operation. + * @param experimentName The Experiment identifier associated with the Experiment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Experiments as paginated response with {@link PagedIterable}. + * @return an Experiment by ExperimentName. */ - PagedIterable listByProfile(String resourceGroupName, String profileName, Context context); + Experiment get(String resourceGroupName, String profileName, String experimentName); /** - * Gets an Experiment by ExperimentName. + * Deletes an Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Experiment by ExperimentName along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String profileName, String experimentName, - Context context); + void delete(String resourceGroupName, String profileName, String experimentName); /** - * Gets an Experiment by ExperimentName. + * Deletes an Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Experiment by ExperimentName. */ - Experiment get(String resourceGroupName, String profileName, String experimentName); + void delete(String resourceGroupName, String profileName, String experimentName, Context context); /** - * Deletes an Experiment. + * Gets a list of Experiments. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. - * @param experimentName The Experiment identifier associated with the Experiment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Experiments as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String profileName, String experimentName); + PagedIterable listByProfile(String resourceGroupName, String profileName); /** - * Deletes an Experiment. + * Gets a list of Experiments. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. - * @param experimentName The Experiment identifier associated with the Experiment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Experiments as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String profileName, String experimentName, Context context); + PagedIterable listByProfile(String resourceGroupName, String profileName, Context context); /** * Gets an Experiment by ExperimentName. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ForwardingConfiguration.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ForwardingConfiguration.java index 8f1572a2e12a6..79c0bd82fe6d1 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ForwardingConfiguration.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ForwardingConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -139,18 +139,6 @@ public ForwardingConfiguration withBackendPool(SubResource backendPool) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (cacheConfiguration() != null) { - cacheConfiguration().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoor.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoor.java index cced7bde32258..1f23046d94cdc 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoor.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoor.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -52,7 +52,9 @@ public interface FrontDoor { Map tags(); /** - * Gets the resourceState property: Resource status of the Front Door. + * Gets the resourceState property: Resource status of the Front Door or Front Door SubResource. + * + * Resource status of the Front Door. * * @return the resourceState value. */ @@ -223,7 +225,7 @@ interface WithResourceGroup { /** * Specifies resourceGroupName. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ WithCreate withExistingResourceGroup(String resourceGroupName); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorCertificateSource.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorCertificateSource.java index 69b2f7c44b33d..5bb6f57aea5a6 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorCertificateSource.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorCertificateSource.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,12 +12,12 @@ */ public final class FrontDoorCertificateSource extends ExpandableStringEnum { /** - * Static value AzureKeyVault for FrontDoorCertificateSource. + * AzureKeyVault. */ public static final FrontDoorCertificateSource AZURE_KEY_VAULT = fromString("AzureKeyVault"); /** - * Static value FrontDoor for FrontDoorCertificateSource. + * FrontDoor. */ public static final FrontDoorCertificateSource FRONT_DOOR = fromString("FrontDoor"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorCertificateType.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorCertificateType.java index d313be8f98b23..6d939f270c1e4 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorCertificateType.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorCertificateType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,7 +12,7 @@ */ public final class FrontDoorCertificateType extends ExpandableStringEnum { /** - * Static value Dedicated for FrontDoorCertificateType. + * Dedicated. */ public static final FrontDoorCertificateType DEDICATED = fromString("Dedicated"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorEnabledState.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorEnabledState.java index bbd450ace7a0f..9e6362c0fdcf4 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorEnabledState.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorEnabledState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,12 +12,12 @@ */ public final class FrontDoorEnabledState extends ExpandableStringEnum { /** - * Static value Enabled for FrontDoorEnabledState. + * Enabled. */ public static final FrontDoorEnabledState ENABLED = fromString("Enabled"); /** - * Static value Disabled for FrontDoorEnabledState. + * Disabled. */ public static final FrontDoorEnabledState DISABLED = fromString("Disabled"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorForwardingProtocol.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorForwardingProtocol.java index 4ad1d31ee2534..b9f76b25b0369 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorForwardingProtocol.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorForwardingProtocol.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,17 +12,17 @@ */ public final class FrontDoorForwardingProtocol extends ExpandableStringEnum { /** - * Static value HttpOnly for FrontDoorForwardingProtocol. + * HttpOnly. */ public static final FrontDoorForwardingProtocol HTTP_ONLY = fromString("HttpOnly"); /** - * Static value HttpsOnly for FrontDoorForwardingProtocol. + * HttpsOnly. */ public static final FrontDoorForwardingProtocol HTTPS_ONLY = fromString("HttpsOnly"); /** - * Static value MatchRequest for FrontDoorForwardingProtocol. + * MatchRequest. */ public static final FrontDoorForwardingProtocol MATCH_REQUEST = fromString("MatchRequest"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorHealthProbeMethod.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorHealthProbeMethod.java index 3e77bcca162c4..ecf292c275c4b 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorHealthProbeMethod.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorHealthProbeMethod.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,12 +12,12 @@ */ public final class FrontDoorHealthProbeMethod extends ExpandableStringEnum { /** - * Static value GET for FrontDoorHealthProbeMethod. + * GET. */ public static final FrontDoorHealthProbeMethod GET = fromString("GET"); /** - * Static value HEAD for FrontDoorHealthProbeMethod. + * HEAD. */ public static final FrontDoorHealthProbeMethod HEAD = fromString("HEAD"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorNameAvailabilities.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorNameAvailabilities.java index 519339132e387..4760423027249 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorNameAvailabilities.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorNameAvailabilities.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -14,7 +14,7 @@ public interface FrontDoorNameAvailabilities { /** * Check the availability of a Front Door resource name. * - * @param checkFrontDoorNameAvailabilityInput Input to check. + * @param checkFrontDoorNameAvailabilityInput The request body. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -27,7 +27,7 @@ public interface FrontDoorNameAvailabilities { /** * Check the availability of a Front Door resource name. * - * @param checkFrontDoorNameAvailabilityInput Input to check. + * @param checkFrontDoorNameAvailabilityInput The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorNameAvailabilityWithSubscriptions.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorNameAvailabilityWithSubscriptions.java index 75aede4370cec..1817890d59818 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorNameAvailabilityWithSubscriptions.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorNameAvailabilityWithSubscriptions.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -14,7 +14,7 @@ public interface FrontDoorNameAvailabilityWithSubscriptions { /** * Check the availability of a Front Door subdomain. * - * @param checkFrontDoorNameAvailabilityInput Input to check. + * @param checkFrontDoorNameAvailabilityInput The request body. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -27,7 +27,7 @@ public interface FrontDoorNameAvailabilityWithSubscriptions { /** * Check the availability of a Front Door subdomain. * - * @param checkFrontDoorNameAvailabilityInput Input to check. + * @param checkFrontDoorNameAvailabilityInput The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorProtocol.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorProtocol.java index e59ed3736017a..123c5221c3d76 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorProtocol.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorProtocol.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,12 +12,12 @@ */ public final class FrontDoorProtocol extends ExpandableStringEnum { /** - * Static value Http for FrontDoorProtocol. + * Http. */ public static final FrontDoorProtocol HTTP = fromString("Http"); /** - * Static value Https for FrontDoorProtocol. + * Https. */ public static final FrontDoorProtocol HTTPS = fromString("Https"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorQuery.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorQuery.java index 616047d991e40..c59d67063e4e8 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorQuery.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorQuery.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,22 +12,22 @@ */ public final class FrontDoorQuery extends ExpandableStringEnum { /** - * Static value StripNone for FrontDoorQuery. + * StripNone. */ public static final FrontDoorQuery STRIP_NONE = fromString("StripNone"); /** - * Static value StripAll for FrontDoorQuery. + * StripAll. */ public static final FrontDoorQuery STRIP_ALL = fromString("StripAll"); /** - * Static value StripOnly for FrontDoorQuery. + * StripOnly. */ public static final FrontDoorQuery STRIP_ONLY = fromString("StripOnly"); /** - * Static value StripAllExcept for FrontDoorQuery. + * StripAllExcept. */ public static final FrontDoorQuery STRIP_ALL_EXCEPT = fromString("StripAllExcept"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorRedirectProtocol.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorRedirectProtocol.java index 618bc2b3cd405..8e08709ae0c09 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorRedirectProtocol.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorRedirectProtocol.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,17 +12,17 @@ */ public final class FrontDoorRedirectProtocol extends ExpandableStringEnum { /** - * Static value HttpOnly for FrontDoorRedirectProtocol. + * HttpOnly. */ public static final FrontDoorRedirectProtocol HTTP_ONLY = fromString("HttpOnly"); /** - * Static value HttpsOnly for FrontDoorRedirectProtocol. + * HttpsOnly. */ public static final FrontDoorRedirectProtocol HTTPS_ONLY = fromString("HttpsOnly"); /** - * Static value MatchRequest for FrontDoorRedirectProtocol. + * MatchRequest. */ public static final FrontDoorRedirectProtocol MATCH_REQUEST = fromString("MatchRequest"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorRedirectType.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorRedirectType.java index 0e982329f4d8a..39fae7e47ebad 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorRedirectType.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorRedirectType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,22 +12,22 @@ */ public final class FrontDoorRedirectType extends ExpandableStringEnum { /** - * Static value Moved for FrontDoorRedirectType. + * Moved. */ public static final FrontDoorRedirectType MOVED = fromString("Moved"); /** - * Static value Found for FrontDoorRedirectType. + * Found. */ public static final FrontDoorRedirectType FOUND = fromString("Found"); /** - * Static value TemporaryRedirect for FrontDoorRedirectType. + * TemporaryRedirect. */ public static final FrontDoorRedirectType TEMPORARY_REDIRECT = fromString("TemporaryRedirect"); /** - * Static value PermanentRedirect for FrontDoorRedirectType. + * PermanentRedirect. */ public static final FrontDoorRedirectType PERMANENT_REDIRECT = fromString("PermanentRedirect"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorResourceState.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorResourceState.java index 75eac5a3eb2bb..b1471e3096047 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorResourceState.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorResourceState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,42 +12,42 @@ */ public final class FrontDoorResourceState extends ExpandableStringEnum { /** - * Static value Creating for FrontDoorResourceState. + * Creating. */ public static final FrontDoorResourceState CREATING = fromString("Creating"); /** - * Static value Enabling for FrontDoorResourceState. + * Enabling. */ public static final FrontDoorResourceState ENABLING = fromString("Enabling"); /** - * Static value Enabled for FrontDoorResourceState. + * Enabled. */ public static final FrontDoorResourceState ENABLED = fromString("Enabled"); /** - * Static value Disabling for FrontDoorResourceState. + * Disabling. */ public static final FrontDoorResourceState DISABLING = fromString("Disabling"); /** - * Static value Disabled for FrontDoorResourceState. + * Disabled. */ public static final FrontDoorResourceState DISABLED = fromString("Disabled"); /** - * Static value Deleting for FrontDoorResourceState. + * Deleting. */ public static final FrontDoorResourceState DELETING = fromString("Deleting"); /** - * Static value Migrating for FrontDoorResourceState. + * Migrating. */ public static final FrontDoorResourceState MIGRATING = fromString("Migrating"); /** - * Static value Migrated for FrontDoorResourceState. + * Migrated. */ public static final FrontDoorResourceState MIGRATED = fromString("Migrated"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorTlsProtocolType.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorTlsProtocolType.java index 8dcd06e8ec423..de8b5f46399cf 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorTlsProtocolType.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorTlsProtocolType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,7 +12,7 @@ */ public final class FrontDoorTlsProtocolType extends ExpandableStringEnum { /** - * Static value ServerNameIndication for FrontDoorTlsProtocolType. + * ServerNameIndication. */ public static final FrontDoorTlsProtocolType SERVER_NAME_INDICATION = fromString("ServerNameIndication"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorUpdateParameters.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorUpdateParameters.java index 1b359510beceb..e5bd21e843bd3 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorUpdateParameters.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorUpdateParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -226,32 +226,6 @@ public FrontDoorUpdateParameters withEnabledState(FrontDoorEnabledState enabledS return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (routingRules() != null) { - routingRules().forEach(e -> e.validate()); - } - if (loadBalancingSettings() != null) { - loadBalancingSettings().forEach(e -> e.validate()); - } - if (healthProbeSettings() != null) { - healthProbeSettings().forEach(e -> e.validate()); - } - if (backendPools() != null) { - backendPools().forEach(e -> e.validate()); - } - if (frontendEndpoints() != null) { - frontendEndpoints().forEach(e -> e.validate()); - } - if (backendPoolsSettings() != null) { - backendPoolsSettings().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoors.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoors.java index 962baa60882eb..59657915157dc 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoors.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoors.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -13,101 +13,101 @@ */ public interface FrontDoors { /** - * Lists all of the Front Doors within an Azure subscription. + * Gets a Front Door with the specified Front Door name under the specified subscription and resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param frontDoorName Name of the Front Door which is globally unique. + * @param context The context to associate with this 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 result of the request to list Front Doors as paginated response with {@link PagedIterable}. + * @return a Front Door with the specified Front Door name under the specified subscription and resource group along + * with {@link Response}. */ - PagedIterable list(); + Response getByResourceGroupWithResponse(String resourceGroupName, String frontDoorName, Context context); /** - * Lists all of the Front Doors within an Azure subscription. + * Gets a Front Door with the specified Front Door name under the specified subscription and resource group. * - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param frontDoorName Name of the Front Door which is globally unique. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Front Doors as paginated response with {@link PagedIterable}. + * @return a Front Door with the specified Front Door name under the specified subscription and resource group. */ - PagedIterable list(Context context); + FrontDoor getByResourceGroup(String resourceGroupName, String frontDoorName); /** - * Lists all of the Front Doors within a resource group under a subscription. + * Deletes an existing Front Door with the specified parameters. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param frontDoorName Name of the Front Door which is globally unique. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Front Doors as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + void deleteByResourceGroup(String resourceGroupName, String frontDoorName); /** - * Lists all of the Front Doors within a resource group under a subscription. + * Deletes an existing Front Door with the specified parameters. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param frontDoorName Name of the Front Door which is globally unique. * @param context The context to associate with this 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 result of the request to list Front Doors as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); + void delete(String resourceGroupName, String frontDoorName, Context context); /** - * Gets a Front Door with the specified Front Door name under the specified subscription and resource group. + * Lists all of the Front Doors within a resource group under a subscription. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param frontDoorName Name of the Front Door which is globally unique. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Front Door with the specified Front Door name under the specified subscription and resource group along - * with {@link Response}. + * @return paged collection of FrontDoor items as paginated response with {@link PagedIterable}. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String frontDoorName, Context context); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Gets a Front Door with the specified Front Door name under the specified subscription and resource group. + * Lists all of the Front Doors within a resource group under a subscription. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param frontDoorName Name of the Front Door which is globally unique. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Front Door with the specified Front Door name under the specified subscription and resource group. + * @return paged collection of FrontDoor items as paginated response with {@link PagedIterable}. */ - FrontDoor getByResourceGroup(String resourceGroupName, String frontDoorName); + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Deletes an existing Front Door with the specified parameters. + * Lists all of the Front Doors within an Azure subscription. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param frontDoorName Name of the Front Door which is globally unique. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of FrontDoor items as paginated response with {@link PagedIterable}. */ - void deleteByResourceGroup(String resourceGroupName, String frontDoorName); + PagedIterable list(); /** - * Deletes an existing Front Door with the specified parameters. + * Lists all of the Front Doors within an Azure subscription. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param frontDoorName Name of the Front Door which is globally unique. * @param context The context to associate with this 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 paged collection of FrontDoor items as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String frontDoorName, Context context); + PagedIterable list(Context context); /** * Validates the custom domain mapping to ensure it maps to the correct Front Door endpoint in DNS. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param customDomainProperties Custom domain to be validated. * @param context The context to associate with this operation. @@ -122,7 +122,7 @@ Response validateCustomDomainWithResponse(String res /** * Validates the custom domain mapping to ensure it maps to the correct Front Door endpoint in DNS. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param customDomainProperties Custom domain to be validated. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontendEndpoint.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontendEndpoint.java index 1227033a91018..9decb55992452 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontendEndpoint.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontendEndpoint.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -11,7 +11,7 @@ */ public interface FrontendEndpoint { /** - * Gets the id property: Fully qualified resource Id for the resource. + * Gets the id property: Resource ID. * * @return the id value. */ @@ -32,7 +32,9 @@ public interface FrontendEndpoint { String type(); /** - * Gets the resourceState property: Resource status. + * Gets the resourceState property: Resource status of the Front Door or Front Door SubResource. + * + * Resource status. * * @return the resourceState value. */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontendEndpointLink.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontendEndpointLink.java index 8131977aa016f..d15af7d2bdf25 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontendEndpointLink.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/FrontendEndpointLink.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Defines the Resource ID for a Frontend Endpoint. */ -@Fluent +@Immutable public final class FrontendEndpointLink implements JsonSerializable { /* * Resource ID. @@ -24,7 +24,7 @@ public final class FrontendEndpointLink implements JsonSerializable listByFrontDoor(String resourceGroupName, String frontDoorName); + Response getWithResponse(String resourceGroupName, String frontDoorName, + String frontendEndpointName, Context context); /** - * Lists all of the frontend endpoints within a Front Door. + * Gets a Frontend endpoint with the specified name within the specified Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. - * @param context The context to associate with this operation. + * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list frontend endpoints as paginated response with {@link PagedIterable}. + * @return a Frontend endpoint with the specified name within the specified Front Door. */ - PagedIterable listByFrontDoor(String resourceGroupName, String frontDoorName, Context context); + FrontendEndpoint get(String resourceGroupName, String frontDoorName, String frontendEndpointName); /** - * Gets a Frontend endpoint with the specified name within the specified Front Door. + * Lists all of the frontend endpoints within a Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. - * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Frontend endpoint with the specified name within the specified Front Door along with {@link Response}. + * @return paged collection of FrontendEndpoint items as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String frontDoorName, - String frontendEndpointName, Context context); + PagedIterable listByFrontDoor(String resourceGroupName, String frontDoorName); /** - * Gets a Frontend endpoint with the specified name within the specified Front Door. + * Lists all of the frontend endpoints within a Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. - * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Frontend endpoint with the specified name within the specified Front Door. + * @return paged collection of FrontendEndpoint items as paginated response with {@link PagedIterable}. */ - FrontendEndpoint get(String resourceGroupName, String frontDoorName, String frontendEndpointName); + PagedIterable listByFrontDoor(String resourceGroupName, String frontDoorName, Context context); /** * Enables a frontendEndpoint for HTTPS traffic. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. * @param customHttpsConfiguration The configuration specifying how to enable HTTPS. @@ -82,7 +82,7 @@ void enableHttps(String resourceGroupName, String frontDoorName, String frontend /** * Enables a frontendEndpoint for HTTPS traffic. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. * @param customHttpsConfiguration The configuration specifying how to enable HTTPS. @@ -97,7 +97,7 @@ void enableHttps(String resourceGroupName, String frontDoorName, String frontend /** * Disables a frontendEndpoint for HTTPS traffic. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -109,7 +109,7 @@ void enableHttps(String resourceGroupName, String frontDoorName, String frontend /** * Disables a frontendEndpoint for HTTPS traffic. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door. * @param context The context to associate with this operation. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/GroupByVariable.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/GroupByVariable.java index 3109b48890fe8..839a73d35581b 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/GroupByVariable.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/GroupByVariable.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -48,20 +47,6 @@ public GroupByVariable withVariableName(VariableName variableName) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (variableName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property variableName in model GroupByVariable")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(GroupByVariable.class); - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/HeaderAction.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/HeaderAction.java index 9faa262032752..c06e7451a0cab 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/HeaderAction.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/HeaderAction.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -100,24 +99,6 @@ public HeaderAction withValue(String value) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (headerActionType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property headerActionType in model HeaderAction")); - } - if (headerName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property headerName in model HeaderAction")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(HeaderAction.class); - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/HeaderActionType.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/HeaderActionType.java index ff58a279e7100..01373e72217b5 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/HeaderActionType.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/HeaderActionType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,17 +12,17 @@ */ public final class HeaderActionType extends ExpandableStringEnum { /** - * Static value Append for HeaderActionType. + * Append. */ public static final HeaderActionType APPEND = fromString("Append"); /** - * Static value Delete for HeaderActionType. + * Delete. */ public static final HeaderActionType DELETE = fromString("Delete"); /** - * Static value Overwrite for HeaderActionType. + * Overwrite. */ public static final HeaderActionType OVERWRITE = fromString("Overwrite"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/HealthProbeEnabled.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/HealthProbeEnabled.java index 23cd1f751877b..5b7f4d8157063 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/HealthProbeEnabled.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/HealthProbeEnabled.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -13,12 +13,12 @@ */ public final class HealthProbeEnabled extends ExpandableStringEnum { /** - * Static value Enabled for HealthProbeEnabled. + * Enabled. */ public static final HealthProbeEnabled ENABLED = fromString("Enabled"); /** - * Static value Disabled for HealthProbeEnabled. + * Disabled. */ public static final HealthProbeEnabled DISABLED = fromString("Disabled"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/HealthProbeSettingsModel.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/HealthProbeSettingsModel.java index 0a2a60a60529e..cc9bfbb18126b 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/HealthProbeSettingsModel.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/HealthProbeSettingsModel.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -86,7 +86,9 @@ public HealthProbeSettingsModel withId(String id) { } /** - * Get the resourceState property: Resource status. + * Get the resourceState property: Resource status of the Front Door or Front Door SubResource. + * + * Resource status. * * @return the resourceState value. */ @@ -215,17 +217,6 @@ public HealthProbeSettingsModel withEnabledState(HealthProbeEnabled enabledState return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/HealthProbeSettingsUpdateParameters.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/HealthProbeSettingsUpdateParameters.java index 37fe51275a43f..57500d1d43d9c 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/HealthProbeSettingsUpdateParameters.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/HealthProbeSettingsUpdateParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -154,14 +154,6 @@ public HealthProbeSettingsUpdateParameters withEnabledState(HealthProbeEnabled e return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/KeyVaultCertificateSourceParametersVault.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/KeyVaultCertificateSourceParametersVault.java index 5ce5bca65d41a..334e462418af1 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/KeyVaultCertificateSourceParametersVault.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/KeyVaultCertificateSourceParametersVault.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -48,14 +48,6 @@ public KeyVaultCertificateSourceParametersVault withId(String id) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/LatencyMetric.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/LatencyMetric.java index e6720b6d12334..5082e8804adc8 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/LatencyMetric.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/LatencyMetric.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -69,7 +69,7 @@ public final class LatencyMetric implements JsonSerializable { /** * Creates an instance of LatencyMetric class. */ - public LatencyMetric() { + private LatencyMetric() { } /** @@ -162,14 +162,6 @@ public Float bUpper95CI() { return this.bUpper95CI; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/LatencyScorecard.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/LatencyScorecard.java index 8b966bcd38ace..9e2fa003fd024 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/LatencyScorecard.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/LatencyScorecard.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/LatencyScorecardAggregationInterval.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/LatencyScorecardAggregationInterval.java index 2f2d0f4f995a1..585d45e48f43f 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/LatencyScorecardAggregationInterval.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/LatencyScorecardAggregationInterval.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -13,17 +13,17 @@ public final class LatencyScorecardAggregationInterval extends ExpandableStringEnum { /** - * Static value Daily for LatencyScorecardAggregationInterval. + * Daily. */ public static final LatencyScorecardAggregationInterval DAILY = fromString("Daily"); /** - * Static value Weekly for LatencyScorecardAggregationInterval. + * Weekly. */ public static final LatencyScorecardAggregationInterval WEEKLY = fromString("Weekly"); /** - * Static value Monthly for LatencyScorecardAggregationInterval. + * Monthly. */ public static final LatencyScorecardAggregationInterval MONTHLY = fromString("Monthly"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/LoadBalancingSettingsModel.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/LoadBalancingSettingsModel.java index 37383e7109614..86c48b67d7ef2 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/LoadBalancingSettingsModel.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/LoadBalancingSettingsModel.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -86,7 +86,9 @@ public LoadBalancingSettingsModel withId(String id) { } /** - * Get the resourceState property: Resource status. + * Get the resourceState property: Resource status of the Front Door or Front Door SubResource. + * + * Resource status. * * @return the resourceState value. */ @@ -165,17 +167,6 @@ public LoadBalancingSettingsModel withAdditionalLatencyMilliseconds(Integer addi return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/LoadBalancingSettingsUpdateParameters.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/LoadBalancingSettingsUpdateParameters.java index f29c31a0c21b9..1a1ae9888a3d0 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/LoadBalancingSettingsUpdateParameters.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/LoadBalancingSettingsUpdateParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -100,14 +100,6 @@ public Integer additionalLatencyMilliseconds() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleDefinition.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleDefinition.java index 1c3433bb25920..b13893e739cb1 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleDefinition.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleDefinition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -31,15 +31,26 @@ public final class ManagedRuleDefinition implements JsonSerializable { /** - * Static value Disabled for ManagedRuleEnabledState. + * Disabled. */ public static final ManagedRuleEnabledState DISABLED = fromString("Disabled"); /** - * Static value Enabled for ManagedRuleEnabledState. + * Enabled. */ public static final ManagedRuleEnabledState ENABLED = fromString("Enabled"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleExclusion.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleExclusion.java index 00896a8712961..ed70d5228b43a 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleExclusion.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleExclusion.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -102,30 +101,6 @@ public ManagedRuleExclusion withSelector(String selector) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (matchVariable() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property matchVariable in model ManagedRuleExclusion")); - } - if (selectorMatchOperator() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property selectorMatchOperator in model ManagedRuleExclusion")); - } - if (selector() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property selector in model ManagedRuleExclusion")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ManagedRuleExclusion.class); - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleExclusionMatchVariable.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleExclusionMatchVariable.java index 96fd15eef62e2..f3c7c5dd95bf2 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleExclusionMatchVariable.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleExclusionMatchVariable.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,28 +12,28 @@ */ public final class ManagedRuleExclusionMatchVariable extends ExpandableStringEnum { /** - * Static value RequestHeaderNames for ManagedRuleExclusionMatchVariable. + * RequestHeaderNames. */ public static final ManagedRuleExclusionMatchVariable REQUEST_HEADER_NAMES = fromString("RequestHeaderNames"); /** - * Static value RequestCookieNames for ManagedRuleExclusionMatchVariable. + * RequestCookieNames. */ public static final ManagedRuleExclusionMatchVariable REQUEST_COOKIE_NAMES = fromString("RequestCookieNames"); /** - * Static value QueryStringArgNames for ManagedRuleExclusionMatchVariable. + * QueryStringArgNames. */ public static final ManagedRuleExclusionMatchVariable QUERY_STRING_ARG_NAMES = fromString("QueryStringArgNames"); /** - * Static value RequestBodyPostArgNames for ManagedRuleExclusionMatchVariable. + * RequestBodyPostArgNames. */ public static final ManagedRuleExclusionMatchVariable REQUEST_BODY_POST_ARG_NAMES = fromString("RequestBodyPostArgNames"); /** - * Static value RequestBodyJsonArgNames for ManagedRuleExclusionMatchVariable. + * RequestBodyJsonArgNames. */ public static final ManagedRuleExclusionMatchVariable REQUEST_BODY_JSON_ARG_NAMES = fromString("RequestBodyJsonArgNames"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleExclusionSelectorMatchOperator.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleExclusionSelectorMatchOperator.java index a7c402eaec1f2..d5ba448223596 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleExclusionSelectorMatchOperator.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleExclusionSelectorMatchOperator.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -14,27 +14,27 @@ public final class ManagedRuleExclusionSelectorMatchOperator extends ExpandableStringEnum { /** - * Static value Equals for ManagedRuleExclusionSelectorMatchOperator. + * Equals. */ public static final ManagedRuleExclusionSelectorMatchOperator EQUALS = fromString("Equals"); /** - * Static value Contains for ManagedRuleExclusionSelectorMatchOperator. + * Contains. */ public static final ManagedRuleExclusionSelectorMatchOperator CONTAINS = fromString("Contains"); /** - * Static value StartsWith for ManagedRuleExclusionSelectorMatchOperator. + * StartsWith. */ public static final ManagedRuleExclusionSelectorMatchOperator STARTS_WITH = fromString("StartsWith"); /** - * Static value EndsWith for ManagedRuleExclusionSelectorMatchOperator. + * EndsWith. */ public static final ManagedRuleExclusionSelectorMatchOperator ENDS_WITH = fromString("EndsWith"); /** - * Static value EqualsAny for ManagedRuleExclusionSelectorMatchOperator. + * EqualsAny. */ public static final ManagedRuleExclusionSelectorMatchOperator EQUALS_ANY = fromString("EqualsAny"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleGroupDefinition.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleGroupDefinition.java index ab4e826e725a4..0ff17075f9a34 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleGroupDefinition.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleGroupDefinition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -35,7 +35,7 @@ public final class ManagedRuleGroupDefinition implements JsonSerializable rules() { return this.rules; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (rules() != null) { - rules().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleGroupOverride.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleGroupOverride.java index fde398db560bb..c525a433a0b11 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleGroupOverride.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleGroupOverride.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -101,27 +100,6 @@ public ManagedRuleGroupOverride withRules(List rules) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (ruleGroupName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property ruleGroupName in model ManagedRuleGroupOverride")); - } - if (exclusions() != null) { - exclusions().forEach(e -> e.validate()); - } - if (rules() != null) { - rules().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ManagedRuleGroupOverride.class); - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleOverride.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleOverride.java index f02c26ea6b41b..414e28a4052fe 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleOverride.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleOverride.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -33,6 +32,11 @@ public final class ManagedRuleOverride implements JsonSerializable exclusions) return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (ruleId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property ruleId in model ManagedRuleOverride")); - } - if (exclusions() != null) { - exclusions().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ManagedRuleOverride.class); - /** * {@inheritDoc} */ @@ -152,6 +159,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("ruleId", this.ruleId); jsonWriter.writeStringField("enabledState", this.enabledState == null ? null : this.enabledState.toString()); jsonWriter.writeStringField("action", this.action == null ? null : this.action.toString()); + jsonWriter.writeStringField("sensitivity", this.sensitivity == null ? null : this.sensitivity.toString()); jsonWriter.writeArrayField("exclusions", this.exclusions, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -179,6 +187,8 @@ public static ManagedRuleOverride fromJson(JsonReader jsonReader) throws IOExcep = ManagedRuleEnabledState.fromString(reader.getString()); } else if ("action".equals(fieldName)) { deserializedManagedRuleOverride.action = ActionType.fromString(reader.getString()); + } else if ("sensitivity".equals(fieldName)) { + deserializedManagedRuleOverride.sensitivity = SensitivityType.fromString(reader.getString()); } else if ("exclusions".equals(fieldName)) { List exclusions = reader.readArray(reader1 -> ManagedRuleExclusion.fromJson(reader1)); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSet.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSet.java index 53f75fe947221..23d944603366f 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSet.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSet.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -29,6 +28,8 @@ public final class ManagedRuleSet implements JsonSerializable { private String ruleSetVersion; /* + * ruleSetAction + * * Defines the rule set action. */ private ManagedRuleSetActionType ruleSetAction; @@ -90,7 +91,9 @@ public ManagedRuleSet withRuleSetVersion(String ruleSetVersion) { } /** - * Get the ruleSetAction property: Defines the rule set action. + * Get the ruleSetAction property: ruleSetAction + * + * Defines the rule set action. * * @return the ruleSetAction value. */ @@ -99,7 +102,9 @@ public ManagedRuleSetActionType ruleSetAction() { } /** - * Set the ruleSetAction property: Defines the rule set action. + * Set the ruleSetAction property: ruleSetAction + * + * Defines the rule set action. * * @param ruleSetAction the ruleSetAction value to set. * @return the ManagedRuleSet object itself. @@ -149,30 +154,6 @@ public ManagedRuleSet withRuleGroupOverrides(List rule return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (ruleSetType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property ruleSetType in model ManagedRuleSet")); - } - if (ruleSetVersion() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property ruleSetVersion in model ManagedRuleSet")); - } - if (exclusions() != null) { - exclusions().forEach(e -> e.validate()); - } - if (ruleGroupOverrides() != null) { - ruleGroupOverrides().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ManagedRuleSet.class); - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSetActionType.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSetActionType.java index 11b4daac35d5a..3d609ca165bd1 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSetActionType.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSetActionType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,17 +12,17 @@ */ public final class ManagedRuleSetActionType extends ExpandableStringEnum { /** - * Static value Block for ManagedRuleSetActionType. + * Block. */ public static final ManagedRuleSetActionType BLOCK = fromString("Block"); /** - * Static value Log for ManagedRuleSetActionType. + * Log. */ public static final ManagedRuleSetActionType LOG = fromString("Log"); /** - * Static value Redirect for ManagedRuleSetActionType. + * Redirect. */ public static final ManagedRuleSetActionType REDIRECT = fromString("Redirect"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSetDefinition.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSetDefinition.java index 23988ee393d28..aff7c3087629e 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSetDefinition.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSetDefinition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -82,6 +82,21 @@ public interface ManagedRuleSetDefinition { */ List ruleGroups(); + /** + * Gets the displayName property: Human-readable display name for the managed rule set version (e.g., 'Default + * Ruleset 2.2 (Latest, Recommended)'). + * + * @return the displayName value. + */ + String displayName(); + + /** + * Gets the status property: Describes the lifecycle status of the managed rule set version. + * + * @return the status value. + */ + ManagedRuleSetStatus status(); + /** * Gets the inner com.azure.resourcemanager.frontdoor.fluent.models.ManagedRuleSetDefinitionInner object. * diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSetException.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSetException.java new file mode 100644 index 0000000000000..5720f31ba88d4 --- /dev/null +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSetException.java @@ -0,0 +1,246 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.frontdoor.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Excludes whole requests from managed rule evaluation according to match conditions. + */ +@Fluent +public final class ManagedRuleSetException implements JsonSerializable { + /* + * The variable to be evaluated for excluding the request. + */ + private ExceptionMatchVariable matchVariable; + + /* + * Comparison operator to apply to the selector when specifying which elements + * in the collection this exception applies to. + */ + private ExceptionSelectorMatchOperator selectorMatchOperator; + + /* + * When matchVariable is a collection, operator used to specify which elements + * in the collection this exception applies to. + * Currently supported only for RequestHeaderNames. + */ + private String selector; + + /* + * Comparison operator to apply to the value to be matched. + */ + private ExceptionValueMatchOperator valueMatchOperator; + + /* + * List of values to be matched with. + */ + private List matchValues; + + /* + * Scope(s) of the exception. + */ + private List scopes; + + /** + * Creates an instance of ManagedRuleSetException class. + */ + public ManagedRuleSetException() { + } + + /** + * Get the matchVariable property: The variable to be evaluated for excluding the request. + * + * @return the matchVariable value. + */ + public ExceptionMatchVariable matchVariable() { + return this.matchVariable; + } + + /** + * Set the matchVariable property: The variable to be evaluated for excluding the request. + * + * @param matchVariable the matchVariable value to set. + * @return the ManagedRuleSetException object itself. + */ + public ManagedRuleSetException withMatchVariable(ExceptionMatchVariable matchVariable) { + this.matchVariable = matchVariable; + return this; + } + + /** + * Get the selectorMatchOperator property: Comparison operator to apply to the selector when specifying which + * elements + * in the collection this exception applies to. + * + * @return the selectorMatchOperator value. + */ + public ExceptionSelectorMatchOperator selectorMatchOperator() { + return this.selectorMatchOperator; + } + + /** + * Set the selectorMatchOperator property: Comparison operator to apply to the selector when specifying which + * elements + * in the collection this exception applies to. + * + * @param selectorMatchOperator the selectorMatchOperator value to set. + * @return the ManagedRuleSetException object itself. + */ + public ManagedRuleSetException withSelectorMatchOperator(ExceptionSelectorMatchOperator selectorMatchOperator) { + this.selectorMatchOperator = selectorMatchOperator; + return this; + } + + /** + * Get the selector property: When matchVariable is a collection, operator used to specify which elements + * in the collection this exception applies to. + * Currently supported only for RequestHeaderNames. + * + * @return the selector value. + */ + public String selector() { + return this.selector; + } + + /** + * Set the selector property: When matchVariable is a collection, operator used to specify which elements + * in the collection this exception applies to. + * Currently supported only for RequestHeaderNames. + * + * @param selector the selector value to set. + * @return the ManagedRuleSetException object itself. + */ + public ManagedRuleSetException withSelector(String selector) { + this.selector = selector; + return this; + } + + /** + * Get the valueMatchOperator property: Comparison operator to apply to the value to be matched. + * + * @return the valueMatchOperator value. + */ + public ExceptionValueMatchOperator valueMatchOperator() { + return this.valueMatchOperator; + } + + /** + * Set the valueMatchOperator property: Comparison operator to apply to the value to be matched. + * + * @param valueMatchOperator the valueMatchOperator value to set. + * @return the ManagedRuleSetException object itself. + */ + public ManagedRuleSetException withValueMatchOperator(ExceptionValueMatchOperator valueMatchOperator) { + this.valueMatchOperator = valueMatchOperator; + return this; + } + + /** + * Get the matchValues property: List of values to be matched with. + * + * @return the matchValues value. + */ + public List matchValues() { + return this.matchValues; + } + + /** + * Set the matchValues property: List of values to be matched with. + * + * @param matchValues the matchValues value to set. + * @return the ManagedRuleSetException object itself. + */ + public ManagedRuleSetException withMatchValues(List matchValues) { + this.matchValues = matchValues; + return this; + } + + /** + * Get the scopes property: Scope(s) of the exception. + * + * @return the scopes value. + */ + public List scopes() { + return this.scopes; + } + + /** + * Set the scopes property: Scope(s) of the exception. + * + * @param scopes the scopes value to set. + * @return the ManagedRuleSetException object itself. + */ + public ManagedRuleSetException withScopes(List scopes) { + this.scopes = scopes; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("matchVariable", this.matchVariable == null ? null : this.matchVariable.toString()); + jsonWriter.writeStringField("valueMatchOperator", + this.valueMatchOperator == null ? null : this.valueMatchOperator.toString()); + jsonWriter.writeArrayField("matchValues", this.matchValues, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("scopes", this.scopes, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("selectorMatchOperator", + this.selectorMatchOperator == null ? null : this.selectorMatchOperator.toString()); + jsonWriter.writeStringField("selector", this.selector); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedRuleSetException from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedRuleSetException if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedRuleSetException. + */ + public static ManagedRuleSetException fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedRuleSetException deserializedManagedRuleSetException = new ManagedRuleSetException(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("matchVariable".equals(fieldName)) { + deserializedManagedRuleSetException.matchVariable + = ExceptionMatchVariable.fromString(reader.getString()); + } else if ("valueMatchOperator".equals(fieldName)) { + deserializedManagedRuleSetException.valueMatchOperator + = ExceptionValueMatchOperator.fromString(reader.getString()); + } else if ("matchValues".equals(fieldName)) { + List matchValues = reader.readArray(reader1 -> reader1.getString()); + deserializedManagedRuleSetException.matchValues = matchValues; + } else if ("scopes".equals(fieldName)) { + List scopes + = reader.readArray(reader1 -> ManagedRuleSetScope.fromJson(reader1)); + deserializedManagedRuleSetException.scopes = scopes; + } else if ("selectorMatchOperator".equals(fieldName)) { + deserializedManagedRuleSetException.selectorMatchOperator + = ExceptionSelectorMatchOperator.fromString(reader.getString()); + } else if ("selector".equals(fieldName)) { + deserializedManagedRuleSetException.selector = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedRuleSetException; + }); + } +} diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSetExceptionList.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSetExceptionList.java new file mode 100644 index 0000000000000..14c2483a4f6f0 --- /dev/null +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSetExceptionList.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.frontdoor.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Defines the list of exceptions for the managed rule sets. + */ +@Fluent +public final class ManagedRuleSetExceptionList implements JsonSerializable { + /* + * List of exceptions. + */ + private List exceptions; + + /** + * Creates an instance of ManagedRuleSetExceptionList class. + */ + public ManagedRuleSetExceptionList() { + } + + /** + * Get the exceptions property: List of exceptions. + * + * @return the exceptions value. + */ + public List exceptions() { + return this.exceptions; + } + + /** + * Set the exceptions property: List of exceptions. + * + * @param exceptions the exceptions value to set. + * @return the ManagedRuleSetExceptionList object itself. + */ + public ManagedRuleSetExceptionList withExceptions(List exceptions) { + this.exceptions = exceptions; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("exceptions", this.exceptions, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedRuleSetExceptionList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedRuleSetExceptionList if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedRuleSetExceptionList. + */ + public static ManagedRuleSetExceptionList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedRuleSetExceptionList deserializedManagedRuleSetExceptionList = new ManagedRuleSetExceptionList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("exceptions".equals(fieldName)) { + List exceptions + = reader.readArray(reader1 -> ManagedRuleSetException.fromJson(reader1)); + deserializedManagedRuleSetExceptionList.exceptions = exceptions; + } else { + reader.skipChildren(); + } + } + + return deserializedManagedRuleSetExceptionList; + }); + } +} diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSetList.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSetList.java index abe8a354f8a56..c477fea14b980 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSetList.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSetList.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -22,6 +22,11 @@ public final class ManagedRuleSetList implements JsonSerializable managedRuleSets; + /* + * List of exceptions applied on the managed rule sets. + */ + private ManagedRuleSetExceptionList exceptionsList; + /** * Creates an instance of ManagedRuleSetList class. */ @@ -49,14 +54,23 @@ public ManagedRuleSetList withManagedRuleSets(List managedRuleSe } /** - * Validates the instance. + * Get the exceptionsList property: List of exceptions applied on the managed rule sets. + * + * @return the exceptionsList value. + */ + public ManagedRuleSetExceptionList exceptionsList() { + return this.exceptionsList; + } + + /** + * Set the exceptionsList property: List of exceptions applied on the managed rule sets. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param exceptionsList the exceptionsList value to set. + * @return the ManagedRuleSetList object itself. */ - public void validate() { - if (managedRuleSets() != null) { - managedRuleSets().forEach(e -> e.validate()); - } + public ManagedRuleSetList withExceptionsList(ManagedRuleSetExceptionList exceptionsList) { + this.exceptionsList = exceptionsList; + return this; } /** @@ -67,6 +81,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("managedRuleSets", this.managedRuleSets, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("exceptionsList", this.exceptionsList); return jsonWriter.writeEndObject(); } @@ -89,6 +104,8 @@ public static ManagedRuleSetList fromJson(JsonReader jsonReader) throws IOExcept List managedRuleSets = reader.readArray(reader1 -> ManagedRuleSet.fromJson(reader1)); deserializedManagedRuleSetList.managedRuleSets = managedRuleSets; + } else if ("exceptionsList".equals(fieldName)) { + deserializedManagedRuleSetList.exceptionsList = ManagedRuleSetExceptionList.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSetScope.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSetScope.java new file mode 100644 index 0000000000000..19e37d9178893 --- /dev/null +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSetScope.java @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.frontdoor.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Defines the scope of the managed rules. + */ +@Fluent +public final class ManagedRuleSetScope implements JsonSerializable { + /* + * Defines the rule set type. + * Examples: DefaultRuleSet, Microsoft_DefaultRuleSet, + * Microsoft_BotManagerRuleSet, Microsoft_HTTPDDoSRuleSet, BotProtection + */ + private String ruleSetType; + + /* + * Defines the version of the rule set. + */ + private String ruleSetVersion; + + /* + * List of rule group scopes. + */ + private List ruleGroupScopes; + + /** + * Creates an instance of ManagedRuleSetScope class. + */ + public ManagedRuleSetScope() { + } + + /** + * Get the ruleSetType property: Defines the rule set type. + * Examples: DefaultRuleSet, Microsoft_DefaultRuleSet, + * Microsoft_BotManagerRuleSet, Microsoft_HTTPDDoSRuleSet, BotProtection. + * + * @return the ruleSetType value. + */ + public String ruleSetType() { + return this.ruleSetType; + } + + /** + * Set the ruleSetType property: Defines the rule set type. + * Examples: DefaultRuleSet, Microsoft_DefaultRuleSet, + * Microsoft_BotManagerRuleSet, Microsoft_HTTPDDoSRuleSet, BotProtection. + * + * @param ruleSetType the ruleSetType value to set. + * @return the ManagedRuleSetScope object itself. + */ + public ManagedRuleSetScope withRuleSetType(String ruleSetType) { + this.ruleSetType = ruleSetType; + return this; + } + + /** + * Get the ruleSetVersion property: Defines the version of the rule set. + * + * @return the ruleSetVersion value. + */ + public String ruleSetVersion() { + return this.ruleSetVersion; + } + + /** + * Set the ruleSetVersion property: Defines the version of the rule set. + * + * @param ruleSetVersion the ruleSetVersion value to set. + * @return the ManagedRuleSetScope object itself. + */ + public ManagedRuleSetScope withRuleSetVersion(String ruleSetVersion) { + this.ruleSetVersion = ruleSetVersion; + return this; + } + + /** + * Get the ruleGroupScopes property: List of rule group scopes. + * + * @return the ruleGroupScopes value. + */ + public List ruleGroupScopes() { + return this.ruleGroupScopes; + } + + /** + * Set the ruleGroupScopes property: List of rule group scopes. + * + * @param ruleGroupScopes the ruleGroupScopes value to set. + * @return the ManagedRuleSetScope object itself. + */ + public ManagedRuleSetScope withRuleGroupScopes(List ruleGroupScopes) { + this.ruleGroupScopes = ruleGroupScopes; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("ruleSetType", this.ruleSetType); + jsonWriter.writeStringField("ruleSetVersion", this.ruleSetVersion); + jsonWriter.writeArrayField("ruleGroupScopes", this.ruleGroupScopes, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedRuleSetScope from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedRuleSetScope if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedRuleSetScope. + */ + public static ManagedRuleSetScope fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedRuleSetScope deserializedManagedRuleSetScope = new ManagedRuleSetScope(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ruleSetType".equals(fieldName)) { + deserializedManagedRuleSetScope.ruleSetType = reader.getString(); + } else if ("ruleSetVersion".equals(fieldName)) { + deserializedManagedRuleSetScope.ruleSetVersion = reader.getString(); + } else if ("ruleGroupScopes".equals(fieldName)) { + List ruleGroupScopes + = reader.readArray(reader1 -> RuleGroupScope.fromJson(reader1)); + deserializedManagedRuleSetScope.ruleGroupScopes = ruleGroupScopes; + } else { + reader.skipChildren(); + } + } + + return deserializedManagedRuleSetScope; + }); + } +} diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSetStatus.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSetStatus.java new file mode 100644 index 0000000000000..fb0cafcfcdc2f --- /dev/null +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSetStatus.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.frontdoor.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Status of a managed rule set. + */ +public final class ManagedRuleSetStatus extends ExpandableStringEnum { + /** + * The managed rule set is in preview. + */ + public static final ManagedRuleSetStatus PREVIEW = fromString("Preview"); + + /** + * The managed rule set is generally available. + */ + public static final ManagedRuleSetStatus GA = fromString("GA"); + + /** + * The managed rule set is deprecated. + */ + public static final ManagedRuleSetStatus DEPRECATED = fromString("Deprecated"); + + /** + * The managed rule set is supported. + */ + public static final ManagedRuleSetStatus SUPPORTED = fromString("Supported"); + + /** + * Creates a new instance of ManagedRuleSetStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ManagedRuleSetStatus() { + } + + /** + * Creates or finds a ManagedRuleSetStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding ManagedRuleSetStatus. + */ + public static ManagedRuleSetStatus fromString(String name) { + return fromString(name, ManagedRuleSetStatus.class); + } + + /** + * Gets known ManagedRuleSetStatus values. + * + * @return known ManagedRuleSetStatus values. + */ + public static Collection values() { + return values(ManagedRuleSetStatus.class); + } +} diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSets.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSets.java index edd55cb86a612..281ef21873d81 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSets.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSets.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/MatchCondition.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/MatchCondition.java index 6e89bb54533d9..182a9af4ba4da 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/MatchCondition.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/MatchCondition.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -176,28 +175,6 @@ public MatchCondition withTransforms(List transforms) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (matchVariable() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property matchVariable in model MatchCondition")); - } - if (operator() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property operator in model MatchCondition")); - } - if (matchValue() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property matchValue in model MatchCondition")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MatchCondition.class); - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/MatchProcessingBehavior.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/MatchProcessingBehavior.java index 130829b3aa3c1..4e6396b0ce29e 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/MatchProcessingBehavior.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/MatchProcessingBehavior.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -13,12 +13,12 @@ */ public final class MatchProcessingBehavior extends ExpandableStringEnum { /** - * Static value Continue for MatchProcessingBehavior. + * Continue. */ public static final MatchProcessingBehavior CONTINUE = fromString("Continue"); /** - * Static value Stop for MatchProcessingBehavior. + * Stop. */ public static final MatchProcessingBehavior STOP = fromString("Stop"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/MatchVariable.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/MatchVariable.java index 9d96c113a49a7..484e09502cf90 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/MatchVariable.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/MatchVariable.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,50 +12,55 @@ */ public final class MatchVariable extends ExpandableStringEnum { /** - * Static value RemoteAddr for MatchVariable. + * RemoteAddr. */ public static final MatchVariable REMOTE_ADDR = fromString("RemoteAddr"); /** - * Static value RequestMethod for MatchVariable. + * RequestMethod. */ public static final MatchVariable REQUEST_METHOD = fromString("RequestMethod"); /** - * Static value QueryString for MatchVariable. + * QueryString. */ public static final MatchVariable QUERY_STRING = fromString("QueryString"); /** - * Static value PostArgs for MatchVariable. + * PostArgs. */ public static final MatchVariable POST_ARGS = fromString("PostArgs"); /** - * Static value RequestUri for MatchVariable. + * RequestUri. */ public static final MatchVariable REQUEST_URI = fromString("RequestUri"); /** - * Static value RequestHeader for MatchVariable. + * RequestHeader. */ public static final MatchVariable REQUEST_HEADER = fromString("RequestHeader"); /** - * Static value RequestBody for MatchVariable. + * RequestBody. */ public static final MatchVariable REQUEST_BODY = fromString("RequestBody"); /** - * Static value Cookies for MatchVariable. + * Cookies. */ public static final MatchVariable COOKIES = fromString("Cookies"); /** - * Static value SocketAddr for MatchVariable. + * SocketAddr. */ public static final MatchVariable SOCKET_ADDR = fromString("SocketAddr"); + /** + * JA4 Match Variable. + */ + public static final MatchVariable JA4 = fromString("JA4"); + /** * Creates a new instance of MatchVariable value. * diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/MinimumTlsVersion.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/MinimumTlsVersion.java index 95b43731b616a..29424de9a159c 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/MinimumTlsVersion.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/MinimumTlsVersion.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,12 +12,12 @@ */ public final class MinimumTlsVersion extends ExpandableStringEnum { /** - * Static value 1.0 for MinimumTlsVersion. + * 1.0. */ public static final MinimumTlsVersion ONE_ZERO = fromString("1.0"); /** - * Static value 1.2 for MinimumTlsVersion. + * 1.2. */ public static final MinimumTlsVersion ONE_TWO = fromString("1.2"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/NetworkExperimentProfiles.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/NetworkExperimentProfiles.java index 76f31b27f0a93..0400f61de3e07 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/NetworkExperimentProfiles.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/NetworkExperimentProfiles.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -13,99 +13,99 @@ */ public interface NetworkExperimentProfiles { /** - * Gets a list of Network Experiment Profiles under a subscription. + * Gets an NetworkExperiment Profile by ProfileName. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The Profile identifier associated with the Tenant and Partner. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Network Experiment Profiles under a subscription as paginated response with - * {@link PagedIterable}. + * @return an NetworkExperiment Profile by ProfileName along with {@link Response}. */ - PagedIterable list(); + Response getByResourceGroupWithResponse(String resourceGroupName, String profileName, Context context); /** - * Gets a list of Network Experiment Profiles under a subscription. + * Gets an NetworkExperiment Profile by ProfileName. * - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The Profile identifier associated with the Tenant and Partner. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Network Experiment Profiles under a subscription as paginated response with - * {@link PagedIterable}. + * @return an NetworkExperiment Profile by ProfileName. */ - PagedIterable list(Context context); + Profile getByResourceGroup(String resourceGroupName, String profileName); /** - * Gets a list of Network Experiment Profiles within a resource group under a subscription. + * Deletes an NetworkExperiment Profile by ProfileName. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The Profile identifier associated with the Tenant and Partner. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Network Experiment Profiles within a resource group under a subscription as paginated response - * with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + void deleteByResourceGroup(String resourceGroupName, String profileName); /** - * Gets a list of Network Experiment Profiles within a resource group under a subscription. + * Deletes an NetworkExperiment Profile by ProfileName. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The Profile identifier associated with the Tenant and Partner. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Network Experiment Profiles within a resource group under a subscription as paginated response - * with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); + void delete(String resourceGroupName, String profileName, Context context); /** - * Gets an NetworkExperiment Profile by ProfileName. + * Gets a list of Network Experiment Profiles within a resource group under a subscription. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName The Profile identifier associated with the Tenant and Partner. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an NetworkExperiment Profile by ProfileName along with {@link Response}. + * @return a list of Network Experiment Profiles within a resource group under a subscription as paginated response + * with {@link PagedIterable}. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String profileName, Context context); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Gets an NetworkExperiment Profile by ProfileName. + * Gets a list of Network Experiment Profiles within a resource group under a subscription. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName The Profile identifier associated with the Tenant and Partner. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an NetworkExperiment Profile by ProfileName. + * @return a list of Network Experiment Profiles within a resource group under a subscription as paginated response + * with {@link PagedIterable}. */ - Profile getByResourceGroup(String resourceGroupName, String profileName); + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Deletes an NetworkExperiment Profile by ProfileName. + * Gets a list of Network Experiment Profiles under a subscription. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName The Profile identifier associated with the Tenant and Partner. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Network Experiment Profiles under a subscription as paginated response with + * {@link PagedIterable}. */ - void deleteByResourceGroup(String resourceGroupName, String profileName); + PagedIterable list(); /** - * Deletes an NetworkExperiment Profile by ProfileName. + * Gets a list of Network Experiment Profiles under a subscription. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName The Profile identifier associated with the Tenant and Partner. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Network Experiment Profiles under a subscription as paginated response with + * {@link PagedIterable}. */ - void delete(String resourceGroupName, String profileName, Context context); + PagedIterable list(Context context); /** * Gets an NetworkExperiment Profile by ProfileName. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/NetworkExperimentResourceState.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/NetworkExperimentResourceState.java index 71b6e3f4b3eef..b5d9ded5c2e5f 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/NetworkExperimentResourceState.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/NetworkExperimentResourceState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,32 +12,32 @@ */ public final class NetworkExperimentResourceState extends ExpandableStringEnum { /** - * Static value Creating for NetworkExperimentResourceState. + * Creating. */ public static final NetworkExperimentResourceState CREATING = fromString("Creating"); /** - * Static value Enabling for NetworkExperimentResourceState. + * Enabling. */ public static final NetworkExperimentResourceState ENABLING = fromString("Enabling"); /** - * Static value Enabled for NetworkExperimentResourceState. + * Enabled. */ public static final NetworkExperimentResourceState ENABLED = fromString("Enabled"); /** - * Static value Disabling for NetworkExperimentResourceState. + * Disabling. */ public static final NetworkExperimentResourceState DISABLING = fromString("Disabling"); /** - * Static value Disabled for NetworkExperimentResourceState. + * Disabled. */ public static final NetworkExperimentResourceState DISABLED = fromString("Disabled"); /** - * Static value Deleting for NetworkExperimentResourceState. + * Deleting. */ public static final NetworkExperimentResourceState DELETING = fromString("Deleting"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Operator.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Operator.java index 300de71be1d2d..14df65d16b2ff 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Operator.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Operator.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,65 +12,80 @@ */ public final class Operator extends ExpandableStringEnum { /** - * Static value Any for Operator. + * Any. */ public static final Operator ANY = fromString("Any"); /** - * Static value IPMatch for Operator. + * IPMatch. */ public static final Operator IPMATCH = fromString("IPMatch"); /** - * Static value GeoMatch for Operator. + * GeoMatch. */ public static final Operator GEO_MATCH = fromString("GeoMatch"); /** - * Static value Equal for Operator. + * Equal. */ public static final Operator EQUAL = fromString("Equal"); /** - * Static value Contains for Operator. + * Contains. */ public static final Operator CONTAINS = fromString("Contains"); /** - * Static value LessThan for Operator. + * LessThan. */ public static final Operator LESS_THAN = fromString("LessThan"); /** - * Static value GreaterThan for Operator. + * GreaterThan. */ public static final Operator GREATER_THAN = fromString("GreaterThan"); /** - * Static value LessThanOrEqual for Operator. + * LessThanOrEqual. */ public static final Operator LESS_THAN_OR_EQUAL = fromString("LessThanOrEqual"); /** - * Static value GreaterThanOrEqual for Operator. + * GreaterThanOrEqual. */ public static final Operator GREATER_THAN_OR_EQUAL = fromString("GreaterThanOrEqual"); /** - * Static value BeginsWith for Operator. + * BeginsWith. */ public static final Operator BEGINS_WITH = fromString("BeginsWith"); /** - * Static value EndsWith for Operator. + * EndsWith. */ public static final Operator ENDS_WITH = fromString("EndsWith"); /** - * Static value RegEx for Operator. + * RegEx. */ public static final Operator REG_EX = fromString("RegEx"); + /** + * ServiceTagMatch. + */ + public static final Operator SERVICE_TAG_MATCH = fromString("ServiceTagMatch"); + + /** + * Autonomous System Number Match Operator. + */ + public static final Operator ASN_MATCH = fromString("AsnMatch"); + + /** + * Client Finger print Operator. + */ + public static final Operator CLIENT_FINGERPRINT = fromString("ClientFingerprint"); + /** * Creates a new instance of Operator value. * diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ParanoiaLevel.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ParanoiaLevel.java new file mode 100644 index 0000000000000..af8b4c9a3ebcb --- /dev/null +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ParanoiaLevel.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.frontdoor.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * OWASP CRS paranoia level of a managed rule. Applicable only for DRS rules. + */ +public final class ParanoiaLevel extends ExpandableStringEnum { + /** + * Paranoia level 1. + */ + public static final ParanoiaLevel PL1 = fromString("PL1"); + + /** + * Paranoia level 2. + */ + public static final ParanoiaLevel PL2 = fromString("PL2"); + + /** + * Paranoia level 3. + */ + public static final ParanoiaLevel PL3 = fromString("PL3"); + + /** + * Paranoia level 4. + */ + public static final ParanoiaLevel PL4 = fromString("PL4"); + + /** + * Creates a new instance of ParanoiaLevel value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ParanoiaLevel() { + } + + /** + * Creates or finds a ParanoiaLevel from its string representation. + * + * @param name a name to look for. + * @return the corresponding ParanoiaLevel. + */ + public static ParanoiaLevel fromString(String name) { + return fromString(name, ParanoiaLevel.class); + } + + /** + * Gets known ParanoiaLevel values. + * + * @return known ParanoiaLevel values. + */ + public static Collection values() { + return values(ParanoiaLevel.class); + } +} diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Policies.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Policies.java index 7803cb1aaa5ce..4a14e55774418 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Policies.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Policies.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -13,96 +13,96 @@ */ public interface Policies { /** - * Lists all of the protection policies within a resource group. + * Retrieve protection policy with specified name within a resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param policyName The name of the Web Application Firewall Policy. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines a list of WebApplicationFirewallPolicies as paginated response with {@link PagedIterable}. + * @return defines web application firewall policy along with {@link Response}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + Response getByResourceGroupWithResponse(String resourceGroupName, String policyName, + Context context); /** - * Lists all of the protection policies within a resource group. + * Retrieve protection policy with specified name within a resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param policyName The name of the Web Application Firewall Policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines a list of WebApplicationFirewallPolicies as paginated response with {@link PagedIterable}. + * @return defines web application firewall policy. */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); + WebApplicationFirewallPolicy getByResourceGroup(String resourceGroupName, String policyName); /** - * Lists all of the protection policies within a subscription. + * Deletes Policy. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param policyName The name of the Web Application Firewall Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines a list of WebApplicationFirewallPolicies as paginated response with {@link PagedIterable}. */ - PagedIterable list(); + void deleteByResourceGroup(String resourceGroupName, String policyName); /** - * Lists all of the protection policies within a subscription. + * Deletes Policy. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param policyName The name of the Web Application Firewall Policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines a list of WebApplicationFirewallPolicies as paginated response with {@link PagedIterable}. */ - PagedIterable list(Context context); + void delete(String resourceGroupName, String policyName, Context context); /** - * Retrieve protection policy with specified name within a resource group. + * Lists all of the protection policies within a resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param policyName The name of the Web Application Firewall Policy. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines web application firewall policy along with {@link Response}. + * @return defines a list of WebApplicationFirewallPolicies as paginated response with {@link PagedIterable}. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String policyName, - Context context); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Retrieve protection policy with specified name within a resource group. + * Lists all of the protection policies within a resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param policyName The name of the Web Application Firewall Policy. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines web application firewall policy. + * @return defines a list of WebApplicationFirewallPolicies as paginated response with {@link PagedIterable}. */ - WebApplicationFirewallPolicy getByResourceGroup(String resourceGroupName, String policyName); + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Deletes Policy. + * Lists all of the protection policies within a subscription. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param policyName The name of the Web Application Firewall Policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines a list of WebApplicationFirewallPolicies as paginated response with {@link PagedIterable}. */ - void deleteByResourceGroup(String resourceGroupName, String policyName); + PagedIterable list(); /** - * Deletes Policy. + * Lists all of the protection policies within a subscription. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param policyName The name of the Web Application Firewall Policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines a list of WebApplicationFirewallPolicies as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String policyName, Context context); + PagedIterable list(Context context); /** * Retrieve protection policy with specified name within a resource group. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/PolicyEnabledState.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/PolicyEnabledState.java index 5d9d86d733321..9bb764f037191 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/PolicyEnabledState.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/PolicyEnabledState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,12 +12,12 @@ */ public final class PolicyEnabledState extends ExpandableStringEnum { /** - * Static value Disabled for PolicyEnabledState. + * Disabled. */ public static final PolicyEnabledState DISABLED = fromString("Disabled"); /** - * Static value Enabled for PolicyEnabledState. + * Enabled. */ public static final PolicyEnabledState ENABLED = fromString("Enabled"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/PolicyMode.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/PolicyMode.java index f0d610ea21a2b..91a74af7617b8 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/PolicyMode.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/PolicyMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,12 +12,12 @@ */ public final class PolicyMode extends ExpandableStringEnum { /** - * Static value Prevention for PolicyMode. + * Prevention. */ public static final PolicyMode PREVENTION = fromString("Prevention"); /** - * Static value Detection for PolicyMode. + * Detection. */ public static final PolicyMode DETECTION = fromString("Detection"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/PolicyRequestBodyCheck.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/PolicyRequestBodyCheck.java index aa163d55353b9..69393c19f21b0 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/PolicyRequestBodyCheck.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/PolicyRequestBodyCheck.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,12 +12,12 @@ */ public final class PolicyRequestBodyCheck extends ExpandableStringEnum { /** - * Static value Disabled for PolicyRequestBodyCheck. + * Disabled. */ public static final PolicyRequestBodyCheck DISABLED = fromString("Disabled"); /** - * Static value Enabled for PolicyRequestBodyCheck. + * Enabled. */ public static final PolicyRequestBodyCheck ENABLED = fromString("Enabled"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/PolicyResourceState.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/PolicyResourceState.java index a2e5c6bfd4d14..240c444980a60 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/PolicyResourceState.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/PolicyResourceState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,32 +12,32 @@ */ public final class PolicyResourceState extends ExpandableStringEnum { /** - * Static value Creating for PolicyResourceState. + * Creating. */ public static final PolicyResourceState CREATING = fromString("Creating"); /** - * Static value Enabling for PolicyResourceState. + * Enabling. */ public static final PolicyResourceState ENABLING = fromString("Enabling"); /** - * Static value Enabled for PolicyResourceState. + * Enabled. */ public static final PolicyResourceState ENABLED = fromString("Enabled"); /** - * Static value Disabling for PolicyResourceState. + * Disabling. */ public static final PolicyResourceState DISABLING = fromString("Disabling"); /** - * Static value Disabled for PolicyResourceState. + * Disabled. */ public static final PolicyResourceState DISABLED = fromString("Disabled"); /** - * Static value Deleting for PolicyResourceState. + * Deleting. */ public static final PolicyResourceState DELETING = fromString("Deleting"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/PolicySettings.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/PolicySettings.java index cd549db4b9106..0060f58cec14a 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/PolicySettings.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/PolicySettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -55,6 +55,12 @@ public final class PolicySettings implements JsonSerializable { */ private Integer javascriptChallengeExpirationInMinutes; + /* + * Defines the Captcha cookie validity lifetime in minutes. This setting is only applicable to + * Premium_AzureFrontDoor. Value must be an integer between 5 and 1440 with the default value being 30. + */ + private Integer captchaExpirationInMinutes; + /* * Defines rules that scrub sensitive fields in the Web Application Firewall logs. */ @@ -216,6 +222,30 @@ public PolicySettings withJavascriptChallengeExpirationInMinutes(Integer javascr return this; } + /** + * Get the captchaExpirationInMinutes property: Defines the Captcha cookie validity lifetime in minutes. This + * setting is only applicable to Premium_AzureFrontDoor. Value must be an integer between 5 and 1440 with the + * default value being 30. + * + * @return the captchaExpirationInMinutes value. + */ + public Integer captchaExpirationInMinutes() { + return this.captchaExpirationInMinutes; + } + + /** + * Set the captchaExpirationInMinutes property: Defines the Captcha cookie validity lifetime in minutes. This + * setting is only applicable to Premium_AzureFrontDoor. Value must be an integer between 5 and 1440 with the + * default value being 30. + * + * @param captchaExpirationInMinutes the captchaExpirationInMinutes value to set. + * @return the PolicySettings object itself. + */ + public PolicySettings withCaptchaExpirationInMinutes(Integer captchaExpirationInMinutes) { + this.captchaExpirationInMinutes = captchaExpirationInMinutes; + return this; + } + /** * Get the innerLogScrubbing property: Defines rules that scrub sensitive fields in the Web Application Firewall * logs. @@ -272,17 +302,6 @@ public PolicySettings withScrubbingRules(List { /** - * Static value Pending for PrivateEndpointStatus. + * Pending. */ public static final PrivateEndpointStatus PENDING = fromString("Pending"); /** - * Static value Approved for PrivateEndpointStatus. + * Approved. */ public static final PrivateEndpointStatus APPROVED = fromString("Approved"); /** - * Static value Rejected for PrivateEndpointStatus. + * Rejected. */ public static final PrivateEndpointStatus REJECTED = fromString("Rejected"); /** - * Static value Disconnected for PrivateEndpointStatus. + * Disconnected. */ public static final PrivateEndpointStatus DISCONNECTED = fromString("Disconnected"); /** - * Static value Timeout for PrivateEndpointStatus. + * Timeout. */ public static final PrivateEndpointStatus TIMEOUT = fromString("Timeout"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Profile.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Profile.java index 1a0499e5de50c..8f2147de1286a 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Profile.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Profile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -14,28 +14,28 @@ */ public interface Profile { /** - * Gets the id property: Fully qualified resource Id for the resource. + * Gets the id property: Resource ID. * * @return the id value. */ String id(); /** - * Gets the name property: The name of the resource. + * Gets the name property: Resource name. * * @return the name value. */ String name(); /** - * Gets the type property: The type of the resource. + * Gets the type property: Resource type. * * @return the type value. */ String type(); /** - * Gets the location property: The geo-location where the resource lives. + * Gets the location property: Resource location. * * @return the location value. */ @@ -100,8 +100,8 @@ public interface Profile { /** * The entirety of the Profile definition. */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } /** @@ -111,28 +111,7 @@ interface DefinitionStages { /** * The first stage of the Profile definition. */ - interface Blank extends WithLocation { - } - - /** - * The stage of the Profile definition allowing to specify location. - */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(String location); + interface Blank extends WithResourceGroup { } /** @@ -142,7 +121,7 @@ interface WithResourceGroup { /** * Specifies resourceGroupName. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ WithCreate withExistingResourceGroup(String resourceGroupName); @@ -152,8 +131,8 @@ interface WithResourceGroup { * The stage of the Profile definition which contains all the minimum required properties for the resource to be * created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithTags, DefinitionStages.WithEtag, DefinitionStages.WithEnabledState { + interface WithCreate extends DefinitionStages.WithLocation, DefinitionStages.WithTags, + DefinitionStages.WithEtag, DefinitionStages.WithEnabledState { /** * Executes the create request. * @@ -170,6 +149,27 @@ interface WithCreate Profile create(Context context); } + /** + * The stage of the Profile definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location Resource location. + * @return the next definition stage. + */ + WithCreate withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location Resource location. + * @return the next definition stage. + */ + WithCreate withRegion(String location); + } + /** * The stage of the Profile definition allowing to specify tags. */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ProfileUpdateModel.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ProfileUpdateModel.java index 6d38832c600b4..4dbd1d34c4f89 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ProfileUpdateModel.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ProfileUpdateModel.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -86,17 +86,6 @@ public ProfileUpdateModel withEnabledState(State enabledState) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/PurgeParameters.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/PurgeParameters.java index 8f8e5257d5d2d..58b8ab6cbec7b 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/PurgeParameters.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/PurgeParameters.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -51,20 +50,6 @@ public PurgeParameters withContentPaths(List contentPaths) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (contentPaths() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property contentPaths in model PurgeParameters")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(PurgeParameters.class); - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RedirectConfiguration.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RedirectConfiguration.java index 26ad96dcf6dbf..f9d7198d89b12 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RedirectConfiguration.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RedirectConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -200,15 +200,6 @@ public RedirectConfiguration withCustomQueryString(String customQueryString) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Reports.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Reports.java index 79eb20f842407..dd4a00b23ec00 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Reports.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Reports.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -15,7 +15,7 @@ public interface Reports { /** * Gets a Latency Scorecard for a given Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param aggregationInterval The aggregation interval of the Latency Scorecard. @@ -35,7 +35,7 @@ Response getLatencyScorecardsWithResponse(String resourceGroup /** * Gets a Latency Scorecard for a given Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param aggregationInterval The aggregation interval of the Latency Scorecard. @@ -50,7 +50,7 @@ LatencyScorecard getLatencyScorecards(String resourceGroupName, String profileNa /** * Gets a Timeseries for a given Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param startDateTimeUtc The start DateTime of the Timeseries in UTC. @@ -74,7 +74,7 @@ Response getTimeseriesWithResponse(String resourceGroupName, String /** * Gets a Timeseries for a given Experiment. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The Profile identifier associated with the Tenant and Partner. * @param experimentName The Experiment identifier associated with the Experiment. * @param startDateTimeUtc The start DateTime of the Timeseries in UTC. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ResourceType.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ResourceType.java index 6a34497dbc91e..6461432c3540b 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ResourceType.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ResourceType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -9,12 +9,12 @@ */ public enum ResourceType { /** - * Enum value Microsoft.Network/frontDoors. + * Microsoft.Network/frontDoors. */ MICROSOFT_NETWORK_FRONT_DOORS("Microsoft.Network/frontDoors"), /** - * Enum value Microsoft.Network/frontDoors/frontendEndpoints. + * Microsoft.Network/frontDoors/frontendEndpoints. */ MICROSOFT_NETWORK_FRONT_DOORS_FRONTEND_ENDPOINTS("Microsoft.Network/frontDoors/frontendEndpoints"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ResourcewithSettableName.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ResourcewithSettableName.java new file mode 100644 index 0000000000000..f8e03820ca1e6 --- /dev/null +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ResourcewithSettableName.java @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.frontdoor.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * Common resource representation. + */ +@Fluent +public class ResourcewithSettableName implements JsonSerializable { + /* + * Resource ID. + */ + private String id; + + /* + * Resource name. + */ + private String name; + + /* + * Resource type. + */ + private String type; + + /* + * Resource location. + */ + private String location; + + /* + * Resource tags. + */ + private Map tags; + + /** + * Creates an instance of ResourcewithSettableName class. + */ + public ResourcewithSettableName() { + } + + /** + * Get the id property: Resource ID. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Resource ID. + * + * @param id the id value to set. + * @return the ResourcewithSettableName object itself. + */ + ResourcewithSettableName withId(String id) { + this.id = id; + return this; + } + + /** + * Get the name property: Resource name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Resource name. + * + * @param name the name value to set. + * @return the ResourcewithSettableName object itself. + */ + ResourcewithSettableName withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type property: Resource type. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Set the type property: Resource type. + * + * @param type the type value to set. + * @return the ResourcewithSettableName object itself. + */ + ResourcewithSettableName withType(String type) { + this.type = type; + return this; + } + + /** + * Get the location property: Resource location. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: Resource location. + * + * @param location the location value to set. + * @return the ResourcewithSettableName object itself. + */ + public ResourcewithSettableName withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the ResourcewithSettableName object itself. + */ + public ResourcewithSettableName withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", this.location); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourcewithSettableName from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourcewithSettableName if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ResourcewithSettableName. + */ + public static ResourcewithSettableName fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourcewithSettableName deserializedResourcewithSettableName = new ResourcewithSettableName(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedResourcewithSettableName.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedResourcewithSettableName.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedResourcewithSettableName.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedResourcewithSettableName.location = reader.getString(); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedResourcewithSettableName.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedResourcewithSettableName; + }); + } +} diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RouteConfiguration.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RouteConfiguration.java index bac28a4d9a345..3a6eba2daa2fc 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RouteConfiguration.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RouteConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -36,14 +36,6 @@ public String odataType() { return this.odataType; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RoutingRule.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RoutingRule.java index 0083f4d3229c8..d74e1d45d0674 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RoutingRule.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RoutingRule.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -88,7 +88,9 @@ public RoutingRule withId(String id) { } /** - * Get the resourceState property: Resource status. + * Get the resourceState property: Resource status of the Front Door or Front Door SubResource. + * + * Resource status. * * @return the resourceState value. */ @@ -260,17 +262,6 @@ public RoutingRule withWebApplicationFirewallPolicyLink( return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RoutingRuleEnabledState.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RoutingRuleEnabledState.java index f79e226579622..7e1582fd19f95 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RoutingRuleEnabledState.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RoutingRuleEnabledState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,12 +12,12 @@ */ public final class RoutingRuleEnabledState extends ExpandableStringEnum { /** - * Static value Enabled for RoutingRuleEnabledState. + * Enabled. */ public static final RoutingRuleEnabledState ENABLED = fromString("Enabled"); /** - * Static value Disabled for RoutingRuleEnabledState. + * Disabled. */ public static final RoutingRuleEnabledState DISABLED = fromString("Disabled"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RoutingRuleLink.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RoutingRuleLink.java index 9826947191fc9..a01586cc2d1a8 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RoutingRuleLink.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RoutingRuleLink.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Defines the Resource ID for a Routing Rule. */ -@Fluent +@Immutable public final class RoutingRuleLink implements JsonSerializable { /* * Resource ID. @@ -24,7 +24,7 @@ public final class RoutingRuleLink implements JsonSerializable /** * Creates an instance of RoutingRuleLink class. */ - public RoutingRuleLink() { + private RoutingRuleLink() { } /** @@ -36,25 +36,6 @@ public String id() { return this.id; } - /** - * Set the id property: Resource ID. - * - * @param id the id value to set. - * @return the RoutingRuleLink object itself. - */ - public RoutingRuleLink withId(String id) { - this.id = id; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RoutingRuleUpdateParameters.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RoutingRuleUpdateParameters.java index 09cd1e78e3d17..ce21cb18e2c61 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RoutingRuleUpdateParameters.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RoutingRuleUpdateParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -202,20 +202,6 @@ public RoutingRuleUpdateParameters withWebApplicationFirewallPolicyLink( return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (routeConfiguration() != null) { - routeConfiguration().validate(); - } - if (webApplicationFirewallPolicyLink() != null) { - webApplicationFirewallPolicyLink().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink.java index c6305ea142cb5..351bbd049c19e 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -48,14 +48,6 @@ public RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink withId(String return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RuleGroupScope.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RuleGroupScope.java new file mode 100644 index 0000000000000..5fe0ccca9bae6 --- /dev/null +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RuleGroupScope.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.frontdoor.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Defines the scope of the rule group. + */ +@Fluent +public final class RuleGroupScope implements JsonSerializable { + /* + * Defines the rule group name. + */ + private String ruleGroupName; + + /* + * List of rule scopes. + */ + private List ruleScopes; + + /** + * Creates an instance of RuleGroupScope class. + */ + public RuleGroupScope() { + } + + /** + * Get the ruleGroupName property: Defines the rule group name. + * + * @return the ruleGroupName value. + */ + public String ruleGroupName() { + return this.ruleGroupName; + } + + /** + * Set the ruleGroupName property: Defines the rule group name. + * + * @param ruleGroupName the ruleGroupName value to set. + * @return the RuleGroupScope object itself. + */ + public RuleGroupScope withRuleGroupName(String ruleGroupName) { + this.ruleGroupName = ruleGroupName; + return this; + } + + /** + * Get the ruleScopes property: List of rule scopes. + * + * @return the ruleScopes value. + */ + public List ruleScopes() { + return this.ruleScopes; + } + + /** + * Set the ruleScopes property: List of rule scopes. + * + * @param ruleScopes the ruleScopes value to set. + * @return the RuleGroupScope object itself. + */ + public RuleGroupScope withRuleScopes(List ruleScopes) { + this.ruleScopes = ruleScopes; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("ruleGroupName", this.ruleGroupName); + jsonWriter.writeArrayField("ruleScopes", this.ruleScopes, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RuleGroupScope from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RuleGroupScope if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RuleGroupScope. + */ + public static RuleGroupScope fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RuleGroupScope deserializedRuleGroupScope = new RuleGroupScope(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ruleGroupName".equals(fieldName)) { + deserializedRuleGroupScope.ruleGroupName = reader.getString(); + } else if ("ruleScopes".equals(fieldName)) { + List ruleScopes = reader.readArray(reader1 -> RuleScope.fromJson(reader1)); + deserializedRuleGroupScope.ruleScopes = ruleScopes; + } else { + reader.skipChildren(); + } + } + + return deserializedRuleGroupScope; + }); + } +} diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RuleScope.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RuleScope.java new file mode 100644 index 0000000000000..bfc7e0d5fdab3 --- /dev/null +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RuleScope.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.frontdoor.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Defines the scope of the rule. + */ +@Fluent +public final class RuleScope implements JsonSerializable { + /* + * Defines the rule id. + */ + private String ruleId; + + /** + * Creates an instance of RuleScope class. + */ + public RuleScope() { + } + + /** + * Get the ruleId property: Defines the rule id. + * + * @return the ruleId value. + */ + public String ruleId() { + return this.ruleId; + } + + /** + * Set the ruleId property: Defines the rule id. + * + * @param ruleId the ruleId value to set. + * @return the RuleScope object itself. + */ + public RuleScope withRuleId(String ruleId) { + this.ruleId = ruleId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("ruleId", this.ruleId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RuleScope from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RuleScope if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RuleScope. + */ + public static RuleScope fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RuleScope deserializedRuleScope = new RuleScope(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ruleId".equals(fieldName)) { + deserializedRuleScope.ruleId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRuleScope; + }); + } +} diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RuleType.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RuleType.java index 41acf60fa5217..4c01ee5fb5335 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RuleType.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RuleType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,12 +12,12 @@ */ public final class RuleType extends ExpandableStringEnum { /** - * Static value MatchRule for RuleType. + * MatchRule. */ public static final RuleType MATCH_RULE = fromString("MatchRule"); /** - * Static value RateLimitRule for RuleType. + * RateLimitRule. */ public static final RuleType RATE_LIMIT_RULE = fromString("RateLimitRule"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RulesEngine.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RulesEngine.java index e9e042d075f5d..f9241fb235ccc 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RulesEngine.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RulesEngine.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -13,28 +13,30 @@ */ public interface RulesEngine { /** - * Gets the id property: Fully qualified resource Id for the resource. + * Gets the id property: Resource ID. * * @return the id value. */ String id(); /** - * Gets the name property: The name of the resource. + * Gets the name property: Resource name. * * @return the name value. */ String name(); /** - * Gets the type property: The type of the resource. + * Gets the type property: Resource type. * * @return the type value. */ String type(); /** - * Gets the resourceState property: Resource status. + * Gets the resourceState property: Resource status of the Front Door or Front Door SubResource. + * + * Resource status. * * @return the resourceState value. */ @@ -85,7 +87,7 @@ interface WithParentResource { /** * Specifies resourceGroupName, frontDoorName. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @return the next definition stage. */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RulesEngineAction.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RulesEngineAction.java index 480c5c0834c26..b8f40b0203423 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RulesEngineAction.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RulesEngineAction.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -100,23 +100,6 @@ public RulesEngineAction withRouteConfigurationOverride(RouteConfiguration route return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (requestHeaderActions() != null) { - requestHeaderActions().forEach(e -> e.validate()); - } - if (responseHeaderActions() != null) { - responseHeaderActions().forEach(e -> e.validate()); - } - if (routeConfigurationOverride() != null) { - routeConfigurationOverride().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RulesEngineMatchCondition.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RulesEngineMatchCondition.java index e55d8eadd997b..e47a7ea3161d9 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RulesEngineMatchCondition.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RulesEngineMatchCondition.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -179,31 +178,6 @@ public RulesEngineMatchCondition withTransforms(List transforms) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (rulesEngineMatchVariable() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property rulesEngineMatchVariable in model RulesEngineMatchCondition")); - } - if (rulesEngineOperator() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property rulesEngineOperator in model RulesEngineMatchCondition")); - } - if (rulesEngineMatchValue() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property rulesEngineMatchValue in model RulesEngineMatchCondition")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RulesEngineMatchCondition.class); - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RulesEngineMatchVariable.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RulesEngineMatchVariable.java index 6803192ce638d..8ccac8790ecc5 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RulesEngineMatchVariable.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RulesEngineMatchVariable.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,62 +12,62 @@ */ public final class RulesEngineMatchVariable extends ExpandableStringEnum { /** - * Static value IsMobile for RulesEngineMatchVariable. + * IsMobile. */ public static final RulesEngineMatchVariable IS_MOBILE = fromString("IsMobile"); /** - * Static value RemoteAddr for RulesEngineMatchVariable. + * RemoteAddr. */ public static final RulesEngineMatchVariable REMOTE_ADDR = fromString("RemoteAddr"); /** - * Static value RequestMethod for RulesEngineMatchVariable. + * RequestMethod. */ public static final RulesEngineMatchVariable REQUEST_METHOD = fromString("RequestMethod"); /** - * Static value QueryString for RulesEngineMatchVariable. + * QueryString. */ public static final RulesEngineMatchVariable QUERY_STRING = fromString("QueryString"); /** - * Static value PostArgs for RulesEngineMatchVariable. + * PostArgs. */ public static final RulesEngineMatchVariable POST_ARGS = fromString("PostArgs"); /** - * Static value RequestUri for RulesEngineMatchVariable. + * RequestUri. */ public static final RulesEngineMatchVariable REQUEST_URI = fromString("RequestUri"); /** - * Static value RequestPath for RulesEngineMatchVariable. + * RequestPath. */ public static final RulesEngineMatchVariable REQUEST_PATH = fromString("RequestPath"); /** - * Static value RequestFilename for RulesEngineMatchVariable. + * RequestFilename. */ public static final RulesEngineMatchVariable REQUEST_FILENAME = fromString("RequestFilename"); /** - * Static value RequestFilenameExtension for RulesEngineMatchVariable. + * RequestFilenameExtension. */ public static final RulesEngineMatchVariable REQUEST_FILENAME_EXTENSION = fromString("RequestFilenameExtension"); /** - * Static value RequestHeader for RulesEngineMatchVariable. + * RequestHeader. */ public static final RulesEngineMatchVariable REQUEST_HEADER = fromString("RequestHeader"); /** - * Static value RequestBody for RulesEngineMatchVariable. + * RequestBody. */ public static final RulesEngineMatchVariable REQUEST_BODY = fromString("RequestBody"); /** - * Static value RequestScheme for RulesEngineMatchVariable. + * RequestScheme. */ public static final RulesEngineMatchVariable REQUEST_SCHEME = fromString("RequestScheme"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RulesEngineOperator.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RulesEngineOperator.java index 15ecde13bf378..a2adc5419f68b 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RulesEngineOperator.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RulesEngineOperator.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,57 +12,57 @@ */ public final class RulesEngineOperator extends ExpandableStringEnum { /** - * Static value Any for RulesEngineOperator. + * Any. */ public static final RulesEngineOperator ANY = fromString("Any"); /** - * Static value IPMatch for RulesEngineOperator. + * IPMatch. */ public static final RulesEngineOperator IPMATCH = fromString("IPMatch"); /** - * Static value GeoMatch for RulesEngineOperator. + * GeoMatch. */ public static final RulesEngineOperator GEO_MATCH = fromString("GeoMatch"); /** - * Static value Equal for RulesEngineOperator. + * Equal. */ public static final RulesEngineOperator EQUAL = fromString("Equal"); /** - * Static value Contains for RulesEngineOperator. + * Contains. */ public static final RulesEngineOperator CONTAINS = fromString("Contains"); /** - * Static value LessThan for RulesEngineOperator. + * LessThan. */ public static final RulesEngineOperator LESS_THAN = fromString("LessThan"); /** - * Static value GreaterThan for RulesEngineOperator. + * GreaterThan. */ public static final RulesEngineOperator GREATER_THAN = fromString("GreaterThan"); /** - * Static value LessThanOrEqual for RulesEngineOperator. + * LessThanOrEqual. */ public static final RulesEngineOperator LESS_THAN_OR_EQUAL = fromString("LessThanOrEqual"); /** - * Static value GreaterThanOrEqual for RulesEngineOperator. + * GreaterThanOrEqual. */ public static final RulesEngineOperator GREATER_THAN_OR_EQUAL = fromString("GreaterThanOrEqual"); /** - * Static value BeginsWith for RulesEngineOperator. + * BeginsWith. */ public static final RulesEngineOperator BEGINS_WITH = fromString("BeginsWith"); /** - * Static value EndsWith for RulesEngineOperator. + * EndsWith. */ public static final RulesEngineOperator ENDS_WITH = fromString("EndsWith"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RulesEngineRule.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RulesEngineRule.java index 6be144185ff0f..e01d29d5bb63c 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RulesEngineRule.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RulesEngineRule.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -157,29 +156,6 @@ public RulesEngineRule withMatchProcessingBehavior(MatchProcessingBehavior match return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property name in model RulesEngineRule")); - } - if (action() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property action in model RulesEngineRule")); - } else { - action().validate(); - } - if (matchConditions() != null) { - matchConditions().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RulesEngineRule.class); - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RulesEngineUpdateParameters.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RulesEngineUpdateParameters.java index fb39aef1f30cd..bfbbb55e1d416 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RulesEngineUpdateParameters.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RulesEngineUpdateParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -48,17 +48,6 @@ public RulesEngineUpdateParameters withRules(List rules) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (rules() != null) { - rules().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RulesEngines.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RulesEngines.java index 0679c673acc87..67f6c7f7024b6 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RulesEngines.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/RulesEngines.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -13,85 +13,83 @@ */ public interface RulesEngines { /** - * Lists all of the Rules Engine Configurations within a Front Door. + * Gets a Rules Engine Configuration with the specified name within the specified Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. + * @param rulesEngineName Name of the Rules Engine which is unique within the Front Door. + * @param context The context to associate with this 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 result of the request to list Rules Engine Configurations as paginated response with - * {@link PagedIterable}. + * @return a Rules Engine Configuration with the specified name within the specified Front Door along with + * {@link Response}. */ - PagedIterable listByFrontDoor(String resourceGroupName, String frontDoorName); + Response getWithResponse(String resourceGroupName, String frontDoorName, String rulesEngineName, + Context context); /** - * Lists all of the Rules Engine Configurations within a Front Door. + * Gets a Rules Engine Configuration with the specified name within the specified Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. - * @param context The context to associate with this operation. + * @param rulesEngineName Name of the Rules Engine which is unique within the Front Door. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Rules Engine Configurations as paginated response with - * {@link PagedIterable}. + * @return a Rules Engine Configuration with the specified name within the specified Front Door. */ - PagedIterable listByFrontDoor(String resourceGroupName, String frontDoorName, Context context); + RulesEngine get(String resourceGroupName, String frontDoorName, String rulesEngineName); /** - * Gets a Rules Engine Configuration with the specified name within the specified Front Door. + * Deletes an existing Rules Engine Configuration with the specified parameters. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param rulesEngineName Name of the Rules Engine which is unique within the Front Door. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Rules Engine Configuration with the specified name within the specified Front Door along with - * {@link Response}. */ - Response getWithResponse(String resourceGroupName, String frontDoorName, String rulesEngineName, - Context context); + void delete(String resourceGroupName, String frontDoorName, String rulesEngineName); /** - * Gets a Rules Engine Configuration with the specified name within the specified Front Door. + * Deletes an existing Rules Engine Configuration with the specified parameters. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. * @param rulesEngineName Name of the Rules Engine which is unique within the Front Door. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Rules Engine Configuration with the specified name within the specified Front Door. */ - RulesEngine get(String resourceGroupName, String frontDoorName, String rulesEngineName); + void delete(String resourceGroupName, String frontDoorName, String rulesEngineName, Context context); /** - * Deletes an existing Rules Engine Configuration with the specified parameters. + * Lists all of the Rules Engine Configurations within a Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. - * @param rulesEngineName Name of the Rules Engine which is unique within the Front Door. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of RulesEngine items as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String frontDoorName, String rulesEngineName); + PagedIterable listByFrontDoor(String resourceGroupName, String frontDoorName); /** - * Deletes an existing Rules Engine Configuration with the specified parameters. + * Lists all of the Rules Engine Configurations within a Front Door. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param frontDoorName Name of the Front Door which is globally unique. - * @param rulesEngineName Name of the Rules Engine which is unique within the Front Door. * @param context The context to associate with this 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 paged collection of RulesEngine items as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String frontDoorName, String rulesEngineName, Context context); + PagedIterable listByFrontDoor(String resourceGroupName, String frontDoorName, Context context); /** * Gets a Rules Engine Configuration with the specified name within the specified Front Door. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ScrubbingRuleEntryMatchOperator.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ScrubbingRuleEntryMatchOperator.java index 7b9386d5daaf2..2506338487795 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ScrubbingRuleEntryMatchOperator.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ScrubbingRuleEntryMatchOperator.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -13,12 +13,12 @@ */ public final class ScrubbingRuleEntryMatchOperator extends ExpandableStringEnum { /** - * Static value EqualsAny for ScrubbingRuleEntryMatchOperator. + * EqualsAny. */ public static final ScrubbingRuleEntryMatchOperator EQUALS_ANY = fromString("EqualsAny"); /** - * Static value Equals for ScrubbingRuleEntryMatchOperator. + * Equals. */ public static final ScrubbingRuleEntryMatchOperator EQUALS = fromString("Equals"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ScrubbingRuleEntryMatchVariable.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ScrubbingRuleEntryMatchVariable.java index 1c8b6510d617e..eb5ebe9f0fd13 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ScrubbingRuleEntryMatchVariable.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ScrubbingRuleEntryMatchVariable.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,38 +12,38 @@ */ public final class ScrubbingRuleEntryMatchVariable extends ExpandableStringEnum { /** - * Static value RequestIPAddress for ScrubbingRuleEntryMatchVariable. + * RequestIPAddress. */ public static final ScrubbingRuleEntryMatchVariable REQUEST_IPADDRESS = fromString("RequestIPAddress"); /** - * Static value RequestUri for ScrubbingRuleEntryMatchVariable. + * RequestUri. */ public static final ScrubbingRuleEntryMatchVariable REQUEST_URI = fromString("RequestUri"); /** - * Static value QueryStringArgNames for ScrubbingRuleEntryMatchVariable. + * QueryStringArgNames. */ public static final ScrubbingRuleEntryMatchVariable QUERY_STRING_ARG_NAMES = fromString("QueryStringArgNames"); /** - * Static value RequestHeaderNames for ScrubbingRuleEntryMatchVariable. + * RequestHeaderNames. */ public static final ScrubbingRuleEntryMatchVariable REQUEST_HEADER_NAMES = fromString("RequestHeaderNames"); /** - * Static value RequestCookieNames for ScrubbingRuleEntryMatchVariable. + * RequestCookieNames. */ public static final ScrubbingRuleEntryMatchVariable REQUEST_COOKIE_NAMES = fromString("RequestCookieNames"); /** - * Static value RequestBodyPostArgNames for ScrubbingRuleEntryMatchVariable. + * RequestBodyPostArgNames. */ public static final ScrubbingRuleEntryMatchVariable REQUEST_BODY_POST_ARG_NAMES = fromString("RequestBodyPostArgNames"); /** - * Static value RequestBodyJsonArgNames for ScrubbingRuleEntryMatchVariable. + * RequestBodyJsonArgNames. */ public static final ScrubbingRuleEntryMatchVariable REQUEST_BODY_JSON_ARG_NAMES = fromString("RequestBodyJsonArgNames"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ScrubbingRuleEntryState.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ScrubbingRuleEntryState.java index bcd12106faa7f..3c96062aedeff 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ScrubbingRuleEntryState.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ScrubbingRuleEntryState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,12 +12,12 @@ */ public final class ScrubbingRuleEntryState extends ExpandableStringEnum { /** - * Static value Enabled for ScrubbingRuleEntryState. + * Enabled. */ public static final ScrubbingRuleEntryState ENABLED = fromString("Enabled"); /** - * Static value Disabled for ScrubbingRuleEntryState. + * Disabled. */ public static final ScrubbingRuleEntryState DISABLED = fromString("Disabled"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/SecurityPolicyLink.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/SecurityPolicyLink.java index 30fdba5458bd5..e07a79284a8ff 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/SecurityPolicyLink.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/SecurityPolicyLink.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Defines the Resource ID for a Security Policy. */ -@Fluent +@Immutable public final class SecurityPolicyLink implements JsonSerializable { /* * Resource ID. @@ -24,7 +24,7 @@ public final class SecurityPolicyLink implements JsonSerializable { + /** + * Low Sensitivity - triggers the rule by larger spikes in traffic. + */ + public static final SensitivityType LOW = fromString("Low"); + + /** + * Medium Sensitivity - triggers the rule by moderate spikes in traffic. + */ + public static final SensitivityType MEDIUM = fromString("Medium"); + + /** + * High Sensitivity - triggers the rule by smaller spikes in traffic. + */ + public static final SensitivityType HIGH = fromString("High"); + + /** + * Creates a new instance of SensitivityType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SensitivityType() { + } + + /** + * Creates or finds a SensitivityType from its string representation. + * + * @param name a name to look for. + * @return the corresponding SensitivityType. + */ + public static SensitivityType fromString(String name) { + return fromString(name, SensitivityType.class); + } + + /** + * Gets known SensitivityType values. + * + * @return known SensitivityType values. + */ + public static Collection values() { + return values(SensitivityType.class); + } +} diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/SessionAffinityEnabledState.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/SessionAffinityEnabledState.java index ab54e18e2fbc5..26e4aff66b3a5 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/SessionAffinityEnabledState.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/SessionAffinityEnabledState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,12 +12,12 @@ */ public final class SessionAffinityEnabledState extends ExpandableStringEnum { /** - * Static value Enabled for SessionAffinityEnabledState. + * Enabled. */ public static final SessionAffinityEnabledState ENABLED = fromString("Enabled"); /** - * Static value Disabled for SessionAffinityEnabledState. + * Disabled. */ public static final SessionAffinityEnabledState DISABLED = fromString("Disabled"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Sku.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Sku.java index 5266cdc418475..b1bebd558dbea 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Sku.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Sku.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -47,14 +47,6 @@ public Sku withName(SkuName name) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/SkuName.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/SkuName.java index ea7bbd46b9e66..47b057b20c19f 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/SkuName.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/SkuName.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,17 +12,17 @@ */ public final class SkuName extends ExpandableStringEnum { /** - * Static value Classic_AzureFrontDoor for SkuName. + * Classic_AzureFrontDoor. */ public static final SkuName CLASSIC_AZURE_FRONT_DOOR = fromString("Classic_AzureFrontDoor"); /** - * Static value Standard_AzureFrontDoor for SkuName. + * Standard_AzureFrontDoor. */ public static final SkuName STANDARD_AZURE_FRONT_DOOR = fromString("Standard_AzureFrontDoor"); /** - * Static value Premium_AzureFrontDoor for SkuName. + * Premium_AzureFrontDoor. */ public static final SkuName PREMIUM_AZURE_FRONT_DOOR = fromString("Premium_AzureFrontDoor"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/State.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/State.java index a5e34ace9092e..666c3ff2e4f4e 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/State.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/State.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,12 +12,12 @@ */ public final class State extends ExpandableStringEnum { /** - * Static value Enabled for State. + * Enabled. */ public static final State ENABLED = fromString("Enabled"); /** - * Static value Disabled for State. + * Disabled. */ public static final State DISABLED = fromString("Disabled"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/TagsObject.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/TagsObject.java index d02f73bd91394..aad55678f6c1d 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/TagsObject.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/TagsObject.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -48,14 +48,6 @@ public TagsObject withTags(Map tags) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Timeseries.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Timeseries.java index 290f14b3acc02..38b868f2a1617 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Timeseries.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Timeseries.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/TimeseriesAggregationInterval.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/TimeseriesAggregationInterval.java index ebcd4fb052041..d8e767d50c9a8 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/TimeseriesAggregationInterval.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/TimeseriesAggregationInterval.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,12 +12,12 @@ */ public final class TimeseriesAggregationInterval extends ExpandableStringEnum { /** - * Static value Hourly for TimeseriesAggregationInterval. + * Hourly. */ public static final TimeseriesAggregationInterval HOURLY = fromString("Hourly"); /** - * Static value Daily for TimeseriesAggregationInterval. + * Daily. */ public static final TimeseriesAggregationInterval DAILY = fromString("Daily"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/TimeseriesDataPoint.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/TimeseriesDataPoint.java index c0291b81db71c..6c8a57b0253a6 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/TimeseriesDataPoint.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/TimeseriesDataPoint.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Defines a timeseries datapoint used in a timeseries. */ -@Fluent +@Immutable public final class TimeseriesDataPoint implements JsonSerializable { /* * The DateTime of the Timeseries data point in UTC @@ -29,7 +29,7 @@ public final class TimeseriesDataPoint implements JsonSerializable { /** - * Static value MeasurementCounts for TimeseriesType. + * MeasurementCounts. */ public static final TimeseriesType MEASUREMENT_COUNTS = fromString("MeasurementCounts"); /** - * Static value LatencyP50 for TimeseriesType. + * LatencyP50. */ public static final TimeseriesType LATENCY_P50 = fromString("LatencyP50"); /** - * Static value LatencyP75 for TimeseriesType. + * LatencyP75. */ public static final TimeseriesType LATENCY_P75 = fromString("LatencyP75"); /** - * Static value LatencyP95 for TimeseriesType. + * LatencyP95. */ public static final TimeseriesType LATENCY_P95 = fromString("LatencyP95"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Transform.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Transform.java index 494179f82bea7..49be6e763b3ab 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Transform.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Transform.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,32 +12,32 @@ */ public final class Transform extends ExpandableStringEnum { /** - * Static value Lowercase for Transform. + * Lowercase. */ public static final Transform LOWERCASE = fromString("Lowercase"); /** - * Static value Uppercase for Transform. + * Uppercase. */ public static final Transform UPPERCASE = fromString("Uppercase"); /** - * Static value Trim for Transform. + * Trim. */ public static final Transform TRIM = fromString("Trim"); /** - * Static value UrlDecode for Transform. + * UrlDecode. */ public static final Transform URL_DECODE = fromString("UrlDecode"); /** - * Static value UrlEncode for Transform. + * UrlEncode. */ public static final Transform URL_ENCODE = fromString("UrlEncode"); /** - * Static value RemoveNulls for Transform. + * RemoveNulls. */ public static final Transform REMOVE_NULLS = fromString("RemoveNulls"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/TransformType.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/TransformType.java index 7a86b062a2ee2..7f67f3301eb40 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/TransformType.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/TransformType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,32 +12,32 @@ */ public final class TransformType extends ExpandableStringEnum { /** - * Static value Lowercase for TransformType. + * Lowercase. */ public static final TransformType LOWERCASE = fromString("Lowercase"); /** - * Static value Uppercase for TransformType. + * Uppercase. */ public static final TransformType UPPERCASE = fromString("Uppercase"); /** - * Static value Trim for TransformType. + * Trim. */ public static final TransformType TRIM = fromString("Trim"); /** - * Static value UrlDecode for TransformType. + * UrlDecode. */ public static final TransformType URL_DECODE = fromString("UrlDecode"); /** - * Static value UrlEncode for TransformType. + * UrlEncode. */ public static final TransformType URL_ENCODE = fromString("UrlEncode"); /** - * Static value RemoveNulls for TransformType. + * RemoveNulls. */ public static final TransformType REMOVE_NULLS = fromString("RemoveNulls"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ValidateCustomDomainInput.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ValidateCustomDomainInput.java index 55c59370b3281..cdb0a3069ed10 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ValidateCustomDomainInput.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ValidateCustomDomainInput.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -48,21 +47,6 @@ public ValidateCustomDomainInput withHostname(String hostname) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (hostname() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property hostname in model ValidateCustomDomainInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ValidateCustomDomainInput.class); - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ValidateCustomDomainOutput.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ValidateCustomDomainOutput.java index 45bf2f0334ea5..350cfb3fb1d99 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ValidateCustomDomainOutput.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/ValidateCustomDomainOutput.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/VariableName.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/VariableName.java index 027c37405f41a..c4b7bf7bb51e6 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/VariableName.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/VariableName.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -12,20 +12,30 @@ */ public final class VariableName extends ExpandableStringEnum { /** - * Static value SocketAddr for VariableName. + * SocketAddr. */ public static final VariableName SOCKET_ADDR = fromString("SocketAddr"); /** - * Static value GeoLocation for VariableName. + * GeoLocation. */ public static final VariableName GEO_LOCATION = fromString("GeoLocation"); /** - * Static value None for VariableName. + * None. */ public static final VariableName NONE = fromString("None"); + /** + * Autonomous System Number. + */ + public static final VariableName ASN = fromString("Asn"); + + /** + * JA4 TLS fingerprint. + */ + public static final VariableName JA4 = fromString("Ja4"); + /** * Creates a new instance of VariableName value. * diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/WebApplicationFirewallPolicy.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/WebApplicationFirewallPolicy.java index 5427a099c48d2..d3d65d44b8193 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/WebApplicationFirewallPolicy.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/WebApplicationFirewallPolicy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -195,7 +195,7 @@ interface WithResourceGroup { /** * Specifies resourceGroupName. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ WithCreate withExistingResourceGroup(String resourceGroupName); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/WebApplicationFirewallScrubbingRules.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/WebApplicationFirewallScrubbingRules.java index 275b7950b6426..79ae0f075d5d2 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/WebApplicationFirewallScrubbingRules.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/WebApplicationFirewallScrubbingRules.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -131,26 +130,6 @@ public WebApplicationFirewallScrubbingRules withState(ScrubbingRuleEntryState st return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (matchVariable() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property matchVariable in model WebApplicationFirewallScrubbingRules")); - } - if (selectorMatchOperator() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property selectorMatchOperator in model WebApplicationFirewallScrubbingRules")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(WebApplicationFirewallScrubbingRules.class); - /** * {@inheritDoc} */ diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/WebApplicationFirewallScrubbingState.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/WebApplicationFirewallScrubbingState.java index 9913402308d73..3d36c221a4292 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/WebApplicationFirewallScrubbingState.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/WebApplicationFirewallScrubbingState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.models; @@ -13,12 +13,12 @@ public final class WebApplicationFirewallScrubbingState extends ExpandableStringEnum { /** - * Static value Enabled for WebApplicationFirewallScrubbingState. + * Enabled. */ public static final WebApplicationFirewallScrubbingState ENABLED = fromString("Enabled"); /** - * Static value Disabled for WebApplicationFirewallScrubbingState. + * Disabled. */ public static final WebApplicationFirewallScrubbingState DISABLED = fromString("Disabled"); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/package-info.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/package-info.java index bac64c7eb5bb6..ac7b7587b7f16 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/package-info.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** * Package containing the data models for FrontDoorManagementClient. - * FrontDoor Client. + * APIs to manage web application firewall rules. */ package com.azure.resourcemanager.frontdoor.models; diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/package-info.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/package-info.java index 64597aa8106a6..dcc6d94a3afac 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/package-info.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** * Package containing the classes for FrontDoorManagementClient. - * FrontDoor Client. + * APIs to manage web application firewall rules. */ package com.azure.resourcemanager.frontdoor; diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/module-info.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/module-info.java index 4b6907f557bf1..e275d093e56d7 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/module-info.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/module-info.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. module com.azure.resourcemanager.frontdoor { requires transitive com.azure.core.management; @@ -12,4 +12,5 @@ opens com.azure.resourcemanager.frontdoor.fluent.models to com.azure.core; opens com.azure.resourcemanager.frontdoor.models to com.azure.core; + opens com.azure.resourcemanager.frontdoor.implementation.models to com.azure.core; } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/resources/META-INF/azure-resourcemanager-frontdoor_metadata.json b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/resources/META-INF/azure-resourcemanager-frontdoor_metadata.json new file mode 100644 index 0000000000000..fb07e8ca84f74 --- /dev/null +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/resources/META-INF/azure-resourcemanager-frontdoor_metadata.json @@ -0,0 +1 @@ +{"flavor":"azure","apiVersions":{"Microsoft.Network":"2026-04-01"},"crossLanguagePackageId":"Microsoft.Network","crossLanguageVersion":"a0a1b0e77a71","crossLanguageDefinitions":{"com.azure.resourcemanager.frontdoor.fluent.EndpointsClient":"Microsoft.Network","com.azure.resourcemanager.frontdoor.fluent.EndpointsClient.beginPurgeContent":"Microsoft.Network.FrontDoors.purgeContent","com.azure.resourcemanager.frontdoor.fluent.EndpointsClient.purgeContent":"Microsoft.Network.FrontDoors.purgeContent","com.azure.resourcemanager.frontdoor.fluent.ExperimentsClient":"Microsoft.Network.Experiments","com.azure.resourcemanager.frontdoor.fluent.ExperimentsClient.beginCreateOrUpdate":"Microsoft.Network.Experiments.createOrUpdate","com.azure.resourcemanager.frontdoor.fluent.ExperimentsClient.beginDelete":"Microsoft.Network.Experiments.delete","com.azure.resourcemanager.frontdoor.fluent.ExperimentsClient.beginUpdate":"Microsoft.Network.Experiments.update","com.azure.resourcemanager.frontdoor.fluent.ExperimentsClient.createOrUpdate":"Microsoft.Network.Experiments.createOrUpdate","com.azure.resourcemanager.frontdoor.fluent.ExperimentsClient.delete":"Microsoft.Network.Experiments.delete","com.azure.resourcemanager.frontdoor.fluent.ExperimentsClient.get":"Microsoft.Network.Experiments.get","com.azure.resourcemanager.frontdoor.fluent.ExperimentsClient.getWithResponse":"Microsoft.Network.Experiments.get","com.azure.resourcemanager.frontdoor.fluent.ExperimentsClient.listByProfile":"Microsoft.Network.Experiments.listByProfile","com.azure.resourcemanager.frontdoor.fluent.ExperimentsClient.update":"Microsoft.Network.Experiments.update","com.azure.resourcemanager.frontdoor.fluent.FrontDoorManagementClient":"Microsoft.Network","com.azure.resourcemanager.frontdoor.fluent.FrontDoorNameAvailabilitiesClient":"Microsoft.Network","com.azure.resourcemanager.frontdoor.fluent.FrontDoorNameAvailabilitiesClient.check":"Microsoft.Network.FrontDoorNameAvailabilityOperationGroup.check","com.azure.resourcemanager.frontdoor.fluent.FrontDoorNameAvailabilitiesClient.checkWithResponse":"Microsoft.Network.FrontDoorNameAvailabilityOperationGroup.check","com.azure.resourcemanager.frontdoor.fluent.FrontDoorNameAvailabilityWithSubscriptionsClient":"Microsoft.Network","com.azure.resourcemanager.frontdoor.fluent.FrontDoorNameAvailabilityWithSubscriptionsClient.check":"Microsoft.Network.FrontDoorNameAvailabilityWithSubscriptionOperationGroup.check","com.azure.resourcemanager.frontdoor.fluent.FrontDoorNameAvailabilityWithSubscriptionsClient.checkWithResponse":"Microsoft.Network.FrontDoorNameAvailabilityWithSubscriptionOperationGroup.check","com.azure.resourcemanager.frontdoor.fluent.FrontDoorsClient":"Microsoft.Network.FrontDoors","com.azure.resourcemanager.frontdoor.fluent.FrontDoorsClient.beginCreateOrUpdate":"Microsoft.Network.FrontDoors.createOrUpdate","com.azure.resourcemanager.frontdoor.fluent.FrontDoorsClient.beginDelete":"Microsoft.Network.FrontDoors.delete","com.azure.resourcemanager.frontdoor.fluent.FrontDoorsClient.createOrUpdate":"Microsoft.Network.FrontDoors.createOrUpdate","com.azure.resourcemanager.frontdoor.fluent.FrontDoorsClient.delete":"Microsoft.Network.FrontDoors.delete","com.azure.resourcemanager.frontdoor.fluent.FrontDoorsClient.getByResourceGroup":"Microsoft.Network.FrontDoors.get","com.azure.resourcemanager.frontdoor.fluent.FrontDoorsClient.getByResourceGroupWithResponse":"Microsoft.Network.FrontDoors.get","com.azure.resourcemanager.frontdoor.fluent.FrontDoorsClient.list":"Microsoft.Network.FrontDoors.list","com.azure.resourcemanager.frontdoor.fluent.FrontDoorsClient.listByResourceGroup":"Microsoft.Network.FrontDoors.listByResourceGroup","com.azure.resourcemanager.frontdoor.fluent.FrontDoorsClient.validateCustomDomain":"Microsoft.Network.FrontDoors.validateCustomDomain","com.azure.resourcemanager.frontdoor.fluent.FrontDoorsClient.validateCustomDomainWithResponse":"Microsoft.Network.FrontDoors.validateCustomDomain","com.azure.resourcemanager.frontdoor.fluent.FrontendEndpointsClient":"Microsoft.Network.FrontendEndpoints","com.azure.resourcemanager.frontdoor.fluent.FrontendEndpointsClient.beginDisableHttps":"Microsoft.Network.FrontendEndpoints.disableHttps","com.azure.resourcemanager.frontdoor.fluent.FrontendEndpointsClient.beginEnableHttps":"Microsoft.Network.FrontendEndpoints.enableHttps","com.azure.resourcemanager.frontdoor.fluent.FrontendEndpointsClient.disableHttps":"Microsoft.Network.FrontendEndpoints.disableHttps","com.azure.resourcemanager.frontdoor.fluent.FrontendEndpointsClient.enableHttps":"Microsoft.Network.FrontendEndpoints.enableHttps","com.azure.resourcemanager.frontdoor.fluent.FrontendEndpointsClient.get":"Microsoft.Network.FrontendEndpoints.get","com.azure.resourcemanager.frontdoor.fluent.FrontendEndpointsClient.getWithResponse":"Microsoft.Network.FrontendEndpoints.get","com.azure.resourcemanager.frontdoor.fluent.FrontendEndpointsClient.listByFrontDoor":"Microsoft.Network.FrontendEndpoints.listByFrontDoor","com.azure.resourcemanager.frontdoor.fluent.ManagedRuleSetsClient":"Microsoft.Network","com.azure.resourcemanager.frontdoor.fluent.ManagedRuleSetsClient.list":"Microsoft.Network.ManagedRuleSetsOperationGroup.list","com.azure.resourcemanager.frontdoor.fluent.NetworkExperimentProfilesClient":"Microsoft.Network","com.azure.resourcemanager.frontdoor.fluent.NetworkExperimentProfilesClient.beginCreateOrUpdate":"Microsoft.Network.Profiles.createOrUpdate","com.azure.resourcemanager.frontdoor.fluent.NetworkExperimentProfilesClient.beginDelete":"Microsoft.Network.Profiles.delete","com.azure.resourcemanager.frontdoor.fluent.NetworkExperimentProfilesClient.beginUpdate":"Microsoft.Network.Profiles.update","com.azure.resourcemanager.frontdoor.fluent.NetworkExperimentProfilesClient.createOrUpdate":"Microsoft.Network.Profiles.createOrUpdate","com.azure.resourcemanager.frontdoor.fluent.NetworkExperimentProfilesClient.delete":"Microsoft.Network.Profiles.delete","com.azure.resourcemanager.frontdoor.fluent.NetworkExperimentProfilesClient.getByResourceGroup":"Microsoft.Network.Profiles.get","com.azure.resourcemanager.frontdoor.fluent.NetworkExperimentProfilesClient.getByResourceGroupWithResponse":"Microsoft.Network.Profiles.get","com.azure.resourcemanager.frontdoor.fluent.NetworkExperimentProfilesClient.list":"Microsoft.Network.Profiles.list","com.azure.resourcemanager.frontdoor.fluent.NetworkExperimentProfilesClient.listByResourceGroup":"Microsoft.Network.Profiles.listByResourceGroup","com.azure.resourcemanager.frontdoor.fluent.NetworkExperimentProfilesClient.update":"Microsoft.Network.Profiles.update","com.azure.resourcemanager.frontdoor.fluent.PoliciesClient":"Microsoft.Network","com.azure.resourcemanager.frontdoor.fluent.PoliciesClient.beginCreateOrUpdate":"Microsoft.Network.WebApplicationFirewallPolicies.createOrUpdate","com.azure.resourcemanager.frontdoor.fluent.PoliciesClient.beginDelete":"Microsoft.Network.WebApplicationFirewallPolicies.delete","com.azure.resourcemanager.frontdoor.fluent.PoliciesClient.beginUpdate":"Microsoft.Network.WebApplicationFirewallPolicies.update","com.azure.resourcemanager.frontdoor.fluent.PoliciesClient.createOrUpdate":"Microsoft.Network.WebApplicationFirewallPolicies.createOrUpdate","com.azure.resourcemanager.frontdoor.fluent.PoliciesClient.delete":"Microsoft.Network.WebApplicationFirewallPolicies.delete","com.azure.resourcemanager.frontdoor.fluent.PoliciesClient.getByResourceGroup":"Microsoft.Network.WebApplicationFirewallPolicies.get","com.azure.resourcemanager.frontdoor.fluent.PoliciesClient.getByResourceGroupWithResponse":"Microsoft.Network.WebApplicationFirewallPolicies.get","com.azure.resourcemanager.frontdoor.fluent.PoliciesClient.list":"Microsoft.Network.WebApplicationFirewallPolicies.listBySubscription","com.azure.resourcemanager.frontdoor.fluent.PoliciesClient.listByResourceGroup":"Microsoft.Network.WebApplicationFirewallPolicies.list","com.azure.resourcemanager.frontdoor.fluent.PoliciesClient.update":"Microsoft.Network.WebApplicationFirewallPolicies.update","com.azure.resourcemanager.frontdoor.fluent.PreconfiguredEndpointsClient":"Microsoft.Network","com.azure.resourcemanager.frontdoor.fluent.PreconfiguredEndpointsClient.list":"Microsoft.Network.Profiles.preconfiguredEndpointsList","com.azure.resourcemanager.frontdoor.fluent.ReportsClient":"Microsoft.Network","com.azure.resourcemanager.frontdoor.fluent.ReportsClient.getLatencyScorecards":"Microsoft.Network.Experiments.getLatencyScorecards","com.azure.resourcemanager.frontdoor.fluent.ReportsClient.getLatencyScorecardsWithResponse":"Microsoft.Network.Experiments.getLatencyScorecards","com.azure.resourcemanager.frontdoor.fluent.ReportsClient.getTimeseries":"Microsoft.Network.Experiments.getTimeseries","com.azure.resourcemanager.frontdoor.fluent.ReportsClient.getTimeseriesWithResponse":"Microsoft.Network.Experiments.getTimeseries","com.azure.resourcemanager.frontdoor.fluent.RulesEnginesClient":"Microsoft.Network.RulesEngines","com.azure.resourcemanager.frontdoor.fluent.RulesEnginesClient.beginCreateOrUpdate":"Microsoft.Network.RulesEngines.createOrUpdate","com.azure.resourcemanager.frontdoor.fluent.RulesEnginesClient.beginDelete":"Microsoft.Network.RulesEngines.delete","com.azure.resourcemanager.frontdoor.fluent.RulesEnginesClient.createOrUpdate":"Microsoft.Network.RulesEngines.createOrUpdate","com.azure.resourcemanager.frontdoor.fluent.RulesEnginesClient.delete":"Microsoft.Network.RulesEngines.delete","com.azure.resourcemanager.frontdoor.fluent.RulesEnginesClient.get":"Microsoft.Network.RulesEngines.get","com.azure.resourcemanager.frontdoor.fluent.RulesEnginesClient.getWithResponse":"Microsoft.Network.RulesEngines.get","com.azure.resourcemanager.frontdoor.fluent.RulesEnginesClient.listByFrontDoor":"Microsoft.Network.RulesEngines.listByFrontDoor","com.azure.resourcemanager.frontdoor.fluent.models.BackendPoolProperties":"Microsoft.Network.BackendPoolProperties","com.azure.resourcemanager.frontdoor.fluent.models.CheckNameAvailabilityOutputInner":"Microsoft.Network.CheckNameAvailabilityOutput","com.azure.resourcemanager.frontdoor.fluent.models.ExperimentInner":"Microsoft.Network.Experiment","com.azure.resourcemanager.frontdoor.fluent.models.ExperimentProperties":"Microsoft.Network.ExperimentProperties","com.azure.resourcemanager.frontdoor.fluent.models.ExperimentUpdateProperties":"Microsoft.Network.ExperimentUpdateProperties","com.azure.resourcemanager.frontdoor.fluent.models.FrontDoorCertificateSourceParameters":"Microsoft.Network.FrontDoorCertificateSourceParameters","com.azure.resourcemanager.frontdoor.fluent.models.FrontDoorInner":"Microsoft.Network.FrontDoor","com.azure.resourcemanager.frontdoor.fluent.models.FrontDoorProperties":"Microsoft.Network.FrontDoorProperties","com.azure.resourcemanager.frontdoor.fluent.models.FrontendEndpointInner":"Microsoft.Network.FrontendEndpoint","com.azure.resourcemanager.frontdoor.fluent.models.FrontendEndpointProperties":"Microsoft.Network.FrontendEndpointProperties","com.azure.resourcemanager.frontdoor.fluent.models.HealthProbeSettingsProperties":"Microsoft.Network.HealthProbeSettingsProperties","com.azure.resourcemanager.frontdoor.fluent.models.KeyVaultCertificateSourceParameters":"Microsoft.Network.KeyVaultCertificateSourceParameters","com.azure.resourcemanager.frontdoor.fluent.models.LatencyScorecardInner":"Microsoft.Network.LatencyScorecard","com.azure.resourcemanager.frontdoor.fluent.models.LatencyScorecardProperties":"Microsoft.Network.LatencyScorecardProperties","com.azure.resourcemanager.frontdoor.fluent.models.LoadBalancingSettingsProperties":"Microsoft.Network.LoadBalancingSettingsProperties","com.azure.resourcemanager.frontdoor.fluent.models.ManagedRuleSetDefinitionInner":"Microsoft.Network.ManagedRuleSetDefinition","com.azure.resourcemanager.frontdoor.fluent.models.ManagedRuleSetDefinitionProperties":"Microsoft.Network.ManagedRuleSetDefinitionProperties","com.azure.resourcemanager.frontdoor.fluent.models.PolicySettingsLogScrubbing":"Microsoft.Network.PolicySettingsLogScrubbing","com.azure.resourcemanager.frontdoor.fluent.models.PreconfiguredEndpointInner":"Microsoft.Network.PreconfiguredEndpoint","com.azure.resourcemanager.frontdoor.fluent.models.PreconfiguredEndpointProperties":"Microsoft.Network.PreconfiguredEndpointProperties","com.azure.resourcemanager.frontdoor.fluent.models.ProfileInner":"Microsoft.Network.Profile","com.azure.resourcemanager.frontdoor.fluent.models.ProfileProperties":"Microsoft.Network.ProfileProperties","com.azure.resourcemanager.frontdoor.fluent.models.ProfileUpdateProperties":"Microsoft.Network.ProfileUpdateProperties","com.azure.resourcemanager.frontdoor.fluent.models.RoutingRuleProperties":"Microsoft.Network.RoutingRuleProperties","com.azure.resourcemanager.frontdoor.fluent.models.RulesEngineInner":"Microsoft.Network.RulesEngine","com.azure.resourcemanager.frontdoor.fluent.models.RulesEngineProperties":"Microsoft.Network.RulesEngineProperties","com.azure.resourcemanager.frontdoor.fluent.models.TimeseriesInner":"Microsoft.Network.Timeseries","com.azure.resourcemanager.frontdoor.fluent.models.TimeseriesProperties":"Microsoft.Network.TimeseriesProperties","com.azure.resourcemanager.frontdoor.fluent.models.ValidateCustomDomainOutputInner":"Microsoft.Network.ValidateCustomDomainOutput","com.azure.resourcemanager.frontdoor.fluent.models.WebApplicationFirewallPolicyInner":"Microsoft.Network.WebApplicationFirewallPolicy","com.azure.resourcemanager.frontdoor.fluent.models.WebApplicationFirewallPolicyProperties":"Microsoft.Network.WebApplicationFirewallPolicyProperties","com.azure.resourcemanager.frontdoor.implementation.FrontDoorManagementClientBuilder":"Microsoft.Network","com.azure.resourcemanager.frontdoor.implementation.models.ExperimentList":"Microsoft.Network.ExperimentList","com.azure.resourcemanager.frontdoor.implementation.models.FrontDoorListResult":"Microsoft.Network.FrontDoorListResult","com.azure.resourcemanager.frontdoor.implementation.models.FrontendEndpointsListResult":"Microsoft.Network.FrontendEndpointsListResult","com.azure.resourcemanager.frontdoor.implementation.models.ManagedRuleSetDefinitionList":"Microsoft.Network.ManagedRuleSetDefinitionList","com.azure.resourcemanager.frontdoor.implementation.models.PreconfiguredEndpointList":"Microsoft.Network.PreconfiguredEndpointList","com.azure.resourcemanager.frontdoor.implementation.models.ProfileList":"Microsoft.Network.ProfileList","com.azure.resourcemanager.frontdoor.implementation.models.RulesEngineListResult":"Microsoft.Network.RulesEngineListResult","com.azure.resourcemanager.frontdoor.implementation.models.WebApplicationFirewallPolicyList":"Microsoft.Network.WebApplicationFirewallPolicyList","com.azure.resourcemanager.frontdoor.models.ActionType":"Microsoft.Network.ActionType","com.azure.resourcemanager.frontdoor.models.AggregationInterval":"Microsoft.Network.AggregationInterval","com.azure.resourcemanager.frontdoor.models.Availability":"Microsoft.Network.Availability","com.azure.resourcemanager.frontdoor.models.Backend":"Microsoft.Network.Backend","com.azure.resourcemanager.frontdoor.models.BackendEnabledState":"Microsoft.Network.BackendEnabledState","com.azure.resourcemanager.frontdoor.models.BackendPool":"Microsoft.Network.BackendPool","com.azure.resourcemanager.frontdoor.models.BackendPoolUpdateParameters":"Microsoft.Network.BackendPoolUpdateParameters","com.azure.resourcemanager.frontdoor.models.BackendPoolsSettings":"Microsoft.Network.BackendPoolsSettings","com.azure.resourcemanager.frontdoor.models.BasicResource":"Microsoft.Network.BasicResource","com.azure.resourcemanager.frontdoor.models.BasicResourceWithSettableIDName":"Microsoft.Network.BasicResourceWithSettableIDName","com.azure.resourcemanager.frontdoor.models.CacheConfiguration":"Microsoft.Network.CacheConfiguration","com.azure.resourcemanager.frontdoor.models.CheckNameAvailabilityInput":"Microsoft.Network.CheckNameAvailabilityInput","com.azure.resourcemanager.frontdoor.models.CustomHttpsConfiguration":"Microsoft.Network.CustomHttpsConfiguration","com.azure.resourcemanager.frontdoor.models.CustomHttpsProvisioningState":"Microsoft.Network.CustomHttpsProvisioningState","com.azure.resourcemanager.frontdoor.models.CustomHttpsProvisioningSubstate":"Microsoft.Network.CustomHttpsProvisioningSubstate","com.azure.resourcemanager.frontdoor.models.CustomRule":"Microsoft.Network.CustomRule","com.azure.resourcemanager.frontdoor.models.CustomRuleEnabledState":"Microsoft.Network.CustomRuleEnabledState","com.azure.resourcemanager.frontdoor.models.CustomRuleList":"Microsoft.Network.CustomRuleList","com.azure.resourcemanager.frontdoor.models.DynamicCompressionEnabled":"Microsoft.Network.DynamicCompressionEnabled","com.azure.resourcemanager.frontdoor.models.Endpoint":"Microsoft.Network.Endpoint","com.azure.resourcemanager.frontdoor.models.EndpointType":"Microsoft.Network.EndpointType","com.azure.resourcemanager.frontdoor.models.EnforceCertificateNameCheckEnabledState":"Microsoft.Network.EnforceCertificateNameCheckEnabledState","com.azure.resourcemanager.frontdoor.models.ExceptionMatchVariable":"Microsoft.Network.ExceptionMatchVariable","com.azure.resourcemanager.frontdoor.models.ExceptionSelectorMatchOperator":"Microsoft.Network.ExceptionSelectorMatchOperator","com.azure.resourcemanager.frontdoor.models.ExceptionValueMatchOperator":"Microsoft.Network.ExceptionValueMatchOperator","com.azure.resourcemanager.frontdoor.models.ExperimentUpdateModel":"Microsoft.Network.ExperimentUpdateModel","com.azure.resourcemanager.frontdoor.models.ForwardingConfiguration":"Microsoft.Network.ForwardingConfiguration","com.azure.resourcemanager.frontdoor.models.FrontDoorCertificateSource":"Microsoft.Network.FrontDoorCertificateSource","com.azure.resourcemanager.frontdoor.models.FrontDoorCertificateType":"Microsoft.Network.FrontDoorCertificateType","com.azure.resourcemanager.frontdoor.models.FrontDoorEnabledState":"Microsoft.Network.FrontDoorEnabledState","com.azure.resourcemanager.frontdoor.models.FrontDoorForwardingProtocol":"Microsoft.Network.FrontDoorForwardingProtocol","com.azure.resourcemanager.frontdoor.models.FrontDoorHealthProbeMethod":"Microsoft.Network.FrontDoorHealthProbeMethod","com.azure.resourcemanager.frontdoor.models.FrontDoorProtocol":"Microsoft.Network.FrontDoorProtocol","com.azure.resourcemanager.frontdoor.models.FrontDoorQuery":"Microsoft.Network.FrontDoorQuery","com.azure.resourcemanager.frontdoor.models.FrontDoorRedirectProtocol":"Microsoft.Network.FrontDoorRedirectProtocol","com.azure.resourcemanager.frontdoor.models.FrontDoorRedirectType":"Microsoft.Network.FrontDoorRedirectType","com.azure.resourcemanager.frontdoor.models.FrontDoorResourceState":"Microsoft.Network.FrontDoorResourceState","com.azure.resourcemanager.frontdoor.models.FrontDoorTlsProtocolType":"Microsoft.Network.FrontDoorTlsProtocolType","com.azure.resourcemanager.frontdoor.models.FrontDoorUpdateParameters":"Microsoft.Network.FrontDoorUpdateParameters","com.azure.resourcemanager.frontdoor.models.FrontendEndpointLink":"Microsoft.Network.FrontendEndpointLink","com.azure.resourcemanager.frontdoor.models.FrontendEndpointUpdateParameters":"Microsoft.Network.FrontendEndpointUpdateParameters","com.azure.resourcemanager.frontdoor.models.FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink":"Microsoft.Network.FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink","com.azure.resourcemanager.frontdoor.models.GroupByVariable":"Microsoft.Network.GroupByVariable","com.azure.resourcemanager.frontdoor.models.HeaderAction":"Microsoft.Network.HeaderAction","com.azure.resourcemanager.frontdoor.models.HeaderActionType":"Microsoft.Network.HeaderActionType","com.azure.resourcemanager.frontdoor.models.HealthProbeEnabled":"Microsoft.Network.HealthProbeEnabled","com.azure.resourcemanager.frontdoor.models.HealthProbeSettingsModel":"Microsoft.Network.HealthProbeSettingsModel","com.azure.resourcemanager.frontdoor.models.HealthProbeSettingsUpdateParameters":"Microsoft.Network.HealthProbeSettingsUpdateParameters","com.azure.resourcemanager.frontdoor.models.KeyVaultCertificateSourceParametersVault":"Microsoft.Network.KeyVaultCertificateSourceParametersVault","com.azure.resourcemanager.frontdoor.models.LatencyMetric":"Microsoft.Network.LatencyMetric","com.azure.resourcemanager.frontdoor.models.LatencyScorecardAggregationInterval":"Microsoft.Network.LatencyScorecardAggregationInterval","com.azure.resourcemanager.frontdoor.models.LoadBalancingSettingsModel":"Microsoft.Network.LoadBalancingSettingsModel","com.azure.resourcemanager.frontdoor.models.LoadBalancingSettingsUpdateParameters":"Microsoft.Network.LoadBalancingSettingsUpdateParameters","com.azure.resourcemanager.frontdoor.models.ManagedRuleDefinition":"Microsoft.Network.ManagedRuleDefinition","com.azure.resourcemanager.frontdoor.models.ManagedRuleEnabledState":"Microsoft.Network.ManagedRuleEnabledState","com.azure.resourcemanager.frontdoor.models.ManagedRuleExclusion":"Microsoft.Network.ManagedRuleExclusion","com.azure.resourcemanager.frontdoor.models.ManagedRuleExclusionMatchVariable":"Microsoft.Network.ManagedRuleExclusionMatchVariable","com.azure.resourcemanager.frontdoor.models.ManagedRuleExclusionSelectorMatchOperator":"Microsoft.Network.ManagedRuleExclusionSelectorMatchOperator","com.azure.resourcemanager.frontdoor.models.ManagedRuleGroupDefinition":"Microsoft.Network.ManagedRuleGroupDefinition","com.azure.resourcemanager.frontdoor.models.ManagedRuleGroupOverride":"Microsoft.Network.ManagedRuleGroupOverride","com.azure.resourcemanager.frontdoor.models.ManagedRuleOverride":"Microsoft.Network.ManagedRuleOverride","com.azure.resourcemanager.frontdoor.models.ManagedRuleSet":"Microsoft.Network.ManagedRuleSet","com.azure.resourcemanager.frontdoor.models.ManagedRuleSetActionType":"Microsoft.Network.ManagedRuleSetActionType","com.azure.resourcemanager.frontdoor.models.ManagedRuleSetException":"Microsoft.Network.ManagedRuleSetException","com.azure.resourcemanager.frontdoor.models.ManagedRuleSetExceptionList":"Microsoft.Network.ManagedRuleSetExceptionList","com.azure.resourcemanager.frontdoor.models.ManagedRuleSetList":"Microsoft.Network.ManagedRuleSetList","com.azure.resourcemanager.frontdoor.models.ManagedRuleSetScope":"Microsoft.Network.ManagedRuleSetScope","com.azure.resourcemanager.frontdoor.models.ManagedRuleSetStatus":"Microsoft.Network.ManagedRuleSetStatus","com.azure.resourcemanager.frontdoor.models.MatchCondition":"Microsoft.Network.MatchCondition","com.azure.resourcemanager.frontdoor.models.MatchProcessingBehavior":"Microsoft.Network.MatchProcessingBehavior","com.azure.resourcemanager.frontdoor.models.MatchVariable":"Microsoft.Network.MatchVariable","com.azure.resourcemanager.frontdoor.models.MinimumTlsVersion":"Microsoft.Network.MinimumTLSVersion","com.azure.resourcemanager.frontdoor.models.NetworkExperimentResourceState":"Microsoft.Network.NetworkExperimentResourceState","com.azure.resourcemanager.frontdoor.models.Operator":"Microsoft.Network.Operator","com.azure.resourcemanager.frontdoor.models.ParanoiaLevel":"Microsoft.Network.ParanoiaLevel","com.azure.resourcemanager.frontdoor.models.PolicyEnabledState":"Microsoft.Network.PolicyEnabledState","com.azure.resourcemanager.frontdoor.models.PolicyMode":"Microsoft.Network.PolicyMode","com.azure.resourcemanager.frontdoor.models.PolicyRequestBodyCheck":"Microsoft.Network.PolicyRequestBodyCheck","com.azure.resourcemanager.frontdoor.models.PolicyResourceState":"Microsoft.Network.PolicyResourceState","com.azure.resourcemanager.frontdoor.models.PolicySettings":"Microsoft.Network.PolicySettings","com.azure.resourcemanager.frontdoor.models.PrivateEndpointStatus":"Microsoft.Network.PrivateEndpointStatus","com.azure.resourcemanager.frontdoor.models.ProfileUpdateModel":"Microsoft.Network.ProfileUpdateModel","com.azure.resourcemanager.frontdoor.models.PurgeParameters":"Microsoft.Network.PurgeParameters","com.azure.resourcemanager.frontdoor.models.RedirectConfiguration":"Microsoft.Network.RedirectConfiguration","com.azure.resourcemanager.frontdoor.models.ResourceType":"Microsoft.Network.ResourceType","com.azure.resourcemanager.frontdoor.models.ResourcewithSettableName":"Microsoft.Network.ResourcewithSettableName","com.azure.resourcemanager.frontdoor.models.RouteConfiguration":"Microsoft.Network.RouteConfiguration","com.azure.resourcemanager.frontdoor.models.RoutingRule":"Microsoft.Network.RoutingRule","com.azure.resourcemanager.frontdoor.models.RoutingRuleEnabledState":"Microsoft.Network.RoutingRuleEnabledState","com.azure.resourcemanager.frontdoor.models.RoutingRuleLink":"Microsoft.Network.RoutingRuleLink","com.azure.resourcemanager.frontdoor.models.RoutingRuleUpdateParameters":"Microsoft.Network.RoutingRuleUpdateParameters","com.azure.resourcemanager.frontdoor.models.RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink":"Microsoft.Network.RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink","com.azure.resourcemanager.frontdoor.models.RuleGroupScope":"Microsoft.Network.RuleGroupScope","com.azure.resourcemanager.frontdoor.models.RuleScope":"Microsoft.Network.RuleScope","com.azure.resourcemanager.frontdoor.models.RuleType":"Microsoft.Network.RuleType","com.azure.resourcemanager.frontdoor.models.RulesEngineAction":"Microsoft.Network.RulesEngineAction","com.azure.resourcemanager.frontdoor.models.RulesEngineMatchCondition":"Microsoft.Network.RulesEngineMatchCondition","com.azure.resourcemanager.frontdoor.models.RulesEngineMatchVariable":"Microsoft.Network.RulesEngineMatchVariable","com.azure.resourcemanager.frontdoor.models.RulesEngineOperator":"Microsoft.Network.RulesEngineOperator","com.azure.resourcemanager.frontdoor.models.RulesEngineRule":"Microsoft.Network.RulesEngineRule","com.azure.resourcemanager.frontdoor.models.RulesEngineUpdateParameters":"Microsoft.Network.RulesEngineUpdateParameters","com.azure.resourcemanager.frontdoor.models.ScrubbingRuleEntryMatchOperator":"Microsoft.Network.ScrubbingRuleEntryMatchOperator","com.azure.resourcemanager.frontdoor.models.ScrubbingRuleEntryMatchVariable":"Microsoft.Network.ScrubbingRuleEntryMatchVariable","com.azure.resourcemanager.frontdoor.models.ScrubbingRuleEntryState":"Microsoft.Network.ScrubbingRuleEntryState","com.azure.resourcemanager.frontdoor.models.SecurityPolicyLink":"Microsoft.Network.SecurityPolicyLink","com.azure.resourcemanager.frontdoor.models.SensitivityType":"Microsoft.Network.SensitivityType","com.azure.resourcemanager.frontdoor.models.SessionAffinityEnabledState":"Microsoft.Network.SessionAffinityEnabledState","com.azure.resourcemanager.frontdoor.models.Sku":"Microsoft.Network.Sku","com.azure.resourcemanager.frontdoor.models.SkuName":"Microsoft.Network.SkuName","com.azure.resourcemanager.frontdoor.models.State":"Microsoft.Network.State","com.azure.resourcemanager.frontdoor.models.TagsObject":"Microsoft.Network.TagsObject","com.azure.resourcemanager.frontdoor.models.TimeseriesAggregationInterval":"Microsoft.Network.TimeseriesAggregationInterval","com.azure.resourcemanager.frontdoor.models.TimeseriesDataPoint":"Microsoft.Network.TimeseriesDataPoint","com.azure.resourcemanager.frontdoor.models.TimeseriesType":"Microsoft.Network.TimeseriesType","com.azure.resourcemanager.frontdoor.models.Transform":"Microsoft.Network.Transform","com.azure.resourcemanager.frontdoor.models.TransformType":"Microsoft.Network.TransformType","com.azure.resourcemanager.frontdoor.models.ValidateCustomDomainInput":"Microsoft.Network.ValidateCustomDomainInput","com.azure.resourcemanager.frontdoor.models.VariableName":"Microsoft.Network.VariableName","com.azure.resourcemanager.frontdoor.models.WebApplicationFirewallScrubbingRules":"Microsoft.Network.WebApplicationFirewallScrubbingRules","com.azure.resourcemanager.frontdoor.models.WebApplicationFirewallScrubbingState":"Microsoft.Network.WebApplicationFirewallScrubbingState"},"generatedFiles":["src/main/java/com/azure/resourcemanager/frontdoor/FrontDoorManager.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/EndpointsClient.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/ExperimentsClient.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/FrontDoorManagementClient.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/FrontDoorNameAvailabilitiesClient.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/FrontDoorNameAvailabilityWithSubscriptionsClient.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/FrontDoorsClient.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/FrontendEndpointsClient.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/ManagedRuleSetsClient.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/NetworkExperimentProfilesClient.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/PoliciesClient.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/PreconfiguredEndpointsClient.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/ReportsClient.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/RulesEnginesClient.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/BackendPoolProperties.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/CheckNameAvailabilityOutputInner.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/ExperimentInner.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/ExperimentProperties.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/ExperimentUpdateProperties.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/FrontDoorCertificateSourceParameters.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/FrontDoorInner.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/FrontDoorProperties.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/FrontendEndpointInner.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/FrontendEndpointProperties.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/HealthProbeSettingsProperties.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/KeyVaultCertificateSourceParameters.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/LatencyScorecardInner.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/LatencyScorecardProperties.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/LoadBalancingSettingsProperties.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/ManagedRuleSetDefinitionInner.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/ManagedRuleSetDefinitionProperties.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/PolicySettingsLogScrubbing.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/PreconfiguredEndpointInner.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/PreconfiguredEndpointProperties.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/ProfileInner.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/ProfileProperties.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/ProfileUpdateProperties.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/RoutingRuleProperties.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/RulesEngineInner.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/RulesEngineProperties.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/TimeseriesInner.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/TimeseriesProperties.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/ValidateCustomDomainOutputInner.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/WebApplicationFirewallPolicyInner.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/WebApplicationFirewallPolicyProperties.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/frontdoor/fluent/package-info.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/CheckNameAvailabilityOutputImpl.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/EndpointsClientImpl.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/EndpointsImpl.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/ExperimentImpl.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/ExperimentsClientImpl.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/ExperimentsImpl.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorImpl.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorManagementClientImpl.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorNameAvailabilitiesClientImpl.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorNameAvailabilitiesImpl.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorNameAvailabilityWithSubscriptionsClientImpl.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorNameAvailabilityWithSubscriptionsImpl.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorsClientImpl.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontDoorsImpl.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontendEndpointImpl.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontendEndpointsClientImpl.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/FrontendEndpointsImpl.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/LatencyScorecardImpl.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/ManagedRuleSetDefinitionImpl.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/ManagedRuleSetsClientImpl.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/ManagedRuleSetsImpl.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/NetworkExperimentProfilesClientImpl.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/NetworkExperimentProfilesImpl.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/PoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/PoliciesImpl.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/PreconfiguredEndpointImpl.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/PreconfiguredEndpointsClientImpl.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/PreconfiguredEndpointsImpl.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/ProfileImpl.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/ReportsClientImpl.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/ReportsImpl.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/RulesEngineImpl.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/RulesEnginesClientImpl.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/RulesEnginesImpl.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/TimeseriesImpl.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/ValidateCustomDomainOutputImpl.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/WebApplicationFirewallPolicyImpl.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/models/ExperimentList.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/models/FrontDoorListResult.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/models/FrontendEndpointsListResult.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/models/ManagedRuleSetDefinitionList.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/models/PreconfiguredEndpointList.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/models/ProfileList.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/models/RulesEngineListResult.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/models/WebApplicationFirewallPolicyList.java","src/main/java/com/azure/resourcemanager/frontdoor/implementation/package-info.java","src/main/java/com/azure/resourcemanager/frontdoor/models/ActionType.java","src/main/java/com/azure/resourcemanager/frontdoor/models/AggregationInterval.java","src/main/java/com/azure/resourcemanager/frontdoor/models/Availability.java","src/main/java/com/azure/resourcemanager/frontdoor/models/Backend.java","src/main/java/com/azure/resourcemanager/frontdoor/models/BackendEnabledState.java","src/main/java/com/azure/resourcemanager/frontdoor/models/BackendPool.java","src/main/java/com/azure/resourcemanager/frontdoor/models/BackendPoolUpdateParameters.java","src/main/java/com/azure/resourcemanager/frontdoor/models/BackendPoolsSettings.java","src/main/java/com/azure/resourcemanager/frontdoor/models/BasicResource.java","src/main/java/com/azure/resourcemanager/frontdoor/models/BasicResourceWithSettableIDName.java","src/main/java/com/azure/resourcemanager/frontdoor/models/CacheConfiguration.java","src/main/java/com/azure/resourcemanager/frontdoor/models/CheckNameAvailabilityInput.java","src/main/java/com/azure/resourcemanager/frontdoor/models/CheckNameAvailabilityOutput.java","src/main/java/com/azure/resourcemanager/frontdoor/models/CustomHttpsConfiguration.java","src/main/java/com/azure/resourcemanager/frontdoor/models/CustomHttpsProvisioningState.java","src/main/java/com/azure/resourcemanager/frontdoor/models/CustomHttpsProvisioningSubstate.java","src/main/java/com/azure/resourcemanager/frontdoor/models/CustomRule.java","src/main/java/com/azure/resourcemanager/frontdoor/models/CustomRuleEnabledState.java","src/main/java/com/azure/resourcemanager/frontdoor/models/CustomRuleList.java","src/main/java/com/azure/resourcemanager/frontdoor/models/DynamicCompressionEnabled.java","src/main/java/com/azure/resourcemanager/frontdoor/models/Endpoint.java","src/main/java/com/azure/resourcemanager/frontdoor/models/EndpointType.java","src/main/java/com/azure/resourcemanager/frontdoor/models/Endpoints.java","src/main/java/com/azure/resourcemanager/frontdoor/models/EnforceCertificateNameCheckEnabledState.java","src/main/java/com/azure/resourcemanager/frontdoor/models/ExceptionMatchVariable.java","src/main/java/com/azure/resourcemanager/frontdoor/models/ExceptionSelectorMatchOperator.java","src/main/java/com/azure/resourcemanager/frontdoor/models/ExceptionValueMatchOperator.java","src/main/java/com/azure/resourcemanager/frontdoor/models/Experiment.java","src/main/java/com/azure/resourcemanager/frontdoor/models/ExperimentUpdateModel.java","src/main/java/com/azure/resourcemanager/frontdoor/models/Experiments.java","src/main/java/com/azure/resourcemanager/frontdoor/models/ForwardingConfiguration.java","src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoor.java","src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorCertificateSource.java","src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorCertificateType.java","src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorEnabledState.java","src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorForwardingProtocol.java","src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorHealthProbeMethod.java","src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorNameAvailabilities.java","src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorNameAvailabilityWithSubscriptions.java","src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorProtocol.java","src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorQuery.java","src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorRedirectProtocol.java","src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorRedirectType.java","src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorResourceState.java","src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorTlsProtocolType.java","src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoorUpdateParameters.java","src/main/java/com/azure/resourcemanager/frontdoor/models/FrontDoors.java","src/main/java/com/azure/resourcemanager/frontdoor/models/FrontendEndpoint.java","src/main/java/com/azure/resourcemanager/frontdoor/models/FrontendEndpointLink.java","src/main/java/com/azure/resourcemanager/frontdoor/models/FrontendEndpointUpdateParameters.java","src/main/java/com/azure/resourcemanager/frontdoor/models/FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink.java","src/main/java/com/azure/resourcemanager/frontdoor/models/FrontendEndpoints.java","src/main/java/com/azure/resourcemanager/frontdoor/models/GroupByVariable.java","src/main/java/com/azure/resourcemanager/frontdoor/models/HeaderAction.java","src/main/java/com/azure/resourcemanager/frontdoor/models/HeaderActionType.java","src/main/java/com/azure/resourcemanager/frontdoor/models/HealthProbeEnabled.java","src/main/java/com/azure/resourcemanager/frontdoor/models/HealthProbeSettingsModel.java","src/main/java/com/azure/resourcemanager/frontdoor/models/HealthProbeSettingsUpdateParameters.java","src/main/java/com/azure/resourcemanager/frontdoor/models/KeyVaultCertificateSourceParametersVault.java","src/main/java/com/azure/resourcemanager/frontdoor/models/LatencyMetric.java","src/main/java/com/azure/resourcemanager/frontdoor/models/LatencyScorecard.java","src/main/java/com/azure/resourcemanager/frontdoor/models/LatencyScorecardAggregationInterval.java","src/main/java/com/azure/resourcemanager/frontdoor/models/LoadBalancingSettingsModel.java","src/main/java/com/azure/resourcemanager/frontdoor/models/LoadBalancingSettingsUpdateParameters.java","src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleDefinition.java","src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleEnabledState.java","src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleExclusion.java","src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleExclusionMatchVariable.java","src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleExclusionSelectorMatchOperator.java","src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleGroupDefinition.java","src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleGroupOverride.java","src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleOverride.java","src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSet.java","src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSetActionType.java","src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSetDefinition.java","src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSetException.java","src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSetExceptionList.java","src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSetList.java","src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSetScope.java","src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSetStatus.java","src/main/java/com/azure/resourcemanager/frontdoor/models/ManagedRuleSets.java","src/main/java/com/azure/resourcemanager/frontdoor/models/MatchCondition.java","src/main/java/com/azure/resourcemanager/frontdoor/models/MatchProcessingBehavior.java","src/main/java/com/azure/resourcemanager/frontdoor/models/MatchVariable.java","src/main/java/com/azure/resourcemanager/frontdoor/models/MinimumTlsVersion.java","src/main/java/com/azure/resourcemanager/frontdoor/models/NetworkExperimentProfiles.java","src/main/java/com/azure/resourcemanager/frontdoor/models/NetworkExperimentResourceState.java","src/main/java/com/azure/resourcemanager/frontdoor/models/Operator.java","src/main/java/com/azure/resourcemanager/frontdoor/models/ParanoiaLevel.java","src/main/java/com/azure/resourcemanager/frontdoor/models/Policies.java","src/main/java/com/azure/resourcemanager/frontdoor/models/PolicyEnabledState.java","src/main/java/com/azure/resourcemanager/frontdoor/models/PolicyMode.java","src/main/java/com/azure/resourcemanager/frontdoor/models/PolicyRequestBodyCheck.java","src/main/java/com/azure/resourcemanager/frontdoor/models/PolicyResourceState.java","src/main/java/com/azure/resourcemanager/frontdoor/models/PolicySettings.java","src/main/java/com/azure/resourcemanager/frontdoor/models/PreconfiguredEndpoint.java","src/main/java/com/azure/resourcemanager/frontdoor/models/PreconfiguredEndpoints.java","src/main/java/com/azure/resourcemanager/frontdoor/models/PrivateEndpointStatus.java","src/main/java/com/azure/resourcemanager/frontdoor/models/Profile.java","src/main/java/com/azure/resourcemanager/frontdoor/models/ProfileUpdateModel.java","src/main/java/com/azure/resourcemanager/frontdoor/models/PurgeParameters.java","src/main/java/com/azure/resourcemanager/frontdoor/models/RedirectConfiguration.java","src/main/java/com/azure/resourcemanager/frontdoor/models/Reports.java","src/main/java/com/azure/resourcemanager/frontdoor/models/ResourceType.java","src/main/java/com/azure/resourcemanager/frontdoor/models/ResourcewithSettableName.java","src/main/java/com/azure/resourcemanager/frontdoor/models/RouteConfiguration.java","src/main/java/com/azure/resourcemanager/frontdoor/models/RoutingRule.java","src/main/java/com/azure/resourcemanager/frontdoor/models/RoutingRuleEnabledState.java","src/main/java/com/azure/resourcemanager/frontdoor/models/RoutingRuleLink.java","src/main/java/com/azure/resourcemanager/frontdoor/models/RoutingRuleUpdateParameters.java","src/main/java/com/azure/resourcemanager/frontdoor/models/RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink.java","src/main/java/com/azure/resourcemanager/frontdoor/models/RuleGroupScope.java","src/main/java/com/azure/resourcemanager/frontdoor/models/RuleScope.java","src/main/java/com/azure/resourcemanager/frontdoor/models/RuleType.java","src/main/java/com/azure/resourcemanager/frontdoor/models/RulesEngine.java","src/main/java/com/azure/resourcemanager/frontdoor/models/RulesEngineAction.java","src/main/java/com/azure/resourcemanager/frontdoor/models/RulesEngineMatchCondition.java","src/main/java/com/azure/resourcemanager/frontdoor/models/RulesEngineMatchVariable.java","src/main/java/com/azure/resourcemanager/frontdoor/models/RulesEngineOperator.java","src/main/java/com/azure/resourcemanager/frontdoor/models/RulesEngineRule.java","src/main/java/com/azure/resourcemanager/frontdoor/models/RulesEngineUpdateParameters.java","src/main/java/com/azure/resourcemanager/frontdoor/models/RulesEngines.java","src/main/java/com/azure/resourcemanager/frontdoor/models/ScrubbingRuleEntryMatchOperator.java","src/main/java/com/azure/resourcemanager/frontdoor/models/ScrubbingRuleEntryMatchVariable.java","src/main/java/com/azure/resourcemanager/frontdoor/models/ScrubbingRuleEntryState.java","src/main/java/com/azure/resourcemanager/frontdoor/models/SecurityPolicyLink.java","src/main/java/com/azure/resourcemanager/frontdoor/models/SensitivityType.java","src/main/java/com/azure/resourcemanager/frontdoor/models/SessionAffinityEnabledState.java","src/main/java/com/azure/resourcemanager/frontdoor/models/Sku.java","src/main/java/com/azure/resourcemanager/frontdoor/models/SkuName.java","src/main/java/com/azure/resourcemanager/frontdoor/models/State.java","src/main/java/com/azure/resourcemanager/frontdoor/models/TagsObject.java","src/main/java/com/azure/resourcemanager/frontdoor/models/Timeseries.java","src/main/java/com/azure/resourcemanager/frontdoor/models/TimeseriesAggregationInterval.java","src/main/java/com/azure/resourcemanager/frontdoor/models/TimeseriesDataPoint.java","src/main/java/com/azure/resourcemanager/frontdoor/models/TimeseriesType.java","src/main/java/com/azure/resourcemanager/frontdoor/models/Transform.java","src/main/java/com/azure/resourcemanager/frontdoor/models/TransformType.java","src/main/java/com/azure/resourcemanager/frontdoor/models/ValidateCustomDomainInput.java","src/main/java/com/azure/resourcemanager/frontdoor/models/ValidateCustomDomainOutput.java","src/main/java/com/azure/resourcemanager/frontdoor/models/VariableName.java","src/main/java/com/azure/resourcemanager/frontdoor/models/WebApplicationFirewallPolicy.java","src/main/java/com/azure/resourcemanager/frontdoor/models/WebApplicationFirewallScrubbingRules.java","src/main/java/com/azure/resourcemanager/frontdoor/models/WebApplicationFirewallScrubbingState.java","src/main/java/com/azure/resourcemanager/frontdoor/models/package-info.java","src/main/java/com/azure/resourcemanager/frontdoor/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/resources/azure-resourcemanager-frontdoor.properties b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/resources/azure-resourcemanager-frontdoor.properties new file mode 100644 index 0000000000000..defbd48204e47 --- /dev/null +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/resources/azure-resourcemanager-frontdoor.properties @@ -0,0 +1 @@ +version=${project.version} diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/EndpointsPurgeContentSamples.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/EndpointsPurgeContentSamples.java index f2e986f3ba7d2..0c733c319d331 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/EndpointsPurgeContentSamples.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/EndpointsPurgeContentSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -12,8 +12,7 @@ */ public final class EndpointsPurgeContentSamples { /* - * x-ms-original-file: - * specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/FrontdoorPurgeContent.json + * x-ms-original-file: 2026-04-01/FrontdoorPurgeContent.json */ /** * Sample code: Purge content from Front Door. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/ExperimentsCreateOrUpdateSamples.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/ExperimentsCreateOrUpdateSamples.java index 3f2b8d4e7cd92..ea79819f6a896 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/ExperimentsCreateOrUpdateSamples.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/ExperimentsCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -12,8 +12,7 @@ */ public final class ExperimentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/ - * NetworkExperimentCreateExperiment.json + * x-ms-original-file: 2026-04-01/NetworkExperimentCreateExperiment.json */ /** * Sample code: Creates an Experiment. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/ExperimentsDeleteSamples.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/ExperimentsDeleteSamples.java index 44a0378046f75..91a777f079ab6 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/ExperimentsDeleteSamples.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/ExperimentsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -9,8 +9,7 @@ */ public final class ExperimentsDeleteSamples { /* - * x-ms-original-file: specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/ - * NetworkExperimentDeleteExperiment.json + * x-ms-original-file: 2026-04-01/NetworkExperimentDeleteExperiment.json */ /** * Sample code: Deletes an Experiment. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/ExperimentsGetSamples.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/ExperimentsGetSamples.java index 761c0022aa269..241bf35740dec 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/ExperimentsGetSamples.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/ExperimentsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -9,8 +9,7 @@ */ public final class ExperimentsGetSamples { /* - * x-ms-original-file: specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/ - * NetworkExperimentGetExperiment.json + * x-ms-original-file: 2026-04-01/NetworkExperimentGetExperiment.json */ /** * Sample code: Gets an Experiment by ExperimentName. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/ExperimentsListByProfileSamples.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/ExperimentsListByProfileSamples.java index 5374aa676fc37..dd441a3c71f5f 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/ExperimentsListByProfileSamples.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/ExperimentsListByProfileSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -9,8 +9,7 @@ */ public final class ExperimentsListByProfileSamples { /* - * x-ms-original-file: specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/ - * NetworkExperimentListExperiments.json + * x-ms-original-file: 2026-04-01/NetworkExperimentListExperiments.json */ /** * Sample code: Gets a list of Experiments. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/ExperimentsUpdateSamples.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/ExperimentsUpdateSamples.java index 7231fc94595bf..d7b61d4d0c11e 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/ExperimentsUpdateSamples.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/ExperimentsUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -12,8 +12,7 @@ */ public final class ExperimentsUpdateSamples { /* - * x-ms-original-file: specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/ - * NetworkExperimentUpdateExperiment.json + * x-ms-original-file: 2026-04-01/NetworkExperimentUpdateExperiment.json */ /** * Sample code: Updates an Experiment. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorNameAvailabilityCheckSamples.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorNameAvailabilityCheckSamples.java index 29bdf586860e0..0f6cdb269d755 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorNameAvailabilityCheckSamples.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorNameAvailabilityCheckSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -12,8 +12,7 @@ */ public final class FrontDoorNameAvailabilityCheckSamples { /* - * x-ms-original-file: specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/ - * CheckFrontdoorNameAvailability.json + * x-ms-original-file: 2026-04-01/CheckFrontdoorNameAvailability.json */ /** * Sample code: CheckNameAvailability. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorNameAvailabilityWithSubscriptionCheckSamples.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorNameAvailabilityWithSubscriptionCheckSamples.java index 52cc96ee99867..6011c8dc6fcb3 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorNameAvailabilityWithSubscriptionCheckSamples.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorNameAvailabilityWithSubscriptionCheckSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -12,8 +12,7 @@ */ public final class FrontDoorNameAvailabilityWithSubscriptionCheckSamples { /* - * x-ms-original-file: specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/ - * CheckFrontdoorNameAvailabilityWithSubscription.json + * x-ms-original-file: 2026-04-01/CheckFrontdoorNameAvailabilityWithSubscription.json */ /** * Sample code: CheckNameAvailabilityWithSubscription. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsCreateOrUpdateSamples.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsCreateOrUpdateSamples.java index 6edcca65d9456..08813ce9e0ef7 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsCreateOrUpdateSamples.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -31,8 +31,7 @@ */ public final class FrontDoorsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/FrontdoorCreate.json + * x-ms-original-file: 2026-04-01/FrontdoorCreate.json */ /** * Sample code: Create or update specific Front Door. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsDeleteSamples.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsDeleteSamples.java index 744cabc7237e9..53182b8142e19 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsDeleteSamples.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -9,8 +9,7 @@ */ public final class FrontDoorsDeleteSamples { /* - * x-ms-original-file: - * specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/FrontdoorDelete.json + * x-ms-original-file: 2026-04-01/FrontdoorDelete.json */ /** * Sample code: Delete Front Door. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsGetByResourceGroupSamples.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsGetByResourceGroupSamples.java index 79ccc3127802d..f3ed9670a3166 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsGetByResourceGroupSamples.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -9,8 +9,7 @@ */ public final class FrontDoorsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/FrontdoorGet.json + * x-ms-original-file: 2026-04-01/FrontdoorGet.json */ /** * Sample code: Get Front Door. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsListByResourceGroupSamples.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsListByResourceGroupSamples.java index 8ce695d921db0..afc3f62a58a21 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsListByResourceGroupSamples.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -9,8 +9,7 @@ */ public final class FrontDoorsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/FrontdoorList.json + * x-ms-original-file: 2026-04-01/FrontdoorList.json */ /** * Sample code: List Front Doors in a Resource Group. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsListSamples.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsListSamples.java index 7d445064734a4..d00435887ae22 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsListSamples.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -9,8 +9,7 @@ */ public final class FrontDoorsListSamples { /* - * x-ms-original-file: - * specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/FrontdoorListAll.json + * x-ms-original-file: 2026-04-01/FrontdoorListAll.json */ /** * Sample code: List all Front Doors. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsValidateCustomDomainSamples.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsValidateCustomDomainSamples.java index 315c9768c620e..74eaee1d4a570 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsValidateCustomDomainSamples.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsValidateCustomDomainSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -11,8 +11,7 @@ */ public final class FrontDoorsValidateCustomDomainSamples { /* - * x-ms-original-file: specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/ - * FrontdoorValidateCustomDomain.json + * x-ms-original-file: 2026-04-01/FrontdoorValidateCustomDomain.json */ /** * Sample code: FrontDoor_ValidateCustomDomain. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontendEndpointsDisableHttpsSamples.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontendEndpointsDisableHttpsSamples.java index 0cca89ea74090..03683713ca232 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontendEndpointsDisableHttpsSamples.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontendEndpointsDisableHttpsSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -9,8 +9,7 @@ */ public final class FrontendEndpointsDisableHttpsSamples { /* - * x-ms-original-file: - * specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/FrontdoorDisableHttps.json + * x-ms-original-file: 2026-04-01/FrontdoorDisableHttps.json */ /** * Sample code: FrontendEndpoints_DisableHttps. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontendEndpointsEnableHttpsSamples.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontendEndpointsEnableHttpsSamples.java index 55f21e0967686..0f73cb71c3538 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontendEndpointsEnableHttpsSamples.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontendEndpointsEnableHttpsSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -15,8 +15,7 @@ */ public final class FrontendEndpointsEnableHttpsSamples { /* - * x-ms-original-file: - * specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/FrontdoorEnableHttps.json + * x-ms-original-file: 2026-04-01/FrontdoorEnableHttps.json */ /** * Sample code: FrontendEndpoints_EnableHttps. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontendEndpointsGetSamples.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontendEndpointsGetSamples.java index 0575446d3f65b..5059fadcff339 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontendEndpointsGetSamples.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontendEndpointsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -9,8 +9,7 @@ */ public final class FrontendEndpointsGetSamples { /* - * x-ms-original-file: specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/ - * FrontdoorFrontendEndpointGet.json + * x-ms-original-file: 2026-04-01/FrontdoorFrontendEndpointGet.json */ /** * Sample code: Get Frontend Endpoint. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontendEndpointsListByFrontDoorSamples.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontendEndpointsListByFrontDoorSamples.java index 66d644f78c228..0ca05820a89c2 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontendEndpointsListByFrontDoorSamples.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/FrontendEndpointsListByFrontDoorSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -9,8 +9,7 @@ */ public final class FrontendEndpointsListByFrontDoorSamples { /* - * x-ms-original-file: specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/ - * FrontdoorFrontendEndpointList.json + * x-ms-original-file: 2026-04-01/FrontdoorFrontendEndpointList.json */ /** * Sample code: List Frontend endpoints in a Front Door. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleSetsListSamples.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleSetsListSamples.java index bf403f0ac5c69..119eba90b1beb 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleSetsListSamples.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleSetsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -9,8 +9,7 @@ */ public final class ManagedRuleSetsListSamples { /* - * x-ms-original-file: - * specification/frontdoor/resource-manager/Microsoft.Network/stable/2024-02-01/examples/WafListManagedRuleSets.json + * x-ms-original-file: 2026-04-01/WafListManagedRuleSets.json */ /** * Sample code: List Policies ManagedRuleSets in a Resource Group. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesCreateOrUpdateSamples.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesCreateOrUpdateSamples.java index 5361e1c38cb7e..39f398ffef064 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesCreateOrUpdateSamples.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -11,8 +11,7 @@ */ public final class NetworkExperimentProfilesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/ - * NetworkExperimentCreateProfile.json + * x-ms-original-file: 2026-04-01/NetworkExperimentCreateProfile.json */ /** * Sample code: Creates an NetworkExperiment Profile in a Resource Group. @@ -23,8 +22,8 @@ public static void createsAnNetworkExperimentProfileInAResourceGroup( com.azure.resourcemanager.frontdoor.FrontDoorManager manager) { manager.networkExperimentProfiles() .define("MyProfile") - .withRegion("WestUs") .withExistingResourceGroup("MyResourceGroup") + .withRegion("WestUs") .withEnabledState(State.ENABLED) .create(); } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesDeleteSamples.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesDeleteSamples.java index c69b8f3a96acc..61973a60c93f4 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesDeleteSamples.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -9,8 +9,7 @@ */ public final class NetworkExperimentProfilesDeleteSamples { /* - * x-ms-original-file: specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/ - * NetworkExperimentDeleteProfile.json + * x-ms-original-file: 2026-04-01/NetworkExperimentDeleteProfile.json */ /** * Sample code: Deletes an NetworkExperiment Profile by ProfileName. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesGetByResourceGroupSamples.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesGetByResourceGroupSamples.java index c294c5bab5e0d..9be30a8948be6 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesGetByResourceGroupSamples.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -9,9 +9,7 @@ */ public final class NetworkExperimentProfilesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/NetworkExperimentGetProfile - * .json + * x-ms-original-file: 2026-04-01/NetworkExperimentGetProfile.json */ /** * Sample code: Gets an NetworkExperiment Profile by Profile Id. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesListByResourceGroupSamples.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesListByResourceGroupSamples.java index 46fd628f93944..12dd4cebc6e8d 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesListByResourceGroupSamples.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -9,8 +9,7 @@ */ public final class NetworkExperimentProfilesListByResourceGroupSamples { /* - * x-ms-original-file: specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/ - * NetworkExperimentListProfiles.json + * x-ms-original-file: 2026-04-01/NetworkExperimentListByResourceGroupProfiles.json */ /** * Sample code: List NetworkExperiment Profiles in a Resource Group. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesListSamples.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesListSamples.java index 90b19c5f616c7..876a07274f444 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesListSamples.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -9,8 +9,7 @@ */ public final class NetworkExperimentProfilesListSamples { /* - * x-ms-original-file: specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/ - * NetworkExperimentListProfiles.json + * x-ms-original-file: 2026-04-01/NetworkExperimentListProfiles.json */ /** * Sample code: List NetworkExperiment Profiles in a Resource Group. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesUpdateSamples.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesUpdateSamples.java index 1c5d51eaea587..122a1bab69a47 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesUpdateSamples.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -14,8 +14,7 @@ */ public final class NetworkExperimentProfilesUpdateSamples { /* - * x-ms-original-file: specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/ - * NetworkExperimentUpdateProfile.json + * x-ms-original-file: 2026-04-01/NetworkExperimentUpdateProfile.json */ /** * Sample code: Updates an Experiment. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/PoliciesCreateOrUpdateSamples.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/PoliciesCreateOrUpdateSamples.java index 56fc333fba066..a67cf778904cd 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/PoliciesCreateOrUpdateSamples.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/PoliciesCreateOrUpdateSamples.java @@ -1,12 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; import com.azure.resourcemanager.frontdoor.models.ActionType; import com.azure.resourcemanager.frontdoor.models.CustomRule; import com.azure.resourcemanager.frontdoor.models.CustomRuleList; +import com.azure.resourcemanager.frontdoor.models.ExceptionMatchVariable; +import com.azure.resourcemanager.frontdoor.models.ExceptionSelectorMatchOperator; +import com.azure.resourcemanager.frontdoor.models.ExceptionValueMatchOperator; import com.azure.resourcemanager.frontdoor.models.ManagedRuleEnabledState; import com.azure.resourcemanager.frontdoor.models.ManagedRuleExclusion; import com.azure.resourcemanager.frontdoor.models.ManagedRuleExclusionMatchVariable; @@ -15,7 +18,10 @@ import com.azure.resourcemanager.frontdoor.models.ManagedRuleOverride; import com.azure.resourcemanager.frontdoor.models.ManagedRuleSet; import com.azure.resourcemanager.frontdoor.models.ManagedRuleSetActionType; +import com.azure.resourcemanager.frontdoor.models.ManagedRuleSetException; +import com.azure.resourcemanager.frontdoor.models.ManagedRuleSetExceptionList; import com.azure.resourcemanager.frontdoor.models.ManagedRuleSetList; +import com.azure.resourcemanager.frontdoor.models.ManagedRuleSetScope; import com.azure.resourcemanager.frontdoor.models.MatchCondition; import com.azure.resourcemanager.frontdoor.models.MatchVariable; import com.azure.resourcemanager.frontdoor.models.Operator; @@ -27,6 +33,7 @@ import com.azure.resourcemanager.frontdoor.models.ScrubbingRuleEntryMatchOperator; import com.azure.resourcemanager.frontdoor.models.ScrubbingRuleEntryMatchVariable; import com.azure.resourcemanager.frontdoor.models.ScrubbingRuleEntryState; +import com.azure.resourcemanager.frontdoor.models.SensitivityType; import com.azure.resourcemanager.frontdoor.models.Sku; import com.azure.resourcemanager.frontdoor.models.SkuName; import com.azure.resourcemanager.frontdoor.models.TransformType; @@ -39,9 +46,7 @@ */ public final class PoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/frontdoor/resource-manager/Microsoft.Network/stable/2024-02-01/examples/WafPolicyCreateOrUpdate. - * json + * x-ms-original-file: 2026-04-01/WafPolicyCreateOrUpdate.json */ /** * Sample code: Creates specific policy. @@ -62,6 +67,7 @@ public static void createsSpecificPolicy(com.azure.resourcemanager.frontdoor.Fro "PGh0bWw+CjxoZWFkZXI+PHRpdGxlPkhlbGxvPC90aXRsZT48L2hlYWRlcj4KPGJvZHk+CkhlbGxvIHdvcmxkCjwvYm9keT4KPC9odG1sPg==") .withRequestBodyCheck(PolicyRequestBodyCheck.DISABLED) .withJavascriptChallengeExpirationInMinutes(30) + .withCaptchaExpirationInMinutes(30) .withState(WebApplicationFirewallScrubbingState.ENABLED) .withScrubbingRules(Arrays.asList(new WebApplicationFirewallScrubbingRules() .withMatchVariable(ScrubbingRuleEntryMatchVariable.REQUEST_IPADDRESS) @@ -88,14 +94,22 @@ public static void createsSpecificPolicy(com.azure.resourcemanager.frontdoor.Fro .withOperator(Operator.CONTAINS) .withMatchValue(Arrays.asList("windows")) .withTransforms(Arrays.asList(TransformType.LOWERCASE)))) - .withAction(ActionType.BLOCK)))) + .withAction(ActionType.BLOCK), + new CustomRule().withName("Rule3") + .withPriority(1) + .withRuleType(RuleType.RATE_LIMIT_RULE) + .withRateLimitThreshold(1000) + .withMatchConditions(Arrays.asList(new MatchCondition().withMatchVariable(MatchVariable.REMOTE_ADDR) + .withOperator(Operator.SERVICE_TAG_MATCH) + .withMatchValue(Arrays.asList("AzureBackup", "AzureBotService")))) + .withAction(ActionType.CAPTCHA)))) .withManagedRules( new ManagedRuleSetList() .withManagedRuleSets( Arrays .asList( - new ManagedRuleSet().withRuleSetType("DefaultRuleSet") - .withRuleSetVersion("1.0") + new ManagedRuleSet().withRuleSetType("Microsoft_DefaultRuleSet") + .withRuleSetVersion("2.2") .withRuleSetAction(ManagedRuleSetActionType.BLOCK) .withExclusions(Arrays.asList(new ManagedRuleExclusion() .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_HEADER_NAMES) @@ -119,7 +133,26 @@ public static void createsSpecificPolicy(com.azure.resourcemanager.frontdoor.Fro ManagedRuleExclusionSelectorMatchOperator.EQUALS) .withSelector("query"))), new ManagedRuleOverride().withRuleId("942110") - .withEnabledState(ManagedRuleEnabledState.DISABLED)))))))) + .withEnabledState(ManagedRuleEnabledState.DISABLED))))), + new ManagedRuleSet().withRuleSetType("Microsoft_HTTPDDoSRuleSet") + .withRuleSetVersion("1.0") + .withRuleGroupOverrides(Arrays + .asList(new ManagedRuleGroupOverride().withRuleGroupName("ExcessiveRequests") + .withRules(Arrays.asList(new ManagedRuleOverride().withRuleId("500100") + .withEnabledState(ManagedRuleEnabledState.ENABLED) + .withAction(ActionType.BLOCK) + .withSensitivity(SensitivityType.HIGH))))))) + .withExceptionsList(new ManagedRuleSetExceptionList().withExceptions(Arrays.asList( + new ManagedRuleSetException().withMatchVariable(ExceptionMatchVariable.REQUEST_HEADER_NAMES) + .withSelectorMatchOperator(ExceptionSelectorMatchOperator.EQUALS) + .withSelector("User-Agent") + .withValueMatchOperator(ExceptionValueMatchOperator.CONTAINS) + .withMatchValues(Arrays.asList("Mozilla")) + .withScopes(Arrays.asList( + new ManagedRuleSetScope().withRuleSetType("Microsoft_DefaultRuleSet") + .withRuleSetVersion("2.2"), + new ManagedRuleSetScope().withRuleSetType("Microsoft_HTTPDDoSRuleSet") + .withRuleSetVersion("1.0"))))))) .create(); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/PoliciesDeleteSamples.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/PoliciesDeleteSamples.java index 50a7ccbffc9c7..2be0e506d3736 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/PoliciesDeleteSamples.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/PoliciesDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -9,8 +9,7 @@ */ public final class PoliciesDeleteSamples { /* - * x-ms-original-file: - * specification/frontdoor/resource-manager/Microsoft.Network/stable/2024-02-01/examples/WafPolicyDelete.json + * x-ms-original-file: 2026-04-01/WafPolicyDelete.json */ /** * Sample code: Delete protection policy. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/PoliciesGetByResourceGroupSamples.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/PoliciesGetByResourceGroupSamples.java index 1075e5107937f..4e868e4192383 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/PoliciesGetByResourceGroupSamples.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/PoliciesGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -9,8 +9,7 @@ */ public final class PoliciesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/frontdoor/resource-manager/Microsoft.Network/stable/2024-02-01/examples/WafPolicyGet.json + * x-ms-original-file: 2026-04-01/WafPolicyGet.json */ /** * Sample code: Get Policy. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/PoliciesListByResourceGroupSamples.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/PoliciesListByResourceGroupSamples.java index 0d547aaa9d595..22eaeb4135e0c 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/PoliciesListByResourceGroupSamples.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/PoliciesListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -9,8 +9,7 @@ */ public final class PoliciesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/frontdoor/resource-manager/Microsoft.Network/stable/2024-02-01/examples/WafListPolicies.json + * x-ms-original-file: 2026-04-01/WafListPolicies.json */ /** * Sample code: Get all Policies in a Resource Group. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/PoliciesListSamples.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/PoliciesListSamples.java index e5ea1fb66f153..4036acf3c69e9 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/PoliciesListSamples.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/PoliciesListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -9,8 +9,7 @@ */ public final class PoliciesListSamples { /* - * x-ms-original-file: specification/frontdoor/resource-manager/Microsoft.Network/stable/2024-02-01/examples/ - * WafListPoliciesUnderSubscription.json + * x-ms-original-file: 2026-04-01/WafListPoliciesUnderSubscription.json */ /** * Sample code: Get all Policies in a Resource Group. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/PoliciesUpdateSamples.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/PoliciesUpdateSamples.java index 6928295dacd96..bc09ccfe0f119 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/PoliciesUpdateSamples.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/PoliciesUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -13,8 +13,7 @@ */ public final class PoliciesUpdateSamples { /* - * x-ms-original-file: - * specification/frontdoor/resource-manager/Microsoft.Network/stable/2024-02-01/examples/WafPolicyPatch.json + * x-ms-original-file: 2026-04-01/WafPolicyPatch.json */ /** * Sample code: Patches specific policy. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/PreconfiguredEndpointsListSamples.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/PreconfiguredEndpointsListSamples.java index 5369d1db20359..065a1837c0a7d 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/PreconfiguredEndpointsListSamples.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/PreconfiguredEndpointsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -9,8 +9,7 @@ */ public final class PreconfiguredEndpointsListSamples { /* - * x-ms-original-file: specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/ - * NetworkExperimentGetPreconfiguredEndpoints.json + * x-ms-original-file: 2026-04-01/NetworkExperimentGetPreconfiguredEndpoints.json */ /** * Sample code: Gets a list of Preconfigured Endpoints. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/ReportsGetLatencyScorecardsSamples.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/ReportsGetLatencyScorecardsSamples.java index e757b2eb18547..f589817aebb93 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/ReportsGetLatencyScorecardsSamples.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/ReportsGetLatencyScorecardsSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -11,8 +11,7 @@ */ public final class ReportsGetLatencyScorecardsSamples { /* - * x-ms-original-file: specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/ - * NetworkExperimentGetLatencyScorecard.json + * x-ms-original-file: 2026-04-01/NetworkExperimentGetLatencyScorecard.json */ /** * Sample code: Gets a Latency Scorecard for a given Experiment. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/ReportsGetTimeseriesSamples.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/ReportsGetTimeseriesSamples.java index 9aed2016e009d..263b35b00f706 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/ReportsGetTimeseriesSamples.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/ReportsGetTimeseriesSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -13,8 +13,7 @@ */ public final class ReportsGetTimeseriesSamples { /* - * x-ms-original-file: specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-11-01/examples/ - * NetworkExperimentGetTimeseries.json + * x-ms-original-file: 2026-04-01/NetworkExperimentGetTimeseries.json */ /** * Sample code: Gets a Timeseries for a given Experiment. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/RulesEnginesCreateOrUpdateSamples.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/RulesEnginesCreateOrUpdateSamples.java index e3d7ae94ff331..e7c84563d8c0b 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/RulesEnginesCreateOrUpdateSamples.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/RulesEnginesCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -30,9 +30,7 @@ */ public final class RulesEnginesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/FrontdoorRulesEngineCreate. - * json + * x-ms-original-file: 2026-04-01/FrontdoorRulesEngineCreate.json */ /** * Sample code: Create or update a specific Rules Engine Configuration. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/RulesEnginesDeleteSamples.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/RulesEnginesDeleteSamples.java index 1e2110e59a043..23366d647a36c 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/RulesEnginesDeleteSamples.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/RulesEnginesDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -9,9 +9,7 @@ */ public final class RulesEnginesDeleteSamples { /* - * x-ms-original-file: - * specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/FrontdoorRulesEngineDelete. - * json + * x-ms-original-file: 2026-04-01/FrontdoorRulesEngineDelete.json */ /** * Sample code: Delete Rules Engine Configuration. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/RulesEnginesGetSamples.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/RulesEnginesGetSamples.java index ee9f5933466ce..d45f841c5c8c7 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/RulesEnginesGetSamples.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/RulesEnginesGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -9,9 +9,7 @@ */ public final class RulesEnginesGetSamples { /* - * x-ms-original-file: - * specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/FrontdoorRulesEngineGet. - * json + * x-ms-original-file: 2026-04-01/FrontdoorRulesEngineGet.json */ /** * Sample code: Get Rules Engine Configuration. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/RulesEnginesListByFrontDoorSamples.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/RulesEnginesListByFrontDoorSamples.java index 205550ba6155a..7f5a9b67f16c8 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/RulesEnginesListByFrontDoorSamples.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/samples/java/com/azure/resourcemanager/frontdoor/generated/RulesEnginesListByFrontDoorSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -9,9 +9,7 @@ */ public final class RulesEnginesListByFrontDoorSamples { /* - * x-ms-original-file: - * specification/frontdoor/resource-manager/Microsoft.Network/stable/2021-06-01/examples/FrontdoorRulesEngineList. - * json + * x-ms-original-file: 2026-04-01/FrontdoorRulesEngineList.json */ /** * Sample code: List Rules Engine Configurations in a Front Door. diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/BackendPoolPropertiesTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/BackendPoolPropertiesTests.java index c86f8625994d3..c9c4f9f10aa67 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/BackendPoolPropertiesTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/BackendPoolPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -16,75 +16,64 @@ public final class BackendPoolPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackendPoolProperties model = BinaryData.fromString( - "{\"resourceState\":\"Disabling\",\"backends\":[{\"address\":\"vv\",\"privateLinkAlias\":\"nk\",\"privateLinkResourceId\":\"hqyikvy\",\"privateLinkLocation\":\"uyav\",\"privateEndpointStatus\":\"Pending\",\"privateLinkApprovalMessage\":\"ncstt\",\"httpPort\":2120109491,\"httpsPort\":1869546664,\"enabledState\":\"Disabled\",\"priority\":1465256653,\"weight\":576086700,\"backendHostHeader\":\"gsgbdhuzq\"},{\"address\":\"j\",\"privateLinkAlias\":\"kynscliqhzv\",\"privateLinkResourceId\":\"nk\",\"privateLinkLocation\":\"tkubotppn\",\"privateEndpointStatus\":\"Disconnected\",\"privateLinkApprovalMessage\":\"xhihfrbbcevqagtl\",\"httpPort\":169373915,\"httpsPort\":1706986082,\"enabledState\":\"Enabled\",\"priority\":2094473580,\"weight\":1199430603,\"backendHostHeader\":\"vgtrdcnifmzzs\"},{\"address\":\"m\",\"privateLinkAlias\":\"nysuxmprafwgckh\",\"privateLinkResourceId\":\"xvd\",\"privateLinkLocation\":\"fwafqrouda\",\"privateEndpointStatus\":\"Rejected\",\"privateLinkApprovalMessage\":\"ehhr\",\"httpPort\":221531853,\"httpsPort\":50845900,\"enabledState\":\"Enabled\",\"priority\":484340114,\"weight\":83009194,\"backendHostHeader\":\"xg\"}],\"loadBalancingSettings\":{\"id\":\"yxcdyuibhmfdnbzy\"},\"healthProbeSettings\":{\"id\":\"vfcjnaeoisrvhmg\"}}") + "{\"resourceState\":\"Enabled\",\"backends\":[{\"address\":\"nzdndslgna\",\"privateLinkAlias\":\"igynduhavhqlk\",\"privateLinkResourceId\":\"umaq\",\"privateLinkLocation\":\"bgycduiertgccym\",\"privateEndpointStatus\":\"Timeout\",\"privateLinkApprovalMessage\":\"psslqlfmm\",\"httpPort\":1148330667,\"httpsPort\":532112858,\"enabledState\":\"Disabled\",\"priority\":1340500207,\"weight\":870818177,\"backendHostHeader\":\"d\"},{\"address\":\"wyhzdx\",\"privateLinkAlias\":\"adbzmnvdfznud\",\"privateLinkResourceId\":\"dvxzbncblylpst\",\"privateLinkLocation\":\"hh\",\"privateEndpointStatus\":\"Timeout\",\"privateLinkApprovalMessage\":\"dzu\",\"httpPort\":566185577,\"httpsPort\":1316965845,\"enabledState\":\"Enabled\",\"priority\":930284042,\"weight\":1008975068,\"backendHostHeader\":\"iwjmygtdssls\"}],\"loadBalancingSettings\":{\"id\":\"weriofzpyqsem\"},\"healthProbeSettings\":{\"id\":\"n\"}}") .toObject(BackendPoolProperties.class); - Assertions.assertEquals("vv", model.backends().get(0).address()); - Assertions.assertEquals("nk", model.backends().get(0).privateLinkAlias()); - Assertions.assertEquals("hqyikvy", model.backends().get(0).privateLinkResourceId()); - Assertions.assertEquals("uyav", model.backends().get(0).privateLinkLocation()); - Assertions.assertEquals("ncstt", model.backends().get(0).privateLinkApprovalMessage()); - Assertions.assertEquals(2120109491, model.backends().get(0).httpPort()); - Assertions.assertEquals(1869546664, model.backends().get(0).httpsPort()); + Assertions.assertEquals("nzdndslgna", model.backends().get(0).address()); + Assertions.assertEquals("igynduhavhqlk", model.backends().get(0).privateLinkAlias()); + Assertions.assertEquals("umaq", model.backends().get(0).privateLinkResourceId()); + Assertions.assertEquals("bgycduiertgccym", model.backends().get(0).privateLinkLocation()); + Assertions.assertEquals("psslqlfmm", model.backends().get(0).privateLinkApprovalMessage()); + Assertions.assertEquals(1148330667, model.backends().get(0).httpPort()); + Assertions.assertEquals(532112858, model.backends().get(0).httpsPort()); Assertions.assertEquals(BackendEnabledState.DISABLED, model.backends().get(0).enabledState()); - Assertions.assertEquals(1465256653, model.backends().get(0).priority()); - Assertions.assertEquals(576086700, model.backends().get(0).weight()); - Assertions.assertEquals("gsgbdhuzq", model.backends().get(0).backendHostHeader()); - Assertions.assertEquals("yxcdyuibhmfdnbzy", model.loadBalancingSettings().id()); - Assertions.assertEquals("vfcjnaeoisrvhmg", model.healthProbeSettings().id()); + Assertions.assertEquals(1340500207, model.backends().get(0).priority()); + Assertions.assertEquals(870818177, model.backends().get(0).weight()); + Assertions.assertEquals("d", model.backends().get(0).backendHostHeader()); + Assertions.assertEquals("weriofzpyqsem", model.loadBalancingSettings().id()); + Assertions.assertEquals("n", model.healthProbeSettings().id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { BackendPoolProperties model = new BackendPoolProperties() .withBackends(Arrays.asList( - new Backend().withAddress("vv") - .withPrivateLinkAlias("nk") - .withPrivateLinkResourceId("hqyikvy") - .withPrivateLinkLocation("uyav") - .withPrivateLinkApprovalMessage("ncstt") - .withHttpPort(2120109491) - .withHttpsPort(1869546664) + new Backend().withAddress("nzdndslgna") + .withPrivateLinkAlias("igynduhavhqlk") + .withPrivateLinkResourceId("umaq") + .withPrivateLinkLocation("bgycduiertgccym") + .withPrivateLinkApprovalMessage("psslqlfmm") + .withHttpPort(1148330667) + .withHttpsPort(532112858) .withEnabledState(BackendEnabledState.DISABLED) - .withPriority(1465256653) - .withWeight(576086700) - .withBackendHostHeader("gsgbdhuzq"), - new Backend().withAddress("j") - .withPrivateLinkAlias("kynscliqhzv") - .withPrivateLinkResourceId("nk") - .withPrivateLinkLocation("tkubotppn") - .withPrivateLinkApprovalMessage("xhihfrbbcevqagtl") - .withHttpPort(169373915) - .withHttpsPort(1706986082) + .withPriority(1340500207) + .withWeight(870818177) + .withBackendHostHeader("d"), + new Backend().withAddress("wyhzdx") + .withPrivateLinkAlias("adbzmnvdfznud") + .withPrivateLinkResourceId("dvxzbncblylpst") + .withPrivateLinkLocation("hh") + .withPrivateLinkApprovalMessage("dzu") + .withHttpPort(566185577) + .withHttpsPort(1316965845) .withEnabledState(BackendEnabledState.ENABLED) - .withPriority(2094473580) - .withWeight(1199430603) - .withBackendHostHeader("vgtrdcnifmzzs"), - new Backend().withAddress("m") - .withPrivateLinkAlias("nysuxmprafwgckh") - .withPrivateLinkResourceId("xvd") - .withPrivateLinkLocation("fwafqrouda") - .withPrivateLinkApprovalMessage("ehhr") - .withHttpPort(221531853) - .withHttpsPort(50845900) - .withEnabledState(BackendEnabledState.ENABLED) - .withPriority(484340114) - .withWeight(83009194) - .withBackendHostHeader("xg"))) - .withLoadBalancingSettings(new SubResource().withId("yxcdyuibhmfdnbzy")) - .withHealthProbeSettings(new SubResource().withId("vfcjnaeoisrvhmg")); + .withPriority(930284042) + .withWeight(1008975068) + .withBackendHostHeader("iwjmygtdssls"))) + .withLoadBalancingSettings(new SubResource().withId("weriofzpyqsem")) + .withHealthProbeSettings(new SubResource().withId("n")); model = BinaryData.fromObject(model).toObject(BackendPoolProperties.class); - Assertions.assertEquals("vv", model.backends().get(0).address()); - Assertions.assertEquals("nk", model.backends().get(0).privateLinkAlias()); - Assertions.assertEquals("hqyikvy", model.backends().get(0).privateLinkResourceId()); - Assertions.assertEquals("uyav", model.backends().get(0).privateLinkLocation()); - Assertions.assertEquals("ncstt", model.backends().get(0).privateLinkApprovalMessage()); - Assertions.assertEquals(2120109491, model.backends().get(0).httpPort()); - Assertions.assertEquals(1869546664, model.backends().get(0).httpsPort()); + Assertions.assertEquals("nzdndslgna", model.backends().get(0).address()); + Assertions.assertEquals("igynduhavhqlk", model.backends().get(0).privateLinkAlias()); + Assertions.assertEquals("umaq", model.backends().get(0).privateLinkResourceId()); + Assertions.assertEquals("bgycduiertgccym", model.backends().get(0).privateLinkLocation()); + Assertions.assertEquals("psslqlfmm", model.backends().get(0).privateLinkApprovalMessage()); + Assertions.assertEquals(1148330667, model.backends().get(0).httpPort()); + Assertions.assertEquals(532112858, model.backends().get(0).httpsPort()); Assertions.assertEquals(BackendEnabledState.DISABLED, model.backends().get(0).enabledState()); - Assertions.assertEquals(1465256653, model.backends().get(0).priority()); - Assertions.assertEquals(576086700, model.backends().get(0).weight()); - Assertions.assertEquals("gsgbdhuzq", model.backends().get(0).backendHostHeader()); - Assertions.assertEquals("yxcdyuibhmfdnbzy", model.loadBalancingSettings().id()); - Assertions.assertEquals("vfcjnaeoisrvhmg", model.healthProbeSettings().id()); + Assertions.assertEquals(1340500207, model.backends().get(0).priority()); + Assertions.assertEquals(870818177, model.backends().get(0).weight()); + Assertions.assertEquals("d", model.backends().get(0).backendHostHeader()); + Assertions.assertEquals("weriofzpyqsem", model.loadBalancingSettings().id()); + Assertions.assertEquals("n", model.healthProbeSettings().id()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/BackendPoolTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/BackendPoolTests.java index 28c072a3caa45..45a6764c8b06e 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/BackendPoolTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/BackendPoolTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -16,57 +16,80 @@ public final class BackendPoolTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackendPool model = BinaryData.fromString( - "{\"properties\":{\"resourceState\":\"Creating\",\"backends\":[{\"address\":\"awzqadfl\",\"privateLinkAlias\":\"ur\",\"privateLinkResourceId\":\"laecxndticok\",\"privateLinkLocation\":\"zmlqtmldgxo\",\"privateEndpointStatus\":\"Timeout\",\"privateLinkApprovalMessage\":\"clnpkci\",\"httpPort\":1763691901,\"httpsPort\":1109916167,\"enabledState\":\"Disabled\",\"priority\":609521578,\"weight\":529722805,\"backendHostHeader\":\"vjlboxqvk\"}],\"loadBalancingSettings\":{\"id\":\"xhom\"},\"healthProbeSettings\":{\"id\":\"hdwdi\"}},\"name\":\"mbnraauzzp\",\"type\":\"a\",\"id\":\"sdzhezww\"}") + "{\"properties\":{\"resourceState\":\"Disabling\",\"backends\":[{\"address\":\"cq\",\"privateLinkAlias\":\"xolzdahzx\",\"privateLinkResourceId\":\"obgbkdmoizp\",\"privateLinkLocation\":\"tmgrcfbun\",\"privateEndpointStatus\":\"Timeout\",\"privateLinkApprovalMessage\":\"jhhkxbp\",\"httpPort\":1880019175,\"httpsPort\":1776506496,\"enabledState\":\"Disabled\",\"priority\":256415791,\"weight\":195472365,\"backendHostHeader\":\"u\"},{\"address\":\"vkr\",\"privateLinkAlias\":\"wbxqzvszjfau\",\"privateLinkResourceId\":\"fdxxivetvtcqaqtd\",\"privateLinkLocation\":\"mcbxvwvxysl\",\"privateEndpointStatus\":\"Disconnected\",\"privateLinkApprovalMessage\":\"fxoblytkb\",\"httpPort\":293726964,\"httpsPort\":1854550992,\"enabledState\":\"Disabled\",\"priority\":889591338,\"weight\":1359376561,\"backendHostHeader\":\"rn\"},{\"address\":\"shqjohxcrsbf\",\"privateLinkAlias\":\"asrru\",\"privateLinkResourceId\":\"bhsqfsubcgjbirxb\",\"privateLinkLocation\":\"bsrfbj\",\"privateEndpointStatus\":\"Timeout\",\"privateLinkApprovalMessage\":\"ssotftpv\",\"httpPort\":1235013026,\"httpsPort\":1814798864,\"enabledState\":\"Enabled\",\"priority\":1391757407,\"weight\":1551412306,\"backendHostHeader\":\"q\"}],\"loadBalancingSettings\":{\"id\":\"pmqtaru\"},\"healthProbeSettings\":{\"id\":\"mkcjhwqytjrybn\"}},\"name\":\"ewgdrjervn\",\"type\":\"nqpeh\",\"id\":\"doy\"}") .toObject(BackendPool.class); - Assertions.assertEquals("sdzhezww", model.id()); - Assertions.assertEquals("mbnraauzzp", model.name()); - Assertions.assertEquals("awzqadfl", model.backends().get(0).address()); - Assertions.assertEquals("ur", model.backends().get(0).privateLinkAlias()); - Assertions.assertEquals("laecxndticok", model.backends().get(0).privateLinkResourceId()); - Assertions.assertEquals("zmlqtmldgxo", model.backends().get(0).privateLinkLocation()); - Assertions.assertEquals("clnpkci", model.backends().get(0).privateLinkApprovalMessage()); - Assertions.assertEquals(1763691901, model.backends().get(0).httpPort()); - Assertions.assertEquals(1109916167, model.backends().get(0).httpsPort()); + Assertions.assertEquals("doy", model.id()); + Assertions.assertEquals("ewgdrjervn", model.name()); + Assertions.assertEquals("cq", model.backends().get(0).address()); + Assertions.assertEquals("xolzdahzx", model.backends().get(0).privateLinkAlias()); + Assertions.assertEquals("obgbkdmoizp", model.backends().get(0).privateLinkResourceId()); + Assertions.assertEquals("tmgrcfbun", model.backends().get(0).privateLinkLocation()); + Assertions.assertEquals("jhhkxbp", model.backends().get(0).privateLinkApprovalMessage()); + Assertions.assertEquals(1880019175, model.backends().get(0).httpPort()); + Assertions.assertEquals(1776506496, model.backends().get(0).httpsPort()); Assertions.assertEquals(BackendEnabledState.DISABLED, model.backends().get(0).enabledState()); - Assertions.assertEquals(609521578, model.backends().get(0).priority()); - Assertions.assertEquals(529722805, model.backends().get(0).weight()); - Assertions.assertEquals("vjlboxqvk", model.backends().get(0).backendHostHeader()); - Assertions.assertEquals("xhom", model.loadBalancingSettings().id()); - Assertions.assertEquals("hdwdi", model.healthProbeSettings().id()); + Assertions.assertEquals(256415791, model.backends().get(0).priority()); + Assertions.assertEquals(195472365, model.backends().get(0).weight()); + Assertions.assertEquals("u", model.backends().get(0).backendHostHeader()); + Assertions.assertEquals("pmqtaru", model.loadBalancingSettings().id()); + Assertions.assertEquals("mkcjhwqytjrybn", model.healthProbeSettings().id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BackendPool model = new BackendPool().withId("sdzhezww") - .withName("mbnraauzzp") - .withBackends(Arrays.asList(new Backend().withAddress("awzqadfl") - .withPrivateLinkAlias("ur") - .withPrivateLinkResourceId("laecxndticok") - .withPrivateLinkLocation("zmlqtmldgxo") - .withPrivateLinkApprovalMessage("clnpkci") - .withHttpPort(1763691901) - .withHttpsPort(1109916167) - .withEnabledState(BackendEnabledState.DISABLED) - .withPriority(609521578) - .withWeight(529722805) - .withBackendHostHeader("vjlboxqvk"))) - .withLoadBalancingSettings(new SubResource().withId("xhom")) - .withHealthProbeSettings(new SubResource().withId("hdwdi")); + BackendPool model = new BackendPool().withId("doy") + .withName("ewgdrjervn") + .withBackends(Arrays.asList( + new Backend().withAddress("cq") + .withPrivateLinkAlias("xolzdahzx") + .withPrivateLinkResourceId("obgbkdmoizp") + .withPrivateLinkLocation("tmgrcfbun") + .withPrivateLinkApprovalMessage("jhhkxbp") + .withHttpPort(1880019175) + .withHttpsPort(1776506496) + .withEnabledState(BackendEnabledState.DISABLED) + .withPriority(256415791) + .withWeight(195472365) + .withBackendHostHeader("u"), + new Backend().withAddress("vkr") + .withPrivateLinkAlias("wbxqzvszjfau") + .withPrivateLinkResourceId("fdxxivetvtcqaqtd") + .withPrivateLinkLocation("mcbxvwvxysl") + .withPrivateLinkApprovalMessage("fxoblytkb") + .withHttpPort(293726964) + .withHttpsPort(1854550992) + .withEnabledState(BackendEnabledState.DISABLED) + .withPriority(889591338) + .withWeight(1359376561) + .withBackendHostHeader("rn"), + new Backend().withAddress("shqjohxcrsbf") + .withPrivateLinkAlias("asrru") + .withPrivateLinkResourceId("bhsqfsubcgjbirxb") + .withPrivateLinkLocation("bsrfbj") + .withPrivateLinkApprovalMessage("ssotftpv") + .withHttpPort(1235013026) + .withHttpsPort(1814798864) + .withEnabledState(BackendEnabledState.ENABLED) + .withPriority(1391757407) + .withWeight(1551412306) + .withBackendHostHeader("q"))) + .withLoadBalancingSettings(new SubResource().withId("pmqtaru")) + .withHealthProbeSettings(new SubResource().withId("mkcjhwqytjrybn")); model = BinaryData.fromObject(model).toObject(BackendPool.class); - Assertions.assertEquals("sdzhezww", model.id()); - Assertions.assertEquals("mbnraauzzp", model.name()); - Assertions.assertEquals("awzqadfl", model.backends().get(0).address()); - Assertions.assertEquals("ur", model.backends().get(0).privateLinkAlias()); - Assertions.assertEquals("laecxndticok", model.backends().get(0).privateLinkResourceId()); - Assertions.assertEquals("zmlqtmldgxo", model.backends().get(0).privateLinkLocation()); - Assertions.assertEquals("clnpkci", model.backends().get(0).privateLinkApprovalMessage()); - Assertions.assertEquals(1763691901, model.backends().get(0).httpPort()); - Assertions.assertEquals(1109916167, model.backends().get(0).httpsPort()); + Assertions.assertEquals("doy", model.id()); + Assertions.assertEquals("ewgdrjervn", model.name()); + Assertions.assertEquals("cq", model.backends().get(0).address()); + Assertions.assertEquals("xolzdahzx", model.backends().get(0).privateLinkAlias()); + Assertions.assertEquals("obgbkdmoizp", model.backends().get(0).privateLinkResourceId()); + Assertions.assertEquals("tmgrcfbun", model.backends().get(0).privateLinkLocation()); + Assertions.assertEquals("jhhkxbp", model.backends().get(0).privateLinkApprovalMessage()); + Assertions.assertEquals(1880019175, model.backends().get(0).httpPort()); + Assertions.assertEquals(1776506496, model.backends().get(0).httpsPort()); Assertions.assertEquals(BackendEnabledState.DISABLED, model.backends().get(0).enabledState()); - Assertions.assertEquals(609521578, model.backends().get(0).priority()); - Assertions.assertEquals(529722805, model.backends().get(0).weight()); - Assertions.assertEquals("vjlboxqvk", model.backends().get(0).backendHostHeader()); - Assertions.assertEquals("xhom", model.loadBalancingSettings().id()); - Assertions.assertEquals("hdwdi", model.healthProbeSettings().id()); + Assertions.assertEquals(256415791, model.backends().get(0).priority()); + Assertions.assertEquals(195472365, model.backends().get(0).weight()); + Assertions.assertEquals("u", model.backends().get(0).backendHostHeader()); + Assertions.assertEquals("pmqtaru", model.loadBalancingSettings().id()); + Assertions.assertEquals("mkcjhwqytjrybn", model.healthProbeSettings().id()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/BackendPoolUpdateParametersTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/BackendPoolUpdateParametersTests.java index 1ba7c04623060..691808bb48a29 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/BackendPoolUpdateParametersTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/BackendPoolUpdateParametersTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -16,75 +16,86 @@ public final class BackendPoolUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackendPoolUpdateParameters model = BinaryData.fromString( - "{\"backends\":[{\"address\":\"ukiscvwmzhw\",\"privateLinkAlias\":\"efaxvxilc\",\"privateLinkResourceId\":\"gnhnzeyq\",\"privateLinkLocation\":\"jjfzqlqhycavo\",\"privateEndpointStatus\":\"Rejected\",\"privateLinkApprovalMessage\":\"dbeesmie\",\"httpPort\":426944858,\"httpsPort\":1641970858,\"enabledState\":\"Enabled\",\"priority\":2070170024,\"weight\":1897469256,\"backendHostHeader\":\"agy\"},{\"address\":\"qfby\",\"privateLinkAlias\":\"rfgi\",\"privateLinkResourceId\":\"tcojocqwo\",\"privateLinkLocation\":\"nzjvusfzldm\",\"privateEndpointStatus\":\"Approved\",\"privateLinkApprovalMessage\":\"ylfsbtk\",\"httpPort\":2130953454,\"httpsPort\":201650328,\"enabledState\":\"Enabled\",\"priority\":1574366459,\"weight\":268742670,\"backendHostHeader\":\"bugrj\"},{\"address\":\"to\",\"privateLinkAlias\":\"mi\",\"privateLinkResourceId\":\"fieypefojyqdhcup\",\"privateLinkLocation\":\"plcwkhi\",\"privateEndpointStatus\":\"Timeout\",\"privateLinkApprovalMessage\":\"hzdsqtzbsrgnow\",\"httpPort\":994844547,\"httpsPort\":741446459,\"enabledState\":\"Enabled\",\"priority\":907830465,\"weight\":1670061981,\"backendHostHeader\":\"xmwoteyowcluqo\"}],\"loadBalancingSettings\":{\"id\":\"qvgqouw\"},\"healthProbeSettings\":{\"id\":\"mpjw\"}}") + "{\"backends\":[{\"address\":\"hszhedplvwiwu\",\"privateLinkAlias\":\"wmbesldnkw\",\"privateLinkResourceId\":\"pp\",\"privateLinkLocation\":\"lcxog\",\"privateEndpointStatus\":\"Pending\",\"privateLinkApprovalMessage\":\"nzmnsikvm\",\"httpPort\":517153396,\"httpsPort\":1984679669,\"enabledState\":\"Disabled\",\"priority\":52302074,\"weight\":1896660287,\"backendHostHeader\":\"xmhhvhgureo\"},{\"address\":\"wobdagxtibqdx\",\"privateLinkAlias\":\"wakbogqxndl\",\"privateLinkResourceId\":\"gxhuriplbp\",\"privateLinkLocation\":\"xunkbebxmubyynt\",\"privateEndpointStatus\":\"Rejected\",\"privateLinkApprovalMessage\":\"qtkoievs\",\"httpPort\":921402224,\"httpsPort\":143823433,\"enabledState\":\"Enabled\",\"priority\":407342571,\"weight\":98779693,\"backendHostHeader\":\"lauwzizxbmpgcjef\"},{\"address\":\"muvp\",\"privateLinkAlias\":\"tdum\",\"privateLinkResourceId\":\"p\",\"privateLinkLocation\":\"ebmnzbtbhjpglk\",\"privateEndpointStatus\":\"Pending\",\"privateLinkApprovalMessage\":\"dneu\",\"httpPort\":2052379315,\"httpsPort\":571890155,\"enabledState\":\"Disabled\",\"priority\":314213768,\"weight\":418216203,\"backendHostHeader\":\"fikdowwqu\"},{\"address\":\"xzxcl\",\"privateLinkAlias\":\"thhqzonosggbh\",\"privateLinkResourceId\":\"hfwdsjnkaljutiis\",\"privateLinkLocation\":\"cffgdkzzewk\",\"privateEndpointStatus\":\"Pending\",\"privateLinkApprovalMessage\":\"crailvpn\",\"httpPort\":831905679,\"httpsPort\":1159921712,\"enabledState\":\"Disabled\",\"priority\":15051004,\"weight\":1760230888,\"backendHostHeader\":\"lxyjr\"}],\"loadBalancingSettings\":{\"id\":\"gafcnihgwqapnedg\"},\"healthProbeSettings\":{\"id\":\"vkcvqvpkeqd\"}}") .toObject(BackendPoolUpdateParameters.class); - Assertions.assertEquals("ukiscvwmzhw", model.backends().get(0).address()); - Assertions.assertEquals("efaxvxilc", model.backends().get(0).privateLinkAlias()); - Assertions.assertEquals("gnhnzeyq", model.backends().get(0).privateLinkResourceId()); - Assertions.assertEquals("jjfzqlqhycavo", model.backends().get(0).privateLinkLocation()); - Assertions.assertEquals("dbeesmie", model.backends().get(0).privateLinkApprovalMessage()); - Assertions.assertEquals(426944858, model.backends().get(0).httpPort()); - Assertions.assertEquals(1641970858, model.backends().get(0).httpsPort()); - Assertions.assertEquals(BackendEnabledState.ENABLED, model.backends().get(0).enabledState()); - Assertions.assertEquals(2070170024, model.backends().get(0).priority()); - Assertions.assertEquals(1897469256, model.backends().get(0).weight()); - Assertions.assertEquals("agy", model.backends().get(0).backendHostHeader()); - Assertions.assertEquals("qvgqouw", model.loadBalancingSettings().id()); - Assertions.assertEquals("mpjw", model.healthProbeSettings().id()); + Assertions.assertEquals("hszhedplvwiwu", model.backends().get(0).address()); + Assertions.assertEquals("wmbesldnkw", model.backends().get(0).privateLinkAlias()); + Assertions.assertEquals("pp", model.backends().get(0).privateLinkResourceId()); + Assertions.assertEquals("lcxog", model.backends().get(0).privateLinkLocation()); + Assertions.assertEquals("nzmnsikvm", model.backends().get(0).privateLinkApprovalMessage()); + Assertions.assertEquals(517153396, model.backends().get(0).httpPort()); + Assertions.assertEquals(1984679669, model.backends().get(0).httpsPort()); + Assertions.assertEquals(BackendEnabledState.DISABLED, model.backends().get(0).enabledState()); + Assertions.assertEquals(52302074, model.backends().get(0).priority()); + Assertions.assertEquals(1896660287, model.backends().get(0).weight()); + Assertions.assertEquals("xmhhvhgureo", model.backends().get(0).backendHostHeader()); + Assertions.assertEquals("gafcnihgwqapnedg", model.loadBalancingSettings().id()); + Assertions.assertEquals("vkcvqvpkeqd", model.healthProbeSettings().id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { BackendPoolUpdateParameters model = new BackendPoolUpdateParameters() .withBackends(Arrays.asList( - new Backend().withAddress("ukiscvwmzhw") - .withPrivateLinkAlias("efaxvxilc") - .withPrivateLinkResourceId("gnhnzeyq") - .withPrivateLinkLocation("jjfzqlqhycavo") - .withPrivateLinkApprovalMessage("dbeesmie") - .withHttpPort(426944858) - .withHttpsPort(1641970858) + new Backend().withAddress("hszhedplvwiwu") + .withPrivateLinkAlias("wmbesldnkw") + .withPrivateLinkResourceId("pp") + .withPrivateLinkLocation("lcxog") + .withPrivateLinkApprovalMessage("nzmnsikvm") + .withHttpPort(517153396) + .withHttpsPort(1984679669) + .withEnabledState(BackendEnabledState.DISABLED) + .withPriority(52302074) + .withWeight(1896660287) + .withBackendHostHeader("xmhhvhgureo"), + new Backend().withAddress("wobdagxtibqdx") + .withPrivateLinkAlias("wakbogqxndl") + .withPrivateLinkResourceId("gxhuriplbp") + .withPrivateLinkLocation("xunkbebxmubyynt") + .withPrivateLinkApprovalMessage("qtkoievs") + .withHttpPort(921402224) + .withHttpsPort(143823433) .withEnabledState(BackendEnabledState.ENABLED) - .withPriority(2070170024) - .withWeight(1897469256) - .withBackendHostHeader("agy"), - new Backend().withAddress("qfby") - .withPrivateLinkAlias("rfgi") - .withPrivateLinkResourceId("tcojocqwo") - .withPrivateLinkLocation("nzjvusfzldm") - .withPrivateLinkApprovalMessage("ylfsbtk") - .withHttpPort(2130953454) - .withHttpsPort(201650328) - .withEnabledState(BackendEnabledState.ENABLED) - .withPriority(1574366459) - .withWeight(268742670) - .withBackendHostHeader("bugrj"), - new Backend().withAddress("to") - .withPrivateLinkAlias("mi") - .withPrivateLinkResourceId("fieypefojyqdhcup") - .withPrivateLinkLocation("plcwkhi") - .withPrivateLinkApprovalMessage("hzdsqtzbsrgnow") - .withHttpPort(994844547) - .withHttpsPort(741446459) - .withEnabledState(BackendEnabledState.ENABLED) - .withPriority(907830465) - .withWeight(1670061981) - .withBackendHostHeader("xmwoteyowcluqo"))) - .withLoadBalancingSettings(new SubResource().withId("qvgqouw")) - .withHealthProbeSettings(new SubResource().withId("mpjw")); + .withPriority(407342571) + .withWeight(98779693) + .withBackendHostHeader("lauwzizxbmpgcjef"), + new Backend().withAddress("muvp") + .withPrivateLinkAlias("tdum") + .withPrivateLinkResourceId("p") + .withPrivateLinkLocation("ebmnzbtbhjpglk") + .withPrivateLinkApprovalMessage("dneu") + .withHttpPort(2052379315) + .withHttpsPort(571890155) + .withEnabledState(BackendEnabledState.DISABLED) + .withPriority(314213768) + .withWeight(418216203) + .withBackendHostHeader("fikdowwqu"), + new Backend().withAddress("xzxcl") + .withPrivateLinkAlias("thhqzonosggbh") + .withPrivateLinkResourceId("hfwdsjnkaljutiis") + .withPrivateLinkLocation("cffgdkzzewk") + .withPrivateLinkApprovalMessage("crailvpn") + .withHttpPort(831905679) + .withHttpsPort(1159921712) + .withEnabledState(BackendEnabledState.DISABLED) + .withPriority(15051004) + .withWeight(1760230888) + .withBackendHostHeader("lxyjr"))) + .withLoadBalancingSettings(new SubResource().withId("gafcnihgwqapnedg")) + .withHealthProbeSettings(new SubResource().withId("vkcvqvpkeqd")); model = BinaryData.fromObject(model).toObject(BackendPoolUpdateParameters.class); - Assertions.assertEquals("ukiscvwmzhw", model.backends().get(0).address()); - Assertions.assertEquals("efaxvxilc", model.backends().get(0).privateLinkAlias()); - Assertions.assertEquals("gnhnzeyq", model.backends().get(0).privateLinkResourceId()); - Assertions.assertEquals("jjfzqlqhycavo", model.backends().get(0).privateLinkLocation()); - Assertions.assertEquals("dbeesmie", model.backends().get(0).privateLinkApprovalMessage()); - Assertions.assertEquals(426944858, model.backends().get(0).httpPort()); - Assertions.assertEquals(1641970858, model.backends().get(0).httpsPort()); - Assertions.assertEquals(BackendEnabledState.ENABLED, model.backends().get(0).enabledState()); - Assertions.assertEquals(2070170024, model.backends().get(0).priority()); - Assertions.assertEquals(1897469256, model.backends().get(0).weight()); - Assertions.assertEquals("agy", model.backends().get(0).backendHostHeader()); - Assertions.assertEquals("qvgqouw", model.loadBalancingSettings().id()); - Assertions.assertEquals("mpjw", model.healthProbeSettings().id()); + Assertions.assertEquals("hszhedplvwiwu", model.backends().get(0).address()); + Assertions.assertEquals("wmbesldnkw", model.backends().get(0).privateLinkAlias()); + Assertions.assertEquals("pp", model.backends().get(0).privateLinkResourceId()); + Assertions.assertEquals("lcxog", model.backends().get(0).privateLinkLocation()); + Assertions.assertEquals("nzmnsikvm", model.backends().get(0).privateLinkApprovalMessage()); + Assertions.assertEquals(517153396, model.backends().get(0).httpPort()); + Assertions.assertEquals(1984679669, model.backends().get(0).httpsPort()); + Assertions.assertEquals(BackendEnabledState.DISABLED, model.backends().get(0).enabledState()); + Assertions.assertEquals(52302074, model.backends().get(0).priority()); + Assertions.assertEquals(1896660287, model.backends().get(0).weight()); + Assertions.assertEquals("xmhhvhgureo", model.backends().get(0).backendHostHeader()); + Assertions.assertEquals("gafcnihgwqapnedg", model.loadBalancingSettings().id()); + Assertions.assertEquals("vkcvqvpkeqd", model.healthProbeSettings().id()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/BackendPoolsSettingsTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/BackendPoolsSettingsTests.java index 00960b11cd25b..1c87ec2002274 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/BackendPoolsSettingsTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/BackendPoolsSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -13,19 +13,19 @@ public final class BackendPoolsSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackendPoolsSettings model = BinaryData - .fromString("{\"enforceCertificateNameCheck\":\"Enabled\",\"sendRecvTimeoutSeconds\":455457939}") + .fromString("{\"enforceCertificateNameCheck\":\"Enabled\",\"sendRecvTimeoutSeconds\":1273171944}") .toObject(BackendPoolsSettings.class); Assertions.assertEquals(EnforceCertificateNameCheckEnabledState.ENABLED, model.enforceCertificateNameCheck()); - Assertions.assertEquals(455457939, model.sendRecvTimeoutSeconds()); + Assertions.assertEquals(1273171944, model.sendRecvTimeoutSeconds()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { BackendPoolsSettings model = new BackendPoolsSettings() .withEnforceCertificateNameCheck(EnforceCertificateNameCheckEnabledState.ENABLED) - .withSendRecvTimeoutSeconds(455457939); + .withSendRecvTimeoutSeconds(1273171944); model = BinaryData.fromObject(model).toObject(BackendPoolsSettings.class); Assertions.assertEquals(EnforceCertificateNameCheckEnabledState.ENABLED, model.enforceCertificateNameCheck()); - Assertions.assertEquals(455457939, model.sendRecvTimeoutSeconds()); + Assertions.assertEquals(1273171944, model.sendRecvTimeoutSeconds()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/BackendTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/BackendTests.java index 3e73b52c74d70..c212fdab06a18 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/BackendTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/BackendTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -13,45 +13,45 @@ public final class BackendTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { Backend model = BinaryData.fromString( - "{\"address\":\"vqikfxcvhrfsphu\",\"privateLinkAlias\":\"rttikteusqc\",\"privateLinkResourceId\":\"vyklxuby\",\"privateLinkLocation\":\"ff\",\"privateEndpointStatus\":\"Approved\",\"privateLinkApprovalMessage\":\"lcqcuubgqibrt\",\"httpPort\":2109412730,\"httpsPort\":1066879045,\"enabledState\":\"Enabled\",\"priority\":1081428420,\"weight\":1155063942,\"backendHostHeader\":\"qxihhrmooi\"}") + "{\"address\":\"drhvoodsotbo\",\"privateLinkAlias\":\"dopcjwvnh\",\"privateLinkResourceId\":\"d\",\"privateLinkLocation\":\"gx\",\"privateEndpointStatus\":\"Rejected\",\"privateLinkApprovalMessage\":\"lpmutwuoegrpkhj\",\"httpPort\":726839595,\"httpsPort\":1641060352,\"enabledState\":\"Disabled\",\"priority\":258381541,\"weight\":351540832,\"backendHostHeader\":\"ggkzzlvmbmpa\"}") .toObject(Backend.class); - Assertions.assertEquals("vqikfxcvhrfsphu", model.address()); - Assertions.assertEquals("rttikteusqc", model.privateLinkAlias()); - Assertions.assertEquals("vyklxuby", model.privateLinkResourceId()); - Assertions.assertEquals("ff", model.privateLinkLocation()); - Assertions.assertEquals("lcqcuubgqibrt", model.privateLinkApprovalMessage()); - Assertions.assertEquals(2109412730, model.httpPort()); - Assertions.assertEquals(1066879045, model.httpsPort()); - Assertions.assertEquals(BackendEnabledState.ENABLED, model.enabledState()); - Assertions.assertEquals(1081428420, model.priority()); - Assertions.assertEquals(1155063942, model.weight()); - Assertions.assertEquals("qxihhrmooi", model.backendHostHeader()); + Assertions.assertEquals("drhvoodsotbo", model.address()); + Assertions.assertEquals("dopcjwvnh", model.privateLinkAlias()); + Assertions.assertEquals("d", model.privateLinkResourceId()); + Assertions.assertEquals("gx", model.privateLinkLocation()); + Assertions.assertEquals("lpmutwuoegrpkhj", model.privateLinkApprovalMessage()); + Assertions.assertEquals(726839595, model.httpPort()); + Assertions.assertEquals(1641060352, model.httpsPort()); + Assertions.assertEquals(BackendEnabledState.DISABLED, model.enabledState()); + Assertions.assertEquals(258381541, model.priority()); + Assertions.assertEquals(351540832, model.weight()); + Assertions.assertEquals("ggkzzlvmbmpa", model.backendHostHeader()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Backend model = new Backend().withAddress("vqikfxcvhrfsphu") - .withPrivateLinkAlias("rttikteusqc") - .withPrivateLinkResourceId("vyklxuby") - .withPrivateLinkLocation("ff") - .withPrivateLinkApprovalMessage("lcqcuubgqibrt") - .withHttpPort(2109412730) - .withHttpsPort(1066879045) - .withEnabledState(BackendEnabledState.ENABLED) - .withPriority(1081428420) - .withWeight(1155063942) - .withBackendHostHeader("qxihhrmooi"); + Backend model = new Backend().withAddress("drhvoodsotbo") + .withPrivateLinkAlias("dopcjwvnh") + .withPrivateLinkResourceId("d") + .withPrivateLinkLocation("gx") + .withPrivateLinkApprovalMessage("lpmutwuoegrpkhj") + .withHttpPort(726839595) + .withHttpsPort(1641060352) + .withEnabledState(BackendEnabledState.DISABLED) + .withPriority(258381541) + .withWeight(351540832) + .withBackendHostHeader("ggkzzlvmbmpa"); model = BinaryData.fromObject(model).toObject(Backend.class); - Assertions.assertEquals("vqikfxcvhrfsphu", model.address()); - Assertions.assertEquals("rttikteusqc", model.privateLinkAlias()); - Assertions.assertEquals("vyklxuby", model.privateLinkResourceId()); - Assertions.assertEquals("ff", model.privateLinkLocation()); - Assertions.assertEquals("lcqcuubgqibrt", model.privateLinkApprovalMessage()); - Assertions.assertEquals(2109412730, model.httpPort()); - Assertions.assertEquals(1066879045, model.httpsPort()); - Assertions.assertEquals(BackendEnabledState.ENABLED, model.enabledState()); - Assertions.assertEquals(1081428420, model.priority()); - Assertions.assertEquals(1155063942, model.weight()); - Assertions.assertEquals("qxihhrmooi", model.backendHostHeader()); + Assertions.assertEquals("drhvoodsotbo", model.address()); + Assertions.assertEquals("dopcjwvnh", model.privateLinkAlias()); + Assertions.assertEquals("d", model.privateLinkResourceId()); + Assertions.assertEquals("gx", model.privateLinkLocation()); + Assertions.assertEquals("lpmutwuoegrpkhj", model.privateLinkApprovalMessage()); + Assertions.assertEquals(726839595, model.httpPort()); + Assertions.assertEquals(1641060352, model.httpsPort()); + Assertions.assertEquals(BackendEnabledState.DISABLED, model.enabledState()); + Assertions.assertEquals(258381541, model.priority()); + Assertions.assertEquals(351540832, model.weight()); + Assertions.assertEquals("ggkzzlvmbmpa", model.backendHostHeader()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/BasicResourceTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/BasicResourceTests.java new file mode 100644 index 0000000000000..3eb36c1a04934 --- /dev/null +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/BasicResourceTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.frontdoor.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.frontdoor.models.BasicResource; + +public final class BasicResourceTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BasicResource model = BinaryData.fromString("{\"id\":\"jpxac\",\"name\":\"udfnbyxba\",\"type\":\"bjyvay\"}") + .toObject(BasicResource.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BasicResource model = new BasicResource(); + model = BinaryData.fromObject(model).toObject(BasicResource.class); + } +} diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/BasicResourceWithSettableIDNameTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/BasicResourceWithSettableIDNameTests.java new file mode 100644 index 0000000000000..891fa99868be1 --- /dev/null +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/BasicResourceWithSettableIDNameTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.frontdoor.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.frontdoor.models.BasicResourceWithSettableIDName; +import org.junit.jupiter.api.Assertions; + +public final class BasicResourceWithSettableIDNameTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BasicResourceWithSettableIDName model + = BinaryData.fromString("{\"id\":\"akcp\",\"name\":\"yzvqt\",\"type\":\"ubex\"}") + .toObject(BasicResourceWithSettableIDName.class); + Assertions.assertEquals("akcp", model.id()); + Assertions.assertEquals("yzvqt", model.name()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BasicResourceWithSettableIDName model = new BasicResourceWithSettableIDName().withId("akcp").withName("yzvqt"); + model = BinaryData.fromObject(model).toObject(BasicResourceWithSettableIDName.class); + Assertions.assertEquals("akcp", model.id()); + Assertions.assertEquals("yzvqt", model.name()); + } +} diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/CacheConfigurationTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/CacheConfigurationTests.java index 4edb7105963e1..7e350a1dcc0b7 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/CacheConfigurationTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/CacheConfigurationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -15,24 +15,24 @@ public final class CacheConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CacheConfiguration model = BinaryData.fromString( - "{\"queryParameterStripDirective\":\"StripNone\",\"queryParameters\":\"ri\",\"dynamicCompression\":\"Enabled\",\"cacheDuration\":\"PT99H47M36S\"}") + "{\"queryParameterStripDirective\":\"StripAll\",\"queryParameters\":\"zbbtdzumveek\",\"dynamicCompression\":\"Enabled\",\"cacheDuration\":\"PT37H43M44S\"}") .toObject(CacheConfiguration.class); - Assertions.assertEquals(FrontDoorQuery.STRIP_NONE, model.queryParameterStripDirective()); - Assertions.assertEquals("ri", model.queryParameters()); + Assertions.assertEquals(FrontDoorQuery.STRIP_ALL, model.queryParameterStripDirective()); + Assertions.assertEquals("zbbtdzumveek", model.queryParameters()); Assertions.assertEquals(DynamicCompressionEnabled.ENABLED, model.dynamicCompression()); - Assertions.assertEquals(Duration.parse("PT99H47M36S"), model.cacheDuration()); + Assertions.assertEquals(Duration.parse("PT37H43M44S"), model.cacheDuration()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CacheConfiguration model = new CacheConfiguration().withQueryParameterStripDirective(FrontDoorQuery.STRIP_NONE) - .withQueryParameters("ri") + CacheConfiguration model = new CacheConfiguration().withQueryParameterStripDirective(FrontDoorQuery.STRIP_ALL) + .withQueryParameters("zbbtdzumveek") .withDynamicCompression(DynamicCompressionEnabled.ENABLED) - .withCacheDuration(Duration.parse("PT99H47M36S")); + .withCacheDuration(Duration.parse("PT37H43M44S")); model = BinaryData.fromObject(model).toObject(CacheConfiguration.class); - Assertions.assertEquals(FrontDoorQuery.STRIP_NONE, model.queryParameterStripDirective()); - Assertions.assertEquals("ri", model.queryParameters()); + Assertions.assertEquals(FrontDoorQuery.STRIP_ALL, model.queryParameterStripDirective()); + Assertions.assertEquals("zbbtdzumveek", model.queryParameters()); Assertions.assertEquals(DynamicCompressionEnabled.ENABLED, model.dynamicCompression()); - Assertions.assertEquals(Duration.parse("PT99H47M36S"), model.cacheDuration()); + Assertions.assertEquals(Duration.parse("PT37H43M44S"), model.cacheDuration()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/CheckNameAvailabilityInputTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/CheckNameAvailabilityInputTests.java index 24f54eed46fdc..a55d35df7940a 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/CheckNameAvailabilityInputTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/CheckNameAvailabilityInputTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -13,18 +13,18 @@ public final class CheckNameAvailabilityInputTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CheckNameAvailabilityInput model - = BinaryData.fromString("{\"name\":\"nkymuctqhjfbebrj\",\"type\":\"Microsoft.Network/frontDoors\"}") + = BinaryData.fromString("{\"name\":\"kxxpvbrd\",\"type\":\"Microsoft.Network/frontDoors\"}") .toObject(CheckNameAvailabilityInput.class); - Assertions.assertEquals("nkymuctqhjfbebrj", model.name()); + Assertions.assertEquals("kxxpvbrd", model.name()); Assertions.assertEquals(ResourceType.MICROSOFT_NETWORK_FRONT_DOORS, model.type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CheckNameAvailabilityInput model = new CheckNameAvailabilityInput().withName("nkymuctqhjfbebrj") + CheckNameAvailabilityInput model = new CheckNameAvailabilityInput().withName("kxxpvbrd") .withType(ResourceType.MICROSOFT_NETWORK_FRONT_DOORS); model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityInput.class); - Assertions.assertEquals("nkymuctqhjfbebrj", model.name()); + Assertions.assertEquals("kxxpvbrd", model.name()); Assertions.assertEquals(ResourceType.MICROSOFT_NETWORK_FRONT_DOORS, model.type()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/CheckNameAvailabilityOutputInnerTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/CheckNameAvailabilityOutputInnerTests.java index f74d211d020b5..a9d0919731533 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/CheckNameAvailabilityOutputInnerTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/CheckNameAvailabilityOutputInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -11,14 +11,7 @@ public final class CheckNameAvailabilityOutputInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CheckNameAvailabilityOutputInner model = BinaryData - .fromString( - "{\"nameAvailability\":\"Available\",\"reason\":\"uwutttxfvjrbi\",\"message\":\"hxepcyvahfnlj\"}") + .fromString("{\"nameAvailability\":\"Unavailable\",\"reason\":\"yzfhotlhi\",\"message\":\"yych\"}") .toObject(CheckNameAvailabilityOutputInner.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CheckNameAvailabilityOutputInner model = new CheckNameAvailabilityOutputInner(); - model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityOutputInner.class); - } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/CustomRuleListTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/CustomRuleListTests.java index 804c0e0c513b0..db5d5f53cbe29 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/CustomRuleListTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/CustomRuleListTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -23,78 +23,153 @@ public final class CustomRuleListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CustomRuleList model = BinaryData.fromString( - "{\"rules\":[{\"name\":\"ooojywifsqe\",\"priority\":1701108276,\"enabledState\":\"Disabled\",\"ruleType\":\"RateLimitRule\",\"rateLimitDurationInMinutes\":1678603587,\"rateLimitThreshold\":570858872,\"groupBy\":[{\"variableName\":\"GeoLocation\"},{\"variableName\":\"SocketAddr\"}],\"matchConditions\":[{\"matchVariable\":\"QueryString\",\"selector\":\"f\",\"operator\":\"GeoMatch\",\"negateCondition\":false,\"matchValue\":[\"ktsizntocipaou\",\"jpsq\",\"cmpoyfdkfogkny\",\"jofjd\"],\"transforms\":[\"Trim\"]},{\"matchVariable\":\"RequestHeader\",\"selector\":\"eupewnwreitjz\",\"operator\":\"GreaterThanOrEqual\",\"negateCondition\":true,\"matchValue\":[\"arhmofcqhsmy\",\"rkdtmlxh\"],\"transforms\":[\"Trim\",\"Lowercase\",\"UrlEncode\"]},{\"matchVariable\":\"SocketAddr\",\"selector\":\"ukcdmparcryuanzw\",\"operator\":\"Any\",\"negateCondition\":true,\"matchValue\":[\"t\",\"yrlhmwhfpmrqobm\"],\"transforms\":[\"UrlEncode\",\"Trim\",\"Uppercase\"]}],\"action\":\"JSChallenge\"}]}") + "{\"rules\":[{\"name\":\"dymbrny\",\"priority\":44176896,\"enabledState\":\"Disabled\",\"ruleType\":\"RateLimitRule\",\"rateLimitDurationInMinutes\":214541271,\"rateLimitThreshold\":1016215887,\"groupBy\":[{\"variableName\":\"GeoLocation\"}],\"matchConditions\":[{\"matchVariable\":\"JA4\",\"selector\":\"xvd\",\"operator\":\"Contains\",\"negateCondition\":false,\"matchValue\":[\"fqroudas\"],\"transforms\":[\"Uppercase\",\"Lowercase\",\"Uppercase\",\"UrlDecode\"]},{\"matchVariable\":\"RequestHeader\",\"selector\":\"bunzozudh\",\"operator\":\"LessThan\",\"negateCondition\":true,\"matchValue\":[\"oyxcdyuib\"],\"transforms\":[\"RemoveNulls\"]},{\"matchVariable\":\"JA4\",\"selector\":\"zydvfvf\",\"operator\":\"Any\",\"negateCondition\":false,\"matchValue\":[\"oisrvhmgorffu\",\"is\",\"vwmzhwplefaxvxil\"],\"transforms\":[\"RemoveNulls\"]},{\"matchVariable\":\"RequestUri\",\"selector\":\"nzeyqxtjj\",\"operator\":\"ServiceTagMatch\",\"negateCondition\":false,\"matchValue\":[\"hycav\",\"dggxdbeesmi\",\"knlrariaawiuagy\",\"wqfbylyrfgiagt\"],\"transforms\":[\"RemoveNulls\",\"Lowercase\",\"Trim\",\"Trim\"]}],\"action\":\"Redirect\"},{\"name\":\"fnzjvusfzldm\",\"priority\":1956453984,\"enabledState\":\"Disabled\",\"ruleType\":\"MatchRule\",\"rateLimitDurationInMinutes\":1764292422,\"rateLimitThreshold\":2142846069,\"groupBy\":[{\"variableName\":\"None\"},{\"variableName\":\"SocketAddr\"},{\"variableName\":\"None\"}],\"matchConditions\":[{\"matchVariable\":\"RequestUri\",\"selector\":\"wn\",\"operator\":\"EndsWith\",\"negateCondition\":false,\"matchValue\":[\"u\",\"rj\"],\"transforms\":[\"RemoveNulls\"]},{\"matchVariable\":\"QueryString\",\"selector\":\"mi\",\"operator\":\"BeginsWith\",\"negateCondition\":false,\"matchValue\":[\"ypefojyqdhcupl\",\"plcwkhi\",\"ihlhzdsqtzb\"],\"transforms\":[\"Lowercase\",\"UrlDecode\",\"Trim\",\"Lowercase\"]},{\"matchVariable\":\"RequestBody\",\"selector\":\"fgmvecactxmwo\",\"operator\":\"GreaterThanOrEqual\",\"negateCondition\":false,\"matchValue\":[\"cluqovekqvgqo\",\"wifzmp\",\"wyivqikf\",\"cvhrfsp\"],\"transforms\":[\"Lowercase\"]}],\"action\":\"Allow\"},{\"name\":\"tikteusqczkvykl\",\"priority\":505977286,\"enabledState\":\"Disabled\",\"ruleType\":\"RateLimitRule\",\"rateLimitDurationInMinutes\":490127820,\"rateLimitThreshold\":1774375239,\"groupBy\":[{\"variableName\":\"Ja4\"},{\"variableName\":\"SocketAddr\"}],\"matchConditions\":[{\"matchVariable\":\"SocketAddr\",\"selector\":\"u\",\"operator\":\"EndsWith\",\"negateCondition\":true,\"matchValue\":[\"brta\",\"metttwgd\"],\"transforms\":[\"UrlEncode\",\"UrlDecode\",\"UrlEncode\"]}],\"action\":\"JSChallenge\"},{\"name\":\"moo\",\"priority\":4493700,\"enabledState\":\"Enabled\",\"ruleType\":\"RateLimitRule\",\"rateLimitDurationInMinutes\":1524776028,\"rateLimitThreshold\":783149271,\"groupBy\":[{\"variableName\":\"SocketAddr\"},{\"variableName\":\"SocketAddr\"},{\"variableName\":\"Asn\"},{\"variableName\":\"None\"}],\"matchConditions\":[{\"matchVariable\":\"RequestHeader\",\"selector\":\"rpetogebjoxsl\",\"operator\":\"ClientFingerprint\",\"negateCondition\":false,\"matchValue\":[\"abrqnkkzj\",\"jb\",\"rgaehvvibrxjj\",\"toqbeitpkxztmoob\"],\"transforms\":[\"Uppercase\"]},{\"matchVariable\":\"PostArgs\",\"selector\":\"gfcwqmpimaqxzhem\",\"operator\":\"GreaterThanOrEqual\",\"negateCondition\":false,\"matchValue\":[\"uj\",\"wtwko\",\"zwculkbawpfajnj\",\"ltlwtjjguktalhs\"],\"transforms\":[\"Trim\",\"Lowercase\",\"UrlDecode\",\"Lowercase\"]}],\"action\":\"Allow\"}]}") .toObject(CustomRuleList.class); - Assertions.assertEquals("ooojywifsqe", model.rules().get(0).name()); - Assertions.assertEquals(1701108276, model.rules().get(0).priority()); + Assertions.assertEquals("dymbrny", model.rules().get(0).name()); + Assertions.assertEquals(44176896, model.rules().get(0).priority()); Assertions.assertEquals(CustomRuleEnabledState.DISABLED, model.rules().get(0).enabledState()); Assertions.assertEquals(RuleType.RATE_LIMIT_RULE, model.rules().get(0).ruleType()); - Assertions.assertEquals(1678603587, model.rules().get(0).rateLimitDurationInMinutes()); - Assertions.assertEquals(570858872, model.rules().get(0).rateLimitThreshold()); + Assertions.assertEquals(214541271, model.rules().get(0).rateLimitDurationInMinutes()); + Assertions.assertEquals(1016215887, model.rules().get(0).rateLimitThreshold()); Assertions.assertEquals(VariableName.GEO_LOCATION, model.rules().get(0).groupBy().get(0).variableName()); - Assertions.assertEquals(MatchVariable.QUERY_STRING, - model.rules().get(0).matchConditions().get(0).matchVariable()); - Assertions.assertEquals("f", model.rules().get(0).matchConditions().get(0).selector()); - Assertions.assertEquals(Operator.GEO_MATCH, model.rules().get(0).matchConditions().get(0).operator()); - Assertions.assertEquals(false, model.rules().get(0).matchConditions().get(0).negateCondition()); - Assertions.assertEquals("ktsizntocipaou", model.rules().get(0).matchConditions().get(0).matchValue().get(0)); - Assertions.assertEquals(TransformType.TRIM, model.rules().get(0).matchConditions().get(0).transforms().get(0)); - Assertions.assertEquals(ActionType.JSCHALLENGE, model.rules().get(0).action()); + Assertions.assertEquals(MatchVariable.JA4, model.rules().get(0).matchConditions().get(0).matchVariable()); + Assertions.assertEquals("xvd", model.rules().get(0).matchConditions().get(0).selector()); + Assertions.assertEquals(Operator.CONTAINS, model.rules().get(0).matchConditions().get(0).operator()); + Assertions.assertFalse(model.rules().get(0).matchConditions().get(0).negateCondition()); + Assertions.assertEquals("fqroudas", model.rules().get(0).matchConditions().get(0).matchValue().get(0)); + Assertions.assertEquals(TransformType.UPPERCASE, + model.rules().get(0).matchConditions().get(0).transforms().get(0)); + Assertions.assertEquals(ActionType.REDIRECT, model.rules().get(0).action()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { CustomRuleList model - = new CustomRuleList() - .withRules( - Arrays.asList(new CustomRule().withName("ooojywifsqe") - .withPriority(1701108276) - .withEnabledState(CustomRuleEnabledState.DISABLED) - .withRuleType(RuleType.RATE_LIMIT_RULE) - .withRateLimitDurationInMinutes(1678603587) - .withRateLimitThreshold(570858872) - .withGroupBy(Arrays.asList(new GroupByVariable().withVariableName(VariableName.GEO_LOCATION), - new GroupByVariable().withVariableName(VariableName.SOCKET_ADDR))) - .withMatchConditions( - Arrays - .asList( - new MatchCondition().withMatchVariable(MatchVariable.QUERY_STRING) - .withSelector("f") - .withOperator(Operator.GEO_MATCH) - .withNegateCondition(false) - .withMatchValue( - Arrays.asList("ktsizntocipaou", "jpsq", "cmpoyfdkfogkny", "jofjd")) - .withTransforms(Arrays.asList(TransformType.TRIM)), - new MatchCondition().withMatchVariable(MatchVariable.REQUEST_HEADER) - .withSelector("eupewnwreitjz") - .withOperator(Operator.GREATER_THAN_OR_EQUAL) - .withNegateCondition(true) - .withMatchValue(Arrays.asList("arhmofcqhsmy", "rkdtmlxh")) - .withTransforms(Arrays.asList(TransformType.TRIM, TransformType.LOWERCASE, - TransformType.URL_ENCODE)), - new MatchCondition().withMatchVariable(MatchVariable.SOCKET_ADDR) - .withSelector("ukcdmparcryuanzw") - .withOperator(Operator.ANY) - .withNegateCondition(true) - .withMatchValue(Arrays.asList("t", "yrlhmwhfpmrqobm")) - .withTransforms(Arrays.asList(TransformType.URL_ENCODE, TransformType.TRIM, - TransformType.UPPERCASE)))) - .withAction(ActionType.JSCHALLENGE))); + = new CustomRuleList().withRules(Arrays.asList( + new CustomRule().withName("dymbrny") + .withPriority(44176896) + .withEnabledState(CustomRuleEnabledState.DISABLED) + .withRuleType(RuleType.RATE_LIMIT_RULE) + .withRateLimitDurationInMinutes(214541271) + .withRateLimitThreshold(1016215887) + .withGroupBy(Arrays.asList(new GroupByVariable().withVariableName(VariableName.GEO_LOCATION))) + .withMatchConditions(Arrays.asList( + new MatchCondition().withMatchVariable(MatchVariable.JA4) + .withSelector("xvd") + .withOperator(Operator.CONTAINS) + .withNegateCondition(false) + .withMatchValue(Arrays.asList("fqroudas")) + .withTransforms(Arrays.asList(TransformType.UPPERCASE, TransformType.LOWERCASE, + TransformType.UPPERCASE, TransformType.URL_DECODE)), + new MatchCondition().withMatchVariable(MatchVariable.REQUEST_HEADER) + .withSelector("bunzozudh") + .withOperator(Operator.LESS_THAN) + .withNegateCondition(true) + .withMatchValue(Arrays.asList("oyxcdyuib")) + .withTransforms(Arrays.asList(TransformType.REMOVE_NULLS)), + new MatchCondition().withMatchVariable(MatchVariable.JA4) + .withSelector("zydvfvf") + .withOperator(Operator.ANY) + .withNegateCondition(false) + .withMatchValue(Arrays.asList("oisrvhmgorffu", "is", "vwmzhwplefaxvxil")) + .withTransforms(Arrays.asList(TransformType.REMOVE_NULLS)), + new MatchCondition().withMatchVariable(MatchVariable.REQUEST_URI) + .withSelector("nzeyqxtjj") + .withOperator(Operator.SERVICE_TAG_MATCH) + .withNegateCondition(false) + .withMatchValue(Arrays.asList("hycav", "dggxdbeesmi", "knlrariaawiuagy", "wqfbylyrfgiagt")) + .withTransforms(Arrays.asList(TransformType.REMOVE_NULLS, TransformType.LOWERCASE, + TransformType.TRIM, TransformType.TRIM)))) + .withAction(ActionType.REDIRECT), + new CustomRule().withName("fnzjvusfzldm") + .withPriority(1956453984) + .withEnabledState(CustomRuleEnabledState.DISABLED) + .withRuleType(RuleType.MATCH_RULE) + .withRateLimitDurationInMinutes(1764292422) + .withRateLimitThreshold(2142846069) + .withGroupBy(Arrays.asList(new GroupByVariable().withVariableName(VariableName.NONE), + new GroupByVariable().withVariableName(VariableName.SOCKET_ADDR), + new GroupByVariable().withVariableName(VariableName.NONE))) + .withMatchConditions(Arrays.asList( + new MatchCondition().withMatchVariable(MatchVariable.REQUEST_URI) + .withSelector("wn") + .withOperator(Operator.ENDS_WITH) + .withNegateCondition(false) + .withMatchValue(Arrays.asList("u", "rj")) + .withTransforms(Arrays.asList(TransformType.REMOVE_NULLS)), + new MatchCondition().withMatchVariable(MatchVariable.QUERY_STRING) + .withSelector("mi") + .withOperator(Operator.BEGINS_WITH) + .withNegateCondition(false) + .withMatchValue(Arrays.asList("ypefojyqdhcupl", "plcwkhi", "ihlhzdsqtzb")) + .withTransforms(Arrays.asList(TransformType.LOWERCASE, TransformType.URL_DECODE, + TransformType.TRIM, TransformType.LOWERCASE)), + new MatchCondition().withMatchVariable(MatchVariable.REQUEST_BODY) + .withSelector("fgmvecactxmwo") + .withOperator(Operator.GREATER_THAN_OR_EQUAL) + .withNegateCondition(false) + .withMatchValue(Arrays.asList("cluqovekqvgqo", "wifzmp", "wyivqikf", "cvhrfsp")) + .withTransforms(Arrays.asList(TransformType.LOWERCASE)))) + .withAction(ActionType.ALLOW), + new CustomRule().withName("tikteusqczkvykl") + .withPriority(505977286) + .withEnabledState(CustomRuleEnabledState.DISABLED) + .withRuleType(RuleType.RATE_LIMIT_RULE) + .withRateLimitDurationInMinutes(490127820) + .withRateLimitThreshold(1774375239) + .withGroupBy(Arrays.asList(new GroupByVariable().withVariableName(VariableName.JA4), + new GroupByVariable().withVariableName(VariableName.SOCKET_ADDR))) + .withMatchConditions(Arrays.asList(new MatchCondition().withMatchVariable(MatchVariable.SOCKET_ADDR) + .withSelector("u") + .withOperator(Operator.ENDS_WITH) + .withNegateCondition(true) + .withMatchValue(Arrays.asList("brta", "metttwgd")) + .withTransforms(Arrays.asList(TransformType.URL_ENCODE, TransformType.URL_DECODE, + TransformType.URL_ENCODE)))) + .withAction(ActionType.JSCHALLENGE), + new CustomRule().withName("moo") + .withPriority(4493700) + .withEnabledState(CustomRuleEnabledState.ENABLED) + .withRuleType(RuleType.RATE_LIMIT_RULE) + .withRateLimitDurationInMinutes(1524776028) + .withRateLimitThreshold(783149271) + .withGroupBy(Arrays.asList(new GroupByVariable().withVariableName(VariableName.SOCKET_ADDR), + new GroupByVariable().withVariableName(VariableName.SOCKET_ADDR), + new GroupByVariable().withVariableName(VariableName.ASN), + new GroupByVariable().withVariableName(VariableName.NONE))) + .withMatchConditions( + Arrays + .asList( + new MatchCondition().withMatchVariable(MatchVariable.REQUEST_HEADER) + .withSelector("rpetogebjoxsl") + .withOperator(Operator.CLIENT_FINGERPRINT) + .withNegateCondition(false) + .withMatchValue( + Arrays.asList("abrqnkkzj", "jb", "rgaehvvibrxjj", "toqbeitpkxztmoob")) + .withTransforms(Arrays.asList(TransformType.UPPERCASE)), + new MatchCondition().withMatchVariable(MatchVariable.POST_ARGS) + .withSelector("gfcwqmpimaqxzhem") + .withOperator(Operator.GREATER_THAN_OR_EQUAL) + .withNegateCondition(false) + .withMatchValue(Arrays.asList("uj", "wtwko", "zwculkbawpfajnj", "ltlwtjjguktalhs")) + .withTransforms(Arrays.asList(TransformType.TRIM, TransformType.LOWERCASE, + TransformType.URL_DECODE, TransformType.LOWERCASE)))) + .withAction(ActionType.ALLOW))); model = BinaryData.fromObject(model).toObject(CustomRuleList.class); - Assertions.assertEquals("ooojywifsqe", model.rules().get(0).name()); - Assertions.assertEquals(1701108276, model.rules().get(0).priority()); + Assertions.assertEquals("dymbrny", model.rules().get(0).name()); + Assertions.assertEquals(44176896, model.rules().get(0).priority()); Assertions.assertEquals(CustomRuleEnabledState.DISABLED, model.rules().get(0).enabledState()); Assertions.assertEquals(RuleType.RATE_LIMIT_RULE, model.rules().get(0).ruleType()); - Assertions.assertEquals(1678603587, model.rules().get(0).rateLimitDurationInMinutes()); - Assertions.assertEquals(570858872, model.rules().get(0).rateLimitThreshold()); + Assertions.assertEquals(214541271, model.rules().get(0).rateLimitDurationInMinutes()); + Assertions.assertEquals(1016215887, model.rules().get(0).rateLimitThreshold()); Assertions.assertEquals(VariableName.GEO_LOCATION, model.rules().get(0).groupBy().get(0).variableName()); - Assertions.assertEquals(MatchVariable.QUERY_STRING, - model.rules().get(0).matchConditions().get(0).matchVariable()); - Assertions.assertEquals("f", model.rules().get(0).matchConditions().get(0).selector()); - Assertions.assertEquals(Operator.GEO_MATCH, model.rules().get(0).matchConditions().get(0).operator()); - Assertions.assertEquals(false, model.rules().get(0).matchConditions().get(0).negateCondition()); - Assertions.assertEquals("ktsizntocipaou", model.rules().get(0).matchConditions().get(0).matchValue().get(0)); - Assertions.assertEquals(TransformType.TRIM, model.rules().get(0).matchConditions().get(0).transforms().get(0)); - Assertions.assertEquals(ActionType.JSCHALLENGE, model.rules().get(0).action()); + Assertions.assertEquals(MatchVariable.JA4, model.rules().get(0).matchConditions().get(0).matchVariable()); + Assertions.assertEquals("xvd", model.rules().get(0).matchConditions().get(0).selector()); + Assertions.assertEquals(Operator.CONTAINS, model.rules().get(0).matchConditions().get(0).operator()); + Assertions.assertFalse(model.rules().get(0).matchConditions().get(0).negateCondition()); + Assertions.assertEquals("fqroudas", model.rules().get(0).matchConditions().get(0).matchValue().get(0)); + Assertions.assertEquals(TransformType.UPPERCASE, + model.rules().get(0).matchConditions().get(0).transforms().get(0)); + Assertions.assertEquals(ActionType.REDIRECT, model.rules().get(0).action()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/CustomRuleTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/CustomRuleTests.java index d6add0ff33391..8c63f66beacae 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/CustomRuleTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/CustomRuleTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -22,82 +22,75 @@ public final class CustomRuleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CustomRule model = BinaryData.fromString( - "{\"name\":\"tihfx\",\"priority\":1773018691,\"enabledState\":\"Disabled\",\"ruleType\":\"RateLimitRule\",\"rateLimitDurationInMinutes\":322305671,\"rateLimitThreshold\":1747386848,\"groupBy\":[{\"variableName\":\"None\"},{\"variableName\":\"None\"},{\"variableName\":\"SocketAddr\"},{\"variableName\":\"GeoLocation\"}],\"matchConditions\":[{\"matchVariable\":\"RequestUri\",\"selector\":\"fcyzkohdbihanufh\",\"operator\":\"RegEx\",\"negateCondition\":false,\"matchValue\":[\"s\"],\"transforms\":[\"Trim\",\"Uppercase\",\"Uppercase\"]},{\"matchVariable\":\"SocketAddr\",\"selector\":\"abifpikxwczbys\",\"operator\":\"EndsWith\",\"negateCondition\":false,\"matchValue\":[\"uhivyqniw\"],\"transforms\":[\"RemoveNulls\"]},{\"matchVariable\":\"Cookies\",\"selector\":\"vd\",\"operator\":\"Contains\",\"negateCondition\":false,\"matchValue\":[\"tfwvukxgaudc\"],\"transforms\":[\"UrlDecode\",\"RemoveNulls\",\"Trim\"]},{\"matchVariable\":\"SocketAddr\",\"selector\":\"yejhk\",\"operator\":\"BeginsWith\",\"negateCondition\":true,\"matchValue\":[\"apcz\",\"lokjyemkk\",\"ni\"],\"transforms\":[\"Trim\",\"RemoveNulls\",\"RemoveNulls\",\"UrlDecode\"]}],\"action\":\"Block\"}") + "{\"name\":\"poaimlnwiaaomyl\",\"priority\":1672004300,\"enabledState\":\"Disabled\",\"ruleType\":\"RateLimitRule\",\"rateLimitDurationInMinutes\":670464675,\"rateLimitThreshold\":958825204,\"groupBy\":[{\"variableName\":\"Asn\"}],\"matchConditions\":[{\"matchVariable\":\"RequestBody\",\"selector\":\"jhlfzswpchwahf\",\"operator\":\"LessThan\",\"negateCondition\":true,\"matchValue\":[\"fepgfew\",\"twly\"],\"transforms\":[\"Uppercase\",\"Lowercase\",\"UrlDecode\",\"Trim\"]},{\"matchVariable\":\"SocketAddr\",\"selector\":\"djhlimm\",\"operator\":\"Equal\",\"negateCondition\":false,\"matchValue\":[\"bcporxvxcjzhqizx\"],\"transforms\":[\"RemoveNulls\",\"RemoveNulls\",\"Trim\",\"UrlEncode\"]},{\"matchVariable\":\"QueryString\",\"selector\":\"avft\",\"operator\":\"Contains\",\"negateCondition\":true,\"matchValue\":[\"azkmtgguwp\"],\"transforms\":[\"Uppercase\"]},{\"matchVariable\":\"SocketAddr\",\"selector\":\"ivmmghfcfiwrxgk\",\"operator\":\"IPMatch\",\"negateCondition\":false,\"matchValue\":[\"inzqodfvpgs\",\"oxgsgbpfgzdjtx\",\"zflbqvg\"],\"transforms\":[\"RemoveNulls\"]}],\"action\":\"JSChallenge\"}") .toObject(CustomRule.class); - Assertions.assertEquals("tihfx", model.name()); - Assertions.assertEquals(1773018691, model.priority()); + Assertions.assertEquals("poaimlnwiaaomyl", model.name()); + Assertions.assertEquals(1672004300, model.priority()); Assertions.assertEquals(CustomRuleEnabledState.DISABLED, model.enabledState()); Assertions.assertEquals(RuleType.RATE_LIMIT_RULE, model.ruleType()); - Assertions.assertEquals(322305671, model.rateLimitDurationInMinutes()); - Assertions.assertEquals(1747386848, model.rateLimitThreshold()); - Assertions.assertEquals(VariableName.NONE, model.groupBy().get(0).variableName()); - Assertions.assertEquals(MatchVariable.REQUEST_URI, model.matchConditions().get(0).matchVariable()); - Assertions.assertEquals("fcyzkohdbihanufh", model.matchConditions().get(0).selector()); - Assertions.assertEquals(Operator.REG_EX, model.matchConditions().get(0).operator()); - Assertions.assertEquals(false, model.matchConditions().get(0).negateCondition()); - Assertions.assertEquals("s", model.matchConditions().get(0).matchValue().get(0)); - Assertions.assertEquals(TransformType.TRIM, model.matchConditions().get(0).transforms().get(0)); - Assertions.assertEquals(ActionType.BLOCK, model.action()); + Assertions.assertEquals(670464675, model.rateLimitDurationInMinutes()); + Assertions.assertEquals(958825204, model.rateLimitThreshold()); + Assertions.assertEquals(VariableName.ASN, model.groupBy().get(0).variableName()); + Assertions.assertEquals(MatchVariable.REQUEST_BODY, model.matchConditions().get(0).matchVariable()); + Assertions.assertEquals("jhlfzswpchwahf", model.matchConditions().get(0).selector()); + Assertions.assertEquals(Operator.LESS_THAN, model.matchConditions().get(0).operator()); + Assertions.assertTrue(model.matchConditions().get(0).negateCondition()); + Assertions.assertEquals("fepgfew", model.matchConditions().get(0).matchValue().get(0)); + Assertions.assertEquals(TransformType.UPPERCASE, model.matchConditions().get(0).transforms().get(0)); + Assertions.assertEquals(ActionType.JSCHALLENGE, model.action()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CustomRule model - = new CustomRule().withName("tihfx") - .withPriority(1773018691) - .withEnabledState(CustomRuleEnabledState.DISABLED) - .withRuleType(RuleType.RATE_LIMIT_RULE) - .withRateLimitDurationInMinutes(322305671) - .withRateLimitThreshold(1747386848) - .withGroupBy(Arrays.asList(new GroupByVariable().withVariableName(VariableName.NONE), - new GroupByVariable().withVariableName(VariableName.NONE), new GroupByVariable().withVariableName( - VariableName.SOCKET_ADDR), - new GroupByVariable().withVariableName(VariableName.GEO_LOCATION))) - .withMatchConditions( - Arrays - .asList( - new MatchCondition().withMatchVariable(MatchVariable.REQUEST_URI) - .withSelector("fcyzkohdbihanufh") - .withOperator(Operator.REG_EX) - .withNegateCondition(false) - .withMatchValue(Arrays.asList("s")) - .withTransforms(Arrays.asList(TransformType.TRIM, TransformType.UPPERCASE, - TransformType.UPPERCASE)), - new MatchCondition().withMatchVariable(MatchVariable.SOCKET_ADDR) - .withSelector("abifpikxwczbys") - .withOperator(Operator.ENDS_WITH) - .withNegateCondition(false) - .withMatchValue(Arrays.asList("uhivyqniw")) - .withTransforms(Arrays.asList(TransformType.REMOVE_NULLS)), - new MatchCondition().withMatchVariable(MatchVariable.COOKIES) - .withSelector("vd") - .withOperator(Operator.CONTAINS) - .withNegateCondition(false) - .withMatchValue(Arrays.asList("tfwvukxgaudc")) - .withTransforms(Arrays.asList(TransformType.URL_DECODE, TransformType.REMOVE_NULLS, - TransformType.TRIM)), - new MatchCondition().withMatchVariable(MatchVariable.SOCKET_ADDR) - .withSelector("yejhk") - .withOperator(Operator.BEGINS_WITH) - .withNegateCondition(true) - .withMatchValue(Arrays.asList("apcz", "lokjyemkk", "ni")) - .withTransforms(Arrays.asList(TransformType.TRIM, TransformType.REMOVE_NULLS, - TransformType.REMOVE_NULLS, TransformType.URL_DECODE)))) - .withAction(ActionType.BLOCK); + CustomRule model = new CustomRule().withName("poaimlnwiaaomyl") + .withPriority(1672004300) + .withEnabledState(CustomRuleEnabledState.DISABLED) + .withRuleType(RuleType.RATE_LIMIT_RULE) + .withRateLimitDurationInMinutes(670464675) + .withRateLimitThreshold(958825204) + .withGroupBy(Arrays.asList(new GroupByVariable().withVariableName(VariableName.ASN))) + .withMatchConditions(Arrays.asList( + new MatchCondition().withMatchVariable(MatchVariable.REQUEST_BODY) + .withSelector("jhlfzswpchwahf") + .withOperator(Operator.LESS_THAN) + .withNegateCondition(true) + .withMatchValue(Arrays.asList("fepgfew", "twly")) + .withTransforms(Arrays.asList(TransformType.UPPERCASE, TransformType.LOWERCASE, + TransformType.URL_DECODE, TransformType.TRIM)), + new MatchCondition().withMatchVariable(MatchVariable.SOCKET_ADDR) + .withSelector("djhlimm") + .withOperator(Operator.EQUAL) + .withNegateCondition(false) + .withMatchValue(Arrays.asList("bcporxvxcjzhqizx")) + .withTransforms(Arrays.asList(TransformType.REMOVE_NULLS, TransformType.REMOVE_NULLS, + TransformType.TRIM, TransformType.URL_ENCODE)), + new MatchCondition().withMatchVariable(MatchVariable.QUERY_STRING) + .withSelector("avft") + .withOperator(Operator.CONTAINS) + .withNegateCondition(true) + .withMatchValue(Arrays.asList("azkmtgguwp")) + .withTransforms(Arrays.asList(TransformType.UPPERCASE)), + new MatchCondition().withMatchVariable(MatchVariable.SOCKET_ADDR) + .withSelector("ivmmghfcfiwrxgk") + .withOperator(Operator.IPMATCH) + .withNegateCondition(false) + .withMatchValue(Arrays.asList("inzqodfvpgs", "oxgsgbpfgzdjtx", "zflbqvg")) + .withTransforms(Arrays.asList(TransformType.REMOVE_NULLS)))) + .withAction(ActionType.JSCHALLENGE); model = BinaryData.fromObject(model).toObject(CustomRule.class); - Assertions.assertEquals("tihfx", model.name()); - Assertions.assertEquals(1773018691, model.priority()); + Assertions.assertEquals("poaimlnwiaaomyl", model.name()); + Assertions.assertEquals(1672004300, model.priority()); Assertions.assertEquals(CustomRuleEnabledState.DISABLED, model.enabledState()); Assertions.assertEquals(RuleType.RATE_LIMIT_RULE, model.ruleType()); - Assertions.assertEquals(322305671, model.rateLimitDurationInMinutes()); - Assertions.assertEquals(1747386848, model.rateLimitThreshold()); - Assertions.assertEquals(VariableName.NONE, model.groupBy().get(0).variableName()); - Assertions.assertEquals(MatchVariable.REQUEST_URI, model.matchConditions().get(0).matchVariable()); - Assertions.assertEquals("fcyzkohdbihanufh", model.matchConditions().get(0).selector()); - Assertions.assertEquals(Operator.REG_EX, model.matchConditions().get(0).operator()); - Assertions.assertEquals(false, model.matchConditions().get(0).negateCondition()); - Assertions.assertEquals("s", model.matchConditions().get(0).matchValue().get(0)); - Assertions.assertEquals(TransformType.TRIM, model.matchConditions().get(0).transforms().get(0)); - Assertions.assertEquals(ActionType.BLOCK, model.action()); + Assertions.assertEquals(670464675, model.rateLimitDurationInMinutes()); + Assertions.assertEquals(958825204, model.rateLimitThreshold()); + Assertions.assertEquals(VariableName.ASN, model.groupBy().get(0).variableName()); + Assertions.assertEquals(MatchVariable.REQUEST_BODY, model.matchConditions().get(0).matchVariable()); + Assertions.assertEquals("jhlfzswpchwahf", model.matchConditions().get(0).selector()); + Assertions.assertEquals(Operator.LESS_THAN, model.matchConditions().get(0).operator()); + Assertions.assertTrue(model.matchConditions().get(0).negateCondition()); + Assertions.assertEquals("fepgfew", model.matchConditions().get(0).matchValue().get(0)); + Assertions.assertEquals(TransformType.UPPERCASE, model.matchConditions().get(0).transforms().get(0)); + Assertions.assertEquals(ActionType.JSCHALLENGE, model.action()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/EndpointTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/EndpointTests.java index fa59faf0202ad..0346be009a20b 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/EndpointTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/EndpointTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -11,17 +11,17 @@ public final class EndpointTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - Endpoint model = BinaryData.fromString("{\"name\":\"lihrraiouaubr\",\"endpoint\":\"loqxfuojrngif\"}") + Endpoint model = BinaryData.fromString("{\"name\":\"nvuqeqvldspa\",\"endpoint\":\"jbkkdmflvestmjl\"}") .toObject(Endpoint.class); - Assertions.assertEquals("lihrraiouaubr", model.name()); - Assertions.assertEquals("loqxfuojrngif", model.endpoint()); + Assertions.assertEquals("nvuqeqvldspa", model.name()); + Assertions.assertEquals("jbkkdmflvestmjl", model.endpoint()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Endpoint model = new Endpoint().withName("lihrraiouaubr").withEndpoint("loqxfuojrngif"); + Endpoint model = new Endpoint().withName("nvuqeqvldspa").withEndpoint("jbkkdmflvestmjl"); model = BinaryData.fromObject(model).toObject(Endpoint.class); - Assertions.assertEquals("lihrraiouaubr", model.name()); - Assertions.assertEquals("loqxfuojrngif", model.endpoint()); + Assertions.assertEquals("nvuqeqvldspa", model.name()); + Assertions.assertEquals("jbkkdmflvestmjl", model.endpoint()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/EndpointsPurgeContentMockTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/EndpointsPurgeContentMockTests.java index 6197607dd5126..52f55a480a7f3 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/EndpointsPurgeContentMockTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/EndpointsPurgeContentMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.frontdoor.FrontDoorManager; import com.azure.resourcemanager.frontdoor.models.PurgeParameters; @@ -27,10 +27,11 @@ public void testPurgeContent() throws Exception { FrontDoorManager manager = FrontDoorManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.endpoints() - .purgeContent("gvttx", "nrup", new PurgeParameters().withContentPaths(Arrays.asList("amrdixtrekidswys")), + .purgeContent("i", "jceagb", + new PurgeParameters().withContentPaths(Arrays.asList("vl", "umyw", "ashxgonoyjfqi")), com.azure.core.util.Context.NONE); } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ExperimentInnerTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ExperimentInnerTests.java index 32a276c9d21c1..b8327b08fb048 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ExperimentInnerTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ExperimentInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -16,34 +16,34 @@ public final class ExperimentInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExperimentInner model = BinaryData.fromString( - "{\"properties\":{\"description\":\"jmonfdgn\",\"endpointA\":{\"name\":\"ypuuwwltvuqjctze\",\"endpoint\":\"eifzzhmk\"},\"endpointB\":{\"name\":\"vflyhbxcu\",\"endpoint\":\"hxgsrboldfor\"},\"enabledState\":\"Disabled\",\"resourceState\":\"Enabling\",\"status\":\"izbfhfovvacq\",\"scriptFileUri\":\"tuodxeszabbelaw\"},\"location\":\"muaslzkw\",\"tags\":{\"ahnomdrkywu\":\"oycqucwy\",\"lniexz\":\"psvfuurutlwexxwl\",\"tybbwwpgda\":\"rzpgep\"},\"id\":\"chzyvlixqnrk\",\"name\":\"xkjibnxmy\",\"type\":\"uxswqrntvl\"}") + "{\"properties\":{\"description\":\"hpodbzev\",\"endpointA\":{\"name\":\"nhf\",\"endpoint\":\"uvsj\"},\"endpointB\":{\"name\":\"smystuluqypfc\",\"endpoint\":\"er\"},\"enabledState\":\"Disabled\",\"resourceState\":\"Disabled\",\"status\":\"f\",\"scriptFileUri\":\"babwidfcxss\"},\"location\":\"uunnoxyhkxgqdd\",\"tags\":{\"djvlpj\":\"pfhoqcaaewdao\"},\"id\":\"xkzb\",\"name\":\"msgeivsiykzk\",\"type\":\"ncj\"}") .toObject(ExperimentInner.class); - Assertions.assertEquals("muaslzkw", model.location()); - Assertions.assertEquals("oycqucwy", model.tags().get("ahnomdrkywu")); - Assertions.assertEquals("jmonfdgn", model.description()); - Assertions.assertEquals("ypuuwwltvuqjctze", model.endpointA().name()); - Assertions.assertEquals("eifzzhmk", model.endpointA().endpoint()); - Assertions.assertEquals("vflyhbxcu", model.endpointB().name()); - Assertions.assertEquals("hxgsrboldfor", model.endpointB().endpoint()); + Assertions.assertEquals("uunnoxyhkxgqdd", model.location()); + Assertions.assertEquals("pfhoqcaaewdao", model.tags().get("djvlpj")); + Assertions.assertEquals("hpodbzev", model.description()); + Assertions.assertEquals("nhf", model.endpointA().name()); + Assertions.assertEquals("uvsj", model.endpointA().endpoint()); + Assertions.assertEquals("smystuluqypfc", model.endpointB().name()); + Assertions.assertEquals("er", model.endpointB().endpoint()); Assertions.assertEquals(State.DISABLED, model.enabledState()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ExperimentInner model = new ExperimentInner().withLocation("muaslzkw") - .withTags(mapOf("ahnomdrkywu", "oycqucwy", "lniexz", "psvfuurutlwexxwl", "tybbwwpgda", "rzpgep")) - .withDescription("jmonfdgn") - .withEndpointA(new Endpoint().withName("ypuuwwltvuqjctze").withEndpoint("eifzzhmk")) - .withEndpointB(new Endpoint().withName("vflyhbxcu").withEndpoint("hxgsrboldfor")) + ExperimentInner model = new ExperimentInner().withLocation("uunnoxyhkxgqdd") + .withTags(mapOf("djvlpj", "pfhoqcaaewdao")) + .withDescription("hpodbzev") + .withEndpointA(new Endpoint().withName("nhf").withEndpoint("uvsj")) + .withEndpointB(new Endpoint().withName("smystuluqypfc").withEndpoint("er")) .withEnabledState(State.DISABLED); model = BinaryData.fromObject(model).toObject(ExperimentInner.class); - Assertions.assertEquals("muaslzkw", model.location()); - Assertions.assertEquals("oycqucwy", model.tags().get("ahnomdrkywu")); - Assertions.assertEquals("jmonfdgn", model.description()); - Assertions.assertEquals("ypuuwwltvuqjctze", model.endpointA().name()); - Assertions.assertEquals("eifzzhmk", model.endpointA().endpoint()); - Assertions.assertEquals("vflyhbxcu", model.endpointB().name()); - Assertions.assertEquals("hxgsrboldfor", model.endpointB().endpoint()); + Assertions.assertEquals("uunnoxyhkxgqdd", model.location()); + Assertions.assertEquals("pfhoqcaaewdao", model.tags().get("djvlpj")); + Assertions.assertEquals("hpodbzev", model.description()); + Assertions.assertEquals("nhf", model.endpointA().name()); + Assertions.assertEquals("uvsj", model.endpointA().endpoint()); + Assertions.assertEquals("smystuluqypfc", model.endpointB().name()); + Assertions.assertEquals("er", model.endpointB().endpoint()); Assertions.assertEquals(State.DISABLED, model.enabledState()); } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ExperimentListTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ExperimentListTests.java index 899b6ab04aad4..d41706070f4a3 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ExperimentListTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ExperimentListTests.java @@ -1,26 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.frontdoor.models.ExperimentList; +import com.azure.resourcemanager.frontdoor.implementation.models.ExperimentList; import org.junit.jupiter.api.Assertions; public final class ExperimentListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExperimentList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"description\":\"fzpbgtgkyl\",\"endpointA\":{\"name\":\"hrjeuutlw\",\"endpoint\":\"z\"},\"endpointB\":{\"name\":\"okvbwnhhtqlgehg\",\"endpoint\":\"ipifhpfeoajvg\"},\"enabledState\":\"Disabled\",\"resourceState\":\"Deleting\",\"status\":\"sheafid\",\"scriptFileUri\":\"ugsresmkssjhoi\"},\"location\":\"txfkfweg\",\"tags\":{\"ucb\":\"ptil\"},\"id\":\"qtgdqohmcwsl\",\"name\":\"riz\",\"type\":\"tpwb\"},{\"properties\":{\"description\":\"llibphbqzmizak\",\"endpointA\":{\"name\":\"nkjpdnjzha\",\"endpoint\":\"ylhjlm\"},\"endpointB\":{\"name\":\"xprimrsop\",\"endpoint\":\"ecj\"},\"enabledState\":\"Enabled\",\"resourceState\":\"Disabled\",\"status\":\"tvasy\",\"scriptFileUri\":\"xdza\"},\"location\":\"mweoohgu\",\"tags\":{\"olbaemwmdx\":\"zboyjathwt\",\"f\":\"ebwjscjpahlxvea\",\"qcttadijaeukmrsi\":\"xnmwmqtibxyijddt\"},\"id\":\"ekpndzaapmudq\",\"name\":\"eqw\",\"type\":\"gp\"},{\"properties\":{\"description\":\"dqwyxeb\",\"endpointA\":{\"name\":\"pmzznrtffya\",\"endpoint\":\"tmhheioqa\"},\"endpointB\":{\"name\":\"seufuqy\",\"endpoint\":\"pdlc\"},\"enabledState\":\"Disabled\",\"resourceState\":\"Enabled\",\"status\":\"mjqfrddgamquhio\",\"scriptFileUri\":\"sjuivfcdisyir\"},\"location\":\"xzhczexrxz\",\"tags\":{\"zonzlrpiqywnc\":\"rtrhqvwrevkhgnl\",\"zehtdhgb\":\"jtszcof\",\"reljeamur\":\"k\"},\"id\":\"zmlovuanash\",\"name\":\"xlpm\",\"type\":\"erbdk\"}],\"nextLink\":\"vidizozsdb\"}") + "{\"value\":[{\"properties\":{\"description\":\"zrrjvpgly\",\"endpointA\":{\"name\":\"krvq\",\"endpoint\":\"vtoepryutnw\"},\"endpointB\":{\"name\":\"zdmovzv\",\"endpoint\":\"aawzqadfl\"},\"enabledState\":\"Enabled\",\"resourceState\":\"Enabling\",\"status\":\"laecxndticok\",\"scriptFileUri\":\"zmlqtmldgxo\"},\"location\":\"firclnpkciayz\",\"tags\":{\"jlmxhomdynhd\":\"khyawfvjlboxqv\",\"auzzptjazysd\":\"digumbnr\",\"uvvfonkp\":\"hezwwvaiq\",\"auy\":\"hqyikvy\"},\"id\":\"vluwmncsttij\",\"name\":\"y\",\"type\":\"vpo\"}],\"nextLink\":\"rsg\"}") .toObject(ExperimentList.class); - Assertions.assertEquals("vidizozsdb", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExperimentList model = new ExperimentList().withNextLink("vidizozsdb"); - model = BinaryData.fromObject(model).toObject(ExperimentList.class); - Assertions.assertEquals("vidizozsdb", model.nextLink()); + Assertions.assertEquals("rsg", model.nextLink()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ExperimentPropertiesTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ExperimentPropertiesTests.java index 46f95e35131a3..7de7be7919b03 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ExperimentPropertiesTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ExperimentPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -14,28 +14,28 @@ public final class ExperimentPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExperimentProperties model = BinaryData.fromString( - "{\"description\":\"jpsttexoq\",\"endpointA\":{\"name\":\"cyyufmh\",\"endpoint\":\"nc\"},\"endpointB\":{\"name\":\"qspkcdqzhlctd\",\"endpoint\":\"nqndyfpchrqbn\"},\"enabledState\":\"Disabled\",\"resourceState\":\"Creating\",\"status\":\"gydcw\",\"scriptFileUri\":\"xjumvq\"}") + "{\"description\":\"onbzoggculapzwy\",\"endpointA\":{\"name\":\"ogtqxepnylbf\",\"endpoint\":\"jlyjtlvofq\"},\"endpointB\":{\"name\":\"fcibyfmowuxrkj\",\"endpoint\":\"dwxf\"},\"enabledState\":\"Disabled\",\"resourceState\":\"Creating\",\"status\":\"zjb\",\"scriptFileUri\":\"zsxjrkambtrneg\"}") .toObject(ExperimentProperties.class); - Assertions.assertEquals("jpsttexoq", model.description()); - Assertions.assertEquals("cyyufmh", model.endpointA().name()); - Assertions.assertEquals("nc", model.endpointA().endpoint()); - Assertions.assertEquals("qspkcdqzhlctd", model.endpointB().name()); - Assertions.assertEquals("nqndyfpchrqbn", model.endpointB().endpoint()); + Assertions.assertEquals("onbzoggculapzwy", model.description()); + Assertions.assertEquals("ogtqxepnylbf", model.endpointA().name()); + Assertions.assertEquals("jlyjtlvofq", model.endpointA().endpoint()); + Assertions.assertEquals("fcibyfmowuxrkj", model.endpointB().name()); + Assertions.assertEquals("dwxf", model.endpointB().endpoint()); Assertions.assertEquals(State.DISABLED, model.enabledState()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ExperimentProperties model = new ExperimentProperties().withDescription("jpsttexoq") - .withEndpointA(new Endpoint().withName("cyyufmh").withEndpoint("nc")) - .withEndpointB(new Endpoint().withName("qspkcdqzhlctd").withEndpoint("nqndyfpchrqbn")) + ExperimentProperties model = new ExperimentProperties().withDescription("onbzoggculapzwy") + .withEndpointA(new Endpoint().withName("ogtqxepnylbf").withEndpoint("jlyjtlvofq")) + .withEndpointB(new Endpoint().withName("fcibyfmowuxrkj").withEndpoint("dwxf")) .withEnabledState(State.DISABLED); model = BinaryData.fromObject(model).toObject(ExperimentProperties.class); - Assertions.assertEquals("jpsttexoq", model.description()); - Assertions.assertEquals("cyyufmh", model.endpointA().name()); - Assertions.assertEquals("nc", model.endpointA().endpoint()); - Assertions.assertEquals("qspkcdqzhlctd", model.endpointB().name()); - Assertions.assertEquals("nqndyfpchrqbn", model.endpointB().endpoint()); + Assertions.assertEquals("onbzoggculapzwy", model.description()); + Assertions.assertEquals("ogtqxepnylbf", model.endpointA().name()); + Assertions.assertEquals("jlyjtlvofq", model.endpointA().endpoint()); + Assertions.assertEquals("fcibyfmowuxrkj", model.endpointB().name()); + Assertions.assertEquals("dwxf", model.endpointB().endpoint()); Assertions.assertEquals(State.DISABLED, model.enabledState()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ExperimentUpdateModelTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ExperimentUpdateModelTests.java index da8b083e617ab..8f96e68640dca 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ExperimentUpdateModelTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ExperimentUpdateModelTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -15,22 +15,22 @@ public final class ExperimentUpdateModelTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExperimentUpdateModel model = BinaryData.fromString( - "{\"tags\":{\"imzdlyj\":\"pasccbi\"},\"properties\":{\"description\":\"wmkyoqufdvruzsl\",\"enabledState\":\"Enabled\"}}") + "{\"tags\":{\"wk\":\"ilozapeewchpxlk\"},\"properties\":{\"description\":\"ycslevufuztcktyh\",\"enabledState\":\"Disabled\"}}") .toObject(ExperimentUpdateModel.class); - Assertions.assertEquals("pasccbi", model.tags().get("imzdlyj")); - Assertions.assertEquals("wmkyoqufdvruzsl", model.description()); - Assertions.assertEquals(State.ENABLED, model.enabledState()); + Assertions.assertEquals("ilozapeewchpxlk", model.tags().get("wk")); + Assertions.assertEquals("ycslevufuztcktyh", model.description()); + Assertions.assertEquals(State.DISABLED, model.enabledState()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ExperimentUpdateModel model = new ExperimentUpdateModel().withTags(mapOf("imzdlyj", "pasccbi")) - .withDescription("wmkyoqufdvruzsl") - .withEnabledState(State.ENABLED); + ExperimentUpdateModel model = new ExperimentUpdateModel().withTags(mapOf("wk", "ilozapeewchpxlk")) + .withDescription("ycslevufuztcktyh") + .withEnabledState(State.DISABLED); model = BinaryData.fromObject(model).toObject(ExperimentUpdateModel.class); - Assertions.assertEquals("pasccbi", model.tags().get("imzdlyj")); - Assertions.assertEquals("wmkyoqufdvruzsl", model.description()); - Assertions.assertEquals(State.ENABLED, model.enabledState()); + Assertions.assertEquals("ilozapeewchpxlk", model.tags().get("wk")); + Assertions.assertEquals("ycslevufuztcktyh", model.description()); + Assertions.assertEquals(State.DISABLED, model.enabledState()); } // Use "Map.of" if available diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ExperimentUpdatePropertiesTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ExperimentUpdatePropertiesTests.java index c70087b73d5e9..ffee17edaaf34 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ExperimentUpdatePropertiesTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ExperimentUpdatePropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -13,18 +13,18 @@ public final class ExperimentUpdatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExperimentUpdateProperties model - = BinaryData.fromString("{\"description\":\"pctf\",\"enabledState\":\"Enabled\"}") + = BinaryData.fromString("{\"description\":\"dcgzul\",\"enabledState\":\"Disabled\"}") .toObject(ExperimentUpdateProperties.class); - Assertions.assertEquals("pctf", model.description()); - Assertions.assertEquals(State.ENABLED, model.enabledState()); + Assertions.assertEquals("dcgzul", model.description()); + Assertions.assertEquals(State.DISABLED, model.enabledState()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ExperimentUpdateProperties model - = new ExperimentUpdateProperties().withDescription("pctf").withEnabledState(State.ENABLED); + = new ExperimentUpdateProperties().withDescription("dcgzul").withEnabledState(State.DISABLED); model = BinaryData.fromObject(model).toObject(ExperimentUpdateProperties.class); - Assertions.assertEquals("pctf", model.description()); - Assertions.assertEquals(State.ENABLED, model.enabledState()); + Assertions.assertEquals("dcgzul", model.description()); + Assertions.assertEquals(State.DISABLED, model.enabledState()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ExperimentsCreateOrUpdateMockTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ExperimentsCreateOrUpdateMockTests.java index f79ee1827c40e..91203fcc6cff3 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ExperimentsCreateOrUpdateMockTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ExperimentsCreateOrUpdateMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.frontdoor.FrontDoorManager; import com.azure.resourcemanager.frontdoor.models.Endpoint; @@ -25,33 +25,34 @@ public final class ExperimentsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"description\":\"cvmwfauxxepmy\",\"endpointA\":{\"name\":\"rmcqmiciijqpkz\",\"endpoint\":\"ojxjmcsmyqwix\"},\"endpointB\":{\"name\":\"wnkwywzwo\",\"endpoint\":\"lickduoi\"},\"enabledState\":\"Enabled\",\"resourceState\":\"Creating\",\"status\":\"vsknxrwzawnv\",\"scriptFileUri\":\"cfhzagxnvhycv\"},\"location\":\"imwrzregzgyufu\",\"tags\":{\"hmeott\":\"pweryekzk\",\"yos\":\"w\"},\"id\":\"wwhnhjtfvpn\",\"name\":\"pmil\",\"type\":\"pnwy\"}"; + = "{\"properties\":{\"description\":\"rwwgil\",\"endpointA\":{\"name\":\"qacdmkxwxdcvjwcy\",\"endpoint\":\"akeciqchx\"},\"endpointB\":{\"name\":\"icdsiwd\",\"endpoint\":\"mpzhzzwvywrgyngy\"},\"enabledState\":\"Enabled\",\"resourceState\":\"Disabling\",\"status\":\"cakiqao\",\"scriptFileUri\":\"jrkc\"},\"location\":\"amgglvlmfejdoq\",\"tags\":{\"ayejsxtlgflwfgz\":\"gltygxhqfgq\",\"lijjjrtvam\":\"iucijjcea\"},\"id\":\"a\",\"name\":\"zknxkv\",\"type\":\"cxetyvkunmignoh\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); FrontDoorManager manager = FrontDoorManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Experiment response = manager.experiments() - .define("pag") - .withRegion("brzmqxucycijoclx") - .withExistingNetworkExperimentProfile("aderzmw", "t") - .withTags(mapOf("btxjeaoqaqbzg", "gjcyzyzjdnrq", "v", "hfw")) - .withDescription("v") - .withEndpointA(new Endpoint().withName("goaqylkjztj").withEndpoint("azjcgmxitpfin")) - .withEndpointB(new Endpoint().withName("dltkrlg").withEndpoint("tbdrvcqgue")) - .withEnabledState(State.DISABLED) + .define("qba") + .withRegion("lszerqzevx") + .withExistingNetworkExperimentProfile("cpwzv", "doksqdtiwlwxlbon") + .withTags(mapOf("jglzoblqwaafrq", "intxwa", "yqbhd", "lhm", "xwmzwdfkbnrz", "afjrqpjiyrqjcrg", + "tqjfgxxsaet", "rpdltbq")) + .withDescription("cqchygtvxbyjane") + .withEndpointA(new Endpoint().withName("dpkxyqvg").withEndpoint("aodetv")) + .withEndpointB(new Endpoint().withName("xdxuwsaifmc").withEndpoint("osbz")) + .withEnabledState(State.ENABLED) .create(); - Assertions.assertEquals("imwrzregzgyufu", response.location()); - Assertions.assertEquals("pweryekzk", response.tags().get("hmeott")); - Assertions.assertEquals("cvmwfauxxepmy", response.description()); - Assertions.assertEquals("rmcqmiciijqpkz", response.endpointA().name()); - Assertions.assertEquals("ojxjmcsmyqwix", response.endpointA().endpoint()); - Assertions.assertEquals("wnkwywzwo", response.endpointB().name()); - Assertions.assertEquals("lickduoi", response.endpointB().endpoint()); + Assertions.assertEquals("amgglvlmfejdoq", response.location()); + Assertions.assertEquals("gltygxhqfgq", response.tags().get("ayejsxtlgflwfgz")); + Assertions.assertEquals("rwwgil", response.description()); + Assertions.assertEquals("qacdmkxwxdcvjwcy", response.endpointA().name()); + Assertions.assertEquals("akeciqchx", response.endpointA().endpoint()); + Assertions.assertEquals("icdsiwd", response.endpointB().name()); + Assertions.assertEquals("mpzhzzwvywrgyngy", response.endpointB().endpoint()); Assertions.assertEquals(State.ENABLED, response.enabledState()); } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ExperimentsDeleteMockTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ExperimentsDeleteMockTests.java index 29c746f0ca2a8..5e52153f304f8 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ExperimentsDeleteMockTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ExperimentsDeleteMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.frontdoor.FrontDoorManager; import java.nio.charset.StandardCharsets; @@ -25,9 +25,9 @@ public void testDelete() throws Exception { FrontDoorManager manager = FrontDoorManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.experiments().delete("hzlwxaea", "vurex", "ndsbdw", com.azure.core.util.Context.NONE); + manager.experiments().delete("rxtd", "sn", "evhdlmydid", com.azure.core.util.Context.NONE); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ExperimentsGetWithResponseMockTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ExperimentsGetWithResponseMockTests.java index 550c07fd3b35d..0a27bab9f4fc4 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ExperimentsGetWithResponseMockTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ExperimentsGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.frontdoor.FrontDoorManager; import com.azure.resourcemanager.frontdoor.models.Experiment; @@ -22,26 +22,26 @@ public final class ExperimentsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"description\":\"jofqcvovjufycs\",\"endpointA\":{\"name\":\"bemyeji\",\"endpoint\":\"uxegthortudawlpj\"},\"endpointB\":{\"name\":\"qerpptcbgqnzm\",\"endpoint\":\"iilialwc\"},\"enabledState\":\"Enabled\",\"resourceState\":\"Disabled\",\"status\":\"cccg\",\"scriptFileUri\":\"raoxnyuff\"},\"location\":\"tsgftipwcxbyubh\",\"tags\":{\"pnuhzafccnu\":\"xyur\",\"yl\":\"iig\",\"vxva\":\"ui\"},\"id\":\"vcrk\",\"name\":\"lbnb\",\"type\":\"xvhcs\"}"; + = "{\"properties\":{\"description\":\"sbezaxyfukzxuizh\",\"endpointA\":{\"name\":\"epkpe\",\"endpoint\":\"arxqiubx\"},\"endpointB\":{\"name\":\"ecpxdazvdhc\",\"endpoint\":\"mkoszudbl\"},\"enabledState\":\"Disabled\",\"resourceState\":\"Enabling\",\"status\":\"caqkiofk\",\"scriptFileUri\":\"fmhklbnld\"},\"location\":\"vcb\",\"tags\":{\"usqxutrpbrr\":\"zyqu\",\"lbnwtpcpahp\":\"yuuatvlmbjwcolbm\"},\"id\":\"z\",\"name\":\"vxhmtfhocnxzcmj\",\"type\":\"ngxno\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); FrontDoorManager manager = FrontDoorManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Experiment response = manager.experiments() - .getWithResponse("vskbuhzacaq", "yltcoqcuj", "dsxzakuejkmvb", com.azure.core.util.Context.NONE) + .getWithResponse("zkrrcoiisba", "nppcce", "u", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("tsgftipwcxbyubh", response.location()); - Assertions.assertEquals("xyur", response.tags().get("pnuhzafccnu")); - Assertions.assertEquals("jofqcvovjufycs", response.description()); - Assertions.assertEquals("bemyeji", response.endpointA().name()); - Assertions.assertEquals("uxegthortudawlpj", response.endpointA().endpoint()); - Assertions.assertEquals("qerpptcbgqnzm", response.endpointB().name()); - Assertions.assertEquals("iilialwc", response.endpointB().endpoint()); - Assertions.assertEquals(State.ENABLED, response.enabledState()); + Assertions.assertEquals("vcb", response.location()); + Assertions.assertEquals("zyqu", response.tags().get("usqxutrpbrr")); + Assertions.assertEquals("sbezaxyfukzxuizh", response.description()); + Assertions.assertEquals("epkpe", response.endpointA().name()); + Assertions.assertEquals("arxqiubx", response.endpointA().endpoint()); + Assertions.assertEquals("ecpxdazvdhc", response.endpointB().name()); + Assertions.assertEquals("mkoszudbl", response.endpointB().endpoint()); + Assertions.assertEquals(State.DISABLED, response.enabledState()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ExperimentsListByProfileMockTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ExperimentsListByProfileMockTests.java index db9df3918e78c..8d4769ec39ace 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ExperimentsListByProfileMockTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ExperimentsListByProfileMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.frontdoor.FrontDoorManager; import com.azure.resourcemanager.frontdoor.models.Experiment; @@ -23,25 +23,25 @@ public final class ExperimentsListByProfileMockTests { @Test public void testListByProfile() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"description\":\"rftb\",\"endpointA\":{\"name\":\"xreuquowtlj\",\"endpoint\":\"whreagkhyxvrq\"},\"endpointB\":{\"name\":\"czsulmdggl\",\"endpoint\":\"pjpfseykgs\"},\"enabledState\":\"Disabled\",\"resourceState\":\"Enabling\",\"status\":\"n\",\"scriptFileUri\":\"fpgylkve\"},\"location\":\"jujcngoad\",\"tags\":{\"jfoknubnoitpkp\":\"mzr\"},\"id\":\"trgdgxvc\",\"name\":\"qraswugyxpqitwei\",\"type\":\"l\"}]}"; + = "{\"value\":[{\"properties\":{\"description\":\"ck\",\"endpointA\":{\"name\":\"kxkxhnegk\",\"endpoint\":\"z\"},\"endpointB\":{\"name\":\"t\",\"endpoint\":\"plvukaobrlbpg\"},\"enabledState\":\"Enabled\",\"resourceState\":\"Disabled\",\"status\":\"chjhgemuowak\",\"scriptFileUri\":\"a\"},\"location\":\"hjym\",\"tags\":{\"gdrclssolj\":\"qt\",\"dkkgjiiytssikizb\":\"mevtfycnlbvgjc\"},\"id\":\"ufqbvntnr\",\"name\":\"mqso\",\"type\":\"hcekxgnlykm\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); FrontDoorManager manager = FrontDoorManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.experiments().listByProfile("uqwqulsutrjbhxyk", "hyqezvqq", com.azure.core.util.Context.NONE); + = manager.experiments().listByProfile("hepfwwtjfdoes", "xhmw", com.azure.core.util.Context.NONE); - Assertions.assertEquals("jujcngoad", response.iterator().next().location()); - Assertions.assertEquals("mzr", response.iterator().next().tags().get("jfoknubnoitpkp")); - Assertions.assertEquals("rftb", response.iterator().next().description()); - Assertions.assertEquals("xreuquowtlj", response.iterator().next().endpointA().name()); - Assertions.assertEquals("whreagkhyxvrq", response.iterator().next().endpointA().endpoint()); - Assertions.assertEquals("czsulmdggl", response.iterator().next().endpointB().name()); - Assertions.assertEquals("pjpfseykgs", response.iterator().next().endpointB().endpoint()); - Assertions.assertEquals(State.DISABLED, response.iterator().next().enabledState()); + Assertions.assertEquals("hjym", response.iterator().next().location()); + Assertions.assertEquals("qt", response.iterator().next().tags().get("gdrclssolj")); + Assertions.assertEquals("ck", response.iterator().next().description()); + Assertions.assertEquals("kxkxhnegk", response.iterator().next().endpointA().name()); + Assertions.assertEquals("z", response.iterator().next().endpointA().endpoint()); + Assertions.assertEquals("t", response.iterator().next().endpointB().name()); + Assertions.assertEquals("plvukaobrlbpg", response.iterator().next().endpointB().endpoint()); + Assertions.assertEquals(State.ENABLED, response.iterator().next().enabledState()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ForwardingConfigurationTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ForwardingConfigurationTests.java index 7ca7b98858fba..577061fea1975 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ForwardingConfigurationTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ForwardingConfigurationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -18,33 +18,33 @@ public final class ForwardingConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ForwardingConfiguration model = BinaryData.fromString( - "{\"@odata.type\":\"#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration\",\"customForwardingPath\":\"fhvfsl\",\"forwardingProtocol\":\"HttpsOnly\",\"cacheConfiguration\":{\"queryParameterStripDirective\":\"StripOnly\",\"queryParameters\":\"igjkskyrio\",\"dynamicCompression\":\"Enabled\",\"cacheDuration\":\"PT115H46M34S\"},\"backendPool\":{\"id\":\"waabzmifrygzn\"}}") + "{\"@odata.type\":\"#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration\",\"customForwardingPath\":\"lmwlxkvugfhzo\",\"forwardingProtocol\":\"HttpsOnly\",\"cacheConfiguration\":{\"queryParameterStripDirective\":\"StripAll\",\"queryParameters\":\"nluthnnp\",\"dynamicCompression\":\"Disabled\",\"cacheDuration\":\"PT187H16M34S\"},\"backendPool\":{\"id\":\"lpjzuaejxdu\"}}") .toObject(ForwardingConfiguration.class); - Assertions.assertEquals("fhvfsl", model.customForwardingPath()); + Assertions.assertEquals("lmwlxkvugfhzo", model.customForwardingPath()); Assertions.assertEquals(FrontDoorForwardingProtocol.HTTPS_ONLY, model.forwardingProtocol()); - Assertions.assertEquals(FrontDoorQuery.STRIP_ONLY, model.cacheConfiguration().queryParameterStripDirective()); - Assertions.assertEquals("igjkskyrio", model.cacheConfiguration().queryParameters()); - Assertions.assertEquals(DynamicCompressionEnabled.ENABLED, model.cacheConfiguration().dynamicCompression()); - Assertions.assertEquals(Duration.parse("PT115H46M34S"), model.cacheConfiguration().cacheDuration()); - Assertions.assertEquals("waabzmifrygzn", model.backendPool().id()); + Assertions.assertEquals(FrontDoorQuery.STRIP_ALL, model.cacheConfiguration().queryParameterStripDirective()); + Assertions.assertEquals("nluthnnp", model.cacheConfiguration().queryParameters()); + Assertions.assertEquals(DynamicCompressionEnabled.DISABLED, model.cacheConfiguration().dynamicCompression()); + Assertions.assertEquals(Duration.parse("PT187H16M34S"), model.cacheConfiguration().cacheDuration()); + Assertions.assertEquals("lpjzuaejxdu", model.backendPool().id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ForwardingConfiguration model = new ForwardingConfiguration().withCustomForwardingPath("fhvfsl") + ForwardingConfiguration model = new ForwardingConfiguration().withCustomForwardingPath("lmwlxkvugfhzo") .withForwardingProtocol(FrontDoorForwardingProtocol.HTTPS_ONLY) - .withCacheConfiguration(new CacheConfiguration().withQueryParameterStripDirective(FrontDoorQuery.STRIP_ONLY) - .withQueryParameters("igjkskyrio") - .withDynamicCompression(DynamicCompressionEnabled.ENABLED) - .withCacheDuration(Duration.parse("PT115H46M34S"))) - .withBackendPool(new SubResource().withId("waabzmifrygzn")); + .withCacheConfiguration(new CacheConfiguration().withQueryParameterStripDirective(FrontDoorQuery.STRIP_ALL) + .withQueryParameters("nluthnnp") + .withDynamicCompression(DynamicCompressionEnabled.DISABLED) + .withCacheDuration(Duration.parse("PT187H16M34S"))) + .withBackendPool(new SubResource().withId("lpjzuaejxdu")); model = BinaryData.fromObject(model).toObject(ForwardingConfiguration.class); - Assertions.assertEquals("fhvfsl", model.customForwardingPath()); + Assertions.assertEquals("lmwlxkvugfhzo", model.customForwardingPath()); Assertions.assertEquals(FrontDoorForwardingProtocol.HTTPS_ONLY, model.forwardingProtocol()); - Assertions.assertEquals(FrontDoorQuery.STRIP_ONLY, model.cacheConfiguration().queryParameterStripDirective()); - Assertions.assertEquals("igjkskyrio", model.cacheConfiguration().queryParameters()); - Assertions.assertEquals(DynamicCompressionEnabled.ENABLED, model.cacheConfiguration().dynamicCompression()); - Assertions.assertEquals(Duration.parse("PT115H46M34S"), model.cacheConfiguration().cacheDuration()); - Assertions.assertEquals("waabzmifrygzn", model.backendPool().id()); + Assertions.assertEquals(FrontDoorQuery.STRIP_ALL, model.cacheConfiguration().queryParameterStripDirective()); + Assertions.assertEquals("nluthnnp", model.cacheConfiguration().queryParameters()); + Assertions.assertEquals(DynamicCompressionEnabled.DISABLED, model.cacheConfiguration().dynamicCompression()); + Assertions.assertEquals(Duration.parse("PT187H16M34S"), model.cacheConfiguration().cacheDuration()); + Assertions.assertEquals("lpjzuaejxdu", model.backendPool().id()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorCertificateSourceParametersTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorCertificateSourceParametersTests.java index 8fe23a613824a..68e68bda7d84a 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorCertificateSourceParametersTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorCertificateSourceParametersTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorListResultTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorListResultTests.java index 454c32df05c7b..dd893feab3e04 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorListResultTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorListResultTests.java @@ -1,26 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.frontdoor.models.FrontDoorListResult; +import com.azure.resourcemanager.frontdoor.implementation.models.FrontDoorListResult; import org.junit.jupiter.api.Assertions; public final class FrontDoorListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FrontDoorListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"resourceState\":\"Enabled\",\"provisioningState\":\"ujqgidok\",\"cname\":\"ljyoxgvcltb\",\"frontdoorId\":\"ncghkje\",\"rulesEngines\":[{\"properties\":{},\"id\":\"bijhtxfvgxbf\",\"name\":\"mxnehmp\",\"type\":\"ec\"},{\"properties\":{},\"id\":\"odebfqkkrbmpu\",\"name\":\"gr\",\"type\":\"wflzlfbxzpuzy\"},{\"properties\":{},\"id\":\"spnqzahmgkb\",\"name\":\"pyydhi\",\"type\":\"nuqqkpikadrgvt\"}],\"extendedProperties\":{\"uynhijg\":\"n\",\"iarbutrcvpna\":\"mebf\"},\"friendlyName\":\"mhjrunmpxttdbhr\",\"routingRules\":[{\"properties\":{},\"name\":\"kx\",\"type\":\"skpbhenbtkcxywn\",\"id\":\"nrs\"}],\"loadBalancingSettings\":[{\"properties\":{},\"name\":\"dybyxczfclhaa\",\"type\":\"babphlwrqlfk\",\"id\":\"thsu\"},{\"properties\":{},\"name\":\"mnyyazt\",\"type\":\"twwrqp\",\"id\":\"dckzywbiexz\"}],\"healthProbeSettings\":[{\"properties\":{},\"name\":\"axibxujw\",\"type\":\"qwalmuzyoxaepd\",\"id\":\"jancu\"},{\"properties\":{},\"name\":\"d\",\"type\":\"avxbniwdjswztsdb\",\"id\":\"nxytxh\"},{\"properties\":{},\"name\":\"bzpfzab\",\"type\":\"cuh\",\"id\":\"tcty\"}],\"backendPools\":[{\"properties\":{},\"name\":\"bovpl\",\"type\":\"bhvgy\",\"id\":\"uosvmkfssxqukk\"}],\"frontendEndpoints\":[{\"properties\":{},\"name\":\"gsxnkjzkdeslpv\",\"type\":\"pwiyig\",\"id\":\"pkdwzbai\"}],\"backendPoolsSettings\":{\"enforceCertificateNameCheck\":\"Disabled\",\"sendRecvTimeoutSeconds\":1370468424},\"enabledState\":\"Disabled\"},\"location\":\"yqupedeojnabckh\",\"tags\":{\"pskrdqmh\":\"xpsiebtfhvpes\"},\"id\":\"jdhtldwkyzxu\",\"name\":\"tkncwsc\",\"type\":\"svlxotogtwrup\"}],\"nextLink\":\"xvnmicykvceov\"}") + "{\"value\":[{\"properties\":{\"resourceState\":\"Creating\",\"provisioningState\":\"gwfqatmt\",\"cname\":\"tmdvypgikdgs\",\"frontdoorId\":\"w\",\"rulesEngines\":[{\"properties\":{},\"id\":\"yuzhlhkjoqrvq\",\"name\":\"atjinrvgoupmfiib\",\"type\":\"gjio\"},{\"properties\":{},\"id\":\"rwxkvtkkgl\",\"name\":\"wjygvjayvblmhvk\",\"type\":\"hbxvvyhgsopbyrqu\"},{\"properties\":{},\"id\":\"xuvw\",\"name\":\"bnhlmc\",\"type\":\"p\"}],\"extendedProperties\":{\"ijejvegrhbpn\":\"itvgbmhrixkwm\",\"dreaxh\":\"ixexcc\"},\"friendlyName\":\"xdrrvqahqkghtp\",\"routingRules\":[{\"properties\":{},\"name\":\"yjsvfyc\",\"type\":\"bfvoowvrv\",\"id\":\"gjqppy\"},{\"properties\":{},\"name\":\"ronzmyhgfip\",\"type\":\"xkmcwaekrrjre\",\"id\":\"xt\"}],\"loadBalancingSettings\":[{\"properties\":{},\"name\":\"jglikkxwslolb\",\"type\":\"vuzlm\",\"id\":\"elfk\"}],\"healthProbeSettings\":[{\"properties\":{},\"name\":\"rpw\",\"type\":\"eznoig\",\"id\":\"njwmwkpnbsazejj\"},{\"properties\":{},\"name\":\"agfhsxtta\",\"type\":\"zxnfaaz\",\"id\":\"dtnkdmkq\"},{\"properties\":{},\"name\":\"wuenvr\",\"type\":\"yo\",\"id\":\"ibreb\"},{\"properties\":{},\"name\":\"ysjkixqtnqttez\",\"type\":\"fffiak\",\"id\":\"pqqmted\"}],\"backendPools\":[{\"properties\":{},\"name\":\"ihyeozphvw\",\"type\":\"y\",\"id\":\"c\"}],\"frontendEndpoints\":[{\"properties\":{},\"id\":\"vipmdscwxqupevzh\",\"name\":\"totxhojujb\",\"type\":\"elmcuvhixbjxyfw\"},{\"properties\":{},\"id\":\"r\",\"name\":\"o\",\"type\":\"ttpkiwkkbnujrywv\"},{\"properties\":{},\"id\":\"bfpncurdo\",\"name\":\"iithtywu\",\"type\":\"cbihwqk\"}],\"backendPoolsSettings\":{\"enforceCertificateNameCheck\":\"Enabled\",\"sendRecvTimeoutSeconds\":1640142335},\"enabledState\":\"Disabled\"},\"location\":\"hrdgoihxumwcto\",\"tags\":{\"udfdlwgg\":\"jl\"},\"id\":\"tsbwtovvtgse\",\"name\":\"nqfiufxqknpi\",\"type\":\"gnepttwqmsni\"},{\"properties\":{\"resourceState\":\"Deleting\",\"provisioningState\":\"qnrojlpijnkrxfrd\",\"cname\":\"c\",\"frontdoorId\":\"tizzronasxif\",\"rulesEngines\":[{\"properties\":{},\"id\":\"zh\",\"name\":\"wesgogczh\",\"type\":\"nxkrlgnyhmossxkk\"}],\"extendedProperties\":{\"pdso\":\"rrghxjbdhqxvcxgf\"},\"friendlyName\":\"shrnsvbuswdvz\",\"routingRules\":[{\"properties\":{},\"name\":\"nu\",\"type\":\"jsrtk\",\"id\":\"wnopqgikyzirtx\"},{\"properties\":{},\"name\":\"x\",\"type\":\"jntpsewgioilqu\",\"id\":\"ydxtqm\"},{\"properties\":{},\"name\":\"xorgg\",\"type\":\"hyaomtbghhavgr\",\"id\":\"ffovjzhpj\"},{\"properties\":{},\"name\":\"gjmfxumvfcl\",\"type\":\"ovwxnbkfezzxsc\",\"id\":\"wzdgirujbzbo\"}],\"loadBalancingSettings\":[{\"properties\":{},\"name\":\"tdcqvpniyuj\",\"type\":\"ylwdshfssn\",\"id\":\"gy\"},{\"properties\":{},\"name\":\"ymsgaojfmwnc\",\"type\":\"mrfhirctymox\",\"id\":\"tpipiwyczuhx\"},{\"properties\":{},\"name\":\"qjlihhyuspska\",\"type\":\"vlmfwdgzxulucv\",\"id\":\"mrsreuzvxurisjnh\"},{\"properties\":{},\"name\":\"xifqjzgxm\",\"type\":\"ublwpcesutrg\",\"id\":\"pauutpw\"}],\"healthProbeSettings\":[{\"properties\":{},\"name\":\"ejqgw\",\"type\":\"nfqn\",\"id\":\"ypsxjvfoim\"},{\"properties\":{},\"name\":\"lirc\",\"type\":\"jxv\",\"id\":\"fceacvlhvygd\"},{\"properties\":{},\"name\":\"umrtwnawjsl\",\"type\":\"wkojgcyztsfmzn\",\"id\":\"eqphchqnrnr\"},{\"properties\":{},\"name\":\"huwrykqgaifm\",\"type\":\"klbydv\",\"id\":\"bejdznxcv\"}],\"backendPools\":[{\"properties\":{},\"name\":\"jivolvtnov\",\"type\":\"zgemjdftuljlt\",\"id\":\"ceamtm\"}],\"frontendEndpoints\":[{\"properties\":{},\"id\":\"ejwcwwqiok\",\"name\":\"sx\",\"type\":\"jmsvpkjp\"}],\"backendPoolsSettings\":{\"enforceCertificateNameCheck\":\"Disabled\",\"sendRecvTimeoutSeconds\":524680213},\"enabledState\":\"Enabled\"},\"location\":\"ljyxgtczhe\",\"tags\":{\"xu\":\"sdshmkxmaehvb\",\"n\":\"iplt\",\"xywr\":\"tbaxk\",\"uodpv\":\"kpyklyhp\"},\"id\":\"uudl\",\"name\":\"zibt\",\"type\":\"ostgkts\"},{\"properties\":{\"resourceState\":\"Migrated\",\"provisioningState\":\"clzedqbcvh\",\"cname\":\"h\",\"frontdoorId\":\"odqkdlwwqfb\",\"rulesEngines\":[{\"properties\":{},\"id\":\"trqjfsmlmbtx\",\"name\":\"gfwsrtaw\",\"type\":\"ezbrhubskh\"}],\"extendedProperties\":{\"kkqfqjbvle\":\"goo\"},\"friendlyName\":\"fmluiqtqzfavyvn\",\"routingRules\":[{\"properties\":{},\"name\":\"ryeu\",\"type\":\"jkqa\",\"id\":\"gzslesjcbhernnti\"}],\"loadBalancingSettings\":[{\"properties\":{},\"name\":\"vbquwr\",\"type\":\"hwagohbuffkmrqe\",\"id\":\"vhmxtdrjfu\"}],\"healthProbeSettings\":[{\"properties\":{},\"name\":\"bj\",\"type\":\"wzcjznmwcpmgua\",\"id\":\"raufactkahzova\"},{\"properties\":{},\"name\":\"iuxxpshneekulfg\",\"type\":\"qubkw\",\"id\":\"enr\"},{\"properties\":{},\"name\":\"tujbazpju\",\"type\":\"minyflnorwm\",\"id\":\"vwpklvxwmygdxp\"}],\"backendPools\":[{\"properties\":{},\"name\":\"isze\",\"type\":\"nb\",\"id\":\"rxgibbd\"},{\"properties\":{},\"name\":\"onfo\",\"type\":\"uors\",\"id\":\"okwbqplh\"}],\"frontendEndpoints\":[{\"properties\":{},\"id\":\"epzl\",\"name\":\"hw\",\"type\":\"oldweyuqdu\"},{\"properties\":{},\"id\":\"nnrwrbiork\",\"name\":\"lywjhh\",\"type\":\"nhxmsi\"},{\"properties\":{},\"id\":\"miloxggdufiqndie\",\"name\":\"ao\",\"type\":\"chvcyyysfgdo\"}],\"backendPoolsSettings\":{\"enforceCertificateNameCheck\":\"Enabled\",\"sendRecvTimeoutSeconds\":299022273},\"enabledState\":\"Disabled\"},\"location\":\"ipwoqonmacjek\",\"tags\":{\"gmblrri\":\"shqvcimpev\"},\"id\":\"bywdxsmicc\",\"name\":\"rwfscjfnynszquj\",\"type\":\"zdvoqytibyowbb\"}],\"nextLink\":\"yavutpthjoxois\"}") .toObject(FrontDoorListResult.class); - Assertions.assertEquals("xvnmicykvceov", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FrontDoorListResult model = new FrontDoorListResult().withNextLink("xvnmicykvceov"); - model = BinaryData.fromObject(model).toObject(FrontDoorListResult.class); - Assertions.assertEquals("xvnmicykvceov", model.nextLink()); + Assertions.assertEquals("yavutpthjoxois", model.nextLink()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorNameAvailabilitiesCheckWithResponseMockTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorNameAvailabilitiesCheckWithResponseMockTests.java index 34300090a687e..c8eb0dad70917 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorNameAvailabilitiesCheckWithResponseMockTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorNameAvailabilitiesCheckWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.frontdoor.FrontDoorManager; import com.azure.resourcemanager.frontdoor.models.CheckNameAvailabilityInput; @@ -21,18 +21,19 @@ public final class FrontDoorNameAvailabilitiesCheckWithResponseMockTests { @Test public void testCheckWithResponse() throws Exception { - String responseStr = "{\"nameAvailability\":\"Unavailable\",\"reason\":\"z\",\"message\":\"iwbuqny\"}"; + String responseStr + = "{\"nameAvailability\":\"Unavailable\",\"reason\":\"geumil\",\"message\":\"uitrdexyiono\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); FrontDoorManager manager = FrontDoorManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CheckNameAvailabilityOutput response = manager.frontDoorNameAvailabilities() .checkWithResponse( - new CheckNameAvailabilityInput().withName("nktwfansnvpdibmi") + new CheckNameAvailabilityInput().withName("hajqfuk") .withType(ResourceType.MICROSOFT_NETWORK_FRONT_DOORS_FRONTEND_ENDPOINTS), com.azure.core.util.Context.NONE) .getValue(); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorNameAvailabilityWithSubscriptionsCheckWithResponseMockTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorNameAvailabilityWithSubscriptionsCheckWithResponseMockTests.java index b7daebe4bfc92..b9ba66ea16870 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorNameAvailabilityWithSubscriptionsCheckWithResponseMockTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorNameAvailabilityWithSubscriptionsCheckWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.frontdoor.FrontDoorManager; import com.azure.resourcemanager.frontdoor.models.CheckNameAvailabilityInput; @@ -21,18 +21,18 @@ public final class FrontDoorNameAvailabilityWithSubscriptionsCheckWithResponseMockTests { @Test public void testCheckWithResponse() throws Exception { - String responseStr = "{\"nameAvailability\":\"Available\",\"reason\":\"ezzcez\",\"message\":\"fwyfwlwxjwet\"}"; + String responseStr = "{\"nameAvailability\":\"Unavailable\",\"reason\":\"prtug\",\"message\":\"bzbcyksiv\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); FrontDoorManager manager = FrontDoorManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CheckNameAvailabilityOutput response = manager.frontDoorNameAvailabilityWithSubscriptions() .checkWithResponse( - new CheckNameAvailabilityInput().withName("phzfylsgcrp") + new CheckNameAvailabilityInput().withName("ninbdbzsxcwqqrs") .withType(ResourceType.MICROSOFT_NETWORK_FRONT_DOORS_FRONTEND_ENDPOINTS), com.azure.core.util.Context.NONE) .getValue(); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsCreateOrUpdateMockTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsCreateOrUpdateMockTests.java index 41460c5a34242..a3f286ee6a24f 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsCreateOrUpdateMockTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsCreateOrUpdateMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.SubResource; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.frontdoor.FrontDoorManager; import com.azure.resourcemanager.frontdoor.fluent.models.FrontendEndpointInner; @@ -42,147 +42,157 @@ public final class FrontDoorsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"resourceState\":\"Deleting\",\"provisioningState\":\"Succeeded\",\"cname\":\"tafsrbxrblmliowx\",\"frontdoorId\":\"spnxwqagnepzw\",\"rulesEngines\":[{\"properties\":{\"resourceState\":\"Enabling\",\"rules\":[{\"name\":\"qqagwwr\",\"priority\":412798979,\"action\":{}},{\"name\":\"omzisglrrcz\",\"priority\":1240241948,\"action\":{}},{\"name\":\"k\",\"priority\":1583480383,\"action\":{}},{\"name\":\"ltn\",\"priority\":1388509479,\"action\":{}}]},\"id\":\"dhqoawj\",\"name\":\"oyueayfbpcmsp\",\"type\":\"byrrueqth\"}],\"extendedProperties\":{\"gdhxi\":\"nmbscbbx\",\"opedbwdpyqyybxub\":\"d\",\"jelaqacigele\":\"dnafcbqwre\",\"beonrlkwzdq\":\"hdbvqvwzkjop\"},\"friendlyName\":\"x\",\"routingRules\":[{\"properties\":{\"resourceState\":\"Deleting\",\"frontendEndpoints\":[{},{},{},{}],\"acceptedProtocols\":[\"Https\",\"Https\",\"Https\"],\"patternsToMatch\":[\"seqchkrt\",\"zrazisgyk\",\"uem\"],\"enabledState\":\"Disabled\",\"routeConfiguration\":{\"@odata.type\":\"RouteConfiguration\"},\"rulesEngine\":{},\"webApplicationFirewallPolicyLink\":{}},\"name\":\"hmnr\",\"type\":\"bsojk\",\"id\":\"nhmdptysprqs\"},{\"properties\":{\"resourceState\":\"Deleting\",\"frontendEndpoints\":[{}],\"acceptedProtocols\":[\"Https\",\"Https\",\"Http\"],\"patternsToMatch\":[\"pli\"],\"enabledState\":\"Disabled\",\"routeConfiguration\":{\"@odata.type\":\"RouteConfiguration\"},\"rulesEngine\":{},\"webApplicationFirewallPolicyLink\":{}},\"name\":\"xqvapcohh\",\"type\":\"cqpqojxcxzrzdc\",\"id\":\"zbenribc\"},{\"properties\":{\"resourceState\":\"Enabled\",\"frontendEndpoints\":[{}],\"acceptedProtocols\":[\"Https\",\"Https\",\"Http\",\"Https\"],\"patternsToMatch\":[\"hzn\"],\"enabledState\":\"Disabled\",\"routeConfiguration\":{\"@odata.type\":\"RouteConfiguration\"},\"rulesEngine\":{},\"webApplicationFirewallPolicyLink\":{}},\"name\":\"zwcjjncqtj\",\"type\":\"izvg\",\"id\":\"atzuuv\"},{\"properties\":{\"resourceState\":\"Migrated\",\"frontendEndpoints\":[{},{}],\"acceptedProtocols\":[\"Http\",\"Https\",\"Https\",\"Https\"],\"patternsToMatch\":[\"zlswvajqf\",\"t\"],\"enabledState\":\"Enabled\",\"routeConfiguration\":{\"@odata.type\":\"RouteConfiguration\"},\"rulesEngine\":{},\"webApplicationFirewallPolicyLink\":{}},\"name\":\"sunwqrjzfrgqhaoh\",\"type\":\"buocnjr\",\"id\":\"mbpyryxamebly\"}],\"loadBalancingSettings\":[{\"properties\":{\"resourceState\":\"Disabling\",\"sampleSize\":164914100,\"successfulSamplesRequired\":1136575417,\"additionalLatencyMilliseconds\":1644605139},\"name\":\"hvsmtodlfpyap\",\"type\":\"ygvoavyunssxlgh\",\"id\":\"egjlgvvpa\"},{\"properties\":{\"resourceState\":\"Enabling\",\"sampleSize\":54212693,\"successfulSamplesRequired\":320573412,\"additionalLatencyMilliseconds\":1604945969},\"name\":\"uygdhgaqipirp\",\"type\":\"rqofulopmjnlexwh\",\"id\":\"jpib\"}],\"healthProbeSettings\":[{\"properties\":{\"resourceState\":\"Deleting\",\"path\":\"erctatoyin\",\"protocol\":\"Https\",\"intervalInSeconds\":2087275634,\"healthProbeMethod\":\"HEAD\",\"enabledState\":\"Disabled\"},\"name\":\"uczkgofxyfsruc\",\"type\":\"rrp\",\"id\":\"ttbst\"},{\"properties\":{\"resourceState\":\"Migrating\",\"path\":\"nrmvvfkoxmlghk\",\"protocol\":\"Http\",\"intervalInSeconds\":2137769434,\"healthProbeMethod\":\"GET\",\"enabledState\":\"Enabled\"},\"name\":\"pdwwexymzvlazi\",\"type\":\"hpwvqsgnyyuu\",\"id\":\"vensrpm\"},{\"properties\":{\"resourceState\":\"Disabling\",\"path\":\"kpatlbijpzgsks\",\"protocol\":\"Https\",\"intervalInSeconds\":221037138,\"healthProbeMethod\":\"HEAD\",\"enabledState\":\"Disabled\"},\"name\":\"bnxwc\",\"type\":\"mmpvf\",\"id\":\"wzfgbrttuiaclkie\"}],\"backendPools\":[{\"properties\":{\"resourceState\":\"Enabling\",\"backends\":[{}],\"loadBalancingSettings\":{},\"healthProbeSettings\":{}},\"name\":\"fyut\",\"type\":\"iygbpvn\",\"id\":\"wmtxkyctwwgz\"},{\"properties\":{\"resourceState\":\"Creating\",\"backends\":[{}],\"loadBalancingSettings\":{},\"healthProbeSettings\":{}},\"name\":\"gygzyvn\",\"type\":\"zaifghtmoqqtlff\",\"id\":\"bkrkjj\"},{\"properties\":{\"resourceState\":\"Migrating\",\"backends\":[{},{},{},{}],\"loadBalancingSettings\":{},\"healthProbeSettings\":{}},\"name\":\"qoewdogiyetesy\",\"type\":\"idbz\",\"id\":\"hqtfbovn\"}],\"frontendEndpoints\":[{\"properties\":{\"resourceState\":\"Deleting\",\"customHttpsProvisioningState\":\"Disabling\",\"customHttpsProvisioningSubstate\":\"PendingDomainControlValidationREquestApproval\",\"customHttpsConfiguration\":{\"certificateSource\":\"AzureKeyVault\",\"protocolType\":\"ServerNameIndication\",\"minimumTlsVersion\":\"1.0\"},\"hostName\":\"kzyaup\",\"sessionAffinityEnabledState\":\"Disabled\",\"sessionAffinityTtlSeconds\":1440531201,\"webApplicationFirewallPolicyLink\":{}},\"name\":\"fbwqrooht\",\"type\":\"vmaonurjt\",\"id\":\"ghihpvecms\"},{\"properties\":{\"resourceState\":\"Creating\",\"customHttpsProvisioningState\":\"Enabling\",\"customHttpsProvisioningSubstate\":\"PendingDomainControlValidationREquestApproval\",\"customHttpsConfiguration\":{\"certificateSource\":\"FrontDoor\",\"protocolType\":\"ServerNameIndication\",\"minimumTlsVersion\":\"1.2\"},\"hostName\":\"uscv\",\"sessionAffinityEnabledState\":\"Enabled\",\"sessionAffinityTtlSeconds\":1229874612,\"webApplicationFirewallPolicyLink\":{}},\"name\":\"mgxuupbezqcc\",\"type\":\"rtceukdqkkyihzt\",\"id\":\"qm\"}],\"backendPoolsSettings\":{\"enforceCertificateNameCheck\":\"Enabled\",\"sendRecvTimeoutSeconds\":1752106609},\"enabledState\":\"Disabled\"},\"location\":\"ychillcecfe\",\"tags\":{\"stacsjvhrweftkwq\":\"aoaguhicqlli\",\"vssehaepw\":\"jp\"},\"id\":\"mcxtczhu\",\"name\":\"euknijduyyes\",\"type\":\"ydjfb\"}"; + = "{\"properties\":{\"resourceState\":\"Enabling\",\"provisioningState\":\"Succeeded\",\"cname\":\"xsjybvitvqk\",\"frontdoorId\":\"az\",\"rulesEngines\":[{\"properties\":{\"resourceState\":\"Migrating\",\"rules\":[{\"name\":\"wdchozfn\",\"priority\":820610981,\"action\":{}},{\"name\":\"exlvxnoakiz\",\"priority\":1190155426,\"action\":{}}]},\"id\":\"iknaqlnuwig\",\"name\":\"xly\",\"type\":\"phvxz\"},{\"properties\":{\"resourceState\":\"Migrating\",\"rules\":[{\"name\":\"ejtlk\",\"priority\":705146713,\"action\":{}},{\"name\":\"aonwivkcqhrxh\",\"priority\":920780247,\"action\":{}}]},\"id\":\"lccrmmkyupi\",\"name\":\"byqjfkakfqfrkem\",\"type\":\"ldudxjascowv\"}],\"extendedProperties\":{\"snmgzvyfi\":\"kpdxphlk\",\"qnwsithuqolyah\":\"dkz\",\"hyqezvqq\":\"uqwqulsutrjbhxyk\",\"rftb\":\"g\"},\"friendlyName\":\"exreu\",\"routingRules\":[{\"properties\":{\"resourceState\":\"Deleting\",\"frontendEndpoints\":[{},{},{},{}],\"acceptedProtocols\":[\"Http\",\"Https\",\"Http\",\"Http\"],\"patternsToMatch\":[\"hyxvrqt\",\"bczsulmdgglmepjp\",\"s\"],\"enabledState\":\"Disabled\",\"routeConfiguration\":{\"@odata.type\":\"RouteConfiguration\"},\"rulesEngine\":{},\"webApplicationFirewallPolicyLink\":{}},\"name\":\"gpszngafpg\",\"type\":\"kvec\",\"id\":\"jcngoadyed\"},{\"properties\":{\"resourceState\":\"Migrated\",\"frontendEndpoints\":[{},{},{}],\"acceptedProtocols\":[\"Http\",\"Http\",\"Http\"],\"patternsToMatch\":[\"itpkpztrgdg\",\"vcoqraswugyxpqi\",\"we\",\"alwvskbu\"],\"enabledState\":\"Disabled\",\"routeConfiguration\":{\"@odata.type\":\"RouteConfiguration\"},\"rulesEngine\":{},\"webApplicationFirewallPolicyLink\":{}},\"name\":\"yltcoqcuj\",\"type\":\"sxzakuejkm\",\"id\":\"iztjof\"}],\"loadBalancingSettings\":[{\"properties\":{\"resourceState\":\"Enabling\",\"sampleSize\":215833997,\"successfulSamplesRequired\":1228581117,\"additionalLatencyMilliseconds\":1407579380},\"name\":\"lbemyej\",\"type\":\"iuxegth\",\"id\":\"tudaw\"},{\"properties\":{\"resourceState\":\"Disabled\",\"sampleSize\":1566043321,\"successfulSamplesRequired\":1302185073,\"additionalLatencyMilliseconds\":1502657115},\"name\":\"tcbgqnz\",\"type\":\"h\",\"id\":\"lialwcjgckbbcccg\"},{\"properties\":{\"resourceState\":\"Creating\",\"sampleSize\":1968192672,\"successfulSamplesRequired\":68368510,\"additionalLatencyMilliseconds\":606416580},\"name\":\"a\",\"type\":\"gftipwc\",\"id\":\"yubhiqdx\"},{\"properties\":{\"resourceState\":\"Migrating\",\"sampleSize\":543172402,\"successfulSamplesRequired\":699290789,\"additionalLatencyMilliseconds\":908546910},\"name\":\"ccnuhiig\",\"type\":\"lbuigv\",\"id\":\"atvcrkdlbnbq\"}],\"healthProbeSettings\":[{\"properties\":{\"resourceState\":\"Migrated\",\"path\":\"zlwxaeaovur\",\"protocol\":\"Https\",\"intervalInSeconds\":20906315,\"healthProbeMethod\":\"GET\",\"enabledState\":\"Enabled\"},\"name\":\"aderzmw\",\"type\":\"opagttmvmmag\",\"id\":\"qylkjztjiu\"}],\"backendPools\":[{\"properties\":{\"resourceState\":\"Deleting\",\"backends\":[{},{},{}],\"loadBalancingSettings\":{},\"healthProbeSettings\":{}},\"name\":\"inzcpdltkrlgj\",\"type\":\"bd\",\"id\":\"cqguef\"}],\"frontendEndpoints\":[{\"properties\":{\"resourceState\":\"Migrated\",\"customHttpsProvisioningState\":\"Disabling\",\"customHttpsProvisioningSubstate\":\"IssuingCertificate\",\"customHttpsConfiguration\":{\"certificateSource\":\"AzureKeyVault\",\"protocolType\":\"ServerNameIndication\",\"minimumTlsVersion\":\"1.2\"},\"hostName\":\"jlfyou\",\"sessionAffinityEnabledState\":\"Disabled\",\"sessionAffinityTtlSeconds\":582357329,\"webApplicationFirewallPolicyLink\":{}},\"id\":\"lcdi\",\"name\":\"tajbrz\",\"type\":\"xucycijoclxi\"},{\"properties\":{\"resourceState\":\"Creating\",\"customHttpsProvisioningState\":\"Disabled\",\"customHttpsProvisioningSubstate\":\"IssuingCertificate\",\"customHttpsConfiguration\":{\"certificateSource\":\"AzureKeyVault\",\"protocolType\":\"ServerNameIndication\",\"minimumTlsVersion\":\"1.2\"},\"hostName\":\"qjbtxjeaoqaqbzgy\",\"sessionAffinityEnabledState\":\"Enabled\",\"sessionAffinityTtlSeconds\":122929865,\"webApplicationFirewallPolicyLink\":{}},\"id\":\"tbwbqamteuli\",\"name\":\"lpkcvmwfauxxep\",\"type\":\"wbormcqmi\"},{\"properties\":{\"resourceState\":\"Disabling\",\"customHttpsProvisioningState\":\"Failed\",\"customHttpsProvisioningSubstate\":\"DomainControlValidationRequestApproved\",\"customHttpsConfiguration\":{\"certificateSource\":\"FrontDoor\",\"protocolType\":\"ServerNameIndication\",\"minimumTlsVersion\":\"1.2\"},\"hostName\":\"jmcsmyqwixvcpwn\",\"sessionAffinityEnabledState\":\"Disabled\",\"sessionAffinityTtlSeconds\":136390769,\"webApplicationFirewallPolicyLink\":{}},\"id\":\"falickduoiqtamty\",\"name\":\"kn\",\"type\":\"wzawnvsbcfhzagxn\"}],\"backendPoolsSettings\":{\"enforceCertificateNameCheck\":\"Enabled\",\"sendRecvTimeoutSeconds\":1228570374},\"enabledState\":\"Disabled\"},\"location\":\"wrzregzgyufu\",\"tags\":{\"hmeott\":\"pweryekzk\",\"yos\":\"w\"},\"id\":\"wwhnhjtfvpn\",\"name\":\"pmil\",\"type\":\"pnwy\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); FrontDoorManager manager = FrontDoorManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); FrontDoor response = manager.frontDoors() - .define("lbyulidwcwvmze") - .withRegion("isqcssffxuifmcs") - .withExistingResourceGroup("arbgjekgl") - .withTags(mapOf("rdzsylollgtrczzy", "bkdq", "rkihcirld", "mxzjijpvua", "dcoxnbk", "fx")) - .withFriendlyName("ejyfdvlvhbwrnfx") + .define("hhqxuwyvcacoyviv") + .withRegion("jxsqwjhqkbiwetp") + .withExistingResourceGroup("xfxjelgcmpzqj") + .withTags(mapOf("qiqyhgfsetzlexbs", "c", "uwfbzkkdtnhqsy", "ledynojpz", "pbafvafhlbylc", "ljselp", + "wrso", "bevxrhyzd")) + .withFriendlyName("clujyx") .withRoutingRules( - Arrays.asList( - new RoutingRule().withId("klelssxb") - .withName("tgjcsgguxheml") - .withFrontendEndpoints( - Arrays.asList(new SubResource(), new SubResource(), new SubResource())) - .withAcceptedProtocols(Arrays.asList(FrontDoorProtocol.HTTP)) - .withPatternsToMatch(Arrays.asList("aoyankcoeqswa", "kltytmhdroz")) - .withEnabledState(RoutingRuleEnabledState.ENABLED) - .withRouteConfiguration(new RouteConfiguration()) - .withRulesEngine(new SubResource()) - .withWebApplicationFirewallPolicyLink( - new RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink()), - new RoutingRule().withId("fykhvuhxepmru") - .withName("c") - .withFrontendEndpoints( - Arrays.asList(new SubResource(), new SubResource(), new SubResource())) - .withAcceptedProtocols(Arrays.asList(FrontDoorProtocol.HTTP)) - .withPatternsToMatch(Arrays.asList("lsmdesqplpvmjc", "oewbid", "vteo", "xvgpiude")) - .withEnabledState(RoutingRuleEnabledState.ENABLED) - .withRouteConfiguration(new RouteConfiguration()) - .withRulesEngine(new SubResource()) - .withWebApplicationFirewallPolicyLink( - new RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink()))) - .withLoadBalancingSettings(Arrays.asList( - new LoadBalancingSettingsModel().withId("phkixkykxdssjpe") - .withName("djltymkm") - .withSampleSize(891088801) - .withSuccessfulSamplesRequired(355684319) - .withAdditionalLatencyMilliseconds(992887479), - new LoadBalancingSettingsModel().withId("iiovgqcgxu") - .withName("lrmymyincqlhri") - .withSampleSize(1558152895) - .withSuccessfulSamplesRequired(116434463) - .withAdditionalLatencyMilliseconds(1886216092), - new LoadBalancingSettingsModel().withId("ptjgwdt") - .withName("l") - .withSampleSize(1965793317) - .withSuccessfulSamplesRequired(1487124629) - .withAdditionalLatencyMilliseconds(1563873341))) + Arrays + .asList( + new RoutingRule().withId("gcgqyhleseyqrhvy") + .withName("n") + .withFrontendEndpoints(Arrays.asList(new SubResource())) + .withAcceptedProtocols(Arrays.asList(FrontDoorProtocol.HTTP, FrontDoorProtocol.HTTPS, + FrontDoorProtocol.HTTPS)) + .withPatternsToMatch(Arrays.asList("fhbzffovwmbjlzq", "czpgvdwnapfdq")) + .withEnabledState(RoutingRuleEnabledState.ENABLED) + .withRouteConfiguration(new RouteConfiguration()) + .withRulesEngine(new SubResource()) + .withWebApplicationFirewallPolicyLink( + new RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink()), + new RoutingRule().withId("vgmmbugtyw") + .withName("lq") + .withFrontendEndpoints(Arrays.asList(new SubResource())) + .withAcceptedProtocols(Arrays.asList(FrontDoorProtocol.HTTPS, FrontDoorProtocol.HTTPS)) + .withPatternsToMatch(Arrays.asList("ws", "ukjtasbvwispkxk")) + .withEnabledState(RoutingRuleEnabledState.DISABLED) + .withRouteConfiguration(new RouteConfiguration()) + .withRulesEngine(new SubResource()) + .withWebApplicationFirewallPolicyLink( + new RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink()), + new RoutingRule().withId("tdwckygr") + .withName("h") + .withFrontendEndpoints(Arrays.asList(new SubResource(), new SubResource(), + new SubResource(), new SubResource())) + .withAcceptedProtocols(Arrays.asList(FrontDoorProtocol.HTTPS, FrontDoorProtocol.HTTP)) + .withPatternsToMatch(Arrays.asList("roeshoygzc", "yf", "x")) + .withEnabledState(RoutingRuleEnabledState.ENABLED) + .withRouteConfiguration(new RouteConfiguration()) + .withRulesEngine(new SubResource()) + .withWebApplicationFirewallPolicyLink( + new RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink()))) + .withLoadBalancingSettings(Arrays.asList(new LoadBalancingSettingsModel().withId("eysfaqegplw") + .withName("br") + .withSampleSize(1535933955) + .withSuccessfulSamplesRequired(732502558) + .withAdditionalLatencyMilliseconds(722264053))) .withHealthProbeSettings(Arrays.asList( - new HealthProbeSettingsModel().withId("fypiv") - .withName("niiprglvaw") - .withPath("lwphqlkccuzgyg") + new HealthProbeSettingsModel().withId("iwenazero") + .withName("tdacarvvlfn") + .withPath("kvb") .withProtocol(FrontDoorProtocol.HTTPS) - .withIntervalInSeconds(642902042) - .withHealthProbeMethod(FrontDoorHealthProbeMethod.HEAD) + .withIntervalInSeconds(553789713) + .withHealthProbeMethod(FrontDoorHealthProbeMethod.GET) .withEnabledState(HealthProbeEnabled.ENABLED), - new HealthProbeSettingsModel().withId("biqmrjgei") - .withName("bqgvgovpbbtte") - .withPath("pmcubkmifoxxkub") + new HealthProbeSettingsModel().withId("q") + .withName("fgsdpcvessmzhhk") + .withPath("a") .withProtocol(FrontDoorProtocol.HTTPS) - .withIntervalInSeconds(202196748) + .withIntervalInSeconds(1999713581) .withHealthProbeMethod(FrontDoorHealthProbeMethod.HEAD) .withEnabledState(HealthProbeEnabled.DISABLED), - new HealthProbeSettingsModel().withId("hnp") - .withName("rc") - .withPath("gwfiwzcxmjpby") - .withProtocol(FrontDoorProtocol.HTTPS) - .withIntervalInSeconds(342558293) - .withHealthProbeMethod(FrontDoorHealthProbeMethod.GET) - .withEnabledState(HealthProbeEnabled.ENABLED), - new HealthProbeSettingsModel().withId("kvci") - .withName("gm") - .withPath("cabvnuil") - .withProtocol(FrontDoorProtocol.HTTPS) - .withIntervalInSeconds(967163680) + new HealthProbeSettingsModel().withId("pskdyzatvfuzk") + .withName("xhzzyse") + .withPath("valblhtjqv") + .withProtocol(FrontDoorProtocol.HTTP) + .withIntervalInSeconds(269491033) .withHealthProbeMethod(FrontDoorHealthProbeMethod.GET) - .withEnabledState(HealthProbeEnabled.DISABLED))) - .withBackendPools(Arrays.asList( - new BackendPool().withId("smgomguaml") - .withName("wuived") - .withBackends(Arrays.asList(new Backend(), new Backend(), new Backend())) - .withLoadBalancingSettings(new SubResource()) - .withHealthProbeSettings(new SubResource()), - new BackendPool().withId("jk") - .withName("zgaufcshhvn") - .withBackends(Arrays.asList(new Backend(), new Backend(), new Backend(), new Backend())) - .withLoadBalancingSettings(new SubResource()) - .withHealthProbeSettings(new SubResource()))) - .withFrontendEndpoints(Arrays.asList(new FrontendEndpointInner().withId("zvxnqmhrp") - .withName("cphdrwjjkhvyo") - .withHostname("hxcylhkgm") - .withSessionAffinityEnabledState(SessionAffinityEnabledState.DISABLED) - .withSessionAffinityTtlSeconds(1963006150) - .withWebApplicationFirewallPolicyLink( - new FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink()))) + .withEnabledState(HealthProbeEnabled.ENABLED))) + .withBackendPools(Arrays.asList(new BackendPool().withId("plkcsm") + .withName("gsyeipqdsmjtg") + .withBackends(Arrays.asList(new Backend(), new Backend(), new Backend(), new Backend())) + .withLoadBalancingSettings(new SubResource()) + .withHealthProbeSettings(new SubResource()))) + .withFrontendEndpoints(Arrays.asList( + new FrontendEndpointInner().withId("abgdexj") + .withName("vjsaqwotm") + .withHostname("qfloygbdgwum") + .withSessionAffinityEnabledState(SessionAffinityEnabledState.DISABLED) + .withSessionAffinityTtlSeconds(548622893) + .withWebApplicationFirewallPolicyLink( + new FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink()), + new FrontendEndpointInner().withId("eeksnbksdqhjvyk") + .withName("eslk") + .withHostname("hv") + .withSessionAffinityEnabledState(SessionAffinityEnabledState.DISABLED) + .withSessionAffinityTtlSeconds(301111411) + .withWebApplicationFirewallPolicyLink( + new FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink()), + new FrontendEndpointInner().withId("svkzykj") + .withName("kns") + .withHostname("ejjjkxybwfdb") + .withSessionAffinityEnabledState(SessionAffinityEnabledState.DISABLED) + .withSessionAffinityTtlSeconds(470007902) + .withWebApplicationFirewallPolicyLink( + new FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink()), + new FrontendEndpointInner().withId("bcyaykmmfzs") + .withName("wxrzxmdewsrsxkrp") + .withHostname("uwxeoiojfizf") + .withSessionAffinityEnabledState(SessionAffinityEnabledState.DISABLED) + .withSessionAffinityTtlSeconds(1495529407) + .withWebApplicationFirewallPolicyLink( + new FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink()))) .withBackendPoolsSettings(new BackendPoolsSettings() .withEnforceCertificateNameCheck(EnforceCertificateNameCheckEnabledState.DISABLED) - .withSendRecvTimeoutSeconds(414258281)) + .withSendRecvTimeoutSeconds(811440586)) .withEnabledState(FrontDoorEnabledState.ENABLED) .create(); - Assertions.assertEquals("ychillcecfe", response.location()); - Assertions.assertEquals("aoaguhicqlli", response.tags().get("stacsjvhrweftkwq")); - Assertions.assertEquals("x", response.friendlyName()); - Assertions.assertEquals("nhmdptysprqs", response.routingRules().get(0).id()); - Assertions.assertEquals("hmnr", response.routingRules().get(0).name()); - Assertions.assertEquals(FrontDoorProtocol.HTTPS, response.routingRules().get(0).acceptedProtocols().get(0)); - Assertions.assertEquals("seqchkrt", response.routingRules().get(0).patternsToMatch().get(0)); + Assertions.assertEquals("wrzregzgyufu", response.location()); + Assertions.assertEquals("pweryekzk", response.tags().get("hmeott")); + Assertions.assertEquals("exreu", response.friendlyName()); + Assertions.assertEquals("jcngoadyed", response.routingRules().get(0).id()); + Assertions.assertEquals("gpszngafpg", response.routingRules().get(0).name()); + Assertions.assertEquals(FrontDoorProtocol.HTTP, response.routingRules().get(0).acceptedProtocols().get(0)); + Assertions.assertEquals("hyxvrqt", response.routingRules().get(0).patternsToMatch().get(0)); Assertions.assertEquals(RoutingRuleEnabledState.DISABLED, response.routingRules().get(0).enabledState()); - Assertions.assertEquals("egjlgvvpa", response.loadBalancingSettings().get(0).id()); - Assertions.assertEquals("hvsmtodlfpyap", response.loadBalancingSettings().get(0).name()); - Assertions.assertEquals(164914100, response.loadBalancingSettings().get(0).sampleSize()); - Assertions.assertEquals(1136575417, response.loadBalancingSettings().get(0).successfulSamplesRequired()); - Assertions.assertEquals(1644605139, response.loadBalancingSettings().get(0).additionalLatencyMilliseconds()); - Assertions.assertEquals("ttbst", response.healthProbeSettings().get(0).id()); - Assertions.assertEquals("uczkgofxyfsruc", response.healthProbeSettings().get(0).name()); - Assertions.assertEquals("erctatoyin", response.healthProbeSettings().get(0).path()); + Assertions.assertEquals("tudaw", response.loadBalancingSettings().get(0).id()); + Assertions.assertEquals("lbemyej", response.loadBalancingSettings().get(0).name()); + Assertions.assertEquals(215833997, response.loadBalancingSettings().get(0).sampleSize()); + Assertions.assertEquals(1228581117, response.loadBalancingSettings().get(0).successfulSamplesRequired()); + Assertions.assertEquals(1407579380, response.loadBalancingSettings().get(0).additionalLatencyMilliseconds()); + Assertions.assertEquals("qylkjztjiu", response.healthProbeSettings().get(0).id()); + Assertions.assertEquals("aderzmw", response.healthProbeSettings().get(0).name()); + Assertions.assertEquals("zlwxaeaovur", response.healthProbeSettings().get(0).path()); Assertions.assertEquals(FrontDoorProtocol.HTTPS, response.healthProbeSettings().get(0).protocol()); - Assertions.assertEquals(2087275634, response.healthProbeSettings().get(0).intervalInSeconds()); - Assertions.assertEquals(FrontDoorHealthProbeMethod.HEAD, + Assertions.assertEquals(20906315, response.healthProbeSettings().get(0).intervalInSeconds()); + Assertions.assertEquals(FrontDoorHealthProbeMethod.GET, response.healthProbeSettings().get(0).healthProbeMethod()); - Assertions.assertEquals(HealthProbeEnabled.DISABLED, response.healthProbeSettings().get(0).enabledState()); - Assertions.assertEquals("wmtxkyctwwgz", response.backendPools().get(0).id()); - Assertions.assertEquals("fyut", response.backendPools().get(0).name()); - Assertions.assertEquals("ghihpvecms", response.frontendEndpoints().get(0).id()); - Assertions.assertEquals("fbwqrooht", response.frontendEndpoints().get(0).name()); - Assertions.assertEquals("kzyaup", response.frontendEndpoints().get(0).hostname()); + Assertions.assertEquals(HealthProbeEnabled.ENABLED, response.healthProbeSettings().get(0).enabledState()); + Assertions.assertEquals("cqguef", response.backendPools().get(0).id()); + Assertions.assertEquals("inzcpdltkrlgj", response.backendPools().get(0).name()); + Assertions.assertEquals("lcdi", response.frontendEndpoints().get(0).id()); + Assertions.assertEquals("tajbrz", response.frontendEndpoints().get(0).name()); + Assertions.assertEquals("jlfyou", response.frontendEndpoints().get(0).hostname()); Assertions.assertEquals(SessionAffinityEnabledState.DISABLED, response.frontendEndpoints().get(0).sessionAffinityEnabledState()); - Assertions.assertEquals(1440531201, response.frontendEndpoints().get(0).sessionAffinityTtlSeconds()); + Assertions.assertEquals(582357329, response.frontendEndpoints().get(0).sessionAffinityTtlSeconds()); Assertions.assertEquals(EnforceCertificateNameCheckEnabledState.ENABLED, response.backendPoolsSettings().enforceCertificateNameCheck()); - Assertions.assertEquals(1752106609, response.backendPoolsSettings().sendRecvTimeoutSeconds()); + Assertions.assertEquals(1228570374, response.backendPoolsSettings().sendRecvTimeoutSeconds()); Assertions.assertEquals(FrontDoorEnabledState.DISABLED, response.enabledState()); } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsGetByResourceGroupWithResponseMockTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsGetByResourceGroupWithResponseMockTests.java index 016072c5524a8..a24121465ca87 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsGetByResourceGroupWithResponseMockTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsGetByResourceGroupWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.frontdoor.FrontDoorManager; import com.azure.resourcemanager.frontdoor.models.EnforceCertificateNameCheckEnabledState; @@ -28,51 +28,51 @@ public final class FrontDoorsGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"resourceState\":\"Enabling\",\"provisioningState\":\"vqtanarfdlpuk\",\"cname\":\"yrneizjcpeo\",\"frontdoorId\":\"hnmgbroux\",\"rulesEngines\":[{\"properties\":{\"resourceState\":\"Migrated\",\"rules\":[{\"name\":\"paz\",\"priority\":1008085279,\"action\":{}},{\"name\":\"oywjxhpdulont\",\"priority\":48133569,\"action\":{}},{\"name\":\"np\",\"priority\":204216617,\"action\":{}},{\"name\":\"tehtuevrhrljyoog\",\"priority\":466288412,\"action\":{}}]},\"id\":\"hnsduugwbsreur\",\"name\":\"q\",\"type\":\"fuarenlvhht\"},{\"properties\":{\"resourceState\":\"Migrated\",\"rules\":[{\"name\":\"fvv\",\"priority\":64736512,\"action\":{}},{\"name\":\"f\",\"priority\":1124530948,\"action\":{}}]},\"id\":\"ev\",\"name\":\"bo\",\"type\":\"lcqxypokk\"},{\"properties\":{\"resourceState\":\"Migrated\",\"rules\":[{\"name\":\"ymc\",\"priority\":150528067,\"action\":{}},{\"name\":\"gn\",\"priority\":348631534,\"action\":{}}]},\"id\":\"xxewu\",\"name\":\"invudbch\",\"type\":\"qdtvqecrqctmxx\"},{\"properties\":{\"resourceState\":\"Disabled\",\"rules\":[{\"name\":\"lhuytxzvtznap\",\"priority\":1526356750,\"action\":{}},{\"name\":\"annovvoxczytpr\",\"priority\":1668555168,\"action\":{}},{\"name\":\"wvroevytlyokrrr\",\"priority\":1027800493,\"action\":{}}]},\"id\":\"uxvnsasbcrymodi\",\"name\":\"rxklobdxnazpmk\",\"type\":\"lmv\"}],\"extendedProperties\":{\"ohrdddt\":\"xzopjhbzxl\"},\"friendlyName\":\"xqbawpc\",\"routingRules\":[{\"properties\":{\"resourceState\":\"Migrating\",\"frontendEndpoints\":[{},{}],\"acceptedProtocols\":[\"Http\",\"Https\",\"Http\"],\"patternsToMatch\":[\"uicdhzbdybwwg\",\"d\",\"ibidmhmwffp\"],\"enabledState\":\"Enabled\",\"routeConfiguration\":{\"@odata.type\":\"RouteConfiguration\"},\"rulesEngine\":{},\"webApplicationFirewallPolicyLink\":{}},\"name\":\"ck\",\"type\":\"rrvwey\",\"id\":\"oy\"},{\"properties\":{\"resourceState\":\"Disabling\",\"frontendEndpoints\":[{},{},{}],\"acceptedProtocols\":[\"Http\",\"Http\",\"Http\",\"Https\"],\"patternsToMatch\":[\"boshbragapyyrmfs\",\"bpav\"],\"enabledState\":\"Enabled\",\"routeConfiguration\":{\"@odata.type\":\"RouteConfiguration\"},\"rulesEngine\":{},\"webApplicationFirewallPolicyLink\":{}},\"name\":\"bwnupgahxkumas\",\"type\":\"aacfdmmc\",\"id\":\"g\"}],\"loadBalancingSettings\":[{\"properties\":{\"resourceState\":\"Disabling\",\"sampleSize\":36314711,\"successfulSamplesRequired\":147186923,\"additionalLatencyMilliseconds\":767150334},\"name\":\"h\",\"type\":\"hoqhnl\",\"id\":\"nbldxeaclgschori\"},{\"properties\":{\"resourceState\":\"Enabling\",\"sampleSize\":91375034,\"successfulSamplesRequired\":815784968,\"additionalLatencyMilliseconds\":578836429},\"name\":\"ofldpuviyfcaa\",\"type\":\"olhbhlvb\",\"id\":\"uqibsxtkcu\"},{\"properties\":{\"resourceState\":\"Enabling\",\"sampleSize\":1181450878,\"successfulSamplesRequired\":312817267,\"additionalLatencyMilliseconds\":1013426268},\"name\":\"wlkjxn\",\"type\":\"vwgf\",\"id\":\"mhqykizmdksa\"},{\"properties\":{\"resourceState\":\"Enabled\",\"sampleSize\":1553969507,\"successfulSamplesRequired\":72107133,\"additionalLatencyMilliseconds\":1363413329},\"name\":\"ycjimryvwgcwwpbm\",\"type\":\"w\",\"id\":\"ydsx\"}],\"healthProbeSettings\":[{\"properties\":{\"resourceState\":\"Enabling\",\"path\":\"bvopwndyqle\",\"protocol\":\"Https\",\"intervalInSeconds\":677434729,\"healthProbeMethod\":\"HEAD\",\"enabledState\":\"Enabled\"},\"name\":\"owkxxpv\",\"type\":\"dfjmzsyzfhotlh\",\"id\":\"cyychunsjlp\"}],\"backendPools\":[{\"properties\":{\"resourceState\":\"Enabled\",\"backends\":[{}],\"loadBalancingSettings\":{},\"healthProbeSettings\":{}},\"name\":\"c\",\"type\":\"vtrrmhwrbfdpyflu\",\"id\":\"vjglrocuyzlwhhme\"},{\"properties\":{\"resourceState\":\"Enabling\",\"backends\":[{},{}],\"loadBalancingSettings\":{},\"healthProbeSettings\":{}},\"name\":\"pqmem\",\"type\":\"jk\",\"id\":\"ykyujxsg\"},{\"properties\":{\"resourceState\":\"Creating\",\"backends\":[{}],\"loadBalancingSettings\":{},\"healthProbeSettings\":{}},\"name\":\"ylmbkzudni\",\"type\":\"fihotj\",\"id\":\"lpxuzzjgnrefq\"}],\"frontendEndpoints\":[{\"properties\":{\"resourceState\":\"Disabling\",\"customHttpsProvisioningState\":\"Enabled\",\"customHttpsProvisioningSubstate\":\"DeployingCertificate\",\"customHttpsConfiguration\":{\"certificateSource\":\"AzureKeyVault\",\"protocolType\":\"ServerNameIndication\",\"minimumTlsVersion\":\"1.0\"},\"hostName\":\"wf\",\"sessionAffinityEnabledState\":\"Disabled\",\"sessionAffinityTtlSeconds\":1023798588,\"webApplicationFirewallPolicyLink\":{}},\"name\":\"qtvhcspodaqax\",\"type\":\"pie\",\"id\":\"bebjfu\"},{\"properties\":{\"resourceState\":\"Migrating\",\"customHttpsProvisioningState\":\"Failed\",\"customHttpsProvisioningSubstate\":\"CertificateDeployed\",\"customHttpsConfiguration\":{\"certificateSource\":\"FrontDoor\",\"protocolType\":\"ServerNameIndication\",\"minimumTlsVersion\":\"1.2\"},\"hostName\":\"ubntnbatzviqsow\",\"sessionAffinityEnabledState\":\"Enabled\",\"sessionAffinityTtlSeconds\":655174268,\"webApplicationFirewallPolicyLink\":{}},\"name\":\"ttcjuhplrvkmjc\",\"type\":\"jvlgfggcvkyyliz\",\"id\":\"bjpsfxsfuztlvtm\"},{\"properties\":{\"resourceState\":\"Enabled\",\"customHttpsProvisioningState\":\"Enabling\",\"customHttpsProvisioningSubstate\":\"CertificateDeployed\",\"customHttpsConfiguration\":{\"certificateSource\":\"AzureKeyVault\",\"protocolType\":\"ServerNameIndication\",\"minimumTlsVersion\":\"1.0\"},\"hostName\":\"oveofizrvjfnmj\",\"sessionAffinityEnabledState\":\"Enabled\",\"sessionAffinityTtlSeconds\":1121766092,\"webApplicationFirewallPolicyLink\":{}},\"name\":\"iblkujr\",\"type\":\"fojuidjpuuyj\",\"id\":\"ejikzoeovvtzejet\"},{\"properties\":{\"resourceState\":\"Creating\",\"customHttpsProvisioningState\":\"Disabling\",\"customHttpsProvisioningSubstate\":\"SubmittingDomainControlValidationRequest\",\"customHttpsConfiguration\":{\"certificateSource\":\"AzureKeyVault\",\"protocolType\":\"ServerNameIndication\",\"minimumTlsVersion\":\"1.0\"},\"hostName\":\"bqzolxr\",\"sessionAffinityEnabledState\":\"Disabled\",\"sessionAffinityTtlSeconds\":699827812,\"webApplicationFirewallPolicyLink\":{}},\"name\":\"rhtgvgzpcrrkol\",\"type\":\"jmjsmwrokcdxf\",\"id\":\"zwyjafitlhgu\"}],\"backendPoolsSettings\":{\"enforceCertificateNameCheck\":\"Enabled\",\"sendRecvTimeoutSeconds\":458551614},\"enabledState\":\"Enabled\"},\"location\":\"ltxdwhmozu\",\"tags\":{\"pafolp\":\"vlnsnnjz\",\"vdulajv\":\"mwamxqzragpgdph\",\"nmzlanru\":\"ejchcsrlz\"},\"id\":\"dwv\",\"name\":\"phcnzqtpj\",\"type\":\"mqrhvthl\"}"; + = "{\"properties\":{\"resourceState\":\"Creating\",\"provisioningState\":\"hvtrrmhwrbfdpyf\",\"cname\":\"bhvjglr\",\"frontdoorId\":\"uyzlw\",\"rulesEngines\":[{\"properties\":{\"resourceState\":\"Enabled\",\"rules\":[{\"name\":\"clutnpqme\",\"priority\":563116604,\"action\":{}}]},\"id\":\"jk\",\"name\":\"ykyujxsg\",\"type\":\"srrryejylmbkzu\"},{\"properties\":{\"resourceState\":\"Deleting\",\"rules\":[{\"name\":\"ihotjewlpxuzzjg\",\"priority\":1271933494,\"action\":{}},{\"name\":\"efqyhqotoihiqaky\",\"priority\":2061594635,\"action\":{}}]},\"id\":\"fb\",\"name\":\"wpzdqtvhcspo\",\"type\":\"qaxsipietgbebjf\"},{\"properties\":{\"resourceState\":\"Migrated\",\"rules\":[{\"name\":\"chdlpnfpubn\",\"priority\":1736302294,\"action\":{}},{\"name\":\"batzviqsows\",\"priority\":1350693916,\"action\":{}}]},\"id\":\"lca\",\"name\":\"cjuhplrvkm\",\"type\":\"wmj\"},{\"properties\":{\"resourceState\":\"Enabling\",\"rules\":[{\"name\":\"cvkyylizrzbj\",\"priority\":1330635778,\"action\":{}},{\"name\":\"fxsfuztlvtmv\",\"priority\":175189485,\"action\":{}}]},\"id\":\"w\",\"name\":\"qlvh\",\"type\":\"oveofizrvjfnmj\"}],\"extendedProperties\":{\"llfojuidjp\":\"wyzgiblkuj\",\"ovvtzejetjkln\":\"uyjucejikzo\"},\"friendlyName\":\"k\",\"routingRules\":[{\"properties\":{\"resourceState\":\"Migrating\",\"frontendEndpoints\":[{},{},{}],\"acceptedProtocols\":[\"Https\"],\"patternsToMatch\":[\"zvhqjwtrhtgvg\"],\"enabledState\":\"Enabled\",\"routeConfiguration\":{\"@odata.type\":\"RouteConfiguration\"},\"rulesEngine\":{},\"webApplicationFirewallPolicyLink\":{}},\"name\":\"lawjmjsmwrok\",\"type\":\"xfzzzwyjafitlhgu\",\"id\":\"uchlgmltx\"}],\"loadBalancingSettings\":[{\"properties\":{\"resourceState\":\"Enabling\",\"sampleSize\":1064451273,\"successfulSamplesRequired\":171786773,\"additionalLatencyMilliseconds\":404477623},\"name\":\"snnjzfpafolpym\",\"type\":\"mxq\",\"id\":\"agpgdph\"}],\"healthProbeSettings\":[{\"properties\":{\"resourceState\":\"Creating\",\"path\":\"vl\",\"protocol\":\"Http\",\"intervalInSeconds\":390046738,\"healthProbeMethod\":\"GET\",\"enabledState\":\"Disabled\"},\"name\":\"nmzlanru\",\"type\":\"wvnph\",\"id\":\"zqtpjhmq\"},{\"properties\":{\"resourceState\":\"Disabled\",\"path\":\"laiwdcxsmlzzh\",\"protocol\":\"Https\",\"intervalInSeconds\":1661098630,\"healthProbeMethod\":\"GET\",\"enabledState\":\"Enabled\"},\"name\":\"lhqvlnnpxybafi\",\"type\":\"eaarbgjekglklbyu\",\"id\":\"dw\"},{\"properties\":{\"resourceState\":\"Disabling\",\"path\":\"eg\",\"protocol\":\"Https\",\"intervalInSeconds\":417009435,\"healthProbeMethod\":\"HEAD\",\"enabledState\":\"Enabled\"},\"name\":\"dnqzbrfkspzhzmt\",\"type\":\"jcitdigsxcdglj\",\"id\":\"keuachtomf\"},{\"properties\":{\"resourceState\":\"Migrated\",\"path\":\"wfpfmdgycx\",\"protocol\":\"Http\",\"intervalInSeconds\":2063610896,\"healthProbeMethod\":\"HEAD\",\"enabledState\":\"Enabled\"},\"name\":\"slurlpshhkvpe\",\"type\":\"qsl\",\"id\":\"hmpqvw\"}],\"backendPools\":[{\"properties\":{\"resourceState\":\"Disabled\",\"backends\":[{},{},{},{}],\"loadBalancingSettings\":{},\"healthProbeSettings\":{}},\"name\":\"muvqejosovyr\",\"type\":\"eaesin\",\"id\":\"tljqobbpih\"},{\"properties\":{\"resourceState\":\"Disabled\",\"backends\":[{},{},{}],\"loadBalancingSettings\":{},\"healthProbeSettings\":{}},\"name\":\"qbr\",\"type\":\"bmpxdlvykfrexc\",\"id\":\"eqwjksgh\"}],\"frontendEndpoints\":[{\"properties\":{\"resourceState\":\"Enabling\",\"customHttpsProvisioningState\":\"Failed\",\"customHttpsProvisioningSubstate\":\"CertificateDeployed\",\"customHttpsConfiguration\":{\"certificateSource\":\"AzureKeyVault\",\"protocolType\":\"ServerNameIndication\",\"minimumTlsVersion\":\"1.2\"},\"hostName\":\"jkxibda\",\"sessionAffinityEnabledState\":\"Enabled\",\"sessionAffinityTtlSeconds\":1074190205,\"webApplicationFirewallPolicyLink\":{}},\"id\":\"omkxf\",\"name\":\"fbhdy\",\"type\":\"hpwpgddeimawzovg\"},{\"properties\":{\"resourceState\":\"Migrating\",\"customHttpsProvisioningState\":\"Disabled\",\"customHttpsProvisioningSubstate\":\"SubmittingDomainControlValidationRequest\",\"customHttpsConfiguration\":{\"certificateSource\":\"AzureKeyVault\",\"protocolType\":\"ServerNameIndication\",\"minimumTlsVersion\":\"1.0\"},\"hostName\":\"tbw\",\"sessionAffinityEnabledState\":\"Enabled\",\"sessionAffinityTtlSeconds\":62293461,\"webApplicationFirewallPolicyLink\":{}},\"id\":\"wcoml\",\"name\":\"ytwvczcswkacve\",\"type\":\"fdv\"}],\"backendPoolsSettings\":{\"enforceCertificateNameCheck\":\"Enabled\",\"sendRecvTimeoutSeconds\":117873360},\"enabledState\":\"Enabled\"},\"location\":\"xt\",\"tags\":{\"kcoeqswank\":\"pqthehnmnaoya\",\"tmhdroznnhdr\":\"t\"},\"id\":\"ktgj\",\"name\":\"sggux\",\"type\":\"eml\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); FrontDoorManager manager = FrontDoorManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); FrontDoor response = manager.frontDoors() - .getByResourceGroupWithResponse("kzmkwklsnoxaxmqe", "alhhjnhgwydyynfs", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("nsjlpjrtws", "hv", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ltxdwhmozu", response.location()); - Assertions.assertEquals("vlnsnnjz", response.tags().get("pafolp")); - Assertions.assertEquals("xqbawpc", response.friendlyName()); - Assertions.assertEquals("oy", response.routingRules().get(0).id()); - Assertions.assertEquals("ck", response.routingRules().get(0).name()); - Assertions.assertEquals(FrontDoorProtocol.HTTP, response.routingRules().get(0).acceptedProtocols().get(0)); - Assertions.assertEquals("uicdhzbdybwwg", response.routingRules().get(0).patternsToMatch().get(0)); + Assertions.assertEquals("xt", response.location()); + Assertions.assertEquals("pqthehnmnaoya", response.tags().get("kcoeqswank")); + Assertions.assertEquals("k", response.friendlyName()); + Assertions.assertEquals("uchlgmltx", response.routingRules().get(0).id()); + Assertions.assertEquals("lawjmjsmwrok", response.routingRules().get(0).name()); + Assertions.assertEquals(FrontDoorProtocol.HTTPS, response.routingRules().get(0).acceptedProtocols().get(0)); + Assertions.assertEquals("zvhqjwtrhtgvg", response.routingRules().get(0).patternsToMatch().get(0)); Assertions.assertEquals(RoutingRuleEnabledState.ENABLED, response.routingRules().get(0).enabledState()); - Assertions.assertEquals("nbldxeaclgschori", response.loadBalancingSettings().get(0).id()); - Assertions.assertEquals("h", response.loadBalancingSettings().get(0).name()); - Assertions.assertEquals(36314711, response.loadBalancingSettings().get(0).sampleSize()); - Assertions.assertEquals(147186923, response.loadBalancingSettings().get(0).successfulSamplesRequired()); - Assertions.assertEquals(767150334, response.loadBalancingSettings().get(0).additionalLatencyMilliseconds()); - Assertions.assertEquals("cyychunsjlp", response.healthProbeSettings().get(0).id()); - Assertions.assertEquals("owkxxpv", response.healthProbeSettings().get(0).name()); - Assertions.assertEquals("bvopwndyqle", response.healthProbeSettings().get(0).path()); - Assertions.assertEquals(FrontDoorProtocol.HTTPS, response.healthProbeSettings().get(0).protocol()); - Assertions.assertEquals(677434729, response.healthProbeSettings().get(0).intervalInSeconds()); - Assertions.assertEquals(FrontDoorHealthProbeMethod.HEAD, + Assertions.assertEquals("agpgdph", response.loadBalancingSettings().get(0).id()); + Assertions.assertEquals("snnjzfpafolpym", response.loadBalancingSettings().get(0).name()); + Assertions.assertEquals(1064451273, response.loadBalancingSettings().get(0).sampleSize()); + Assertions.assertEquals(171786773, response.loadBalancingSettings().get(0).successfulSamplesRequired()); + Assertions.assertEquals(404477623, response.loadBalancingSettings().get(0).additionalLatencyMilliseconds()); + Assertions.assertEquals("zqtpjhmq", response.healthProbeSettings().get(0).id()); + Assertions.assertEquals("nmzlanru", response.healthProbeSettings().get(0).name()); + Assertions.assertEquals("vl", response.healthProbeSettings().get(0).path()); + Assertions.assertEquals(FrontDoorProtocol.HTTP, response.healthProbeSettings().get(0).protocol()); + Assertions.assertEquals(390046738, response.healthProbeSettings().get(0).intervalInSeconds()); + Assertions.assertEquals(FrontDoorHealthProbeMethod.GET, response.healthProbeSettings().get(0).healthProbeMethod()); - Assertions.assertEquals(HealthProbeEnabled.ENABLED, response.healthProbeSettings().get(0).enabledState()); - Assertions.assertEquals("vjglrocuyzlwhhme", response.backendPools().get(0).id()); - Assertions.assertEquals("c", response.backendPools().get(0).name()); - Assertions.assertEquals("bebjfu", response.frontendEndpoints().get(0).id()); - Assertions.assertEquals("qtvhcspodaqax", response.frontendEndpoints().get(0).name()); - Assertions.assertEquals("wf", response.frontendEndpoints().get(0).hostname()); - Assertions.assertEquals(SessionAffinityEnabledState.DISABLED, + Assertions.assertEquals(HealthProbeEnabled.DISABLED, response.healthProbeSettings().get(0).enabledState()); + Assertions.assertEquals("tljqobbpih", response.backendPools().get(0).id()); + Assertions.assertEquals("muvqejosovyr", response.backendPools().get(0).name()); + Assertions.assertEquals("omkxf", response.frontendEndpoints().get(0).id()); + Assertions.assertEquals("fbhdy", response.frontendEndpoints().get(0).name()); + Assertions.assertEquals("jkxibda", response.frontendEndpoints().get(0).hostname()); + Assertions.assertEquals(SessionAffinityEnabledState.ENABLED, response.frontendEndpoints().get(0).sessionAffinityEnabledState()); - Assertions.assertEquals(1023798588, response.frontendEndpoints().get(0).sessionAffinityTtlSeconds()); + Assertions.assertEquals(1074190205, response.frontendEndpoints().get(0).sessionAffinityTtlSeconds()); Assertions.assertEquals(EnforceCertificateNameCheckEnabledState.ENABLED, response.backendPoolsSettings().enforceCertificateNameCheck()); - Assertions.assertEquals(458551614, response.backendPoolsSettings().sendRecvTimeoutSeconds()); + Assertions.assertEquals(117873360, response.backendPoolsSettings().sendRecvTimeoutSeconds()); Assertions.assertEquals(FrontDoorEnabledState.ENABLED, response.enabledState()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsListByResourceGroupMockTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsListByResourceGroupMockTests.java index 243365c9af919..8c994f437c7d6 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsListByResourceGroupMockTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsListByResourceGroupMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.frontdoor.FrontDoorManager; import com.azure.resourcemanager.frontdoor.models.EnforceCertificateNameCheckEnabledState; @@ -29,58 +29,59 @@ public final class FrontDoorsListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"resourceState\":\"Migrating\",\"provisioningState\":\"gpicr\",\"cname\":\"zhrgmqgjsxvpqc\",\"frontdoorId\":\"rmbodt\",\"rulesEngines\":[{\"properties\":{\"resourceState\":\"Migrating\",\"rules\":[{\"name\":\"i\",\"priority\":260183407,\"action\":{}},{\"name\":\"kclacjfrn\",\"priority\":1419015231,\"action\":{}}]},\"id\":\"usx\",\"name\":\"uzlwvsgmw\",\"type\":\"hqf\"},{\"properties\":{\"resourceState\":\"Enabling\",\"rules\":[{\"name\":\"mmkjsvthnwpztek\",\"priority\":1962597445,\"action\":{}},{\"name\":\"mribiat\",\"priority\":2029027223,\"action\":{}}]},\"id\":\"plucfotangcfhnyk\",\"name\":\"cugswvxwlmzqw\",\"type\":\"vtxnjmxmcuqud\"},{\"properties\":{\"resourceState\":\"Enabled\",\"rules\":[{\"name\":\"ynpdkvgfab\",\"priority\":979398617,\"action\":{}},{\"name\":\"yjibuzphdugne\",\"priority\":730335936,\"action\":{}},{\"name\":\"n\",\"priority\":635565091,\"action\":{}}]},\"id\":\"oxgjiuqhibt\",\"name\":\"z\",\"type\":\"pqwjedm\"},{\"properties\":{\"resourceState\":\"Disabling\",\"rules\":[{\"name\":\"ewpktvqy\",\"priority\":999177682,\"action\":{}}]},\"id\":\"mqpzoyhlfbcgw\",\"name\":\"cloxo\",\"type\":\"bqinjipnwjfu\"}],\"extendedProperties\":{\"hpzpo\":\"afcba\",\"yjwpfilkmkkh\":\"o\"},\"friendlyName\":\"vdndviauo\",\"routingRules\":[{\"properties\":{\"resourceState\":\"Disabled\",\"frontendEndpoints\":[{},{}],\"acceptedProtocols\":[\"Https\",\"Https\",\"Http\"],\"patternsToMatch\":[\"chnmna\",\"mnxhkxjqirwrweo\"],\"enabledState\":\"Enabled\",\"routeConfiguration\":{\"@odata.type\":\"RouteConfiguration\"},\"rulesEngine\":{},\"webApplicationFirewallPolicyLink\":{}},\"name\":\"xwrsnew\",\"type\":\"zqvbubqm\",\"id\":\"hsycxhxzgaz\"},{\"properties\":{\"resourceState\":\"Enabling\",\"frontendEndpoints\":[{},{},{}],\"acceptedProtocols\":[\"Https\",\"Https\",\"Https\"],\"patternsToMatch\":[\"pubowsepdfg\"],\"enabledState\":\"Disabled\",\"routeConfiguration\":{\"@odata.type\":\"RouteConfiguration\"},\"rulesEngine\":{},\"webApplicationFirewallPolicyLink\":{}},\"name\":\"ngb\",\"type\":\"juahokqto\",\"id\":\"auxofshfph\"}],\"loadBalancingSettings\":[{\"properties\":{\"resourceState\":\"Deleting\",\"sampleSize\":738049564,\"successfulSamplesRequired\":37632525,\"additionalLatencyMilliseconds\":450217205},\"name\":\"whslwkoj\",\"type\":\"l\",\"id\":\"npdwr\"},{\"properties\":{\"resourceState\":\"Enabling\",\"sampleSize\":1565849312,\"successfulSamplesRequired\":1169799061,\"additionalLatencyMilliseconds\":813335965},\"name\":\"fhyete\",\"type\":\"pococtfjgt\",\"id\":\"rjvzuyt\"},{\"properties\":{\"resourceState\":\"Enabled\",\"sampleSize\":1133060500,\"successfulSamplesRequired\":1311601904,\"additionalLatencyMilliseconds\":956907772},\"name\":\"au\",\"type\":\"opionszon\",\"id\":\"ngajinnixjawrtmj\"},{\"properties\":{\"resourceState\":\"Disabled\",\"sampleSize\":1470383597,\"successfulSamplesRequired\":837645611,\"additionalLatencyMilliseconds\":1452842923},\"name\":\"oxovnekhenlusf\",\"type\":\"dtjxtxrdcqt\",\"id\":\"idttgepus\"}],\"healthProbeSettings\":[{\"properties\":{\"resourceState\":\"Disabled\",\"path\":\"uwkasiz\",\"protocol\":\"Https\",\"intervalInSeconds\":1871243595,\"healthProbeMethod\":\"HEAD\",\"enabledState\":\"Disabled\"},\"name\":\"qfecjxeygtuhx\",\"type\":\"cbuewmrswnjlxuz\",\"id\":\"wpusxjbaqehg\"},{\"properties\":{\"resourceState\":\"Deleting\",\"path\":\"jqatucoigebxn\",\"protocol\":\"Https\",\"intervalInSeconds\":2085427407,\"healthProbeMethod\":\"GET\",\"enabledState\":\"Enabled\"},\"name\":\"fmxjg\",\"type\":\"bjb\",\"id\":\"lfgtdysnaquflqbc\"}],\"backendPools\":[{\"properties\":{\"resourceState\":\"Disabled\",\"backends\":[{}],\"loadBalancingSettings\":{},\"healthProbeSettings\":{}},\"name\":\"qzeqyjleziunjxdf\",\"type\":\"ntkwcegy\",\"id\":\"lbnseqac\"},{\"properties\":{\"resourceState\":\"Deleting\",\"backends\":[{},{},{}],\"loadBalancingSettings\":{},\"healthProbeSettings\":{}},\"name\":\"oq\",\"type\":\"gmditgueiookjbs\",\"id\":\"rtdtpdelq\"},{\"properties\":{\"resourceState\":\"Migrated\",\"backends\":[{},{},{}],\"loadBalancingSettings\":{},\"healthProbeSettings\":{}},\"name\":\"bnfxofvc\",\"type\":\"gdirazf\",\"id\":\"ejwabmdujtmvco\"}],\"frontendEndpoints\":[{\"properties\":{\"resourceState\":\"Migrated\",\"customHttpsProvisioningState\":\"Disabled\",\"customHttpsProvisioningSubstate\":\"CertificateDeployed\",\"customHttpsConfiguration\":{\"certificateSource\":\"FrontDoor\",\"protocolType\":\"ServerNameIndication\",\"minimumTlsVersion\":\"1.2\"},\"hostName\":\"ql\",\"sessionAffinityEnabledState\":\"Enabled\",\"sessionAffinityTtlSeconds\":862833850,\"webApplicationFirewallPolicyLink\":{}},\"name\":\"uwkffdjktsysid\",\"type\":\"c\",\"id\":\"lxnfuijtkbusqogs\"},{\"properties\":{\"resourceState\":\"Migrating\",\"customHttpsProvisioningState\":\"Enabling\",\"customHttpsProvisioningSubstate\":\"DomainControlValidationRequestApproved\",\"customHttpsConfiguration\":{\"certificateSource\":\"AzureKeyVault\",\"protocolType\":\"ServerNameIndication\",\"minimumTlsVersion\":\"1.2\"},\"hostName\":\"jtjiqx\",\"sessionAffinityEnabledState\":\"Enabled\",\"sessionAffinityTtlSeconds\":846546082,\"webApplicationFirewallPolicyLink\":{}},\"name\":\"vwkpqh\",\"type\":\"enuygbq\",\"id\":\"qekewvnqvcd\"}],\"backendPoolsSettings\":{\"enforceCertificateNameCheck\":\"Enabled\",\"sendRecvTimeoutSeconds\":368575860},\"enabledState\":\"Enabled\"},\"location\":\"djwnlaxpunjqi\",\"tags\":{\"acgxmfcsse\":\"vvi\",\"tvsoxhlwntsj\":\"x\",\"uuuybnchrsziz\":\"qrsxyp\",\"etndnbfqyggagf\":\"yuel\"},\"id\":\"nlgmtrwahzjmu\",\"name\":\"ftbyrplro\",\"type\":\"kpigqfusu\"}]}"; + = "{\"value\":[{\"properties\":{\"resourceState\":\"Disabling\",\"provisioningState\":\"elssxblycs\",\"cname\":\"ujksrlsmdesqplpv\",\"frontdoorId\":\"cdoewbidyv\",\"rulesEngines\":[{\"properties\":{\"resourceState\":\"Enabling\",\"rules\":[{\"name\":\"iudeu\",\"priority\":1657363824,\"action\":{}},{\"name\":\"sxze\",\"priority\":242323828,\"action\":{}},{\"name\":\"axwk\",\"priority\":1277972193,\"action\":{}},{\"name\":\"ykhv\",\"priority\":651614149,\"action\":{}}]},\"id\":\"epmrut\",\"name\":\"abaobnslujdjltym\",\"type\":\"vguihywar\"}],\"extendedProperties\":{\"mucfxhikkf\":\"phkixkykxdssjpe\",\"s\":\"rmymyincqlhr\",\"iiiovgqcgxuugq\":\"sl\"},\"friendlyName\":\"totiowlxteqdptjg\",\"routingRules\":[{\"properties\":{\"resourceState\":\"Migrating\",\"frontendEndpoints\":[{},{},{},{}],\"acceptedProtocols\":[\"Https\"],\"patternsToMatch\":[\"hqlkccuzgygqwaho\",\"ulwgniiprglvawuw\",\"d\"],\"enabledState\":\"Enabled\",\"routeConfiguration\":{\"@odata.type\":\"RouteConfiguration\"},\"rulesEngine\":{},\"webApplicationFirewallPolicyLink\":{}},\"name\":\"sbbjpmcu\",\"type\":\"mifoxxkub\",\"id\":\"havpmhbrbqgvg\"},{\"properties\":{\"resourceState\":\"Disabling\",\"frontendEndpoints\":[{},{},{}],\"acceptedProtocols\":[\"Http\",\"Https\"],\"patternsToMatch\":[\"nssqyzqed\",\"kdfrdbiqmrjgeihf\",\"lg\"],\"enabledState\":\"Disabled\",\"routeConfiguration\":{\"@odata.type\":\"RouteConfiguration\"},\"rulesEngine\":{},\"webApplicationFirewallPolicyLink\":{}},\"name\":\"xmjpbyep\",\"type\":\"gt\",\"id\":\"j\"},{\"properties\":{\"resourceState\":\"Creating\",\"frontendEndpoints\":[{}],\"acceptedProtocols\":[\"Http\"],\"patternsToMatch\":[\"hnp\",\"myqwcab\"],\"enabledState\":\"Enabled\",\"routeConfiguration\":{\"@odata.type\":\"RouteConfiguration\"},\"rulesEngine\":{},\"webApplicationFirewallPolicyLink\":{}},\"name\":\"yaswlpaugmr\",\"type\":\"jlrxwtoaukhfk\",\"id\":\"isizm\"},{\"properties\":{\"resourceState\":\"Deleting\",\"frontendEndpoints\":[{}],\"acceptedProtocols\":[\"Https\",\"Http\"],\"patternsToMatch\":[\"dwc\",\"yeew\"],\"enabledState\":\"Enabled\",\"routeConfiguration\":{\"@odata.type\":\"RouteConfiguration\"},\"rulesEngine\":{},\"webApplicationFirewallPolicyLink\":{}},\"name\":\"mgomg\",\"type\":\"mljdlrgmsplzga\",\"id\":\"cshhv\"}],\"loadBalancingSettings\":[{\"properties\":{\"resourceState\":\"Enabling\",\"sampleSize\":1815920077,\"successfulSamplesRequired\":448963425,\"additionalLatencyMilliseconds\":1340957573},\"name\":\"xrjkixtwb\",\"type\":\"oypnyg\",\"id\":\"hxcylhkgm\"},{\"properties\":{\"resourceState\":\"Migrating\",\"sampleSize\":986820074,\"successfulSamplesRequired\":1307496501,\"additionalLatencyMilliseconds\":2022273011},\"name\":\"rwjjkhvyomacluzv\",\"type\":\"qmhrpqp\",\"id\":\"wmkoisq\"},{\"properties\":{\"resourceState\":\"Creating\",\"sampleSize\":1770477631,\"successfulSamplesRequired\":1354024636,\"additionalLatencyMilliseconds\":573045315},\"name\":\"s\",\"type\":\"obkdqzrdzsyl\",\"id\":\"lgtrczzy\"},{\"properties\":{\"resourceState\":\"Migrated\",\"sampleSize\":845392022,\"successfulSamplesRequired\":179847946,\"additionalLatencyMilliseconds\":294173170},\"name\":\"urkihci\",\"type\":\"defxrdc\",\"id\":\"nbkkjanurnnq\"}],\"healthProbeSettings\":[{\"properties\":{\"resourceState\":\"Disabled\",\"path\":\"xqltgrd\",\"protocol\":\"Http\",\"intervalInSeconds\":1616458302,\"healthProbeMethod\":\"GET\",\"enabledState\":\"Enabled\"},\"name\":\"ihwuhvctafsrbxrb\",\"type\":\"li\",\"id\":\"xihspnxwq\"}],\"backendPools\":[{\"properties\":{\"resourceState\":\"Creating\",\"backends\":[{},{}],\"loadBalancingSettings\":{},\"healthProbeSettings\":{}},\"name\":\"bsbqqqag\",\"type\":\"rxaomzisglrrcze\",\"id\":\"hhltnjadhqo\"},{\"properties\":{\"resourceState\":\"Migrated\",\"backends\":[{},{},{}],\"loadBalancingSettings\":{},\"healthProbeSettings\":{}},\"name\":\"yfbpcmsplb\",\"type\":\"rueqthwm\",\"id\":\"mbscbbx\"},{\"properties\":{\"resourceState\":\"Deleting\",\"backends\":[{},{}],\"loadBalancingSettings\":{},\"healthProbeSettings\":{}},\"name\":\"opedbwdpyqyybxub\",\"type\":\"nafcbq\",\"id\":\"e\"}],\"frontendEndpoints\":[{\"properties\":{\"resourceState\":\"Disabled\",\"customHttpsProvisioningState\":\"Enabled\",\"customHttpsProvisioningSubstate\":\"SubmittingDomainControlValidationRequest\",\"customHttpsConfiguration\":{\"certificateSource\":\"FrontDoor\",\"protocolType\":\"ServerNameIndication\",\"minimumTlsVersion\":\"1.2\"},\"hostName\":\"d\",\"sessionAffinityEnabledState\":\"Disabled\",\"sessionAffinityTtlSeconds\":1699509778,\"webApplicationFirewallPolicyLink\":{}},\"id\":\"jopwbeonrlkwz\",\"name\":\"ybxc\",\"type\":\"kxcpt\"}],\"backendPoolsSettings\":{\"enforceCertificateNameCheck\":\"Disabled\",\"sendRecvTimeoutSeconds\":201557433},\"enabledState\":\"Enabled\"},\"location\":\"e\",\"tags\":{\"razisg\":\"krtt\",\"nbwzohmnrxxbso\":\"kiuemv\",\"gnzxojpslsvj\":\"klinhmdptysprq\"},\"id\":\"pli\",\"name\":\"fiqwoy\",\"type\":\"qvapcohhoucq\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); FrontDoorManager manager = FrontDoorManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.frontDoors().listByResourceGroup("tglxx", com.azure.core.util.Context.NONE); + = manager.frontDoors().listByResourceGroup("ywaeeczgf", com.azure.core.util.Context.NONE); - Assertions.assertEquals("djwnlaxpunjqi", response.iterator().next().location()); - Assertions.assertEquals("vvi", response.iterator().next().tags().get("acgxmfcsse")); - Assertions.assertEquals("vdndviauo", response.iterator().next().friendlyName()); - Assertions.assertEquals("hsycxhxzgaz", response.iterator().next().routingRules().get(0).id()); - Assertions.assertEquals("xwrsnew", response.iterator().next().routingRules().get(0).name()); + Assertions.assertEquals("e", response.iterator().next().location()); + Assertions.assertEquals("krtt", response.iterator().next().tags().get("razisg")); + Assertions.assertEquals("totiowlxteqdptjg", response.iterator().next().friendlyName()); + Assertions.assertEquals("havpmhbrbqgvg", response.iterator().next().routingRules().get(0).id()); + Assertions.assertEquals("sbbjpmcu", response.iterator().next().routingRules().get(0).name()); Assertions.assertEquals(FrontDoorProtocol.HTTPS, response.iterator().next().routingRules().get(0).acceptedProtocols().get(0)); - Assertions.assertEquals("chnmna", response.iterator().next().routingRules().get(0).patternsToMatch().get(0)); + Assertions.assertEquals("hqlkccuzgygqwaho", + response.iterator().next().routingRules().get(0).patternsToMatch().get(0)); Assertions.assertEquals(RoutingRuleEnabledState.ENABLED, response.iterator().next().routingRules().get(0).enabledState()); - Assertions.assertEquals("npdwr", response.iterator().next().loadBalancingSettings().get(0).id()); - Assertions.assertEquals("whslwkoj", response.iterator().next().loadBalancingSettings().get(0).name()); - Assertions.assertEquals(738049564, response.iterator().next().loadBalancingSettings().get(0).sampleSize()); - Assertions.assertEquals(37632525, + Assertions.assertEquals("hxcylhkgm", response.iterator().next().loadBalancingSettings().get(0).id()); + Assertions.assertEquals("xrjkixtwb", response.iterator().next().loadBalancingSettings().get(0).name()); + Assertions.assertEquals(1815920077, response.iterator().next().loadBalancingSettings().get(0).sampleSize()); + Assertions.assertEquals(448963425, response.iterator().next().loadBalancingSettings().get(0).successfulSamplesRequired()); - Assertions.assertEquals(450217205, + Assertions.assertEquals(1340957573, response.iterator().next().loadBalancingSettings().get(0).additionalLatencyMilliseconds()); - Assertions.assertEquals("wpusxjbaqehg", response.iterator().next().healthProbeSettings().get(0).id()); - Assertions.assertEquals("qfecjxeygtuhx", response.iterator().next().healthProbeSettings().get(0).name()); - Assertions.assertEquals("uwkasiz", response.iterator().next().healthProbeSettings().get(0).path()); - Assertions.assertEquals(FrontDoorProtocol.HTTPS, + Assertions.assertEquals("xihspnxwq", response.iterator().next().healthProbeSettings().get(0).id()); + Assertions.assertEquals("ihwuhvctafsrbxrb", response.iterator().next().healthProbeSettings().get(0).name()); + Assertions.assertEquals("xqltgrd", response.iterator().next().healthProbeSettings().get(0).path()); + Assertions.assertEquals(FrontDoorProtocol.HTTP, response.iterator().next().healthProbeSettings().get(0).protocol()); - Assertions.assertEquals(1871243595, + Assertions.assertEquals(1616458302, response.iterator().next().healthProbeSettings().get(0).intervalInSeconds()); - Assertions.assertEquals(FrontDoorHealthProbeMethod.HEAD, + Assertions.assertEquals(FrontDoorHealthProbeMethod.GET, response.iterator().next().healthProbeSettings().get(0).healthProbeMethod()); - Assertions.assertEquals(HealthProbeEnabled.DISABLED, + Assertions.assertEquals(HealthProbeEnabled.ENABLED, response.iterator().next().healthProbeSettings().get(0).enabledState()); - Assertions.assertEquals("lbnseqac", response.iterator().next().backendPools().get(0).id()); - Assertions.assertEquals("qzeqyjleziunjxdf", response.iterator().next().backendPools().get(0).name()); - Assertions.assertEquals("lxnfuijtkbusqogs", response.iterator().next().frontendEndpoints().get(0).id()); - Assertions.assertEquals("uwkffdjktsysid", response.iterator().next().frontendEndpoints().get(0).name()); - Assertions.assertEquals("ql", response.iterator().next().frontendEndpoints().get(0).hostname()); - Assertions.assertEquals(SessionAffinityEnabledState.ENABLED, + Assertions.assertEquals("hhltnjadhqo", response.iterator().next().backendPools().get(0).id()); + Assertions.assertEquals("bsbqqqag", response.iterator().next().backendPools().get(0).name()); + Assertions.assertEquals("jopwbeonrlkwz", response.iterator().next().frontendEndpoints().get(0).id()); + Assertions.assertEquals("ybxc", response.iterator().next().frontendEndpoints().get(0).name()); + Assertions.assertEquals("d", response.iterator().next().frontendEndpoints().get(0).hostname()); + Assertions.assertEquals(SessionAffinityEnabledState.DISABLED, response.iterator().next().frontendEndpoints().get(0).sessionAffinityEnabledState()); - Assertions.assertEquals(862833850, + Assertions.assertEquals(1699509778, response.iterator().next().frontendEndpoints().get(0).sessionAffinityTtlSeconds()); - Assertions.assertEquals(EnforceCertificateNameCheckEnabledState.ENABLED, + Assertions.assertEquals(EnforceCertificateNameCheckEnabledState.DISABLED, response.iterator().next().backendPoolsSettings().enforceCertificateNameCheck()); - Assertions.assertEquals(368575860, response.iterator().next().backendPoolsSettings().sendRecvTimeoutSeconds()); + Assertions.assertEquals(201557433, response.iterator().next().backendPoolsSettings().sendRecvTimeoutSeconds()); Assertions.assertEquals(FrontDoorEnabledState.ENABLED, response.iterator().next().enabledState()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsListMockTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsListMockTests.java index 0f3b98a56a831..0229d9f5bcddf 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsListMockTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.frontdoor.FrontDoorManager; import com.azure.resourcemanager.frontdoor.models.EnforceCertificateNameCheckEnabledState; @@ -29,57 +29,58 @@ public final class FrontDoorsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"resourceState\":\"Disabling\",\"provisioningState\":\"clafzvaylpt\",\"cname\":\"qqwzt\",\"frontdoorId\":\"w\",\"rulesEngines\":[{\"properties\":{\"resourceState\":\"Deleting\",\"rules\":[{\"name\":\"xfe\",\"priority\":754983653,\"action\":{}}]},\"id\":\"jkjexf\",\"name\":\"eqvhpsylkk\",\"type\":\"hkbffmbm\"},{\"properties\":{\"resourceState\":\"Enabled\",\"rules\":[{\"name\":\"wwp\",\"priority\":461847321,\"action\":{}},{\"name\":\"xs\",\"priority\":1849178398,\"action\":{}},{\"name\":\"tf\",\"priority\":1964991484,\"action\":{}},{\"name\":\"gicgaaoepttaq\",\"priority\":1296917092,\"action\":{}}]},\"id\":\"dewemxswv\",\"name\":\"uun\",\"type\":\"zjgehkfkim\"},{\"properties\":{\"resourceState\":\"Disabled\",\"rules\":[{\"name\":\"ffqyinlj\",\"priority\":980930736,\"action\":{}},{\"name\":\"pqwhixmonst\",\"priority\":1440167521,\"action\":{}},{\"name\":\"i\",\"priority\":2112276373,\"action\":{}},{\"name\":\"gvelfc\",\"priority\":341924514,\"action\":{}}]},\"id\":\"uccbirdsvuw\",\"name\":\"o\",\"type\":\"iegstm\"}],\"extendedProperties\":{\"jjtbxqmuluxlxqz\":\"wjizcilnghgsh\",\"cucrwnamikze\":\"nersb\",\"fuhok\":\"rqbsmswziq\",\"czznvfbycjsxj\":\"ruswhv\"},\"friendlyName\":\"i\",\"routingRules\":[{\"properties\":{\"resourceState\":\"Migrated\",\"frontendEndpoints\":[{},{},{},{}],\"acceptedProtocols\":[\"Http\",\"Https\",\"Https\",\"Https\"],\"patternsToMatch\":[\"mldsehaohdj\",\"hflzokxco\"],\"enabledState\":\"Enabled\",\"routeConfiguration\":{\"@odata.type\":\"RouteConfiguration\"},\"rulesEngine\":{},\"webApplicationFirewallPolicyLink\":{}},\"name\":\"tag\",\"type\":\"sxoa\",\"id\":\"tgzpnpb\"},{\"properties\":{\"resourceState\":\"Creating\",\"frontendEndpoints\":[{},{},{}],\"acceptedProtocols\":[\"Http\",\"Https\",\"Https\",\"Http\"],\"patternsToMatch\":[\"ihmipgawtxxpk\",\"jcxcjxgrytfmpcyc\",\"lrmcaykg\",\"noxuztrksx\"],\"enabledState\":\"Enabled\",\"routeConfiguration\":{\"@odata.type\":\"RouteConfiguration\"},\"rulesEngine\":{},\"webApplicationFirewallPolicyLink\":{}},\"name\":\"fnznth\",\"type\":\"wkjaos\",\"id\":\"uzvoamktcqiosm\"}],\"loadBalancingSettings\":[{\"properties\":{\"resourceState\":\"Enabling\",\"sampleSize\":1781662163,\"successfulSamplesRequired\":945214435,\"additionalLatencyMilliseconds\":1464165713},\"name\":\"ltlaprltzkatbhj\",\"type\":\"nnbsoqeqa\",\"id\":\"rvlagunbtgfebwln\"}],\"healthProbeSettings\":[{\"properties\":{\"resourceState\":\"Creating\",\"path\":\"udzqavbp\",\"protocol\":\"Https\",\"intervalInSeconds\":341201739,\"healthProbeMethod\":\"HEAD\",\"enabledState\":\"Enabled\"},\"name\":\"lgouwtlmjj\",\"type\":\"ojqtobaxk\",\"id\":\"ytunlbfjkwr\"},{\"properties\":{\"resourceState\":\"Enabling\",\"path\":\"bhsy\",\"protocol\":\"Http\",\"intervalInSeconds\":1414461023,\"healthProbeMethod\":\"HEAD\",\"enabledState\":\"Enabled\"},\"name\":\"xaulkpakdkifmjnn\",\"type\":\"tqabpxuckpgg\",\"id\":\"wey\"}],\"backendPools\":[{\"properties\":{\"resourceState\":\"Migrated\",\"backends\":[{},{},{},{}],\"loadBalancingSettings\":{},\"healthProbeSettings\":{}},\"name\":\"lqqmpiz\",\"type\":\"w\",\"id\":\"qxpxiwfcngjsaa\"},{\"properties\":{\"resourceState\":\"Deleting\",\"backends\":[{},{},{}],\"loadBalancingSettings\":{},\"healthProbeSettings\":{}},\"name\":\"vkviirhgfg\",\"type\":\"sdp\",\"id\":\"atzv\"},{\"properties\":{\"resourceState\":\"Migrated\",\"backends\":[{}],\"loadBalancingSettings\":{},\"healthProbeSettings\":{}},\"name\":\"tctbrxkjzwrgxffm\",\"type\":\"kwfbkgo\",\"id\":\"wopdbydpiz\"},{\"properties\":{\"resourceState\":\"Disabled\",\"backends\":[{},{}],\"loadBalancingSettings\":{},\"healthProbeSettings\":{}},\"name\":\"iygnugjknfsmfctt\",\"type\":\"uuyilfl\",\"id\":\"iquvrehm\"}],\"frontendEndpoints\":[{\"properties\":{\"resourceState\":\"Enabling\",\"customHttpsProvisioningState\":\"Failed\",\"customHttpsProvisioningSubstate\":\"PendingDomainControlValidationREquestApproval\",\"customHttpsConfiguration\":{\"certificateSource\":\"FrontDoor\",\"protocolType\":\"ServerNameIndication\",\"minimumTlsVersion\":\"1.2\"},\"hostName\":\"jtwhauunf\",\"sessionAffinityEnabledState\":\"Enabled\",\"sessionAffinityTtlSeconds\":1321099955,\"webApplicationFirewallPolicyLink\":{}},\"name\":\"lxsmrpddouifamow\",\"type\":\"iynknlq\",\"id\":\"dvpiwh\"},{\"properties\":{\"resourceState\":\"Migrated\",\"customHttpsProvisioningState\":\"Disabling\",\"customHttpsProvisioningSubstate\":\"DomainControlValidationRequestTimedOut\",\"customHttpsConfiguration\":{\"certificateSource\":\"FrontDoor\",\"protocolType\":\"ServerNameIndication\",\"minimumTlsVersion\":\"1.2\"},\"hostName\":\"uxylrjvmtygjbm\",\"sessionAffinityEnabledState\":\"Disabled\",\"sessionAffinityTtlSeconds\":438034725,\"webApplicationFirewallPolicyLink\":{}},\"name\":\"shck\",\"type\":\"yjpmspbpssdfppyo\",\"id\":\"ieyujtvc\"},{\"properties\":{\"resourceState\":\"Creating\",\"customHttpsProvisioningState\":\"Disabling\",\"customHttpsProvisioningSubstate\":\"CertificateDeployed\",\"customHttpsConfiguration\":{\"certificateSource\":\"AzureKeyVault\",\"protocolType\":\"ServerNameIndication\",\"minimumTlsVersion\":\"1.2\"},\"hostName\":\"xvglnkvxlxp\",\"sessionAffinityEnabledState\":\"Disabled\",\"sessionAffinityTtlSeconds\":1806194501,\"webApplicationFirewallPolicyLink\":{}},\"name\":\"gkcvkhpzvuq\",\"type\":\"lvoniy\",\"id\":\"pubcpzgpxtivhjk\"}],\"backendPoolsSettings\":{\"enforceCertificateNameCheck\":\"Enabled\",\"sendRecvTimeoutSeconds\":1731512826},\"enabledState\":\"Disabled\"},\"location\":\"xgpnr\",\"tags\":{\"vuporqzdfuydzv\":\"vfgpikqmhhaowjrm\"},\"id\":\"fvxcnqmxqpswo\",\"name\":\"mvkhlggd\",\"type\":\"bemzqkzszuwi\"}]}"; + = "{\"value\":[{\"properties\":{\"resourceState\":\"Enabling\",\"provisioningState\":\"cxzrzdcgdzben\",\"cname\":\"bcawetz\",\"frontdoorId\":\"dtjwfljhznamt\",\"rulesEngines\":[{\"properties\":{\"resourceState\":\"Disabling\",\"rules\":[{\"name\":\"jncqtjzmi\",\"priority\":1502507838,\"action\":{}}]},\"id\":\"bgatzu\",\"name\":\"bxn\",\"type\":\"ebwgga\"},{\"properties\":{\"resourceState\":\"Disabled\",\"rules\":[{\"name\":\"wvajq\",\"priority\":2029200666,\"action\":{}},{\"name\":\"t\",\"priority\":21918595,\"action\":{}}]},\"id\":\"oqza\",\"name\":\"nwqrjzfrgqh\",\"type\":\"hcmbuocnjrohmbp\"}],\"extendedProperties\":{\"ocxnehvsmtodl\":\"xameblydyvkfkm\"},\"friendlyName\":\"yapucygvoa\",\"routingRules\":[{\"properties\":{\"resourceState\":\"Deleting\",\"frontendEndpoints\":[{},{},{},{}],\"acceptedProtocols\":[\"Http\"],\"patternsToMatch\":[\"gjlgvvpase\",\"sgb\",\"xantuygdhg\"],\"enabledState\":\"Enabled\",\"routeConfiguration\":{\"@odata.type\":\"RouteConfiguration\"},\"rulesEngine\":{},\"webApplicationFirewallPolicyLink\":{}},\"name\":\"iwrqofulopmjnl\",\"type\":\"whc\",\"id\":\"pibkephuu\"},{\"properties\":{\"resourceState\":\"Migrated\",\"frontendEndpoints\":[{},{},{},{}],\"acceptedProtocols\":[\"Https\"],\"patternsToMatch\":[\"tqpbrlcy\",\"duczkgof\"],\"enabledState\":\"Enabled\",\"routeConfiguration\":{\"@odata.type\":\"RouteConfiguration\"},\"rulesEngine\":{},\"webApplicationFirewallPolicyLink\":{}},\"name\":\"vcrrpcj\",\"type\":\"bstvje\",\"id\":\"nrmvvfkoxmlghk\"},{\"properties\":{\"resourceState\":\"Disabled\",\"frontendEndpoints\":[{}],\"acceptedProtocols\":[\"Http\"],\"patternsToMatch\":[\"dwwexymz\",\"lazipbhpwvq\",\"gnyyuuzivens\",\"pmeyyvpkpatlbijp\"],\"enabledState\":\"Disabled\",\"routeConfiguration\":{\"@odata.type\":\"RouteConfiguration\"},\"rulesEngine\":{},\"webApplicationFirewallPolicyLink\":{}},\"name\":\"hfvolmknb\",\"type\":\"wcdommpvfqaw\",\"id\":\"gbrt\"},{\"properties\":{\"resourceState\":\"Migrating\",\"frontendEndpoints\":[{},{},{},{}],\"acceptedProtocols\":[\"Http\",\"Https\"],\"patternsToMatch\":[\"jlfnthiq\",\"yuttdiygbpvnwswm\",\"xkyctwwgzwx\"],\"enabledState\":\"Disabled\",\"routeConfiguration\":{\"@odata.type\":\"RouteConfiguration\"},\"rulesEngine\":{},\"webApplicationFirewallPolicyLink\":{}},\"name\":\"gygzyvn\",\"type\":\"zaifghtmoqqtlff\",\"id\":\"bkrkjj\"}],\"loadBalancingSettings\":[{\"properties\":{\"resourceState\":\"Migrating\",\"sampleSize\":2119539438,\"successfulSamplesRequired\":1545029983,\"additionalLatencyMilliseconds\":1021835000},\"name\":\"dogiyetesyp\",\"type\":\"dbztjhqtfbov\",\"id\":\"nkbw\"},{\"properties\":{\"resourceState\":\"Deleting\",\"sampleSize\":1368462904,\"successfulSamplesRequired\":998586271,\"additionalLatencyMilliseconds\":112222871},\"name\":\"zyaupiac\",\"type\":\"n\",\"id\":\"bwqroohtuovm\"},{\"properties\":{\"resourceState\":\"Disabled\",\"sampleSize\":1468284982,\"successfulSamplesRequired\":1101611175,\"additionalLatencyMilliseconds\":399456929},\"name\":\"ihpvecmslclblyj\",\"type\":\"tbsjuscvsf\",\"id\":\"gctmgxuupbezq\"},{\"properties\":{\"resourceState\":\"Enabling\",\"sampleSize\":737451971,\"successfulSamplesRequired\":480933316,\"additionalLatencyMilliseconds\":348326280},\"name\":\"qkkyihztgeqmg\",\"type\":\"gwldo\",\"id\":\"hillce\"}],\"healthProbeSettings\":[{\"properties\":{\"resourceState\":\"Disabling\",\"path\":\"oaguhic\",\"protocol\":\"Http\",\"intervalInSeconds\":1450419977,\"healthProbeMethod\":\"GET\",\"enabledState\":\"Disabled\"},\"name\":\"jvhrweft\",\"type\":\"qejpmvssehaepwa\",\"id\":\"xtczhupeuknijd\"},{\"properties\":{\"resourceState\":\"Creating\",\"path\":\"pydjfboc\",\"protocol\":\"Https\",\"intervalInSeconds\":629630238,\"healthProbeMethod\":\"GET\",\"enabledState\":\"Enabled\"},\"name\":\"ikdmhlakuflgbhga\",\"type\":\"cdixmx\",\"id\":\"rs\"}],\"backendPools\":[{\"properties\":{\"resourceState\":\"Migrating\",\"backends\":[{},{},{}],\"loadBalancingSettings\":{},\"healthProbeSettings\":{}},\"name\":\"oeoq\",\"type\":\"jhvefgwbmqjchnt\",\"id\":\"faymxbulpz\"},{\"properties\":{\"resourceState\":\"Creating\",\"backends\":[{},{},{}],\"loadBalancingSettings\":{},\"healthProbeSettings\":{}},\"name\":\"jwy\",\"type\":\"kmbtsuahx\",\"id\":\"xjcmmzrrsc\"},{\"properties\":{\"resourceState\":\"Migrating\",\"backends\":[{},{},{}],\"loadBalancingSettings\":{},\"healthProbeSettings\":{}},\"name\":\"xqw\",\"type\":\"iffjxcjrm\",\"id\":\"abwibvjogjo\"}],\"frontendEndpoints\":[{\"properties\":{\"resourceState\":\"Migrating\",\"customHttpsProvisioningState\":\"Disabled\",\"customHttpsProvisioningSubstate\":\"PendingDomainControlValidationREquestApproval\",\"customHttpsConfiguration\":{\"certificateSource\":\"AzureKeyVault\",\"protocolType\":\"ServerNameIndication\",\"minimumTlsVersion\":\"1.0\"},\"hostName\":\"eofvfkakpoldt\",\"sessionAffinityEnabledState\":\"Disabled\",\"sessionAffinityTtlSeconds\":1479898890,\"webApplicationFirewallPolicyLink\":{}},\"id\":\"zhzjknyuxg\",\"name\":\"txpnrupza\",\"type\":\"rdixt\"},{\"properties\":{\"resourceState\":\"Enabling\",\"customHttpsProvisioningState\":\"Disabled\",\"customHttpsProvisioningSubstate\":\"DomainControlValidationRequestApproved\",\"customHttpsConfiguration\":{\"certificateSource\":\"AzureKeyVault\",\"protocolType\":\"ServerNameIndication\",\"minimumTlsVersion\":\"1.2\"},\"hostName\":\"ffg\",\"sessionAffinityEnabledState\":\"Enabled\",\"sessionAffinityTtlSeconds\":937113369,\"webApplicationFirewallPolicyLink\":{}},\"id\":\"vlxhrpqhvmblc\",\"name\":\"qehbhbcds\",\"type\":\"ryrando\"},{\"properties\":{\"resourceState\":\"Enabling\",\"customHttpsProvisioningState\":\"Failed\",\"customHttpsProvisioningSubstate\":\"DomainControlValidationRequestTimedOut\",\"customHttpsConfiguration\":{\"certificateSource\":\"FrontDoor\",\"protocolType\":\"ServerNameIndication\",\"minimumTlsVersion\":\"1.2\"},\"hostName\":\"lwxldyka\",\"sessionAffinityEnabledState\":\"Disabled\",\"sessionAffinityTtlSeconds\":983709936,\"webApplicationFirewallPolicyLink\":{}},\"id\":\"njpnnbmj\",\"name\":\"ibjgsjjxxahm\",\"type\":\"ad\"},{\"properties\":{\"resourceState\":\"Migrated\",\"customHttpsProvisioningState\":\"Enabling\",\"customHttpsProvisioningSubstate\":\"DomainControlValidationRequestTimedOut\",\"customHttpsConfiguration\":{\"certificateSource\":\"FrontDoor\",\"protocolType\":\"ServerNameIndication\",\"minimumTlsVersion\":\"1.0\"},\"hostName\":\"mhwbjijkgqx\",\"sessionAffinityEnabledState\":\"Enabled\",\"sessionAffinityTtlSeconds\":764819775,\"webApplicationFirewallPolicyLink\":{}},\"id\":\"njaujvaan\",\"name\":\"giycwkdtaawxwfek\",\"type\":\"mrrqmbzmqkratb\"}],\"backendPoolsSettings\":{\"enforceCertificateNameCheck\":\"Enabled\",\"sendRecvTimeoutSeconds\":1932770027},\"enabledState\":\"Disabled\"},\"location\":\"birkfpksokdg\",\"tags\":{\"bguzozky\":\"wijymr\",\"zhhh\":\"wnf\",\"mffjkutycyarn\":\"o\"},\"id\":\"oohguabzoghkt\",\"name\":\"pyc\",\"type\":\"hcoeocnhzq\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); FrontDoorManager manager = FrontDoorManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.frontDoors().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("xgpnr", response.iterator().next().location()); - Assertions.assertEquals("vfgpikqmhhaowjrm", response.iterator().next().tags().get("vuporqzdfuydzv")); - Assertions.assertEquals("i", response.iterator().next().friendlyName()); - Assertions.assertEquals("tgzpnpb", response.iterator().next().routingRules().get(0).id()); - Assertions.assertEquals("tag", response.iterator().next().routingRules().get(0).name()); + Assertions.assertEquals("birkfpksokdg", response.iterator().next().location()); + Assertions.assertEquals("wijymr", response.iterator().next().tags().get("bguzozky")); + Assertions.assertEquals("yapucygvoa", response.iterator().next().friendlyName()); + Assertions.assertEquals("pibkephuu", response.iterator().next().routingRules().get(0).id()); + Assertions.assertEquals("iwrqofulopmjnl", response.iterator().next().routingRules().get(0).name()); Assertions.assertEquals(FrontDoorProtocol.HTTP, response.iterator().next().routingRules().get(0).acceptedProtocols().get(0)); - Assertions.assertEquals("mldsehaohdj", + Assertions.assertEquals("gjlgvvpase", response.iterator().next().routingRules().get(0).patternsToMatch().get(0)); Assertions.assertEquals(RoutingRuleEnabledState.ENABLED, response.iterator().next().routingRules().get(0).enabledState()); - Assertions.assertEquals("rvlagunbtgfebwln", response.iterator().next().loadBalancingSettings().get(0).id()); - Assertions.assertEquals("ltlaprltzkatbhj", response.iterator().next().loadBalancingSettings().get(0).name()); - Assertions.assertEquals(1781662163, response.iterator().next().loadBalancingSettings().get(0).sampleSize()); - Assertions.assertEquals(945214435, + Assertions.assertEquals("nkbw", response.iterator().next().loadBalancingSettings().get(0).id()); + Assertions.assertEquals("dogiyetesyp", response.iterator().next().loadBalancingSettings().get(0).name()); + Assertions.assertEquals(2119539438, response.iterator().next().loadBalancingSettings().get(0).sampleSize()); + Assertions.assertEquals(1545029983, response.iterator().next().loadBalancingSettings().get(0).successfulSamplesRequired()); - Assertions.assertEquals(1464165713, + Assertions.assertEquals(1021835000, response.iterator().next().loadBalancingSettings().get(0).additionalLatencyMilliseconds()); - Assertions.assertEquals("ytunlbfjkwr", response.iterator().next().healthProbeSettings().get(0).id()); - Assertions.assertEquals("lgouwtlmjj", response.iterator().next().healthProbeSettings().get(0).name()); - Assertions.assertEquals("udzqavbp", response.iterator().next().healthProbeSettings().get(0).path()); - Assertions.assertEquals(FrontDoorProtocol.HTTPS, + Assertions.assertEquals("xtczhupeuknijd", response.iterator().next().healthProbeSettings().get(0).id()); + Assertions.assertEquals("jvhrweft", response.iterator().next().healthProbeSettings().get(0).name()); + Assertions.assertEquals("oaguhic", response.iterator().next().healthProbeSettings().get(0).path()); + Assertions.assertEquals(FrontDoorProtocol.HTTP, response.iterator().next().healthProbeSettings().get(0).protocol()); - Assertions.assertEquals(341201739, response.iterator().next().healthProbeSettings().get(0).intervalInSeconds()); - Assertions.assertEquals(FrontDoorHealthProbeMethod.HEAD, + Assertions.assertEquals(1450419977, + response.iterator().next().healthProbeSettings().get(0).intervalInSeconds()); + Assertions.assertEquals(FrontDoorHealthProbeMethod.GET, response.iterator().next().healthProbeSettings().get(0).healthProbeMethod()); - Assertions.assertEquals(HealthProbeEnabled.ENABLED, + Assertions.assertEquals(HealthProbeEnabled.DISABLED, response.iterator().next().healthProbeSettings().get(0).enabledState()); - Assertions.assertEquals("qxpxiwfcngjsaa", response.iterator().next().backendPools().get(0).id()); - Assertions.assertEquals("lqqmpiz", response.iterator().next().backendPools().get(0).name()); - Assertions.assertEquals("dvpiwh", response.iterator().next().frontendEndpoints().get(0).id()); - Assertions.assertEquals("lxsmrpddouifamow", response.iterator().next().frontendEndpoints().get(0).name()); - Assertions.assertEquals("jtwhauunf", response.iterator().next().frontendEndpoints().get(0).hostname()); - Assertions.assertEquals(SessionAffinityEnabledState.ENABLED, + Assertions.assertEquals("faymxbulpz", response.iterator().next().backendPools().get(0).id()); + Assertions.assertEquals("oeoq", response.iterator().next().backendPools().get(0).name()); + Assertions.assertEquals("zhzjknyuxg", response.iterator().next().frontendEndpoints().get(0).id()); + Assertions.assertEquals("txpnrupza", response.iterator().next().frontendEndpoints().get(0).name()); + Assertions.assertEquals("eofvfkakpoldt", response.iterator().next().frontendEndpoints().get(0).hostname()); + Assertions.assertEquals(SessionAffinityEnabledState.DISABLED, response.iterator().next().frontendEndpoints().get(0).sessionAffinityEnabledState()); - Assertions.assertEquals(1321099955, + Assertions.assertEquals(1479898890, response.iterator().next().frontendEndpoints().get(0).sessionAffinityTtlSeconds()); Assertions.assertEquals(EnforceCertificateNameCheckEnabledState.ENABLED, response.iterator().next().backendPoolsSettings().enforceCertificateNameCheck()); - Assertions.assertEquals(1731512826, response.iterator().next().backendPoolsSettings().sendRecvTimeoutSeconds()); + Assertions.assertEquals(1932770027, response.iterator().next().backendPoolsSettings().sendRecvTimeoutSeconds()); Assertions.assertEquals(FrontDoorEnabledState.DISABLED, response.iterator().next().enabledState()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsValidateCustomDomainWithResponseMockTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsValidateCustomDomainWithResponseMockTests.java index 46c3a98d9ae59..902a129614c35 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsValidateCustomDomainWithResponseMockTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontDoorsValidateCustomDomainWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.frontdoor.FrontDoorManager; import com.azure.resourcemanager.frontdoor.models.ValidateCustomDomainInput; @@ -20,18 +20,19 @@ public final class FrontDoorsValidateCustomDomainWithResponseMockTests { @Test public void testValidateCustomDomainWithResponse() throws Exception { - String responseStr = "{\"customDomainValidated\":true,\"reason\":\"b\",\"message\":\"iqge\"}"; + String responseStr + = "{\"customDomainValidated\":false,\"reason\":\"qdhmrjzralcxpjby\",\"message\":\"sjoqcjenkyhfqzvs\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); FrontDoorManager manager = FrontDoorManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ValidateCustomDomainOutput response = manager.frontDoors() - .validateCustomDomainWithResponse("iwdcxsmlzzhzd", "xetlgydlhqv", - new ValidateCustomDomainInput().withHostname("n"), com.azure.core.util.Context.NONE) + .validateCustomDomainWithResponse("ot", "jzcfyjzptwr", + new ValidateCustomDomainInput().withHostname("ohapqinfsz"), com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontendEndpointLinkTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontendEndpointLinkTests.java index 289bd64df2f98..ed74597ad3d3b 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontendEndpointLinkTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontendEndpointLinkTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -12,14 +12,7 @@ public final class FrontendEndpointLinkTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FrontendEndpointLink model - = BinaryData.fromString("{\"id\":\"wgndrvynhzgpp\"}").toObject(FrontendEndpointLink.class); - Assertions.assertEquals("wgndrvynhzgpp", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FrontendEndpointLink model = new FrontendEndpointLink().withId("wgndrvynhzgpp"); - model = BinaryData.fromObject(model).toObject(FrontendEndpointLink.class); - Assertions.assertEquals("wgndrvynhzgpp", model.id()); + = BinaryData.fromString("{\"id\":\"azlnqnmcjngzqdqx\"}").toObject(FrontendEndpointLink.class); + Assertions.assertEquals("azlnqnmcjngzqdqx", model.id()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontendEndpointUpdateParametersTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontendEndpointUpdateParametersTests.java index 85aba82106097..91fbcb29efbd6 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontendEndpointUpdateParametersTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontendEndpointUpdateParametersTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -14,25 +14,25 @@ public final class FrontendEndpointUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FrontendEndpointUpdateParameters model = BinaryData.fromString( - "{\"hostName\":\"kozzwculkb\",\"sessionAffinityEnabledState\":\"Disabled\",\"sessionAffinityTtlSeconds\":809021863,\"webApplicationFirewallPolicyLink\":{\"id\":\"jwltlwtjjgu\"}}") + "{\"hostName\":\"mbqfqvmk\",\"sessionAffinityEnabledState\":\"Enabled\",\"sessionAffinityTtlSeconds\":1061947770,\"webApplicationFirewallPolicyLink\":{\"id\":\"helxprglya\"}}") .toObject(FrontendEndpointUpdateParameters.class); - Assertions.assertEquals("kozzwculkb", model.hostname()); - Assertions.assertEquals(SessionAffinityEnabledState.DISABLED, model.sessionAffinityEnabledState()); - Assertions.assertEquals(809021863, model.sessionAffinityTtlSeconds()); - Assertions.assertEquals("jwltlwtjjgu", model.webApplicationFirewallPolicyLink().id()); + Assertions.assertEquals("mbqfqvmk", model.hostname()); + Assertions.assertEquals(SessionAffinityEnabledState.ENABLED, model.sessionAffinityEnabledState()); + Assertions.assertEquals(1061947770, model.sessionAffinityTtlSeconds()); + Assertions.assertEquals("helxprglya", model.webApplicationFirewallPolicyLink().id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - FrontendEndpointUpdateParameters model = new FrontendEndpointUpdateParameters().withHostname("kozzwculkb") - .withSessionAffinityEnabledState(SessionAffinityEnabledState.DISABLED) - .withSessionAffinityTtlSeconds(809021863) + FrontendEndpointUpdateParameters model = new FrontendEndpointUpdateParameters().withHostname("mbqfqvmk") + .withSessionAffinityEnabledState(SessionAffinityEnabledState.ENABLED) + .withSessionAffinityTtlSeconds(1061947770) .withWebApplicationFirewallPolicyLink( - new FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink().withId("jwltlwtjjgu")); + new FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink().withId("helxprglya")); model = BinaryData.fromObject(model).toObject(FrontendEndpointUpdateParameters.class); - Assertions.assertEquals("kozzwculkb", model.hostname()); - Assertions.assertEquals(SessionAffinityEnabledState.DISABLED, model.sessionAffinityEnabledState()); - Assertions.assertEquals(809021863, model.sessionAffinityTtlSeconds()); - Assertions.assertEquals("jwltlwtjjgu", model.webApplicationFirewallPolicyLink().id()); + Assertions.assertEquals("mbqfqvmk", model.hostname()); + Assertions.assertEquals(SessionAffinityEnabledState.ENABLED, model.sessionAffinityEnabledState()); + Assertions.assertEquals(1061947770, model.sessionAffinityTtlSeconds()); + Assertions.assertEquals("helxprglya", model.webApplicationFirewallPolicyLink().id()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLinkTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLinkTests.java index 4d1fb5cef6873..9e80ab73ccd0e 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLinkTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLinkTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -12,17 +12,17 @@ public final class FrontendEndpointUpdateParametersWebApplicationFirewallPolicyL @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink model - = BinaryData.fromString("{\"id\":\"alhsnvkc\"}") + = BinaryData.fromString("{\"id\":\"dckcbc\"}") .toObject(FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink.class); - Assertions.assertEquals("alhsnvkc", model.id()); + Assertions.assertEquals("dckcbc", model.id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink model - = new FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink().withId("alhsnvkc"); + = new FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink().withId("dckcbc"); model = BinaryData.fromObject(model) .toObject(FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink.class); - Assertions.assertEquals("alhsnvkc", model.id()); + Assertions.assertEquals("dckcbc", model.id()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontendEndpointsDisableHttpsMockTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontendEndpointsDisableHttpsMockTests.java index d70cb5e59cd1d..448ac061cf5bb 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontendEndpointsDisableHttpsMockTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/FrontendEndpointsDisableHttpsMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.frontdoor.FrontDoorManager; import java.nio.charset.StandardCharsets; @@ -25,9 +25,9 @@ public void testDisableHttps() throws Exception { FrontDoorManager manager = FrontDoorManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.frontendEndpoints().disableHttps("vfkakpold", "vevboclzh", "jknyu", com.azure.core.util.Context.NONE); + manager.frontendEndpoints().disableHttps("posew", "igpxvkq", "aupxvpi", com.azure.core.util.Context.NONE); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/GroupByVariableTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/GroupByVariableTests.java index 931b4f9cc9c22..e0775deb53d21 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/GroupByVariableTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/GroupByVariableTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/HeaderActionTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/HeaderActionTests.java index e3d858725dcf7..cb82bdd8f6a03 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/HeaderActionTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/HeaderActionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -12,22 +12,22 @@ public final class HeaderActionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - HeaderAction model = BinaryData - .fromString("{\"headerActionType\":\"Overwrite\",\"headerName\":\"qtnqtt\",\"value\":\"lwfffi\"}") - .toObject(HeaderAction.class); - Assertions.assertEquals(HeaderActionType.OVERWRITE, model.headerActionType()); - Assertions.assertEquals("qtnqtt", model.headerName()); - Assertions.assertEquals("lwfffi", model.value()); + HeaderAction model + = BinaryData.fromString("{\"headerActionType\":\"Append\",\"headerName\":\"lvez\",\"value\":\"pqlmfe\"}") + .toObject(HeaderAction.class); + Assertions.assertEquals(HeaderActionType.APPEND, model.headerActionType()); + Assertions.assertEquals("lvez", model.headerName()); + Assertions.assertEquals("pqlmfe", model.value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - HeaderAction model = new HeaderAction().withHeaderActionType(HeaderActionType.OVERWRITE) - .withHeaderName("qtnqtt") - .withValue("lwfffi"); + HeaderAction model = new HeaderAction().withHeaderActionType(HeaderActionType.APPEND) + .withHeaderName("lvez") + .withValue("pqlmfe"); model = BinaryData.fromObject(model).toObject(HeaderAction.class); - Assertions.assertEquals(HeaderActionType.OVERWRITE, model.headerActionType()); - Assertions.assertEquals("qtnqtt", model.headerName()); - Assertions.assertEquals("lwfffi", model.value()); + Assertions.assertEquals(HeaderActionType.APPEND, model.headerActionType()); + Assertions.assertEquals("lvez", model.headerName()); + Assertions.assertEquals("pqlmfe", model.value()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/HealthProbeSettingsModelTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/HealthProbeSettingsModelTests.java index 870e615e7c37d..b0b07e22e996c 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/HealthProbeSettingsModelTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/HealthProbeSettingsModelTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -15,32 +15,32 @@ public final class HealthProbeSettingsModelTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HealthProbeSettingsModel model = BinaryData.fromString( - "{\"properties\":{\"resourceState\":\"Disabled\",\"path\":\"ktwkuziyc\",\"protocol\":\"Https\",\"intervalInSeconds\":1330328967,\"healthProbeMethod\":\"HEAD\",\"enabledState\":\"Disabled\"},\"name\":\"ktyhjt\",\"type\":\"dcgzul\",\"id\":\"mrqzzrrjvpgl\"}") + "{\"properties\":{\"resourceState\":\"Creating\",\"path\":\"gdtpnapnyiro\",\"protocol\":\"Http\",\"intervalInSeconds\":2098592267,\"healthProbeMethod\":\"HEAD\",\"enabledState\":\"Disabled\"},\"name\":\"lgqg\",\"type\":\"xmedjvcsly\",\"id\":\"wwncwzzhxgk\"}") .toObject(HealthProbeSettingsModel.class); - Assertions.assertEquals("mrqzzrrjvpgl", model.id()); - Assertions.assertEquals("ktyhjt", model.name()); - Assertions.assertEquals("ktwkuziyc", model.path()); - Assertions.assertEquals(FrontDoorProtocol.HTTPS, model.protocol()); - Assertions.assertEquals(1330328967, model.intervalInSeconds()); + Assertions.assertEquals("wwncwzzhxgk", model.id()); + Assertions.assertEquals("lgqg", model.name()); + Assertions.assertEquals("gdtpnapnyiro", model.path()); + Assertions.assertEquals(FrontDoorProtocol.HTTP, model.protocol()); + Assertions.assertEquals(2098592267, model.intervalInSeconds()); Assertions.assertEquals(FrontDoorHealthProbeMethod.HEAD, model.healthProbeMethod()); Assertions.assertEquals(HealthProbeEnabled.DISABLED, model.enabledState()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - HealthProbeSettingsModel model = new HealthProbeSettingsModel().withId("mrqzzrrjvpgl") - .withName("ktyhjt") - .withPath("ktwkuziyc") - .withProtocol(FrontDoorProtocol.HTTPS) - .withIntervalInSeconds(1330328967) + HealthProbeSettingsModel model = new HealthProbeSettingsModel().withId("wwncwzzhxgk") + .withName("lgqg") + .withPath("gdtpnapnyiro") + .withProtocol(FrontDoorProtocol.HTTP) + .withIntervalInSeconds(2098592267) .withHealthProbeMethod(FrontDoorHealthProbeMethod.HEAD) .withEnabledState(HealthProbeEnabled.DISABLED); model = BinaryData.fromObject(model).toObject(HealthProbeSettingsModel.class); - Assertions.assertEquals("mrqzzrrjvpgl", model.id()); - Assertions.assertEquals("ktyhjt", model.name()); - Assertions.assertEquals("ktwkuziyc", model.path()); - Assertions.assertEquals(FrontDoorProtocol.HTTPS, model.protocol()); - Assertions.assertEquals(1330328967, model.intervalInSeconds()); + Assertions.assertEquals("wwncwzzhxgk", model.id()); + Assertions.assertEquals("lgqg", model.name()); + Assertions.assertEquals("gdtpnapnyiro", model.path()); + Assertions.assertEquals(FrontDoorProtocol.HTTP, model.protocol()); + Assertions.assertEquals(2098592267, model.intervalInSeconds()); Assertions.assertEquals(FrontDoorHealthProbeMethod.HEAD, model.healthProbeMethod()); Assertions.assertEquals(HealthProbeEnabled.DISABLED, model.enabledState()); } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/HealthProbeSettingsPropertiesTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/HealthProbeSettingsPropertiesTests.java index 87ce97348cb09..2fda544055301 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/HealthProbeSettingsPropertiesTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/HealthProbeSettingsPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -15,27 +15,27 @@ public final class HealthProbeSettingsPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HealthProbeSettingsProperties model = BinaryData.fromString( - "{\"resourceState\":\"Disabling\",\"path\":\"krvq\",\"protocol\":\"Https\",\"intervalInSeconds\":1251506139,\"healthProbeMethod\":\"GET\",\"enabledState\":\"Disabled\"}") + "{\"resourceState\":\"Enabled\",\"path\":\"ucnapkteoellwp\",\"protocol\":\"Http\",\"intervalInSeconds\":183045537,\"healthProbeMethod\":\"HEAD\",\"enabledState\":\"Enabled\"}") .toObject(HealthProbeSettingsProperties.class); - Assertions.assertEquals("krvq", model.path()); - Assertions.assertEquals(FrontDoorProtocol.HTTPS, model.protocol()); - Assertions.assertEquals(1251506139, model.intervalInSeconds()); - Assertions.assertEquals(FrontDoorHealthProbeMethod.GET, model.healthProbeMethod()); - Assertions.assertEquals(HealthProbeEnabled.DISABLED, model.enabledState()); + Assertions.assertEquals("ucnapkteoellwp", model.path()); + Assertions.assertEquals(FrontDoorProtocol.HTTP, model.protocol()); + Assertions.assertEquals(183045537, model.intervalInSeconds()); + Assertions.assertEquals(FrontDoorHealthProbeMethod.HEAD, model.healthProbeMethod()); + Assertions.assertEquals(HealthProbeEnabled.ENABLED, model.enabledState()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - HealthProbeSettingsProperties model = new HealthProbeSettingsProperties().withPath("krvq") - .withProtocol(FrontDoorProtocol.HTTPS) - .withIntervalInSeconds(1251506139) - .withHealthProbeMethod(FrontDoorHealthProbeMethod.GET) - .withEnabledState(HealthProbeEnabled.DISABLED); + HealthProbeSettingsProperties model = new HealthProbeSettingsProperties().withPath("ucnapkteoellwp") + .withProtocol(FrontDoorProtocol.HTTP) + .withIntervalInSeconds(183045537) + .withHealthProbeMethod(FrontDoorHealthProbeMethod.HEAD) + .withEnabledState(HealthProbeEnabled.ENABLED); model = BinaryData.fromObject(model).toObject(HealthProbeSettingsProperties.class); - Assertions.assertEquals("krvq", model.path()); - Assertions.assertEquals(FrontDoorProtocol.HTTPS, model.protocol()); - Assertions.assertEquals(1251506139, model.intervalInSeconds()); - Assertions.assertEquals(FrontDoorHealthProbeMethod.GET, model.healthProbeMethod()); - Assertions.assertEquals(HealthProbeEnabled.DISABLED, model.enabledState()); + Assertions.assertEquals("ucnapkteoellwp", model.path()); + Assertions.assertEquals(FrontDoorProtocol.HTTP, model.protocol()); + Assertions.assertEquals(183045537, model.intervalInSeconds()); + Assertions.assertEquals(FrontDoorHealthProbeMethod.HEAD, model.healthProbeMethod()); + Assertions.assertEquals(HealthProbeEnabled.ENABLED, model.enabledState()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/HealthProbeSettingsUpdateParametersTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/HealthProbeSettingsUpdateParametersTests.java index 1fdda2369b385..4d502e657b0ce 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/HealthProbeSettingsUpdateParametersTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/HealthProbeSettingsUpdateParametersTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -15,26 +15,26 @@ public final class HealthProbeSettingsUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HealthProbeSettingsUpdateParameters model = BinaryData.fromString( - "{\"path\":\"t\",\"protocol\":\"Http\",\"intervalInSeconds\":989782858,\"healthProbeMethod\":\"HEAD\",\"enabledState\":\"Enabled\"}") + "{\"path\":\"ac\",\"protocol\":\"Https\",\"intervalInSeconds\":1015467310,\"healthProbeMethod\":\"HEAD\",\"enabledState\":\"Enabled\"}") .toObject(HealthProbeSettingsUpdateParameters.class); - Assertions.assertEquals("t", model.path()); - Assertions.assertEquals(FrontDoorProtocol.HTTP, model.protocol()); - Assertions.assertEquals(989782858, model.intervalInSeconds()); + Assertions.assertEquals("ac", model.path()); + Assertions.assertEquals(FrontDoorProtocol.HTTPS, model.protocol()); + Assertions.assertEquals(1015467310, model.intervalInSeconds()); Assertions.assertEquals(FrontDoorHealthProbeMethod.HEAD, model.healthProbeMethod()); Assertions.assertEquals(HealthProbeEnabled.ENABLED, model.enabledState()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - HealthProbeSettingsUpdateParameters model = new HealthProbeSettingsUpdateParameters().withPath("t") - .withProtocol(FrontDoorProtocol.HTTP) - .withIntervalInSeconds(989782858) + HealthProbeSettingsUpdateParameters model = new HealthProbeSettingsUpdateParameters().withPath("ac") + .withProtocol(FrontDoorProtocol.HTTPS) + .withIntervalInSeconds(1015467310) .withHealthProbeMethod(FrontDoorHealthProbeMethod.HEAD) .withEnabledState(HealthProbeEnabled.ENABLED); model = BinaryData.fromObject(model).toObject(HealthProbeSettingsUpdateParameters.class); - Assertions.assertEquals("t", model.path()); - Assertions.assertEquals(FrontDoorProtocol.HTTP, model.protocol()); - Assertions.assertEquals(989782858, model.intervalInSeconds()); + Assertions.assertEquals("ac", model.path()); + Assertions.assertEquals(FrontDoorProtocol.HTTPS, model.protocol()); + Assertions.assertEquals(1015467310, model.intervalInSeconds()); Assertions.assertEquals(FrontDoorHealthProbeMethod.HEAD, model.healthProbeMethod()); Assertions.assertEquals(HealthProbeEnabled.ENABLED, model.enabledState()); } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/KeyVaultCertificateSourceParametersVaultTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/KeyVaultCertificateSourceParametersVaultTests.java index f2235d8ec4d8f..5a394ba3e16b3 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/KeyVaultCertificateSourceParametersVaultTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/KeyVaultCertificateSourceParametersVaultTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -12,14 +12,15 @@ public final class KeyVaultCertificateSourceParametersVaultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { KeyVaultCertificateSourceParametersVault model - = BinaryData.fromString("{\"id\":\"uj\"}").toObject(KeyVaultCertificateSourceParametersVault.class); - Assertions.assertEquals("uj", model.id()); + = BinaryData.fromString("{\"id\":\"piexpbtgiw\"}").toObject(KeyVaultCertificateSourceParametersVault.class); + Assertions.assertEquals("piexpbtgiw", model.id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - KeyVaultCertificateSourceParametersVault model = new KeyVaultCertificateSourceParametersVault().withId("uj"); + KeyVaultCertificateSourceParametersVault model + = new KeyVaultCertificateSourceParametersVault().withId("piexpbtgiw"); model = BinaryData.fromObject(model).toObject(KeyVaultCertificateSourceParametersVault.class); - Assertions.assertEquals("uj", model.id()); + Assertions.assertEquals("piexpbtgiw", model.id()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/LatencyMetricTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/LatencyMetricTests.java index 56426cca4ce86..824e125d5c428 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/LatencyMetricTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/LatencyMetricTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -11,13 +11,7 @@ public final class LatencyMetricTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { LatencyMetric model = BinaryData.fromString( - "{\"name\":\"bzefezr\",\"endDateTimeUTC\":\"czurtlei\",\"aValue\":30.662357,\"bValue\":18.551361,\"delta\":9.448862,\"deltaPercent\":79.282104,\"aCLower95CI\":17.816608,\"aHUpper95CI\":60.011448,\"bCLower95CI\":48.05835,\"bUpper95CI\":4.7126713}") + "{\"name\":\"mzqkz\",\"endDateTimeUTC\":\"uwiwtglxxhljfpg\",\"aValue\":76.326385,\"bValue\":51.604496,\"delta\":81.78421,\"deltaPercent\":41.717236,\"aCLower95CI\":54.32484,\"aHUpper95CI\":25.927294,\"bCLower95CI\":94.59076,\"bUpper95CI\":31.165945}") .toObject(LatencyMetric.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LatencyMetric model = new LatencyMetric(); - model = BinaryData.fromObject(model).toObject(LatencyMetric.class); - } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/LatencyScorecardInnerTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/LatencyScorecardInnerTests.java index a40dcdcad330e..84c373b45d0b0 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/LatencyScorecardInnerTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/LatencyScorecardInnerTests.java @@ -1,46 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.frontdoor.fluent.models.LatencyScorecardInner; -import com.azure.resourcemanager.frontdoor.models.LatencyMetric; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class LatencyScorecardInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { LatencyScorecardInner model = BinaryData.fromString( - "{\"properties\":{\"id\":\"tngfdgugeyzihgr\",\"name\":\"ui\",\"description\":\"bsnmfpph\",\"endpointA\":\"eevy\",\"endpointB\":\"hsgz\",\"startDateTimeUTC\":\"2021-09-04T20:31:38Z\",\"endDateTimeUTC\":\"2021-04-26T23:03:25Z\",\"country\":\"mfg\",\"latencyMetrics\":[{\"name\":\"qgleohibetnluank\",\"endDateTimeUTC\":\"fxeeebtijvacvbm\",\"aValue\":39.060837,\"bValue\":0.7475734,\"delta\":82.000725,\"deltaPercent\":54.551792,\"aCLower95CI\":9.691727,\"aHUpper95CI\":32.127506,\"bCLower95CI\":83.196625,\"bUpper95CI\":15.094423},{\"name\":\"h\",\"endDateTimeUTC\":\"uyxoaf\",\"aValue\":43.28481,\"bValue\":12.039203,\"delta\":22.252481,\"deltaPercent\":12.664461,\"aCLower95CI\":42.13147,\"aHUpper95CI\":6.4531984,\"bCLower95CI\":98.56035,\"bUpper95CI\":70.414665}]},\"location\":\"xirpghriy\",\"tags\":{\"yznuciqd\":\"eyhlqhykprl\"},\"id\":\"mexiitdfuxt\",\"name\":\"asiibmiybnnust\",\"type\":\"nlj\"}") + "{\"properties\":{\"id\":\"kqbh\",\"name\":\"rqunjq\",\"description\":\"enx\",\"endpointA\":\"l\",\"endpointB\":\"akdkifmjnnawtqab\",\"startDateTimeUTC\":\"2021-06-23T13:06:59Z\",\"endDateTimeUTC\":\"2021-05-18T06:32:42Z\",\"country\":\"ggqowey\",\"latencyMetrics\":[{\"name\":\"lisn\",\"endDateTimeUTC\":\"fl\",\"aValue\":31.546974,\"bValue\":89.17074,\"delta\":55.92719,\"deltaPercent\":0.50610304,\"aCLower95CI\":26.464039,\"aHUpper95CI\":63.469994,\"bCLower95CI\":16.700912,\"bUpper95CI\":56.7443},{\"name\":\"cng\",\"endDateTimeUTC\":\"aas\",\"aValue\":73.45432,\"bValue\":58.199226,\"delta\":93.08334,\"deltaPercent\":57.847248,\"aCLower95CI\":65.63294,\"aHUpper95CI\":65.831215,\"bCLower95CI\":45.11283,\"bUpper95CI\":82.58599},{\"name\":\"rwsdp\",\"endDateTimeUTC\":\"atzv\",\"aValue\":36.45205,\"bValue\":20.298058,\"delta\":3.6359668,\"deltaPercent\":59.050102,\"aCLower95CI\":89.434525,\"aHUpper95CI\":47.673233,\"bCLower95CI\":62.757366,\"bUpper95CI\":5.196154},{\"name\":\"wrgxffmshkwfbkgo\",\"endDateTimeUTC\":\"wopdbydpiz\",\"aValue\":95.82464,\"bValue\":66.873314,\"delta\":83.092186,\"deltaPercent\":95.02426,\"aCLower95CI\":8.332169,\"aHUpper95CI\":21.508444,\"bCLower95CI\":22.492695,\"bUpper95CI\":99.33303}]},\"location\":\"nfsm\",\"tags\":{\"iquvrehm\":\"tuxuuyilflq\",\"ytqj\":\"njhvsujztc\",\"auunfprnjletlx\":\"w\",\"ddoui\":\"mr\"},\"id\":\"amowaziynknlqwzd\",\"name\":\"piwhxqs\",\"type\":\"dtmaa\"}") .toObject(LatencyScorecardInner.class); - Assertions.assertEquals("xirpghriy", model.location()); - Assertions.assertEquals("eyhlqhykprl", model.tags().get("yznuciqd")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LatencyScorecardInner model = new LatencyScorecardInner().withLocation("xirpghriy") - .withTags(mapOf("yznuciqd", "eyhlqhykprl")) - .withLatencyMetrics(Arrays.asList(new LatencyMetric(), new LatencyMetric())); - model = BinaryData.fromObject(model).toObject(LatencyScorecardInner.class); - Assertions.assertEquals("xirpghriy", model.location()); - Assertions.assertEquals("eyhlqhykprl", model.tags().get("yznuciqd")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("nfsm", model.location()); + Assertions.assertEquals("tuxuuyilflq", model.tags().get("iquvrehm")); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/LatencyScorecardPropertiesTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/LatencyScorecardPropertiesTests.java index 270d08ee28d03..7151e77bf750e 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/LatencyScorecardPropertiesTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/LatencyScorecardPropertiesTests.java @@ -1,26 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.frontdoor.fluent.models.LatencyScorecardProperties; -import com.azure.resourcemanager.frontdoor.models.LatencyMetric; -import java.util.Arrays; public final class LatencyScorecardPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { LatencyScorecardProperties model = BinaryData.fromString( - "{\"id\":\"mgixhcmavmqfou\",\"name\":\"rhc\",\"description\":\"yprotwyp\",\"endpointA\":\"d\",\"endpointB\":\"xhugcm\",\"startDateTimeUTC\":\"2021-10-22T10:15:32Z\",\"endDateTimeUTC\":\"2021-05-28T01:58:35Z\",\"country\":\"or\",\"latencyMetrics\":[{\"name\":\"pmdtz\",\"endDateTimeUTC\":\"ltfvnz\",\"aValue\":71.58709,\"bValue\":13.321095,\"delta\":1.86252,\"deltaPercent\":14.7615795,\"aCLower95CI\":50.949852,\"aHUpper95CI\":17.070621,\"bCLower95CI\":43.74167,\"bUpper95CI\":98.802505},{\"name\":\"qqihedsvqwthmk\",\"endDateTimeUTC\":\"bcysih\",\"aValue\":39.957165,\"bValue\":86.52514,\"delta\":29.727798,\"deltaPercent\":34.064537,\"aCLower95CI\":26.138746,\"aHUpper95CI\":83.44366,\"bCLower95CI\":37.323578,\"bUpper95CI\":28.770208},{\"name\":\"fcohdxbzlmcmu\",\"endDateTimeUTC\":\"cvhd\",\"aValue\":1.3999999,\"bValue\":50.365185,\"delta\":95.75136,\"deltaPercent\":62.209137,\"aCLower95CI\":6.926763,\"aHUpper95CI\":22.552055,\"bCLower95CI\":94.57757,\"bUpper95CI\":54.89984},{\"name\":\"fkbg\",\"endDateTimeUTC\":\"bowxe\",\"aValue\":15.188962,\"bValue\":36.005825,\"delta\":55.835987,\"deltaPercent\":25.24032,\"aCLower95CI\":79.712364,\"aHUpper95CI\":45.767326,\"bCLower95CI\":93.26072,\"bUpper95CI\":33.499878}]}") + "{\"id\":\"uhuxylrjvmtyg\",\"name\":\"mzyospspshck\",\"description\":\"yjpmspbpssdfppyo\",\"endpointA\":\"ieyujtvc\",\"endpointB\":\"cnyxrxmunjd\",\"startDateTimeUTC\":\"2021-10-31T10:07:09Z\",\"endDateTimeUTC\":\"2021-02-11T09:59:21Z\",\"country\":\"vxlx\",\"latencyMetrics\":[{\"name\":\"qivbgkcvkh\",\"endDateTimeUTC\":\"vuqd\",\"aValue\":49.451057,\"bValue\":72.22718,\"delta\":9.952795,\"deltaPercent\":72.31586,\"aCLower95CI\":59.337,\"aHUpper95CI\":50.895363,\"bCLower95CI\":18.233448,\"bUpper95CI\":43.750595},{\"name\":\"tivhjknidibgqjx\",\"endDateTimeUTC\":\"n\",\"aValue\":87.76769,\"bValue\":98.05658,\"delta\":40.892185,\"deltaPercent\":12.046999,\"aCLower95CI\":46.63394,\"aHUpper95CI\":10.271984,\"bCLower95CI\":10.331279,\"bUpper95CI\":80.44109},{\"name\":\"rmzvupo\",\"endDateTimeUTC\":\"zdfuydzvkfvxcnqm\",\"aValue\":12.743616,\"bValue\":66.6378,\"delta\":35.81485,\"deltaPercent\":73.3401,\"aCLower95CI\":10.116464,\"aHUpper95CI\":90.196014,\"bCLower95CI\":73.25534,\"bUpper95CI\":72.57852}]}") .toObject(LatencyScorecardProperties.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LatencyScorecardProperties model = new LatencyScorecardProperties().withLatencyMetrics( - Arrays.asList(new LatencyMetric(), new LatencyMetric(), new LatencyMetric(), new LatencyMetric())); - model = BinaryData.fromObject(model).toObject(LatencyScorecardProperties.class); - } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/LoadBalancingSettingsModelTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/LoadBalancingSettingsModelTests.java index 9cef003f3054a..36b0ced5ff91e 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/LoadBalancingSettingsModelTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/LoadBalancingSettingsModelTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -12,27 +12,27 @@ public final class LoadBalancingSettingsModelTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { LoadBalancingSettingsModel model = BinaryData.fromString( - "{\"properties\":{\"resourceState\":\"Enabled\",\"sampleSize\":1038876843,\"successfulSamplesRequired\":1193867265,\"additionalLatencyMilliseconds\":1115124750},\"name\":\"iivwzjbhyzsxjrka\",\"type\":\"trnegvmnvuqeqvld\",\"id\":\"astjbkkdmflvestm\"}") + "{\"properties\":{\"resourceState\":\"Deleting\",\"sampleSize\":2104091050,\"successfulSamplesRequired\":1143509001,\"additionalLatencyMilliseconds\":1248197676},\"name\":\"joya\",\"type\":\"slyjpkiid\",\"id\":\"exznelixhnr\"}") .toObject(LoadBalancingSettingsModel.class); - Assertions.assertEquals("astjbkkdmflvestm", model.id()); - Assertions.assertEquals("iivwzjbhyzsxjrka", model.name()); - Assertions.assertEquals(1038876843, model.sampleSize()); - Assertions.assertEquals(1193867265, model.successfulSamplesRequired()); - Assertions.assertEquals(1115124750, model.additionalLatencyMilliseconds()); + Assertions.assertEquals("exznelixhnr", model.id()); + Assertions.assertEquals("joya", model.name()); + Assertions.assertEquals(2104091050, model.sampleSize()); + Assertions.assertEquals(1143509001, model.successfulSamplesRequired()); + Assertions.assertEquals(1248197676, model.additionalLatencyMilliseconds()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - LoadBalancingSettingsModel model = new LoadBalancingSettingsModel().withId("astjbkkdmflvestm") - .withName("iivwzjbhyzsxjrka") - .withSampleSize(1038876843) - .withSuccessfulSamplesRequired(1193867265) - .withAdditionalLatencyMilliseconds(1115124750); + LoadBalancingSettingsModel model = new LoadBalancingSettingsModel().withId("exznelixhnr") + .withName("joya") + .withSampleSize(2104091050) + .withSuccessfulSamplesRequired(1143509001) + .withAdditionalLatencyMilliseconds(1248197676); model = BinaryData.fromObject(model).toObject(LoadBalancingSettingsModel.class); - Assertions.assertEquals("astjbkkdmflvestm", model.id()); - Assertions.assertEquals("iivwzjbhyzsxjrka", model.name()); - Assertions.assertEquals(1038876843, model.sampleSize()); - Assertions.assertEquals(1193867265, model.successfulSamplesRequired()); - Assertions.assertEquals(1115124750, model.additionalLatencyMilliseconds()); + Assertions.assertEquals("exznelixhnr", model.id()); + Assertions.assertEquals("joya", model.name()); + Assertions.assertEquals(2104091050, model.sampleSize()); + Assertions.assertEquals(1143509001, model.successfulSamplesRequired()); + Assertions.assertEquals(1248197676, model.additionalLatencyMilliseconds()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/LoadBalancingSettingsPropertiesTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/LoadBalancingSettingsPropertiesTests.java index 074c6fd2bc628..43113ef6bc806 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/LoadBalancingSettingsPropertiesTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/LoadBalancingSettingsPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -12,21 +12,21 @@ public final class LoadBalancingSettingsPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { LoadBalancingSettingsProperties model = BinaryData.fromString( - "{\"resourceState\":\"Deleting\",\"sampleSize\":598557579,\"successfulSamplesRequired\":1514832740,\"additionalLatencyMilliseconds\":444057541}") + "{\"resourceState\":\"Deleting\",\"sampleSize\":1975568377,\"successfulSamplesRequired\":1201064167,\"additionalLatencyMilliseconds\":681203122}") .toObject(LoadBalancingSettingsProperties.class); - Assertions.assertEquals(598557579, model.sampleSize()); - Assertions.assertEquals(1514832740, model.successfulSamplesRequired()); - Assertions.assertEquals(444057541, model.additionalLatencyMilliseconds()); + Assertions.assertEquals(1975568377, model.sampleSize()); + Assertions.assertEquals(1201064167, model.successfulSamplesRequired()); + Assertions.assertEquals(681203122, model.additionalLatencyMilliseconds()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - LoadBalancingSettingsProperties model = new LoadBalancingSettingsProperties().withSampleSize(598557579) - .withSuccessfulSamplesRequired(1514832740) - .withAdditionalLatencyMilliseconds(444057541); + LoadBalancingSettingsProperties model = new LoadBalancingSettingsProperties().withSampleSize(1975568377) + .withSuccessfulSamplesRequired(1201064167) + .withAdditionalLatencyMilliseconds(681203122); model = BinaryData.fromObject(model).toObject(LoadBalancingSettingsProperties.class); - Assertions.assertEquals(598557579, model.sampleSize()); - Assertions.assertEquals(1514832740, model.successfulSamplesRequired()); - Assertions.assertEquals(444057541, model.additionalLatencyMilliseconds()); + Assertions.assertEquals(1975568377, model.sampleSize()); + Assertions.assertEquals(1201064167, model.successfulSamplesRequired()); + Assertions.assertEquals(681203122, model.additionalLatencyMilliseconds()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/LoadBalancingSettingsUpdateParametersTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/LoadBalancingSettingsUpdateParametersTests.java index 126e1daf66b8f..5b4c9e51a1978 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/LoadBalancingSettingsUpdateParametersTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/LoadBalancingSettingsUpdateParametersTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -12,22 +12,22 @@ public final class LoadBalancingSettingsUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { LoadBalancingSettingsUpdateParameters model = BinaryData.fromString( - "{\"sampleSize\":646254417,\"successfulSamplesRequired\":848547164,\"additionalLatencyMilliseconds\":469550193}") + "{\"sampleSize\":245214837,\"successfulSamplesRequired\":1615716441,\"additionalLatencyMilliseconds\":2019040636}") .toObject(LoadBalancingSettingsUpdateParameters.class); - Assertions.assertEquals(646254417, model.sampleSize()); - Assertions.assertEquals(848547164, model.successfulSamplesRequired()); - Assertions.assertEquals(469550193, model.additionalLatencyMilliseconds()); + Assertions.assertEquals(245214837, model.sampleSize()); + Assertions.assertEquals(1615716441, model.successfulSamplesRequired()); + Assertions.assertEquals(2019040636, model.additionalLatencyMilliseconds()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { LoadBalancingSettingsUpdateParameters model - = new LoadBalancingSettingsUpdateParameters().withSampleSize(646254417) - .withSuccessfulSamplesRequired(848547164) - .withAdditionalLatencyMilliseconds(469550193); + = new LoadBalancingSettingsUpdateParameters().withSampleSize(245214837) + .withSuccessfulSamplesRequired(1615716441) + .withAdditionalLatencyMilliseconds(2019040636); model = BinaryData.fromObject(model).toObject(LoadBalancingSettingsUpdateParameters.class); - Assertions.assertEquals(646254417, model.sampleSize()); - Assertions.assertEquals(848547164, model.successfulSamplesRequired()); - Assertions.assertEquals(469550193, model.additionalLatencyMilliseconds()); + Assertions.assertEquals(245214837, model.sampleSize()); + Assertions.assertEquals(1615716441, model.successfulSamplesRequired()); + Assertions.assertEquals(2019040636, model.additionalLatencyMilliseconds()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleDefinitionTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleDefinitionTests.java index 8c4ad54e5b372..3455a130eccb1 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleDefinitionTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleDefinitionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -11,13 +11,7 @@ public final class ManagedRuleDefinitionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedRuleDefinition model = BinaryData.fromString( - "{\"ruleId\":\"dqgbiqylihkaetc\",\"defaultState\":\"Enabled\",\"defaultAction\":\"JSChallenge\",\"description\":\"vf\"}") + "{\"ruleId\":\"ohec\",\"defaultState\":\"Enabled\",\"defaultAction\":\"AnomalyScoring\",\"defaultSensitivity\":\"Medium\",\"description\":\"qleallklmtkh\",\"paranoiaLevel\":\"PL4\"}") .toObject(ManagedRuleDefinition.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedRuleDefinition model = new ManagedRuleDefinition(); - model = BinaryData.fromObject(model).toObject(ManagedRuleDefinition.class); - } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleExclusionTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleExclusionTests.java index b34bb3e72f15e..a881fa219a595 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleExclusionTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleExclusionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -14,11 +14,11 @@ public final class ManagedRuleExclusionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedRuleExclusion model = BinaryData.fromString( - "{\"matchVariable\":\"RequestBodyJsonArgNames\",\"selectorMatchOperator\":\"Equals\",\"selector\":\"wndeicbtwnp\"}") + "{\"matchVariable\":\"RequestBodyJsonArgNames\",\"selectorMatchOperator\":\"Equals\",\"selector\":\"srsjuivfc\"}") .toObject(ManagedRuleExclusion.class); Assertions.assertEquals(ManagedRuleExclusionMatchVariable.REQUEST_BODY_JSON_ARG_NAMES, model.matchVariable()); Assertions.assertEquals(ManagedRuleExclusionSelectorMatchOperator.EQUALS, model.selectorMatchOperator()); - Assertions.assertEquals("wndeicbtwnp", model.selector()); + Assertions.assertEquals("srsjuivfc", model.selector()); } @org.junit.jupiter.api.Test @@ -26,10 +26,10 @@ public void testSerialize() throws Exception { ManagedRuleExclusion model = new ManagedRuleExclusion() .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_BODY_JSON_ARG_NAMES) .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.EQUALS) - .withSelector("wndeicbtwnp"); + .withSelector("srsjuivfc"); model = BinaryData.fromObject(model).toObject(ManagedRuleExclusion.class); Assertions.assertEquals(ManagedRuleExclusionMatchVariable.REQUEST_BODY_JSON_ARG_NAMES, model.matchVariable()); Assertions.assertEquals(ManagedRuleExclusionSelectorMatchOperator.EQUALS, model.selectorMatchOperator()); - Assertions.assertEquals("wndeicbtwnp", model.selector()); + Assertions.assertEquals("srsjuivfc", model.selector()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleGroupDefinitionTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleGroupDefinitionTests.java index 585652b4a30d8..8e2b4645599c6 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleGroupDefinitionTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleGroupDefinitionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -11,13 +11,7 @@ public final class ManagedRuleGroupDefinitionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedRuleGroupDefinition model = BinaryData.fromString( - "{\"ruleGroupName\":\"vwhheunmmqhgyx\",\"description\":\"onocukok\",\"rules\":[{\"ruleId\":\"uconuqszfkbey\",\"defaultState\":\"Enabled\",\"defaultAction\":\"JSChallenge\",\"description\":\"mwvvjektcxsenhw\"},{\"ruleId\":\"s\",\"defaultState\":\"Enabled\",\"defaultAction\":\"Block\",\"description\":\"v\"}]}") + "{\"ruleGroupName\":\"iyfc\",\"description\":\"beolh\",\"rules\":[{\"ruleId\":\"bmxuqib\",\"defaultState\":\"Enabled\",\"defaultAction\":\"Block\",\"defaultSensitivity\":\"High\",\"description\":\"b\",\"paranoiaLevel\":\"PL2\"},{\"ruleId\":\"fs\",\"defaultState\":\"Disabled\",\"defaultAction\":\"AnomalyScoring\",\"defaultSensitivity\":\"Medium\",\"description\":\"qpvwgfst\",\"paranoiaLevel\":\"PL1\"},{\"ruleId\":\"kizmdksaoafclu\",\"defaultState\":\"Enabled\",\"defaultAction\":\"AnomalyScoring\",\"defaultSensitivity\":\"Low\",\"description\":\"im\",\"paranoiaLevel\":\"PL1\"},{\"ruleId\":\"gc\",\"defaultState\":\"Disabled\",\"defaultAction\":\"CAPTCHA\",\"defaultSensitivity\":\"Low\",\"description\":\"esyds\",\"paranoiaLevel\":\"PL1\"}]}") .toObject(ManagedRuleGroupDefinition.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedRuleGroupDefinition model = new ManagedRuleGroupDefinition(); - model = BinaryData.fromObject(model).toObject(ManagedRuleGroupDefinition.class); - } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleGroupOverrideTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleGroupOverrideTests.java index f8c9f388ce908..c0e8f6e6f260c 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleGroupOverrideTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleGroupOverrideTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -12,6 +12,7 @@ import com.azure.resourcemanager.frontdoor.models.ManagedRuleExclusionSelectorMatchOperator; import com.azure.resourcemanager.frontdoor.models.ManagedRuleGroupOverride; import com.azure.resourcemanager.frontdoor.models.ManagedRuleOverride; +import com.azure.resourcemanager.frontdoor.models.SensitivityType; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -19,60 +20,100 @@ public final class ManagedRuleGroupOverrideTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedRuleGroupOverride model = BinaryData.fromString( - "{\"ruleGroupName\":\"aoqvuh\",\"exclusions\":[{\"matchVariable\":\"RequestBodyPostArgNames\",\"selectorMatchOperator\":\"StartsWith\",\"selector\":\"cyddglmjthjqk\"},{\"matchVariable\":\"RequestBodyJsonArgNames\",\"selectorMatchOperator\":\"Equals\",\"selector\":\"eicxmqciwqvhkhi\"},{\"matchVariable\":\"RequestHeaderNames\",\"selectorMatchOperator\":\"EndsWith\",\"selector\":\"gdtopbobjogh\"}],\"rules\":[{\"ruleId\":\"u\",\"enabledState\":\"Disabled\",\"action\":\"Allow\",\"exclusions\":[{\"matchVariable\":\"RequestBodyJsonArgNames\",\"selectorMatchOperator\":\"Contains\",\"selector\":\"vvtpgvdfgio\"}]}]}") + "{\"ruleGroupName\":\"is\",\"exclusions\":[{\"matchVariable\":\"RequestBodyJsonArgNames\",\"selectorMatchOperator\":\"EqualsAny\",\"selector\":\"zhczexrxzbujrtrh\"},{\"matchVariable\":\"RequestCookieNames\",\"selectorMatchOperator\":\"Equals\",\"selector\":\"revkhgnlnzo\"}],\"rules\":[{\"ruleId\":\"rpiqywncv\",\"enabledState\":\"Enabled\",\"action\":\"Redirect\",\"sensitivity\":\"Low\",\"exclusions\":[{\"matchVariable\":\"RequestCookieNames\",\"selectorMatchOperator\":\"StartsWith\",\"selector\":\"tdhgbjkvrelj\"},{\"matchVariable\":\"RequestBodyPostArgNames\",\"selectorMatchOperator\":\"StartsWith\",\"selector\":\"urvzmlovuanashc\"}]},{\"ruleId\":\"lpmjerb\",\"enabledState\":\"Enabled\",\"action\":\"Log\",\"sensitivity\":\"Low\",\"exclusions\":[{\"matchVariable\":\"RequestHeaderNames\",\"selectorMatchOperator\":\"EndsWith\",\"selector\":\"sdbccxjmonfdgnwn\"},{\"matchVariable\":\"RequestBodyJsonArgNames\",\"selectorMatchOperator\":\"StartsWith\",\"selector\":\"uuwwltv\"},{\"matchVariable\":\"RequestHeaderNames\",\"selectorMatchOperator\":\"Contains\",\"selector\":\"ctzenkeifzzhmkd\"},{\"matchVariable\":\"RequestBodyPostArgNames\",\"selectorMatchOperator\":\"Contains\",\"selector\":\"flyh\"}]},{\"ruleId\":\"xcudchxgsr\",\"enabledState\":\"Enabled\",\"action\":\"JSChallenge\",\"sensitivity\":\"Medium\",\"exclusions\":[{\"matchVariable\":\"RequestHeaderNames\",\"selectorMatchOperator\":\"EqualsAny\",\"selector\":\"lvizb\"}]}]}") .toObject(ManagedRuleGroupOverride.class); - Assertions.assertEquals("aoqvuh", model.ruleGroupName()); - Assertions.assertEquals(ManagedRuleExclusionMatchVariable.REQUEST_BODY_POST_ARG_NAMES, + Assertions.assertEquals("is", model.ruleGroupName()); + Assertions.assertEquals(ManagedRuleExclusionMatchVariable.REQUEST_BODY_JSON_ARG_NAMES, model.exclusions().get(0).matchVariable()); - Assertions.assertEquals(ManagedRuleExclusionSelectorMatchOperator.STARTS_WITH, + Assertions.assertEquals(ManagedRuleExclusionSelectorMatchOperator.EQUALS_ANY, model.exclusions().get(0).selectorMatchOperator()); - Assertions.assertEquals("cyddglmjthjqk", model.exclusions().get(0).selector()); - Assertions.assertEquals("u", model.rules().get(0).ruleId()); - Assertions.assertEquals(ManagedRuleEnabledState.DISABLED, model.rules().get(0).enabledState()); - Assertions.assertEquals(ActionType.ALLOW, model.rules().get(0).action()); - Assertions.assertEquals(ManagedRuleExclusionMatchVariable.REQUEST_BODY_JSON_ARG_NAMES, + Assertions.assertEquals("zhczexrxzbujrtrh", model.exclusions().get(0).selector()); + Assertions.assertEquals("rpiqywncv", model.rules().get(0).ruleId()); + Assertions.assertEquals(ManagedRuleEnabledState.ENABLED, model.rules().get(0).enabledState()); + Assertions.assertEquals(ActionType.REDIRECT, model.rules().get(0).action()); + Assertions.assertEquals(SensitivityType.LOW, model.rules().get(0).sensitivity()); + Assertions.assertEquals(ManagedRuleExclusionMatchVariable.REQUEST_COOKIE_NAMES, model.rules().get(0).exclusions().get(0).matchVariable()); - Assertions.assertEquals(ManagedRuleExclusionSelectorMatchOperator.CONTAINS, + Assertions.assertEquals(ManagedRuleExclusionSelectorMatchOperator.STARTS_WITH, model.rules().get(0).exclusions().get(0).selectorMatchOperator()); - Assertions.assertEquals("vvtpgvdfgio", model.rules().get(0).exclusions().get(0).selector()); + Assertions.assertEquals("tdhgbjkvrelj", model.rules().get(0).exclusions().get(0).selector()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ManagedRuleGroupOverride model = new ManagedRuleGroupOverride().withRuleGroupName("aoqvuh") - .withExclusions(Arrays.asList( - new ManagedRuleExclusion() - .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_BODY_POST_ARG_NAMES) - .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.STARTS_WITH) - .withSelector("cyddglmjthjqk"), - new ManagedRuleExclusion() - .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_BODY_JSON_ARG_NAMES) - .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.EQUALS) - .withSelector("eicxmqciwqvhkhi"), - new ManagedRuleExclusion().withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_HEADER_NAMES) - .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.ENDS_WITH) - .withSelector("gdtopbobjogh"))) - .withRules(Arrays.asList(new ManagedRuleOverride().withRuleId("u") - .withEnabledState(ManagedRuleEnabledState.DISABLED) - .withAction(ActionType.ALLOW) - .withExclusions(Arrays.asList(new ManagedRuleExclusion() - .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_BODY_JSON_ARG_NAMES) - .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.CONTAINS) - .withSelector("vvtpgvdfgio"))))); + ManagedRuleGroupOverride model + = new ManagedRuleGroupOverride().withRuleGroupName("is") + .withExclusions(Arrays.asList( + new ManagedRuleExclusion().withMatchVariable( + ManagedRuleExclusionMatchVariable.REQUEST_BODY_JSON_ARG_NAMES) + .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.EQUALS_ANY) + .withSelector("zhczexrxzbujrtrh"), + new ManagedRuleExclusion().withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_COOKIE_NAMES) + .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.EQUALS) + .withSelector("revkhgnlnzo"))) + .withRules( + Arrays + .asList( + new ManagedRuleOverride().withRuleId("rpiqywncv") + .withEnabledState(ManagedRuleEnabledState.ENABLED) + .withAction(ActionType.REDIRECT) + .withSensitivity(SensitivityType.LOW) + .withExclusions(Arrays.asList(new ManagedRuleExclusion() + .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_COOKIE_NAMES) + .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.STARTS_WITH) + .withSelector("tdhgbjkvrelj"), + new ManagedRuleExclusion() + .withMatchVariable( + ManagedRuleExclusionMatchVariable.REQUEST_BODY_POST_ARG_NAMES) + .withSelectorMatchOperator( + ManagedRuleExclusionSelectorMatchOperator.STARTS_WITH) + .withSelector("urvzmlovuanashc"))), + new ManagedRuleOverride().withRuleId("lpmjerb") + .withEnabledState(ManagedRuleEnabledState.ENABLED) + .withAction(ActionType.LOG) + .withSensitivity(SensitivityType.LOW) + .withExclusions(Arrays.asList(new ManagedRuleExclusion() + .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_HEADER_NAMES) + .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.ENDS_WITH) + .withSelector("sdbccxjmonfdgnwn"), + new ManagedRuleExclusion() + .withMatchVariable( + ManagedRuleExclusionMatchVariable.REQUEST_BODY_JSON_ARG_NAMES) + .withSelectorMatchOperator( + ManagedRuleExclusionSelectorMatchOperator.STARTS_WITH) + .withSelector("uuwwltv"), + new ManagedRuleExclusion() + .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_HEADER_NAMES) + .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.CONTAINS) + .withSelector("ctzenkeifzzhmkd"), + new ManagedRuleExclusion() + .withMatchVariable( + ManagedRuleExclusionMatchVariable.REQUEST_BODY_POST_ARG_NAMES) + .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.CONTAINS) + .withSelector("flyh"))), + new ManagedRuleOverride().withRuleId("xcudchxgsr") + .withEnabledState(ManagedRuleEnabledState.ENABLED) + .withAction(ActionType.JSCHALLENGE) + .withSensitivity(SensitivityType.MEDIUM) + .withExclusions(Arrays.asList(new ManagedRuleExclusion() + .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_HEADER_NAMES) + .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.EQUALS_ANY) + .withSelector("lvizb"))))); model = BinaryData.fromObject(model).toObject(ManagedRuleGroupOverride.class); - Assertions.assertEquals("aoqvuh", model.ruleGroupName()); - Assertions.assertEquals(ManagedRuleExclusionMatchVariable.REQUEST_BODY_POST_ARG_NAMES, + Assertions.assertEquals("is", model.ruleGroupName()); + Assertions.assertEquals(ManagedRuleExclusionMatchVariable.REQUEST_BODY_JSON_ARG_NAMES, model.exclusions().get(0).matchVariable()); - Assertions.assertEquals(ManagedRuleExclusionSelectorMatchOperator.STARTS_WITH, + Assertions.assertEquals(ManagedRuleExclusionSelectorMatchOperator.EQUALS_ANY, model.exclusions().get(0).selectorMatchOperator()); - Assertions.assertEquals("cyddglmjthjqk", model.exclusions().get(0).selector()); - Assertions.assertEquals("u", model.rules().get(0).ruleId()); - Assertions.assertEquals(ManagedRuleEnabledState.DISABLED, model.rules().get(0).enabledState()); - Assertions.assertEquals(ActionType.ALLOW, model.rules().get(0).action()); - Assertions.assertEquals(ManagedRuleExclusionMatchVariable.REQUEST_BODY_JSON_ARG_NAMES, + Assertions.assertEquals("zhczexrxzbujrtrh", model.exclusions().get(0).selector()); + Assertions.assertEquals("rpiqywncv", model.rules().get(0).ruleId()); + Assertions.assertEquals(ManagedRuleEnabledState.ENABLED, model.rules().get(0).enabledState()); + Assertions.assertEquals(ActionType.REDIRECT, model.rules().get(0).action()); + Assertions.assertEquals(SensitivityType.LOW, model.rules().get(0).sensitivity()); + Assertions.assertEquals(ManagedRuleExclusionMatchVariable.REQUEST_COOKIE_NAMES, model.rules().get(0).exclusions().get(0).matchVariable()); - Assertions.assertEquals(ManagedRuleExclusionSelectorMatchOperator.CONTAINS, + Assertions.assertEquals(ManagedRuleExclusionSelectorMatchOperator.STARTS_WITH, model.rules().get(0).exclusions().get(0).selectorMatchOperator()); - Assertions.assertEquals("vvtpgvdfgio", model.rules().get(0).exclusions().get(0).selector()); + Assertions.assertEquals("tdhgbjkvrelj", model.rules().get(0).exclusions().get(0).selector()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleOverrideTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleOverrideTests.java index d6950215e5531..a61771aadfa82 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleOverrideTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleOverrideTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -11,6 +11,7 @@ import com.azure.resourcemanager.frontdoor.models.ManagedRuleExclusionMatchVariable; import com.azure.resourcemanager.frontdoor.models.ManagedRuleExclusionSelectorMatchOperator; import com.azure.resourcemanager.frontdoor.models.ManagedRuleOverride; +import com.azure.resourcemanager.frontdoor.models.SensitivityType; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -18,47 +19,50 @@ public final class ManagedRuleOverrideTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedRuleOverride model = BinaryData.fromString( - "{\"ruleId\":\"kftutqxlngxlefg\",\"enabledState\":\"Disabled\",\"action\":\"Redirect\",\"exclusions\":[{\"matchVariable\":\"RequestBodyPostArgNames\",\"selectorMatchOperator\":\"Contains\",\"selector\":\"mi\"},{\"matchVariable\":\"RequestBodyPostArgNames\",\"selectorMatchOperator\":\"EqualsAny\",\"selector\":\"hzrvqd\"},{\"matchVariable\":\"RequestBodyPostArgNames\",\"selectorMatchOperator\":\"Contains\",\"selector\":\"hjybigehoqfbo\"},{\"matchVariable\":\"RequestHeaderNames\",\"selectorMatchOperator\":\"EqualsAny\",\"selector\":\"anyktzlcuiywg\"}]}") + "{\"ruleId\":\"hfovvacqpbtu\",\"enabledState\":\"Disabled\",\"action\":\"Block\",\"sensitivity\":\"High\",\"exclusions\":[{\"matchVariable\":\"RequestBodyJsonArgNames\",\"selectorMatchOperator\":\"StartsWith\",\"selector\":\"awumuaslzkwrrwo\"},{\"matchVariable\":\"QueryStringArgNames\",\"selectorMatchOperator\":\"Equals\",\"selector\":\"ucwyhahno\"},{\"matchVariable\":\"RequestHeaderNames\",\"selectorMatchOperator\":\"StartsWith\",\"selector\":\"kywuhpsvfuu\"},{\"matchVariable\":\"RequestBodyPostArgNames\",\"selectorMatchOperator\":\"Contains\",\"selector\":\"lwexxwl\"}]}") .toObject(ManagedRuleOverride.class); - Assertions.assertEquals("kftutqxlngxlefg", model.ruleId()); + Assertions.assertEquals("hfovvacqpbtu", model.ruleId()); Assertions.assertEquals(ManagedRuleEnabledState.DISABLED, model.enabledState()); - Assertions.assertEquals(ActionType.REDIRECT, model.action()); - Assertions.assertEquals(ManagedRuleExclusionMatchVariable.REQUEST_BODY_POST_ARG_NAMES, + Assertions.assertEquals(ActionType.BLOCK, model.action()); + Assertions.assertEquals(SensitivityType.HIGH, model.sensitivity()); + Assertions.assertEquals(ManagedRuleExclusionMatchVariable.REQUEST_BODY_JSON_ARG_NAMES, model.exclusions().get(0).matchVariable()); - Assertions.assertEquals(ManagedRuleExclusionSelectorMatchOperator.CONTAINS, + Assertions.assertEquals(ManagedRuleExclusionSelectorMatchOperator.STARTS_WITH, model.exclusions().get(0).selectorMatchOperator()); - Assertions.assertEquals("mi", model.exclusions().get(0).selector()); + Assertions.assertEquals("awumuaslzkwrrwo", model.exclusions().get(0).selector()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ManagedRuleOverride model = new ManagedRuleOverride().withRuleId("kftutqxlngxlefg") - .withEnabledState(ManagedRuleEnabledState.DISABLED) - .withAction(ActionType.REDIRECT) - .withExclusions(Arrays.asList( - new ManagedRuleExclusion() - .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_BODY_POST_ARG_NAMES) - .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.CONTAINS) - .withSelector("mi"), - new ManagedRuleExclusion() - .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_BODY_POST_ARG_NAMES) - .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.EQUALS_ANY) - .withSelector("hzrvqd"), - new ManagedRuleExclusion() - .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_BODY_POST_ARG_NAMES) - .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.CONTAINS) - .withSelector("hjybigehoqfbo"), - new ManagedRuleExclusion().withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_HEADER_NAMES) - .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.EQUALS_ANY) - .withSelector("anyktzlcuiywg"))); + ManagedRuleOverride model + = new ManagedRuleOverride().withRuleId("hfovvacqpbtu") + .withEnabledState(ManagedRuleEnabledState.DISABLED) + .withAction(ActionType.BLOCK) + .withSensitivity(SensitivityType.HIGH) + .withExclusions(Arrays.asList(new ManagedRuleExclusion() + .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_BODY_JSON_ARG_NAMES) + .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.STARTS_WITH) + .withSelector("awumuaslzkwrrwo"), + new ManagedRuleExclusion() + .withMatchVariable(ManagedRuleExclusionMatchVariable.QUERY_STRING_ARG_NAMES) + .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.EQUALS) + .withSelector("ucwyhahno"), + new ManagedRuleExclusion().withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_HEADER_NAMES) + .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.STARTS_WITH) + .withSelector("kywuhpsvfuu"), + new ManagedRuleExclusion() + .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_BODY_POST_ARG_NAMES) + .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.CONTAINS) + .withSelector("lwexxwl"))); model = BinaryData.fromObject(model).toObject(ManagedRuleOverride.class); - Assertions.assertEquals("kftutqxlngxlefg", model.ruleId()); + Assertions.assertEquals("hfovvacqpbtu", model.ruleId()); Assertions.assertEquals(ManagedRuleEnabledState.DISABLED, model.enabledState()); - Assertions.assertEquals(ActionType.REDIRECT, model.action()); - Assertions.assertEquals(ManagedRuleExclusionMatchVariable.REQUEST_BODY_POST_ARG_NAMES, + Assertions.assertEquals(ActionType.BLOCK, model.action()); + Assertions.assertEquals(SensitivityType.HIGH, model.sensitivity()); + Assertions.assertEquals(ManagedRuleExclusionMatchVariable.REQUEST_BODY_JSON_ARG_NAMES, model.exclusions().get(0).matchVariable()); - Assertions.assertEquals(ManagedRuleExclusionSelectorMatchOperator.CONTAINS, + Assertions.assertEquals(ManagedRuleExclusionSelectorMatchOperator.STARTS_WITH, model.exclusions().get(0).selectorMatchOperator()); - Assertions.assertEquals("mi", model.exclusions().get(0).selector()); + Assertions.assertEquals("awumuaslzkwrrwo", model.exclusions().get(0).selector()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleSetDefinitionInnerTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleSetDefinitionInnerTests.java index cff90ab78d082..4b28384707b6f 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleSetDefinitionInnerTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleSetDefinitionInnerTests.java @@ -1,43 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.frontdoor.fluent.models.ManagedRuleSetDefinitionInner; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class ManagedRuleSetDefinitionInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedRuleSetDefinitionInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"xhbkuofq\",\"ruleSetId\":\"yk\",\"ruleSetType\":\"enevfyexfwhybci\",\"ruleSetVersion\":\"yvdcsitynnaa\",\"ruleGroups\":[{\"ruleGroupName\":\"tehfiqscjeypvh\",\"description\":\"rkgqhcjrefo\",\"rules\":[{\"ruleId\":\"qsl\",\"defaultState\":\"Disabled\",\"defaultAction\":\"JSChallenge\",\"description\":\"qjpkcattpngjcrc\"},{\"ruleId\":\"sqpjhvmdajvn\",\"defaultState\":\"Enabled\",\"defaultAction\":\"AnomalyScoring\",\"description\":\"e\"},{\"ruleId\":\"noae\",\"defaultState\":\"Enabled\",\"defaultAction\":\"JSChallenge\",\"description\":\"ltrpmopj\"}]},{\"ruleGroupName\":\"matuok\",\"description\":\"fu\",\"rules\":[{\"ruleId\":\"dsfcpkvxodpuoz\",\"defaultState\":\"Enabled\",\"defaultAction\":\"Allow\",\"description\":\"gf\"},{\"ruleId\":\"xbezyiuokktwh\",\"defaultState\":\"Disabled\",\"defaultAction\":\"AnomalyScoring\",\"description\":\"wqsmbsur\"},{\"ruleId\":\"imoryocfsfksym\",\"defaultState\":\"Disabled\",\"defaultAction\":\"Allow\",\"description\":\"i\"}]}]},\"location\":\"uxh\",\"tags\":{\"i\":\"dxorrqnbpoczv\",\"sllr\":\"qrvkdv\"},\"id\":\"vvdfwatkpnpul\",\"name\":\"xxbczwtr\",\"type\":\"wiqzbqjvsovmyo\"}") + "{\"properties\":{\"provisioningState\":\"jvpilguooqja\",\"ruleSetId\":\"d\",\"ruleSetType\":\"gueiookjbsahrtdt\",\"ruleSetVersion\":\"elqacslmot\",\"ruleGroups\":[{\"ruleGroupName\":\"fxof\",\"description\":\"jkgd\",\"rules\":[{\"ruleId\":\"f\",\"defaultState\":\"Enabled\",\"defaultAction\":\"Allow\",\"defaultSensitivity\":\"Low\",\"description\":\"dujtmvcope\",\"paranoiaLevel\":\"PL1\"},{\"ruleId\":\"urbuhhlkyqltq\",\"defaultState\":\"Disabled\",\"defaultAction\":\"Allow\",\"defaultSensitivity\":\"Low\",\"description\":\"ffdjktsysidfvclg\",\"paranoiaLevel\":\"PL1\"},{\"ruleId\":\"uijtkbu\",\"defaultState\":\"Disabled\",\"defaultAction\":\"CAPTCHA\",\"defaultSensitivity\":\"High\",\"description\":\"ayiansharujtji\",\"paranoiaLevel\":\"PL2\"},{\"ruleId\":\"yjqtt\",\"defaultState\":\"Enabled\",\"defaultAction\":\"Allow\",\"defaultSensitivity\":\"High\",\"description\":\"enuygbq\",\"paranoiaLevel\":\"PL3\"}]},{\"ruleGroupName\":\"kewvnqv\",\"description\":\"lguaucm\",\"rules\":[{\"ruleId\":\"nlaxpunjqikcz\",\"defaultState\":\"Enabled\",\"defaultAction\":\"Redirect\",\"defaultSensitivity\":\"High\",\"description\":\"mfcsserx\",\"paranoiaLevel\":\"PL1\"},{\"ruleId\":\"oxhlw\",\"defaultState\":\"Enabled\",\"defaultAction\":\"CAPTCHA\",\"defaultSensitivity\":\"High\",\"description\":\"xypruuuy\",\"paranoiaLevel\":\"PL2\"}]}],\"displayName\":\"r\",\"status\":\"Supported\"},\"location\":\"zoyuelyetndnbf\",\"tags\":{\"jmucftby\":\"gagflnlgmtrwah\",\"usuckzmkwklsno\":\"plrohkpigq\"},\"id\":\"axmqeqal\",\"name\":\"hjnhgwydyynfsvk\",\"type\":\"gbv\"}") .toObject(ManagedRuleSetDefinitionInner.class); - Assertions.assertEquals("uxh", model.location()); - Assertions.assertEquals("dxorrqnbpoczv", model.tags().get("i")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedRuleSetDefinitionInner model = new ManagedRuleSetDefinitionInner().withLocation("uxh") - .withTags(mapOf("i", "dxorrqnbpoczv", "sllr", "qrvkdv")); - model = BinaryData.fromObject(model).toObject(ManagedRuleSetDefinitionInner.class); - Assertions.assertEquals("uxh", model.location()); - Assertions.assertEquals("dxorrqnbpoczv", model.tags().get("i")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("zoyuelyetndnbf", model.location()); + Assertions.assertEquals("gagflnlgmtrwah", model.tags().get("jmucftby")); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleSetDefinitionListTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleSetDefinitionListTests.java index 3b7f5f81378d4..7cff76ddfc1dd 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleSetDefinitionListTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleSetDefinitionListTests.java @@ -1,26 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.frontdoor.models.ManagedRuleSetDefinitionList; +import com.azure.resourcemanager.frontdoor.implementation.models.ManagedRuleSetDefinitionList; import org.junit.jupiter.api.Assertions; public final class ManagedRuleSetDefinitionListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedRuleSetDefinitionList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"x\",\"ruleSetId\":\"qgtz\",\"ruleSetType\":\"pnqbqqwxrjfe\",\"ruleSetVersion\":\"lnwsubisn\",\"ruleGroups\":[{\"ruleGroupName\":\"mngnzscxaqw\",\"description\":\"chcbonqvpkvlrxnj\",\"rules\":[{},{}]},{\"ruleGroupName\":\"ipheoflokeyyien\",\"description\":\"dlwtgrhpdj\",\"rules\":[{},{},{}]},{\"ruleGroupName\":\"asxazjpqyegualhb\",\"description\":\"hejjz\",\"rules\":[{},{},{}]},{\"ruleGroupName\":\"dgwdslfhot\",\"description\":\"cynpwlbjnp\",\"rules\":[{},{}]}]},\"location\":\"ftadehxnltyfs\",\"tags\":{\"nzwdejba\":\"usue\",\"xdn\":\"orxzdmohctbqvud\"},\"id\":\"nvowgujju\",\"name\":\"wdkcglhsl\",\"type\":\"zj\"}],\"nextLink\":\"ggd\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"chnmna\",\"ruleSetId\":\"nxhkxjqi\",\"ruleSetType\":\"rweooxffifhx\",\"ruleSetVersion\":\"snewmozqvbub\",\"ruleGroups\":[{\"ruleGroupName\":\"hsycxhxzgaz\",\"description\":\"abo\",\"rules\":[{},{},{}]},{\"ruleGroupName\":\"fqhppubowsep\",\"description\":\"g\",\"rules\":[{},{},{},{}]},{\"ruleGroupName\":\"herngb\",\"description\":\"juahokqto\",\"rules\":[{},{},{}]},{\"ruleGroupName\":\"xof\",\"description\":\"fphwpnu\",\"rules\":[{},{}]}],\"displayName\":\"wzejywhslw\",\"status\":\"Supported\"},\"location\":\"pllndnp\",\"tags\":{\"tefypococtfjgti\":\"pqafgfugsnnfhy\",\"rmlmuowo\":\"rjvzuyt\"},\"id\":\"bauiropi\",\"name\":\"nszonwpngaj\",\"type\":\"n\"},{\"properties\":{\"provisioningState\":\"jawrtmjfjmyc\",\"ruleSetId\":\"lzhcoxovnekh\",\"ruleSetType\":\"lusfnrdtjxtxrdcq\",\"ruleSetVersion\":\"vidttgepuslvyjt\",\"ruleGroups\":[{\"ruleGroupName\":\"kasizie\",\"description\":\"uughtuqfecjxeyg\",\"rules\":[{},{},{}]},{\"ruleGroupName\":\"uicbuewmrsw\",\"description\":\"lx\",\"rules\":[{},{}]}],\"displayName\":\"wpusxjbaqehg\",\"status\":\"Supported\"},\"location\":\"hzjqatucoige\",\"tags\":{\"g\":\"cnwfepbnwgfmxjg\",\"qbctqha\":\"jbgdlfgtdysnaquf\",\"yjleziunjx\":\"zjrwdkqze\"},\"id\":\"fza\",\"name\":\"tkw\",\"type\":\"eg\"}],\"nextLink\":\"mlbnseq\"}") .toObject(ManagedRuleSetDefinitionList.class); - Assertions.assertEquals("ggd", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedRuleSetDefinitionList model = new ManagedRuleSetDefinitionList().withNextLink("ggd"); - model = BinaryData.fromObject(model).toObject(ManagedRuleSetDefinitionList.class); - Assertions.assertEquals("ggd", model.nextLink()); + Assertions.assertEquals("mlbnseq", model.nextLink()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleSetDefinitionPropertiesTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleSetDefinitionPropertiesTests.java index 6293b4241c335..f0d92ce95aabe 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleSetDefinitionPropertiesTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleSetDefinitionPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -11,13 +11,7 @@ public final class ManagedRuleSetDefinitionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedRuleSetDefinitionProperties model = BinaryData.fromString( - "{\"provisioningState\":\"cspkwlhzdobpxjmf\",\"ruleSetId\":\"vvnchrkcc\",\"ruleSetType\":\"wzjuqk\",\"ruleSetVersion\":\"sa\",\"ruleGroups\":[{\"ruleGroupName\":\"uo\",\"description\":\"skghsauuimj\",\"rules\":[{\"ruleId\":\"eduugi\",\"defaultState\":\"Enabled\",\"defaultAction\":\"Block\",\"description\":\"byao\"},{\"ruleId\":\"e\",\"defaultState\":\"Enabled\",\"defaultAction\":\"Allow\",\"description\":\"clhocohsl\"},{\"ruleId\":\"vleggzfbuhfmvfax\",\"defaultState\":\"Enabled\",\"defaultAction\":\"Allow\",\"description\":\"th\"},{\"ruleId\":\"m\",\"defaultState\":\"Disabled\",\"defaultAction\":\"Block\",\"description\":\"xmzsbbzogg\"}]},{\"ruleGroupName\":\"rxwburv\",\"description\":\"xjnspy\",\"rules\":[{\"ruleId\":\"oenkouknvudwti\",\"defaultState\":\"Enabled\",\"defaultAction\":\"Redirect\",\"description\":\"gkpocipazyxoe\"}]},{\"ruleGroupName\":\"kgjn\",\"description\":\"ucgygevqz\",\"rules\":[{\"ruleId\":\"mrbpizcdrqj\",\"defaultState\":\"Disabled\",\"defaultAction\":\"Allow\",\"description\":\"fyhxde\"}]},{\"ruleGroupName\":\"jzicwifsjt\",\"description\":\"zfbishcbkhaj\",\"rules\":[{\"ruleId\":\"a\",\"defaultState\":\"Disabled\",\"defaultAction\":\"Redirect\",\"description\":\"alpbuxwgipwhon\"},{\"ruleId\":\"kgshwa\",\"defaultState\":\"Enabled\",\"defaultAction\":\"Block\",\"description\":\"injep\"},{\"ruleId\":\"tmryw\",\"defaultState\":\"Enabled\",\"defaultAction\":\"Log\",\"description\":\"tiyqzrnkcqv\"},{\"ruleId\":\"lwh\",\"defaultState\":\"Enabled\",\"defaultAction\":\"Allow\",\"description\":\"hoqqnwvlr\"}]}]}") + "{\"provisioningState\":\"anarfdlpukhpyrne\",\"ruleSetId\":\"jcpeogkhnmg\",\"ruleSetType\":\"ouxddbhfhpfpazj\",\"ruleSetVersion\":\"ywjxh\",\"ruleGroups\":[{\"ruleGroupName\":\"ontacnpq\",\"description\":\"ehtuevrhr\",\"rules\":[{\"ruleId\":\"ogwxhnsduugwb\",\"defaultState\":\"Disabled\",\"defaultAction\":\"JSChallenge\",\"defaultSensitivity\":\"Low\",\"description\":\"fuarenlvhht\",\"paranoiaLevel\":\"PL2\"},{\"ruleId\":\"nafvvkyfedev\",\"defaultState\":\"Disabled\",\"defaultAction\":\"CAPTCHA\",\"defaultSensitivity\":\"Low\",\"description\":\"y\",\"paranoiaLevel\":\"PL4\"}]},{\"ruleGroupName\":\"hminqcymczngnbdx\",\"description\":\"wuninv\",\"rules\":[{\"ruleId\":\"h\",\"defaultState\":\"Disabled\",\"defaultAction\":\"JSChallenge\",\"defaultSensitivity\":\"Low\",\"description\":\"rqctmxxdtdd\",\"paranoiaLevel\":\"PL4\"},{\"ruleId\":\"uytxzvtznapxban\",\"defaultState\":\"Enabled\",\"defaultAction\":\"JSChallenge\",\"defaultSensitivity\":\"Medium\",\"description\":\"ytprwnwvroev\",\"paranoiaLevel\":\"PL3\"}]},{\"ruleGroupName\":\"okrrrouuxv\",\"description\":\"asbcrymodizrx\",\"rules\":[{\"ruleId\":\"d\",\"defaultState\":\"Enabled\",\"defaultAction\":\"Log\",\"defaultSensitivity\":\"Low\",\"description\":\"lmv\",\"paranoiaLevel\":\"PL1\"},{\"ruleId\":\"zopjhbzxliohr\",\"defaultState\":\"Enabled\",\"defaultAction\":\"Block\",\"defaultSensitivity\":\"High\",\"description\":\"ba\",\"paranoiaLevel\":\"PL1\"},{\"ruleId\":\"bnzqcyknapq\",\"defaultState\":\"Enabled\",\"defaultAction\":\"JSChallenge\",\"defaultSensitivity\":\"High\",\"description\":\"zb\",\"paranoiaLevel\":\"PL1\"},{\"ruleId\":\"wgbdvibidmhmwffp\",\"defaultState\":\"Disabled\",\"defaultAction\":\"CAPTCHA\",\"defaultSensitivity\":\"Low\",\"description\":\"kccrrvwey\",\"paranoiaLevel\":\"PL1\"}]},{\"ruleGroupName\":\"yukphaimmoiroq\",\"description\":\"shbraga\",\"rules\":[{\"ruleId\":\"mfsvbpav\",\"defaultState\":\"Disabled\",\"defaultAction\":\"Allow\",\"defaultSensitivity\":\"Medium\",\"description\":\"wnupgahxku\",\"paranoiaLevel\":\"PL4\"},{\"ruleId\":\"caac\",\"defaultState\":\"Disabled\",\"defaultAction\":\"Block\",\"defaultSensitivity\":\"Medium\",\"description\":\"mehqepvufh\",\"paranoiaLevel\":\"PL2\"},{\"ruleId\":\"ewhoqh\",\"defaultState\":\"Disabled\",\"defaultAction\":\"Block\",\"defaultSensitivity\":\"Medium\",\"description\":\"xeaclgsc\",\"paranoiaLevel\":\"PL1\"}]}],\"displayName\":\"mkrsrrmoucsofl\",\"status\":\"Deprecated\"}") .toObject(ManagedRuleSetDefinitionProperties.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedRuleSetDefinitionProperties model = new ManagedRuleSetDefinitionProperties(); - model = BinaryData.fromObject(model).toObject(ManagedRuleSetDefinitionProperties.class); - } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleSetExceptionListTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleSetExceptionListTests.java new file mode 100644 index 0000000000000..53eff3a54ccb9 --- /dev/null +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleSetExceptionListTests.java @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.frontdoor.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.frontdoor.models.ExceptionMatchVariable; +import com.azure.resourcemanager.frontdoor.models.ExceptionSelectorMatchOperator; +import com.azure.resourcemanager.frontdoor.models.ExceptionValueMatchOperator; +import com.azure.resourcemanager.frontdoor.models.ManagedRuleSetException; +import com.azure.resourcemanager.frontdoor.models.ManagedRuleSetExceptionList; +import com.azure.resourcemanager.frontdoor.models.ManagedRuleSetScope; +import com.azure.resourcemanager.frontdoor.models.RuleGroupScope; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ManagedRuleSetExceptionListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ManagedRuleSetExceptionList model = BinaryData.fromString( + "{\"exceptions\":[{\"matchVariable\":\"SocketAddr\",\"selectorMatchOperator\":\"Equals\",\"selector\":\"srzpgepqtybbww\",\"valueMatchOperator\":\"IPMatch\",\"matchValues\":[\"akchzyvlixqnrk\",\"xkjibnxmy\",\"uxswqrntvl\"],\"scopes\":[{\"ruleSetType\":\"jpsttexoq\",\"ruleSetVersion\":\"pwcyyufmhr\",\"ruleGroupScopes\":[{\"ruleGroupName\":\"uwm\"},{\"ruleGroupName\":\"spkcdqzh\"}]},{\"ruleSetType\":\"ctddun\",\"ruleSetVersion\":\"ndy\",\"ruleGroupScopes\":[{\"ruleGroupName\":\"hrqbnjjrcg\"},{\"ruleGroupName\":\"gydcw\"}]}]},{\"matchVariable\":\"SocketAddr\",\"selectorMatchOperator\":\"Equals\",\"selector\":\"mvqqolih\",\"valueMatchOperator\":\"EndsWith\",\"matchValues\":[\"iouaubrjt\",\"oq\",\"fuojrngif\"],\"scopes\":[{\"ruleSetType\":\"z\",\"ruleSetVersion\":\"asccbiui\",\"ruleGroupScopes\":[{\"ruleGroupName\":\"lyjdfqwm\"},{\"ruleGroupName\":\"yoqufdvruz\"}]},{\"ruleSetType\":\"lzo\",\"ruleSetVersion\":\"hpc\",\"ruleGroupScopes\":[{\"ruleGroupName\":\"mdxotngfdgu\"},{\"ruleGroupName\":\"eyzihgrky\"},{\"ruleGroupName\":\"i\"}]},{\"ruleSetType\":\"absnmfpp\",\"ruleSetVersion\":\"ojeevy\",\"ruleGroupScopes\":[{\"ruleGroupName\":\"sgzfczbg\"}]},{\"ruleSetType\":\"mfg\",\"ruleSetVersion\":\"eglqgleohibetn\",\"ruleGroupScopes\":[{\"ruleGroupName\":\"nkrrf\"},{\"ruleGroupName\":\"eeebtijvacv\"},{\"ruleGroupName\":\"mq\"}]}]},{\"matchVariable\":\"SocketAddr\",\"selectorMatchOperator\":\"Equals\",\"selector\":\"lajrnwxacevehj\",\"valueMatchOperator\":\"EqualsAny\",\"matchValues\":[\"xoafgaoqltfae\",\"linmfgv\"],\"scopes\":[{\"ruleSetType\":\"r\",\"ruleSetVersion\":\"gh\",\"ruleGroupScopes\":[{\"ruleGroupName\":\"poqeyhlqh\"}]},{\"ruleSetType\":\"kprlpyznuc\",\"ruleSetVersion\":\"qdsmexiit\",\"ruleGroupScopes\":[{\"ruleGroupName\":\"xtyasiibmiyb\"},{\"ruleGroupName\":\"nustgnljh\"},{\"ruleGroupName\":\"mgixhcmavmqfou\"}]},{\"ruleSetType\":\"or\",\"ruleSetVersion\":\"cgyypro\",\"ruleGroupScopes\":[{\"ruleGroupName\":\"pundmbxhug\"},{\"ruleGroupName\":\"mjkavlgorbmft\"},{\"ruleGroupName\":\"mdtzfjltfvnzc\"}]},{\"ruleSetType\":\"jtotpvopvpbd\",\"ruleSetVersion\":\"zq\",\"ruleGroupScopes\":[{\"ruleGroupName\":\"ihed\"}]}]},{\"matchVariable\":\"SocketAddr\",\"selectorMatchOperator\":\"Equals\",\"selector\":\"hmkyibc\",\"valueMatchOperator\":\"EqualsAny\",\"matchValues\":[\"hsgqc\",\"dhohsdtmcdzsuf\"],\"scopes\":[{\"ruleSetType\":\"hdxbzlm\",\"ruleSetVersion\":\"muapcvhdbevw\",\"ruleGroupScopes\":[{\"ruleGroupName\":\"ey\"},{\"ruleGroupName\":\"ko\"},{\"ruleGroupName\":\"qzinkfkbg\"},{\"ruleGroupName\":\"z\"}]},{\"ruleSetType\":\"owxeqocljmy\",\"ruleSetVersion\":\"vkzqk\",\"ruleGroupScopes\":[{\"ruleGroupName\":\"okbzef\"},{\"ruleGroupName\":\"zrxcczurt\"}]},{\"ruleSetType\":\"e\",\"ruleSetVersion\":\"pqxbkwvzgnzvdf\",\"ruleGroupScopes\":[{\"ruleGroupName\":\"ixz\"}]}]}]}") + .toObject(ManagedRuleSetExceptionList.class); + Assertions.assertEquals(ExceptionMatchVariable.SOCKET_ADDR, model.exceptions().get(0).matchVariable()); + Assertions.assertEquals(ExceptionSelectorMatchOperator.EQUALS, + model.exceptions().get(0).selectorMatchOperator()); + Assertions.assertEquals("srzpgepqtybbww", model.exceptions().get(0).selector()); + Assertions.assertEquals(ExceptionValueMatchOperator.IPMATCH, model.exceptions().get(0).valueMatchOperator()); + Assertions.assertEquals("akchzyvlixqnrk", model.exceptions().get(0).matchValues().get(0)); + Assertions.assertEquals("jpsttexoq", model.exceptions().get(0).scopes().get(0).ruleSetType()); + Assertions.assertEquals("pwcyyufmhr", model.exceptions().get(0).scopes().get(0).ruleSetVersion()); + Assertions.assertEquals("uwm", + model.exceptions().get(0).scopes().get(0).ruleGroupScopes().get(0).ruleGroupName()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ManagedRuleSetExceptionList model = new ManagedRuleSetExceptionList().withExceptions(Arrays.asList( + new ManagedRuleSetException().withMatchVariable(ExceptionMatchVariable.SOCKET_ADDR) + .withSelectorMatchOperator(ExceptionSelectorMatchOperator.EQUALS) + .withSelector("srzpgepqtybbww") + .withValueMatchOperator(ExceptionValueMatchOperator.IPMATCH) + .withMatchValues(Arrays.asList("akchzyvlixqnrk", "xkjibnxmy", "uxswqrntvl")) + .withScopes(Arrays.asList( + new ManagedRuleSetScope().withRuleSetType("jpsttexoq") + .withRuleSetVersion("pwcyyufmhr") + .withRuleGroupScopes(Arrays.asList(new RuleGroupScope().withRuleGroupName("uwm"), + new RuleGroupScope().withRuleGroupName("spkcdqzh"))), + new ManagedRuleSetScope().withRuleSetType("ctddun") + .withRuleSetVersion("ndy") + .withRuleGroupScopes(Arrays.asList(new RuleGroupScope().withRuleGroupName("hrqbnjjrcg"), + new RuleGroupScope().withRuleGroupName("gydcw"))))), + new ManagedRuleSetException().withMatchVariable(ExceptionMatchVariable.SOCKET_ADDR) + .withSelectorMatchOperator(ExceptionSelectorMatchOperator.EQUALS) + .withSelector("mvqqolih") + .withValueMatchOperator(ExceptionValueMatchOperator.ENDS_WITH) + .withMatchValues(Arrays.asList("iouaubrjt", "oq", "fuojrngif")) + .withScopes(Arrays.asList( + new ManagedRuleSetScope().withRuleSetType("z") + .withRuleSetVersion("asccbiui") + .withRuleGroupScopes(Arrays.asList(new RuleGroupScope().withRuleGroupName("lyjdfqwm"), + new RuleGroupScope().withRuleGroupName("yoqufdvruz"))), + new ManagedRuleSetScope().withRuleSetType("lzo") + .withRuleSetVersion("hpc") + .withRuleGroupScopes(Arrays.asList(new RuleGroupScope().withRuleGroupName("mdxotngfdgu"), + new RuleGroupScope().withRuleGroupName("eyzihgrky"), + new RuleGroupScope().withRuleGroupName("i"))), + new ManagedRuleSetScope().withRuleSetType("absnmfpp") + .withRuleSetVersion("ojeevy") + .withRuleGroupScopes(Arrays.asList(new RuleGroupScope().withRuleGroupName("sgzfczbg"))), + new ManagedRuleSetScope().withRuleSetType("mfg") + .withRuleSetVersion("eglqgleohibetn") + .withRuleGroupScopes(Arrays.asList(new RuleGroupScope().withRuleGroupName("nkrrf"), + new RuleGroupScope().withRuleGroupName("eeebtijvacv"), + new RuleGroupScope().withRuleGroupName("mq"))))), + new ManagedRuleSetException().withMatchVariable(ExceptionMatchVariable.SOCKET_ADDR) + .withSelectorMatchOperator(ExceptionSelectorMatchOperator.EQUALS) + .withSelector("lajrnwxacevehj") + .withValueMatchOperator(ExceptionValueMatchOperator.EQUALS_ANY) + .withMatchValues(Arrays.asList("xoafgaoqltfae", "linmfgv")) + .withScopes(Arrays.asList( + new ManagedRuleSetScope().withRuleSetType("r") + .withRuleSetVersion("gh") + .withRuleGroupScopes(Arrays.asList(new RuleGroupScope().withRuleGroupName("poqeyhlqh"))), + new ManagedRuleSetScope().withRuleSetType("kprlpyznuc") + .withRuleSetVersion("qdsmexiit") + .withRuleGroupScopes(Arrays.asList(new RuleGroupScope().withRuleGroupName("xtyasiibmiyb"), + new RuleGroupScope().withRuleGroupName("nustgnljh"), + new RuleGroupScope().withRuleGroupName("mgixhcmavmqfou"))), + new ManagedRuleSetScope().withRuleSetType("or") + .withRuleSetVersion("cgyypro") + .withRuleGroupScopes(Arrays.asList(new RuleGroupScope().withRuleGroupName("pundmbxhug"), + new RuleGroupScope().withRuleGroupName("mjkavlgorbmft"), + new RuleGroupScope().withRuleGroupName("mdtzfjltfvnzc"))), + new ManagedRuleSetScope().withRuleSetType("jtotpvopvpbd") + .withRuleSetVersion("zq") + .withRuleGroupScopes(Arrays.asList(new RuleGroupScope().withRuleGroupName("ihed"))))), + new ManagedRuleSetException().withMatchVariable(ExceptionMatchVariable.SOCKET_ADDR) + .withSelectorMatchOperator(ExceptionSelectorMatchOperator.EQUALS) + .withSelector("hmkyibc") + .withValueMatchOperator(ExceptionValueMatchOperator.EQUALS_ANY) + .withMatchValues(Arrays.asList("hsgqc", "dhohsdtmcdzsuf")) + .withScopes(Arrays.asList( + new ManagedRuleSetScope().withRuleSetType("hdxbzlm") + .withRuleSetVersion("muapcvhdbevw") + .withRuleGroupScopes(Arrays.asList(new RuleGroupScope().withRuleGroupName("ey"), + new RuleGroupScope().withRuleGroupName("ko"), + new RuleGroupScope().withRuleGroupName("qzinkfkbg"), + new RuleGroupScope().withRuleGroupName("z"))), + new ManagedRuleSetScope().withRuleSetType("owxeqocljmy") + .withRuleSetVersion("vkzqk") + .withRuleGroupScopes(Arrays.asList(new RuleGroupScope().withRuleGroupName("okbzef"), + new RuleGroupScope().withRuleGroupName("zrxcczurt"))), + new ManagedRuleSetScope().withRuleSetType("e") + .withRuleSetVersion("pqxbkwvzgnzvdf") + .withRuleGroupScopes(Arrays.asList(new RuleGroupScope().withRuleGroupName("ixz"))))))); + model = BinaryData.fromObject(model).toObject(ManagedRuleSetExceptionList.class); + Assertions.assertEquals(ExceptionMatchVariable.SOCKET_ADDR, model.exceptions().get(0).matchVariable()); + Assertions.assertEquals(ExceptionSelectorMatchOperator.EQUALS, + model.exceptions().get(0).selectorMatchOperator()); + Assertions.assertEquals("srzpgepqtybbww", model.exceptions().get(0).selector()); + Assertions.assertEquals(ExceptionValueMatchOperator.IPMATCH, model.exceptions().get(0).valueMatchOperator()); + Assertions.assertEquals("akchzyvlixqnrk", model.exceptions().get(0).matchValues().get(0)); + Assertions.assertEquals("jpsttexoq", model.exceptions().get(0).scopes().get(0).ruleSetType()); + Assertions.assertEquals("pwcyyufmhr", model.exceptions().get(0).scopes().get(0).ruleSetVersion()); + Assertions.assertEquals("uwm", + model.exceptions().get(0).scopes().get(0).ruleGroupScopes().get(0).ruleGroupName()); + } +} diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleSetExceptionTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleSetExceptionTests.java new file mode 100644 index 0000000000000..167c9dfcde4ef --- /dev/null +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleSetExceptionTests.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.frontdoor.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.frontdoor.models.ExceptionMatchVariable; +import com.azure.resourcemanager.frontdoor.models.ExceptionSelectorMatchOperator; +import com.azure.resourcemanager.frontdoor.models.ExceptionValueMatchOperator; +import com.azure.resourcemanager.frontdoor.models.ManagedRuleSetException; +import com.azure.resourcemanager.frontdoor.models.ManagedRuleSetScope; +import com.azure.resourcemanager.frontdoor.models.RuleGroupScope; +import com.azure.resourcemanager.frontdoor.models.RuleScope; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ManagedRuleSetExceptionTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ManagedRuleSetException model = BinaryData.fromString( + "{\"matchVariable\":\"RequestHeaderNames\",\"selectorMatchOperator\":\"Equals\",\"selector\":\"d\",\"valueMatchOperator\":\"EqualsAny\",\"matchValues\":[\"pqhe\",\"jptmcgsbost\",\"eln\"],\"scopes\":[{\"ruleSetType\":\"atutmzlbiojlvfhr\",\"ruleSetVersion\":\"bpneqvcwwyyurm\",\"ruleGroupScopes\":[{\"ruleGroupName\":\"ppr\",\"ruleScopes\":[{\"ruleId\":\"nmokayzejnhlbk\"},{\"ruleId\":\"bzpcpiljhahzvec\"},{\"ruleId\":\"ndbnwieh\"}]}]}]}") + .toObject(ManagedRuleSetException.class); + Assertions.assertEquals(ExceptionMatchVariable.REQUEST_HEADER_NAMES, model.matchVariable()); + Assertions.assertEquals(ExceptionSelectorMatchOperator.EQUALS, model.selectorMatchOperator()); + Assertions.assertEquals("d", model.selector()); + Assertions.assertEquals(ExceptionValueMatchOperator.EQUALS_ANY, model.valueMatchOperator()); + Assertions.assertEquals("pqhe", model.matchValues().get(0)); + Assertions.assertEquals("atutmzlbiojlvfhr", model.scopes().get(0).ruleSetType()); + Assertions.assertEquals("bpneqvcwwyyurm", model.scopes().get(0).ruleSetVersion()); + Assertions.assertEquals("ppr", model.scopes().get(0).ruleGroupScopes().get(0).ruleGroupName()); + Assertions.assertEquals("nmokayzejnhlbk", + model.scopes().get(0).ruleGroupScopes().get(0).ruleScopes().get(0).ruleId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ManagedRuleSetException model = new ManagedRuleSetException() + .withMatchVariable(ExceptionMatchVariable.REQUEST_HEADER_NAMES) + .withSelectorMatchOperator(ExceptionSelectorMatchOperator.EQUALS) + .withSelector("d") + .withValueMatchOperator(ExceptionValueMatchOperator.EQUALS_ANY) + .withMatchValues(Arrays.asList("pqhe", "jptmcgsbost", "eln")) + .withScopes(Arrays.asList(new ManagedRuleSetScope().withRuleSetType("atutmzlbiojlvfhr") + .withRuleSetVersion("bpneqvcwwyyurm") + .withRuleGroupScopes(Arrays.asList(new RuleGroupScope().withRuleGroupName("ppr") + .withRuleScopes(Arrays.asList(new RuleScope().withRuleId("nmokayzejnhlbk"), + new RuleScope().withRuleId("bzpcpiljhahzvec"), new RuleScope().withRuleId("ndbnwieh"))))))); + model = BinaryData.fromObject(model).toObject(ManagedRuleSetException.class); + Assertions.assertEquals(ExceptionMatchVariable.REQUEST_HEADER_NAMES, model.matchVariable()); + Assertions.assertEquals(ExceptionSelectorMatchOperator.EQUALS, model.selectorMatchOperator()); + Assertions.assertEquals("d", model.selector()); + Assertions.assertEquals(ExceptionValueMatchOperator.EQUALS_ANY, model.valueMatchOperator()); + Assertions.assertEquals("pqhe", model.matchValues().get(0)); + Assertions.assertEquals("atutmzlbiojlvfhr", model.scopes().get(0).ruleSetType()); + Assertions.assertEquals("bpneqvcwwyyurm", model.scopes().get(0).ruleSetVersion()); + Assertions.assertEquals("ppr", model.scopes().get(0).ruleGroupScopes().get(0).ruleGroupName()); + Assertions.assertEquals("nmokayzejnhlbk", + model.scopes().get(0).ruleGroupScopes().get(0).ruleScopes().get(0).ruleId()); + } +} diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleSetListTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleSetListTests.java index 3a811b0964d26..04c8c6624e5ba 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleSetListTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleSetListTests.java @@ -1,10 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.frontdoor.models.ExceptionMatchVariable; +import com.azure.resourcemanager.frontdoor.models.ExceptionSelectorMatchOperator; +import com.azure.resourcemanager.frontdoor.models.ExceptionValueMatchOperator; import com.azure.resourcemanager.frontdoor.models.ManagedRuleExclusion; import com.azure.resourcemanager.frontdoor.models.ManagedRuleExclusionMatchVariable; import com.azure.resourcemanager.frontdoor.models.ManagedRuleExclusionSelectorMatchOperator; @@ -12,7 +15,11 @@ import com.azure.resourcemanager.frontdoor.models.ManagedRuleOverride; import com.azure.resourcemanager.frontdoor.models.ManagedRuleSet; import com.azure.resourcemanager.frontdoor.models.ManagedRuleSetActionType; +import com.azure.resourcemanager.frontdoor.models.ManagedRuleSetException; +import com.azure.resourcemanager.frontdoor.models.ManagedRuleSetExceptionList; import com.azure.resourcemanager.frontdoor.models.ManagedRuleSetList; +import com.azure.resourcemanager.frontdoor.models.ManagedRuleSetScope; +import com.azure.resourcemanager.frontdoor.models.RuleGroupScope; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -20,25 +27,39 @@ public final class ManagedRuleSetListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedRuleSetList model = BinaryData.fromString( - "{\"managedRuleSets\":[{\"ruleSetType\":\"vwmf\",\"ruleSetVersion\":\"atscmd\",\"ruleSetAction\":\"Redirect\",\"exclusions\":[{\"matchVariable\":\"RequestCookieNames\",\"selectorMatchOperator\":\"Equals\",\"selector\":\"uuvmkjozkrwfnd\"}],\"ruleGroupOverrides\":[{\"ruleGroupName\":\"jpslwejd\",\"exclusions\":[{\"matchVariable\":\"RequestBodyJsonArgNames\",\"selectorMatchOperator\":\"Contains\",\"selector\":\"oqpsoa\"},{\"matchVariable\":\"RequestBodyPostArgNames\",\"selectorMatchOperator\":\"Contains\",\"selector\":\"azakl\"},{\"matchVariable\":\"RequestHeaderNames\",\"selectorMatchOperator\":\"Contains\",\"selector\":\"hbcryffdfdosyge\"}],\"rules\":[{\"ruleId\":\"ojakhmsbzjhcrze\"},{\"ruleId\":\"dphlxaolt\"},{\"ruleId\":\"qtrgqjbpfzfsinzg\"},{\"ruleId\":\"f\"}]},{\"ruleGroupName\":\"jrwzox\",\"exclusions\":[{\"matchVariable\":\"QueryStringArgNames\",\"selectorMatchOperator\":\"EndsWith\",\"selector\":\"lluwfzitonpeq\"},{\"matchVariable\":\"RequestCookieNames\",\"selectorMatchOperator\":\"Contains\",\"selector\":\"kjlxofpdvhpf\"}],\"rules\":[{\"ruleId\":\"pini\"},{\"ruleId\":\"mayhuybbkpodepoo\"}]}]},{\"ruleSetType\":\"inuvamiheogn\",\"ruleSetVersion\":\"rxzxtheo\",\"ruleSetAction\":\"Block\",\"exclusions\":[{\"matchVariable\":\"RequestCookieNames\",\"selectorMatchOperator\":\"StartsWith\",\"selector\":\"v\"},{\"matchVariable\":\"QueryStringArgNames\",\"selectorMatchOperator\":\"Contains\",\"selector\":\"qi\"},{\"matchVariable\":\"RequestCookieNames\",\"selectorMatchOperator\":\"Contains\",\"selector\":\"un\"}],\"ruleGroupOverrides\":[{\"ruleGroupName\":\"jzrnf\",\"exclusions\":[{\"matchVariable\":\"RequestCookieNames\",\"selectorMatchOperator\":\"StartsWith\",\"selector\":\"spemvtzfk\"},{\"matchVariable\":\"RequestCookieNames\",\"selectorMatchOperator\":\"Contains\",\"selector\":\"bljofxqeof\"},{\"matchVariable\":\"RequestHeaderNames\",\"selectorMatchOperator\":\"Equals\",\"selector\":\"qjhqjbas\"},{\"matchVariable\":\"QueryStringArgNames\",\"selectorMatchOperator\":\"Equals\",\"selector\":\"mjqulngsn\"}],\"rules\":[{\"ruleId\":\"ybkzgcwr\"},{\"ruleId\":\"clxxwrljdo\"},{\"ruleId\":\"skcqvkocrcjd\"},{\"ruleId\":\"wtnhxbnjbiksqr\"}]},{\"ruleGroupName\":\"lssai\",\"exclusions\":[{\"matchVariable\":\"RequestCookieNames\",\"selectorMatchOperator\":\"Contains\",\"selector\":\"nzl\"}],\"rules\":[{\"ruleId\":\"mppeebvmgxs\"},{\"ruleId\":\"bkyqduu\"}]},{\"ruleGroupName\":\"itcjczdz\",\"exclusions\":[{\"matchVariable\":\"QueryStringArgNames\",\"selectorMatchOperator\":\"EndsWith\",\"selector\":\"krwpdap\"},{\"matchVariable\":\"RequestCookieNames\",\"selectorMatchOperator\":\"EqualsAny\",\"selector\":\"bdkvwrwjf\"}],\"rules\":[{\"ruleId\":\"nhutjeltmrldhugj\"}]},{\"ruleGroupName\":\"zdatqxhocdg\",\"exclusions\":[{\"matchVariable\":\"RequestCookieNames\",\"selectorMatchOperator\":\"Contains\",\"selector\":\"phut\"},{\"matchVariable\":\"RequestBodyJsonArgNames\",\"selectorMatchOperator\":\"EqualsAny\",\"selector\":\"dvkaozw\"},{\"matchVariable\":\"RequestBodyJsonArgNames\",\"selectorMatchOperator\":\"Contains\",\"selector\":\"tyhxhurokft\"}],\"rules\":[{\"ruleId\":\"lniwpwcukjfkgiaw\"},{\"ruleId\":\"klryplwck\"},{\"ruleId\":\"asy\"}]}]}]}") + "{\"managedRuleSets\":[{\"ruleSetType\":\"qsxvmhf\",\"ruleSetVersion\":\"uzjyihsasbhudypo\",\"ruleSetAction\":\"Log\",\"exclusions\":[{\"matchVariable\":\"RequestCookieNames\",\"selectorMatchOperator\":\"Equals\",\"selector\":\"ynsqyrpfoobr\"}],\"ruleGroupOverrides\":[{\"ruleGroupName\":\"y\",\"exclusions\":[{\"matchVariable\":\"RequestBodyJsonArgNames\",\"selectorMatchOperator\":\"EndsWith\",\"selector\":\"gqdnfwqzd\"},{\"matchVariable\":\"QueryStringArgNames\",\"selectorMatchOperator\":\"Contains\",\"selector\":\"ilaxhn\"}],\"rules\":[{\"ruleId\":\"lyvijouwiv\"},{\"ruleId\":\"xoyzunbix\"}]}]}],\"exceptionsList\":{\"exceptions\":[{\"matchVariable\":\"SocketAddr\",\"selectorMatchOperator\":\"Equals\",\"selector\":\"wpgclrcivt\",\"valueMatchOperator\":\"EqualsAny\",\"matchValues\":[\"frkenxpmyyefrp\"],\"scopes\":[{\"ruleSetType\":\"dnqqskawaoqvmmb\",\"ruleSetVersion\":\"pqfrtqlkz\",\"ruleGroupScopes\":[{\"ruleGroupName\":\"nitgvkxlz\"},{\"ruleGroupName\":\"qdrfegcealzxwhc\"},{\"ruleGroupName\":\"nsymoyqhlwigd\"}]},{\"ruleSetType\":\"vbkbxgomf\",\"ruleSetVersion\":\"juwasqvdaeyyguxa\",\"ruleGroupScopes\":[{\"ruleGroupName\":\"qzhzbezkgimsi\"},{\"ruleGroupName\":\"xasicddyvvjskg\"},{\"ruleGroupName\":\"mocwa\"}]},{\"ruleSetType\":\"pqg\",\"ruleSetVersion\":\"tjeaahhvjhh\",\"ruleGroupScopes\":[{\"ruleGroupName\":\"zybbj\"}]},{\"ruleSetType\":\"idjks\",\"ruleSetVersion\":\"xkyxvxevblbj\",\"ruleGroupScopes\":[{\"ruleGroupName\":\"ljlageuaulxu\"},{\"ruleGroupName\":\"smjbnkppxyn\"},{\"ruleGroupName\":\"nlsvxeiz\"}]}]},{\"matchVariable\":\"SocketAddr\",\"selectorMatchOperator\":\"Equals\",\"selector\":\"nsrmffeycx\",\"valueMatchOperator\":\"StartsWith\",\"matchValues\":[\"piymerteea\",\"mx\",\"iekkkzddrtkgdojb\"],\"scopes\":[{\"ruleSetType\":\"vavrefdees\",\"ruleSetVersion\":\"ecuijpxtxs\",\"ruleGroupScopes\":[{\"ruleGroupName\":\"rtujwsawddjibab\"},{\"ruleGroupName\":\"vit\"},{\"ruleGroupName\":\"tvtzeexavoxtfg\"}]}]}]}}") .toObject(ManagedRuleSetList.class); - Assertions.assertEquals("vwmf", model.managedRuleSets().get(0).ruleSetType()); - Assertions.assertEquals("atscmd", model.managedRuleSets().get(0).ruleSetVersion()); - Assertions.assertEquals(ManagedRuleSetActionType.REDIRECT, model.managedRuleSets().get(0).ruleSetAction()); + Assertions.assertEquals("qsxvmhf", model.managedRuleSets().get(0).ruleSetType()); + Assertions.assertEquals("uzjyihsasbhudypo", model.managedRuleSets().get(0).ruleSetVersion()); + Assertions.assertEquals(ManagedRuleSetActionType.LOG, model.managedRuleSets().get(0).ruleSetAction()); Assertions.assertEquals(ManagedRuleExclusionMatchVariable.REQUEST_COOKIE_NAMES, model.managedRuleSets().get(0).exclusions().get(0).matchVariable()); Assertions.assertEquals(ManagedRuleExclusionSelectorMatchOperator.EQUALS, model.managedRuleSets().get(0).exclusions().get(0).selectorMatchOperator()); - Assertions.assertEquals("uuvmkjozkrwfnd", model.managedRuleSets().get(0).exclusions().get(0).selector()); - Assertions.assertEquals("jpslwejd", model.managedRuleSets().get(0).ruleGroupOverrides().get(0).ruleGroupName()); + Assertions.assertEquals("ynsqyrpfoobr", model.managedRuleSets().get(0).exclusions().get(0).selector()); + Assertions.assertEquals("y", model.managedRuleSets().get(0).ruleGroupOverrides().get(0).ruleGroupName()); Assertions.assertEquals(ManagedRuleExclusionMatchVariable.REQUEST_BODY_JSON_ARG_NAMES, model.managedRuleSets().get(0).ruleGroupOverrides().get(0).exclusions().get(0).matchVariable()); - Assertions.assertEquals(ManagedRuleExclusionSelectorMatchOperator.CONTAINS, + Assertions.assertEquals(ManagedRuleExclusionSelectorMatchOperator.ENDS_WITH, model.managedRuleSets().get(0).ruleGroupOverrides().get(0).exclusions().get(0).selectorMatchOperator()); - Assertions.assertEquals("oqpsoa", + Assertions.assertEquals("gqdnfwqzd", model.managedRuleSets().get(0).ruleGroupOverrides().get(0).exclusions().get(0).selector()); - Assertions.assertEquals("ojakhmsbzjhcrze", + Assertions.assertEquals("lyvijouwiv", model.managedRuleSets().get(0).ruleGroupOverrides().get(0).rules().get(0).ruleId()); + Assertions.assertEquals(ExceptionMatchVariable.SOCKET_ADDR, + model.exceptionsList().exceptions().get(0).matchVariable()); + Assertions.assertEquals(ExceptionSelectorMatchOperator.EQUALS, + model.exceptionsList().exceptions().get(0).selectorMatchOperator()); + Assertions.assertEquals("wpgclrcivt", model.exceptionsList().exceptions().get(0).selector()); + Assertions.assertEquals(ExceptionValueMatchOperator.EQUALS_ANY, + model.exceptionsList().exceptions().get(0).valueMatchOperator()); + Assertions.assertEquals("frkenxpmyyefrp", model.exceptionsList().exceptions().get(0).matchValues().get(0)); + Assertions.assertEquals("dnqqskawaoqvmmb", + model.exceptionsList().exceptions().get(0).scopes().get(0).ruleSetType()); + Assertions.assertEquals("pqfrtqlkz", + model.exceptionsList().exceptions().get(0).scopes().get(0).ruleSetVersion()); + Assertions.assertEquals("nitgvkxlz", + model.exceptionsList().exceptions().get(0).scopes().get(0).ruleGroupScopes().get(0).ruleGroupName()); } @org.junit.jupiter.api.Test @@ -48,158 +69,100 @@ public void testSerialize() throws Exception { .withManagedRuleSets( Arrays .asList( - new ManagedRuleSet().withRuleSetType("vwmf") - .withRuleSetVersion("atscmd") - .withRuleSetAction(ManagedRuleSetActionType.REDIRECT) + new ManagedRuleSet().withRuleSetType("qsxvmhf") + .withRuleSetVersion("uzjyihsasbhudypo") + .withRuleSetAction(ManagedRuleSetActionType.LOG) .withExclusions(Arrays.asList(new ManagedRuleExclusion() .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_COOKIE_NAMES) .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.EQUALS) - .withSelector("uuvmkjozkrwfnd"))) - .withRuleGroupOverrides(Arrays.asList( - new ManagedRuleGroupOverride().withRuleGroupName("jpslwejd") - .withExclusions(Arrays.asList( - new ManagedRuleExclusion() - .withMatchVariable( - ManagedRuleExclusionMatchVariable.REQUEST_BODY_JSON_ARG_NAMES) - .withSelectorMatchOperator( - ManagedRuleExclusionSelectorMatchOperator.CONTAINS) - .withSelector("oqpsoa"), - new ManagedRuleExclusion() - .withMatchVariable( - ManagedRuleExclusionMatchVariable.REQUEST_BODY_POST_ARG_NAMES) - .withSelectorMatchOperator( - ManagedRuleExclusionSelectorMatchOperator.CONTAINS) - .withSelector("azakl"), - new ManagedRuleExclusion() - .withMatchVariable( - ManagedRuleExclusionMatchVariable.REQUEST_HEADER_NAMES) - .withSelectorMatchOperator( - ManagedRuleExclusionSelectorMatchOperator.CONTAINS) - .withSelector("hbcryffdfdosyge"))) - .withRules( - Arrays.asList(new ManagedRuleOverride().withRuleId("ojakhmsbzjhcrze"), - new ManagedRuleOverride().withRuleId("dphlxaolt"), - new ManagedRuleOverride() - .withRuleId("qtrgqjbpfzfsinzg"), - new ManagedRuleOverride().withRuleId("f"))), - new ManagedRuleGroupOverride().withRuleGroupName("jrwzox") - .withExclusions(Arrays.asList(new ManagedRuleExclusion() - .withMatchVariable(ManagedRuleExclusionMatchVariable.QUERY_STRING_ARG_NAMES) - .withSelectorMatchOperator( - ManagedRuleExclusionSelectorMatchOperator.ENDS_WITH) - .withSelector("lluwfzitonpeq"), - new ManagedRuleExclusion() - .withMatchVariable( - ManagedRuleExclusionMatchVariable.REQUEST_COOKIE_NAMES) - .withSelectorMatchOperator( - ManagedRuleExclusionSelectorMatchOperator.CONTAINS) - .withSelector("kjlxofpdvhpf"))) - .withRules( - Arrays.asList(new ManagedRuleOverride().withRuleId("pini"), - new ManagedRuleOverride().withRuleId("mayhuybbkpodepoo"))))), - new ManagedRuleSet().withRuleSetType("inuvamiheogn") - .withRuleSetVersion("rxzxtheo") - .withRuleSetAction(ManagedRuleSetActionType.BLOCK) - .withExclusions(Arrays.asList(new ManagedRuleExclusion() - .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_COOKIE_NAMES) - .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.STARTS_WITH) - .withSelector("v"), - new ManagedRuleExclusion() - .withMatchVariable(ManagedRuleExclusionMatchVariable.QUERY_STRING_ARG_NAMES) - .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.CONTAINS) - .withSelector("qi"), - new ManagedRuleExclusion() - .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_COOKIE_NAMES) - .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.CONTAINS) - .withSelector("un"))) + .withSelector("ynsqyrpfoobr"))) .withRuleGroupOverrides(Arrays.asList(new ManagedRuleGroupOverride() - .withRuleGroupName("jzrnf") - .withExclusions(Arrays.asList(new ManagedRuleExclusion() - .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_COOKIE_NAMES) - .withSelectorMatchOperator( - ManagedRuleExclusionSelectorMatchOperator.STARTS_WITH) - .withSelector("spemvtzfk"), + .withRuleGroupName("y") + .withExclusions(Arrays.asList( new ManagedRuleExclusion() - .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_COOKIE_NAMES) + .withMatchVariable( + ManagedRuleExclusionMatchVariable.REQUEST_BODY_JSON_ARG_NAMES) .withSelectorMatchOperator( - ManagedRuleExclusionSelectorMatchOperator.CONTAINS) - .withSelector("bljofxqeof"), - new ManagedRuleExclusion() - .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_HEADER_NAMES) - .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.EQUALS) - .withSelector("qjhqjbas"), + ManagedRuleExclusionSelectorMatchOperator.ENDS_WITH) + .withSelector("gqdnfwqzd"), new ManagedRuleExclusion() .withMatchVariable(ManagedRuleExclusionMatchVariable.QUERY_STRING_ARG_NAMES) - .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.EQUALS) - .withSelector("mjqulngsn"))) - .withRules(Arrays.asList(new ManagedRuleOverride().withRuleId("ybkzgcwr"), - new ManagedRuleOverride().withRuleId("clxxwrljdo"), - new ManagedRuleOverride().withRuleId("skcqvkocrcjd"), - new ManagedRuleOverride().withRuleId("wtnhxbnjbiksqr"))), - new ManagedRuleGroupOverride().withRuleGroupName("lssai") - .withExclusions(Arrays.asList(new ManagedRuleExclusion() - .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_COOKIE_NAMES) .withSelectorMatchOperator( ManagedRuleExclusionSelectorMatchOperator.CONTAINS) - .withSelector("nzl"))) - .withRules( - Arrays.asList(new ManagedRuleOverride().withRuleId("mppeebvmgxs"), - new ManagedRuleOverride().withRuleId("bkyqduu"))), - new ManagedRuleGroupOverride().withRuleGroupName("itcjczdz") - .withExclusions(Arrays.asList(new ManagedRuleExclusion() - .withMatchVariable(ManagedRuleExclusionMatchVariable.QUERY_STRING_ARG_NAMES) - .withSelectorMatchOperator( - ManagedRuleExclusionSelectorMatchOperator.ENDS_WITH) - .withSelector("krwpdap"), - new ManagedRuleExclusion() - .withMatchVariable( - ManagedRuleExclusionMatchVariable.REQUEST_COOKIE_NAMES) - .withSelectorMatchOperator( - ManagedRuleExclusionSelectorMatchOperator.EQUALS_ANY) - .withSelector("bdkvwrwjf"))) - .withRules( - Arrays.asList(new ManagedRuleOverride().withRuleId("nhutjeltmrldhugj"))), - new ManagedRuleGroupOverride().withRuleGroupName("zdatqxhocdg") - .withExclusions(Arrays.asList( - new ManagedRuleExclusion() - .withMatchVariable( - ManagedRuleExclusionMatchVariable.REQUEST_COOKIE_NAMES) - .withSelectorMatchOperator( - ManagedRuleExclusionSelectorMatchOperator.CONTAINS) - .withSelector("phut"), - new ManagedRuleExclusion() - .withMatchVariable( - ManagedRuleExclusionMatchVariable.REQUEST_BODY_JSON_ARG_NAMES) - .withSelectorMatchOperator( - ManagedRuleExclusionSelectorMatchOperator.EQUALS_ANY) - .withSelector("dvkaozw"), - new ManagedRuleExclusion() - .withMatchVariable( - ManagedRuleExclusionMatchVariable.REQUEST_BODY_JSON_ARG_NAMES) - .withSelectorMatchOperator( - ManagedRuleExclusionSelectorMatchOperator.CONTAINS) - .withSelector("tyhxhurokft"))) - .withRules( - Arrays.asList(new ManagedRuleOverride().withRuleId("lniwpwcukjfkgiaw"), - new ManagedRuleOverride().withRuleId("klryplwck"), - new ManagedRuleOverride().withRuleId("asy"))))))); + .withSelector("ilaxhn"))) + .withRules(Arrays.asList(new ManagedRuleOverride().withRuleId("lyvijouwiv"), + new ManagedRuleOverride().withRuleId("xoyzunbix"))))))) + .withExceptionsList(new ManagedRuleSetExceptionList().withExceptions(Arrays.asList( + new ManagedRuleSetException().withMatchVariable(ExceptionMatchVariable.SOCKET_ADDR) + .withSelectorMatchOperator(ExceptionSelectorMatchOperator.EQUALS) + .withSelector("wpgclrcivt") + .withValueMatchOperator(ExceptionValueMatchOperator.EQUALS_ANY) + .withMatchValues(Arrays.asList("frkenxpmyyefrp")) + .withScopes(Arrays.asList( + new ManagedRuleSetScope() + .withRuleSetType("dnqqskawaoqvmmb") + .withRuleSetVersion("pqfrtqlkz") + .withRuleGroupScopes( + Arrays.asList(new RuleGroupScope().withRuleGroupName("nitgvkxlz"), + new RuleGroupScope().withRuleGroupName("qdrfegcealzxwhc"), + new RuleGroupScope().withRuleGroupName("nsymoyqhlwigd"))), + new ManagedRuleSetScope().withRuleSetType("vbkbxgomf") + .withRuleSetVersion("juwasqvdaeyyguxa") + .withRuleGroupScopes( + Arrays.asList(new RuleGroupScope().withRuleGroupName("qzhzbezkgimsi"), + new RuleGroupScope().withRuleGroupName("xasicddyvvjskg"), + new RuleGroupScope().withRuleGroupName("mocwa"))), + new ManagedRuleSetScope().withRuleSetType("pqg") + .withRuleSetVersion("tjeaahhvjhh") + .withRuleGroupScopes(Arrays.asList(new RuleGroupScope().withRuleGroupName("zybbj"))), + new ManagedRuleSetScope().withRuleSetType("idjks") + .withRuleSetVersion("xkyxvxevblbj") + .withRuleGroupScopes( + Arrays.asList(new RuleGroupScope().withRuleGroupName("ljlageuaulxu"), + new RuleGroupScope().withRuleGroupName("smjbnkppxyn"), + new RuleGroupScope().withRuleGroupName("nlsvxeiz"))))), + new ManagedRuleSetException().withMatchVariable(ExceptionMatchVariable.SOCKET_ADDR) + .withSelectorMatchOperator(ExceptionSelectorMatchOperator.EQUALS) + .withSelector("nsrmffeycx") + .withValueMatchOperator(ExceptionValueMatchOperator.STARTS_WITH) + .withMatchValues(Arrays.asList("piymerteea", "mx", "iekkkzddrtkgdojb")) + .withScopes(Arrays.asList(new ManagedRuleSetScope().withRuleSetType("vavrefdees") + .withRuleSetVersion("ecuijpxtxs") + .withRuleGroupScopes( + Arrays.asList(new RuleGroupScope().withRuleGroupName("rtujwsawddjibab"), + new RuleGroupScope().withRuleGroupName("vit"), + new RuleGroupScope().withRuleGroupName("tvtzeexavoxtfg")))))))); model = BinaryData.fromObject(model).toObject(ManagedRuleSetList.class); - Assertions.assertEquals("vwmf", model.managedRuleSets().get(0).ruleSetType()); - Assertions.assertEquals("atscmd", model.managedRuleSets().get(0).ruleSetVersion()); - Assertions.assertEquals(ManagedRuleSetActionType.REDIRECT, model.managedRuleSets().get(0).ruleSetAction()); + Assertions.assertEquals("qsxvmhf", model.managedRuleSets().get(0).ruleSetType()); + Assertions.assertEquals("uzjyihsasbhudypo", model.managedRuleSets().get(0).ruleSetVersion()); + Assertions.assertEquals(ManagedRuleSetActionType.LOG, model.managedRuleSets().get(0).ruleSetAction()); Assertions.assertEquals(ManagedRuleExclusionMatchVariable.REQUEST_COOKIE_NAMES, model.managedRuleSets().get(0).exclusions().get(0).matchVariable()); Assertions.assertEquals(ManagedRuleExclusionSelectorMatchOperator.EQUALS, model.managedRuleSets().get(0).exclusions().get(0).selectorMatchOperator()); - Assertions.assertEquals("uuvmkjozkrwfnd", model.managedRuleSets().get(0).exclusions().get(0).selector()); - Assertions.assertEquals("jpslwejd", model.managedRuleSets().get(0).ruleGroupOverrides().get(0).ruleGroupName()); + Assertions.assertEquals("ynsqyrpfoobr", model.managedRuleSets().get(0).exclusions().get(0).selector()); + Assertions.assertEquals("y", model.managedRuleSets().get(0).ruleGroupOverrides().get(0).ruleGroupName()); Assertions.assertEquals(ManagedRuleExclusionMatchVariable.REQUEST_BODY_JSON_ARG_NAMES, model.managedRuleSets().get(0).ruleGroupOverrides().get(0).exclusions().get(0).matchVariable()); - Assertions.assertEquals(ManagedRuleExclusionSelectorMatchOperator.CONTAINS, + Assertions.assertEquals(ManagedRuleExclusionSelectorMatchOperator.ENDS_WITH, model.managedRuleSets().get(0).ruleGroupOverrides().get(0).exclusions().get(0).selectorMatchOperator()); - Assertions.assertEquals("oqpsoa", + Assertions.assertEquals("gqdnfwqzd", model.managedRuleSets().get(0).ruleGroupOverrides().get(0).exclusions().get(0).selector()); - Assertions.assertEquals("ojakhmsbzjhcrze", + Assertions.assertEquals("lyvijouwiv", model.managedRuleSets().get(0).ruleGroupOverrides().get(0).rules().get(0).ruleId()); + Assertions.assertEquals(ExceptionMatchVariable.SOCKET_ADDR, + model.exceptionsList().exceptions().get(0).matchVariable()); + Assertions.assertEquals(ExceptionSelectorMatchOperator.EQUALS, + model.exceptionsList().exceptions().get(0).selectorMatchOperator()); + Assertions.assertEquals("wpgclrcivt", model.exceptionsList().exceptions().get(0).selector()); + Assertions.assertEquals(ExceptionValueMatchOperator.EQUALS_ANY, + model.exceptionsList().exceptions().get(0).valueMatchOperator()); + Assertions.assertEquals("frkenxpmyyefrp", model.exceptionsList().exceptions().get(0).matchValues().get(0)); + Assertions.assertEquals("dnqqskawaoqvmmb", + model.exceptionsList().exceptions().get(0).scopes().get(0).ruleSetType()); + Assertions.assertEquals("pqfrtqlkz", + model.exceptionsList().exceptions().get(0).scopes().get(0).ruleSetVersion()); + Assertions.assertEquals("nitgvkxlz", + model.exceptionsList().exceptions().get(0).scopes().get(0).ruleGroupScopes().get(0).ruleGroupName()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleSetScopeTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleSetScopeTests.java new file mode 100644 index 0000000000000..926b1b0f9febf --- /dev/null +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleSetScopeTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.frontdoor.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.frontdoor.models.ManagedRuleSetScope; +import com.azure.resourcemanager.frontdoor.models.RuleGroupScope; +import com.azure.resourcemanager.frontdoor.models.RuleScope; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ManagedRuleSetScopeTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ManagedRuleSetScope model = BinaryData.fromString( + "{\"ruleSetType\":\"lewjwiuubwef\",\"ruleSetVersion\":\"sfapaqtferrq\",\"ruleGroupScopes\":[{\"ruleGroupName\":\"jkmfxapjwo\",\"ruleScopes\":[{\"ruleId\":\"nobpudcdabtqwpw\"},{\"ruleId\":\"awbzasqb\"}]}]}") + .toObject(ManagedRuleSetScope.class); + Assertions.assertEquals("lewjwiuubwef", model.ruleSetType()); + Assertions.assertEquals("sfapaqtferrq", model.ruleSetVersion()); + Assertions.assertEquals("jkmfxapjwo", model.ruleGroupScopes().get(0).ruleGroupName()); + Assertions.assertEquals("nobpudcdabtqwpw", model.ruleGroupScopes().get(0).ruleScopes().get(0).ruleId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ManagedRuleSetScope model = new ManagedRuleSetScope().withRuleSetType("lewjwiuubwef") + .withRuleSetVersion("sfapaqtferrq") + .withRuleGroupScopes(Arrays.asList(new RuleGroupScope().withRuleGroupName("jkmfxapjwo") + .withRuleScopes(Arrays.asList(new RuleScope().withRuleId("nobpudcdabtqwpw"), + new RuleScope().withRuleId("awbzasqb"))))); + model = BinaryData.fromObject(model).toObject(ManagedRuleSetScope.class); + Assertions.assertEquals("lewjwiuubwef", model.ruleSetType()); + Assertions.assertEquals("sfapaqtferrq", model.ruleSetVersion()); + Assertions.assertEquals("jkmfxapjwo", model.ruleGroupScopes().get(0).ruleGroupName()); + Assertions.assertEquals("nobpudcdabtqwpw", model.ruleGroupScopes().get(0).ruleScopes().get(0).ruleId()); + } +} diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleSetTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleSetTests.java index 19a7caaac4155..6202c794ed78e 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleSetTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleSetTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -14,6 +14,7 @@ import com.azure.resourcemanager.frontdoor.models.ManagedRuleOverride; import com.azure.resourcemanager.frontdoor.models.ManagedRuleSet; import com.azure.resourcemanager.frontdoor.models.ManagedRuleSetActionType; +import com.azure.resourcemanager.frontdoor.models.SensitivityType; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -21,282 +22,252 @@ public final class ManagedRuleSetTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedRuleSet model = BinaryData.fromString( - "{\"ruleSetType\":\"pnddhsgcbacphejk\",\"ruleSetVersion\":\"tynqgoul\",\"ruleSetAction\":\"Log\",\"exclusions\":[{\"matchVariable\":\"RequestHeaderNames\",\"selectorMatchOperator\":\"EqualsAny\",\"selector\":\"yqkgfg\"}],\"ruleGroupOverrides\":[{\"ruleGroupName\":\"adgakeqsrxybz\",\"exclusions\":[{\"matchVariable\":\"RequestCookieNames\",\"selectorMatchOperator\":\"Contains\",\"selector\":\"ytb\"}],\"rules\":[{\"ruleId\":\"fouflmmnkzsmo\",\"enabledState\":\"Disabled\",\"action\":\"Block\",\"exclusions\":[{\"matchVariable\":\"QueryStringArgNames\",\"selectorMatchOperator\":\"StartsWith\",\"selector\":\"kwtmutduqktapspw\"},{\"matchVariable\":\"QueryStringArgNames\",\"selectorMatchOperator\":\"Contains\",\"selector\":\"ertumkdo\"},{\"matchVariable\":\"RequestBodyPostArgNames\",\"selectorMatchOperator\":\"Equals\",\"selector\":\"whbmd\"}]}]},{\"ruleGroupName\":\"bbjfddgmbmbexp\",\"exclusions\":[{\"matchVariable\":\"QueryStringArgNames\",\"selectorMatchOperator\":\"StartsWith\",\"selector\":\"qrolfpf\"},{\"matchVariable\":\"RequestBodyPostArgNames\",\"selectorMatchOperator\":\"EqualsAny\",\"selector\":\"lgbquxig\"},{\"matchVariable\":\"RequestBodyJsonArgNames\",\"selectorMatchOperator\":\"StartsWith\",\"selector\":\"gzjaoyfhrtxilne\"}],\"rules\":[{\"ruleId\":\"jysvl\",\"enabledState\":\"Enabled\",\"action\":\"Block\",\"exclusions\":[{\"matchVariable\":\"RequestHeaderNames\",\"selectorMatchOperator\":\"EndsWith\",\"selector\":\"lyxwjkcprbnwbx\"},{\"matchVariable\":\"RequestBodyPostArgNames\",\"selectorMatchOperator\":\"EqualsAny\",\"selector\":\"tbvpysszdnru\"}]},{\"ruleId\":\"qguhmuo\",\"enabledState\":\"Disabled\",\"action\":\"Redirect\",\"exclusions\":[{\"matchVariable\":\"RequestHeaderNames\",\"selectorMatchOperator\":\"StartsWith\",\"selector\":\"nguitnwuizgazxu\"}]}]},{\"ruleGroupName\":\"izuckyfihrfidfvz\",\"exclusions\":[{\"matchVariable\":\"RequestBodyJsonArgNames\",\"selectorMatchOperator\":\"EndsWith\",\"selector\":\"tymw\"},{\"matchVariable\":\"RequestHeaderNames\",\"selectorMatchOperator\":\"EqualsAny\",\"selector\":\"kfthwxmntei\"},{\"matchVariable\":\"QueryStringArgNames\",\"selectorMatchOperator\":\"EndsWith\",\"selector\":\"pvkmijcmmxdcuf\"},{\"matchVariable\":\"RequestCookieNames\",\"selectorMatchOperator\":\"StartsWith\",\"selector\":\"rpymzidnsez\"}],\"rules\":[{\"ruleId\":\"bzsgfyccsne\",\"enabledState\":\"Enabled\",\"action\":\"AnomalyScoring\",\"exclusions\":[{\"matchVariable\":\"RequestHeaderNames\",\"selectorMatchOperator\":\"EqualsAny\",\"selector\":\"chboosflnrosf\"},{\"matchVariable\":\"RequestCookieNames\",\"selectorMatchOperator\":\"Equals\",\"selector\":\"eeh\"},{\"matchVariable\":\"RequestBodyPostArgNames\",\"selectorMatchOperator\":\"Contains\",\"selector\":\"ypyqrimzinp\"},{\"matchVariable\":\"RequestBodyJsonArgNames\",\"selectorMatchOperator\":\"EqualsAny\",\"selector\":\"jdkirsoodqx\"}]},{\"ruleId\":\"crmnohjtckwhds\",\"enabledState\":\"Enabled\",\"action\":\"AnomalyScoring\",\"exclusions\":[{\"matchVariable\":\"RequestCookieNames\",\"selectorMatchOperator\":\"StartsWith\",\"selector\":\"sqwpgrjb\"},{\"matchVariable\":\"RequestBodyPostArgNames\",\"selectorMatchOperator\":\"Contains\",\"selector\":\"rcjxvsnbyxqabn\"},{\"matchVariable\":\"QueryStringArgNames\",\"selectorMatchOperator\":\"EqualsAny\",\"selector\":\"pcyshu\"},{\"matchVariable\":\"QueryStringArgNames\",\"selectorMatchOperator\":\"Equals\",\"selector\":\"fblj\"}]},{\"ruleId\":\"gpbtoqcjmklj\",\"enabledState\":\"Disabled\",\"action\":\"Allow\",\"exclusions\":[{\"matchVariable\":\"RequestBodyPostArgNames\",\"selectorMatchOperator\":\"StartsWith\",\"selector\":\"jzyulpk\"},{\"matchVariable\":\"RequestCookieNames\",\"selectorMatchOperator\":\"StartsWith\",\"selector\":\"krlkhbzhfepg\"},{\"matchVariable\":\"QueryStringArgNames\",\"selectorMatchOperator\":\"StartsWith\",\"selector\":\"e\"},{\"matchVariable\":\"RequestBodyPostArgNames\",\"selectorMatchOperator\":\"Equals\",\"selector\":\"ocxscpaierhhbcs\"}]}]},{\"ruleGroupName\":\"l\",\"exclusions\":[{\"matchVariable\":\"RequestHeaderNames\",\"selectorMatchOperator\":\"EndsWith\",\"selector\":\"tjaodxobnb\"},{\"matchVariable\":\"RequestCookieNames\",\"selectorMatchOperator\":\"EndsWith\",\"selector\":\"qp\"}],\"rules\":[{\"ruleId\":\"ajionpimexgstxg\",\"enabledState\":\"Enabled\",\"action\":\"Block\",\"exclusions\":[{\"matchVariable\":\"RequestHeaderNames\",\"selectorMatchOperator\":\"EndsWith\",\"selector\":\"r\"},{\"matchVariable\":\"RequestBodyJsonArgNames\",\"selectorMatchOperator\":\"EndsWith\",\"selector\":\"jwzrl\"}]},{\"ruleId\":\"vmclw\",\"enabledState\":\"Disabled\",\"action\":\"Log\",\"exclusions\":[{\"matchVariable\":\"RequestBodyPostArgNames\",\"selectorMatchOperator\":\"EndsWith\",\"selector\":\"bzaqsqsycbkbfk\"},{\"matchVariable\":\"RequestBodyJsonArgNames\",\"selectorMatchOperator\":\"StartsWith\",\"selector\":\"dkexxppofm\"}]},{\"ruleId\":\"axcfjpgddtocjjx\",\"enabledState\":\"Enabled\",\"action\":\"Allow\",\"exclusions\":[{\"matchVariable\":\"QueryStringArgNames\",\"selectorMatchOperator\":\"EndsWith\",\"selector\":\"dzxibqeojnxqbzvd\"}]}]}]}") + "{\"ruleSetType\":\"ecdmdqbwpy\",\"ruleSetVersion\":\"q\",\"ruleSetAction\":\"Redirect\",\"exclusions\":[{\"matchVariable\":\"RequestHeaderNames\",\"selectorMatchOperator\":\"StartsWith\",\"selector\":\"b\"},{\"matchVariable\":\"RequestCookieNames\",\"selectorMatchOperator\":\"Equals\",\"selector\":\"hxudbxvodht\"},{\"matchVariable\":\"QueryStringArgNames\",\"selectorMatchOperator\":\"Equals\",\"selector\":\"rudhzmmesckdl\"},{\"matchVariable\":\"RequestHeaderNames\",\"selectorMatchOperator\":\"EqualsAny\",\"selector\":\"zrcxfailcfxwmdbo\"}],\"ruleGroupOverrides\":[{\"ruleGroupName\":\"gsftufqobrjlnacg\",\"exclusions\":[{\"matchVariable\":\"QueryStringArgNames\",\"selectorMatchOperator\":\"Contains\",\"selector\":\"hxkizvytnrzv\"},{\"matchVariable\":\"RequestBodyJsonArgNames\",\"selectorMatchOperator\":\"Contains\",\"selector\":\"r\"},{\"matchVariable\":\"RequestCookieNames\",\"selectorMatchOperator\":\"StartsWith\",\"selector\":\"rano\"},{\"matchVariable\":\"RequestBodyJsonArgNames\",\"selectorMatchOperator\":\"Equals\",\"selector\":\"ukkjqnvbroyla\"}],\"rules\":[{\"ruleId\":\"lcdisd\",\"enabledState\":\"Disabled\",\"action\":\"Block\",\"sensitivity\":\"High\",\"exclusions\":[{\"matchVariable\":\"QueryStringArgNames\",\"selectorMatchOperator\":\"StartsWith\",\"selector\":\"whryvycytdcl\"}]},{\"ruleId\":\"gc\",\"enabledState\":\"Disabled\",\"action\":\"Allow\",\"sensitivity\":\"Medium\",\"exclusions\":[{\"matchVariable\":\"RequestBodyPostArgNames\",\"selectorMatchOperator\":\"StartsWith\",\"selector\":\"pdvjdhttzaefedx\"},{\"matchVariable\":\"RequestBodyPostArgNames\",\"selectorMatchOperator\":\"Equals\",\"selector\":\"hrphkmcrjdqn\"},{\"matchVariable\":\"RequestCookieNames\",\"selectorMatchOperator\":\"EndsWith\",\"selector\":\"zpbgtgkylkdg\"}]},{\"ruleId\":\"rjeuut\",\"enabledState\":\"Disabled\",\"action\":\"Allow\",\"sensitivity\":\"Medium\",\"exclusions\":[{\"matchVariable\":\"QueryStringArgNames\",\"selectorMatchOperator\":\"Equals\",\"selector\":\"bwnhhtql\"},{\"matchVariable\":\"QueryStringArgNames\",\"selectorMatchOperator\":\"EqualsAny\",\"selector\":\"gppipifh\"},{\"matchVariable\":\"QueryStringArgNames\",\"selectorMatchOperator\":\"EqualsAny\",\"selector\":\"oajvgcxtxjcs\"},{\"matchVariable\":\"RequestCookieNames\",\"selectorMatchOperator\":\"EndsWith\",\"selector\":\"fidltug\"}]}]},{\"ruleGroupName\":\"resmkssjhoiftxfk\",\"exclusions\":[{\"matchVariable\":\"RequestBodyJsonArgNames\",\"selectorMatchOperator\":\"Contains\",\"selector\":\"rhptilluc\"},{\"matchVariable\":\"RequestBodyJsonArgNames\",\"selectorMatchOperator\":\"Contains\",\"selector\":\"tgdqohmcwsldriz\"},{\"matchVariable\":\"QueryStringArgNames\",\"selectorMatchOperator\":\"Contains\",\"selector\":\"wbralllibphbqzm\"}],\"rules\":[{\"ruleId\":\"kakankjpdnjzhaj\",\"enabledState\":\"Enabled\",\"action\":\"Redirect\",\"sensitivity\":\"Low\",\"exclusions\":[{\"matchVariable\":\"RequestCookieNames\",\"selectorMatchOperator\":\"Contains\",\"selector\":\"primr\"},{\"matchVariable\":\"RequestHeaderNames\",\"selectorMatchOperator\":\"EndsWith\",\"selector\":\"teecjmeislst\"}]}]},{\"ruleGroupName\":\"asylwx\",\"exclusions\":[{\"matchVariable\":\"RequestHeaderNames\",\"selectorMatchOperator\":\"StartsWith\",\"selector\":\"weoohguufuzboyj\"},{\"matchVariable\":\"RequestCookieNames\",\"selectorMatchOperator\":\"EndsWith\",\"selector\":\"wtzolbaemwmdxmeb\"},{\"matchVariable\":\"RequestCookieNames\",\"selectorMatchOperator\":\"Equals\",\"selector\":\"cjpahl\"},{\"matchVariable\":\"RequestHeaderNames\",\"selectorMatchOperator\":\"EndsWith\",\"selector\":\"a\"}],\"rules\":[{\"ruleId\":\"xnmwmqtibxyijddt\",\"enabledState\":\"Disabled\",\"action\":\"CAPTCHA\",\"sensitivity\":\"Medium\",\"exclusions\":[{\"matchVariable\":\"RequestHeaderNames\",\"selectorMatchOperator\":\"EqualsAny\",\"selector\":\"ukm\"},{\"matchVariable\":\"QueryStringArgNames\",\"selectorMatchOperator\":\"StartsWith\",\"selector\":\"eekpndz\"},{\"matchVariable\":\"RequestHeaderNames\",\"selectorMatchOperator\":\"EqualsAny\",\"selector\":\"mudqmeq\"},{\"matchVariable\":\"QueryStringArgNames\",\"selectorMatchOperator\":\"EqualsAny\",\"selector\":\"pibudqwyxebeybpm\"}]},{\"ruleId\":\"znrtffyaqit\",\"enabledState\":\"Disabled\",\"action\":\"Block\",\"sensitivity\":\"Medium\",\"exclusions\":[{\"matchVariable\":\"RequestBodyPostArgNames\",\"selectorMatchOperator\":\"EndsWith\",\"selector\":\"seufuqy\"},{\"matchVariable\":\"QueryStringArgNames\",\"selectorMatchOperator\":\"EqualsAny\",\"selector\":\"dlcgqlsismjqfr\"},{\"matchVariable\":\"RequestBodyJsonArgNames\",\"selectorMatchOperator\":\"Equals\",\"selector\":\"amqu\"}]}]}]}") .toObject(ManagedRuleSet.class); - Assertions.assertEquals("pnddhsgcbacphejk", model.ruleSetType()); - Assertions.assertEquals("tynqgoul", model.ruleSetVersion()); - Assertions.assertEquals(ManagedRuleSetActionType.LOG, model.ruleSetAction()); + Assertions.assertEquals("ecdmdqbwpy", model.ruleSetType()); + Assertions.assertEquals("q", model.ruleSetVersion()); + Assertions.assertEquals(ManagedRuleSetActionType.REDIRECT, model.ruleSetAction()); Assertions.assertEquals(ManagedRuleExclusionMatchVariable.REQUEST_HEADER_NAMES, model.exclusions().get(0).matchVariable()); - Assertions.assertEquals(ManagedRuleExclusionSelectorMatchOperator.EQUALS_ANY, + Assertions.assertEquals(ManagedRuleExclusionSelectorMatchOperator.STARTS_WITH, model.exclusions().get(0).selectorMatchOperator()); - Assertions.assertEquals("yqkgfg", model.exclusions().get(0).selector()); - Assertions.assertEquals("adgakeqsrxybz", model.ruleGroupOverrides().get(0).ruleGroupName()); - Assertions.assertEquals(ManagedRuleExclusionMatchVariable.REQUEST_COOKIE_NAMES, + Assertions.assertEquals("b", model.exclusions().get(0).selector()); + Assertions.assertEquals("gsftufqobrjlnacg", model.ruleGroupOverrides().get(0).ruleGroupName()); + Assertions.assertEquals(ManagedRuleExclusionMatchVariable.QUERY_STRING_ARG_NAMES, model.ruleGroupOverrides().get(0).exclusions().get(0).matchVariable()); Assertions.assertEquals(ManagedRuleExclusionSelectorMatchOperator.CONTAINS, model.ruleGroupOverrides().get(0).exclusions().get(0).selectorMatchOperator()); - Assertions.assertEquals("ytb", model.ruleGroupOverrides().get(0).exclusions().get(0).selector()); - Assertions.assertEquals("fouflmmnkzsmo", model.ruleGroupOverrides().get(0).rules().get(0).ruleId()); + Assertions.assertEquals("hxkizvytnrzv", model.ruleGroupOverrides().get(0).exclusions().get(0).selector()); + Assertions.assertEquals("lcdisd", model.ruleGroupOverrides().get(0).rules().get(0).ruleId()); Assertions.assertEquals(ManagedRuleEnabledState.DISABLED, model.ruleGroupOverrides().get(0).rules().get(0).enabledState()); Assertions.assertEquals(ActionType.BLOCK, model.ruleGroupOverrides().get(0).rules().get(0).action()); + Assertions.assertEquals(SensitivityType.HIGH, model.ruleGroupOverrides().get(0).rules().get(0).sensitivity()); Assertions.assertEquals(ManagedRuleExclusionMatchVariable.QUERY_STRING_ARG_NAMES, model.ruleGroupOverrides().get(0).rules().get(0).exclusions().get(0).matchVariable()); Assertions.assertEquals(ManagedRuleExclusionSelectorMatchOperator.STARTS_WITH, model.ruleGroupOverrides().get(0).rules().get(0).exclusions().get(0).selectorMatchOperator()); - Assertions.assertEquals("kwtmutduqktapspw", + Assertions.assertEquals("whryvycytdcl", model.ruleGroupOverrides().get(0).rules().get(0).exclusions().get(0).selector()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ManagedRuleSet model - = new ManagedRuleSet().withRuleSetType("pnddhsgcbacphejk") - .withRuleSetVersion("tynqgoul") - .withRuleSetAction(ManagedRuleSetActionType.LOG) - .withExclusions(Arrays.asList( - new ManagedRuleExclusion().withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_HEADER_NAMES) - .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.EQUALS_ANY) - .withSelector("yqkgfg"))) - .withRuleGroupOverrides( - Arrays - .asList( - new ManagedRuleGroupOverride().withRuleGroupName("adgakeqsrxybz") - .withExclusions(Arrays.asList(new ManagedRuleExclusion() - .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_COOKIE_NAMES) - .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.CONTAINS) - .withSelector("ytb"))) - .withRules(Arrays.asList(new ManagedRuleOverride().withRuleId("fouflmmnkzsmo") + ManagedRuleSet model = new ManagedRuleSet().withRuleSetType("ecdmdqbwpy") + .withRuleSetVersion("q") + .withRuleSetAction(ManagedRuleSetActionType.REDIRECT) + .withExclusions(Arrays.asList( + new ManagedRuleExclusion().withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_HEADER_NAMES) + .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.STARTS_WITH) + .withSelector("b"), + new ManagedRuleExclusion().withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_COOKIE_NAMES) + .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.EQUALS) + .withSelector("hxudbxvodht"), + new ManagedRuleExclusion().withMatchVariable(ManagedRuleExclusionMatchVariable.QUERY_STRING_ARG_NAMES) + .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.EQUALS) + .withSelector("rudhzmmesckdl"), + new ManagedRuleExclusion().withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_HEADER_NAMES) + .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.EQUALS_ANY) + .withSelector("zrcxfailcfxwmdbo"))) + .withRuleGroupOverrides(Arrays.asList( + new ManagedRuleGroupOverride().withRuleGroupName("gsftufqobrjlnacg") + .withExclusions(Arrays.asList(new ManagedRuleExclusion() + .withMatchVariable(ManagedRuleExclusionMatchVariable.QUERY_STRING_ARG_NAMES) + .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.CONTAINS) + .withSelector("hxkizvytnrzv"), + new ManagedRuleExclusion() + .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_BODY_JSON_ARG_NAMES) + .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.CONTAINS) + .withSelector("r"), + new ManagedRuleExclusion() + .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_COOKIE_NAMES) + .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.STARTS_WITH) + .withSelector("rano"), + new ManagedRuleExclusion() + .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_BODY_JSON_ARG_NAMES) + .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.EQUALS) + .withSelector("ukkjqnvbroyla"))) + .withRules( + Arrays + .asList( + new ManagedRuleOverride().withRuleId("lcdisd") .withEnabledState(ManagedRuleEnabledState.DISABLED) .withAction(ActionType.BLOCK) - .withExclusions(Arrays.asList( - new ManagedRuleExclusion() + .withSensitivity(SensitivityType.HIGH) + .withExclusions( + Arrays.asList(new ManagedRuleExclusion() .withMatchVariable(ManagedRuleExclusionMatchVariable.QUERY_STRING_ARG_NAMES) .withSelectorMatchOperator( ManagedRuleExclusionSelectorMatchOperator.STARTS_WITH) - .withSelector("kwtmutduqktapspw"), + .withSelector("whryvycytdcl"))), + new ManagedRuleOverride().withRuleId("gc") + .withEnabledState(ManagedRuleEnabledState.DISABLED) + .withAction(ActionType.ALLOW) + .withSensitivity(SensitivityType.MEDIUM) + .withExclusions(Arrays.asList( new ManagedRuleExclusion() - .withMatchVariable(ManagedRuleExclusionMatchVariable.QUERY_STRING_ARG_NAMES) + .withMatchVariable( + ManagedRuleExclusionMatchVariable.REQUEST_BODY_POST_ARG_NAMES) .withSelectorMatchOperator( - ManagedRuleExclusionSelectorMatchOperator.CONTAINS) - .withSelector("ertumkdo"), + ManagedRuleExclusionSelectorMatchOperator.STARTS_WITH) + .withSelector("pdvjdhttzaefedx"), new ManagedRuleExclusion() .withMatchVariable( ManagedRuleExclusionMatchVariable.REQUEST_BODY_POST_ARG_NAMES) .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.EQUALS) - .withSelector("whbmd"))))), - new ManagedRuleGroupOverride().withRuleGroupName("bbjfddgmbmbexp") - .withExclusions(Arrays.asList( - new ManagedRuleExclusion() + .withSelector("hrphkmcrjdqn"), + new ManagedRuleExclusion() + .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_COOKIE_NAMES) + .withSelectorMatchOperator( + ManagedRuleExclusionSelectorMatchOperator.ENDS_WITH) + .withSelector("zpbgtgkylkdg"))), + new ManagedRuleOverride().withRuleId("rjeuut") + .withEnabledState(ManagedRuleEnabledState.DISABLED) + .withAction(ActionType.ALLOW) + .withSensitivity(SensitivityType.MEDIUM) + .withExclusions(Arrays.asList(new ManagedRuleExclusion() .withMatchVariable(ManagedRuleExclusionMatchVariable.QUERY_STRING_ARG_NAMES) - .withSelectorMatchOperator( - ManagedRuleExclusionSelectorMatchOperator.STARTS_WITH) - .withSelector("qrolfpf"), - new ManagedRuleExclusion() - .withMatchVariable( - ManagedRuleExclusionMatchVariable.REQUEST_BODY_POST_ARG_NAMES) - .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.EQUALS_ANY) - .withSelector("lgbquxig"), - new ManagedRuleExclusion() - .withMatchVariable( - ManagedRuleExclusionMatchVariable.REQUEST_BODY_JSON_ARG_NAMES) - .withSelectorMatchOperator( - ManagedRuleExclusionSelectorMatchOperator.STARTS_WITH) - .withSelector("gzjaoyfhrtxilne"))) - .withRules(Arrays.asList( - new ManagedRuleOverride().withRuleId("jysvl") - .withEnabledState(ManagedRuleEnabledState.ENABLED) - .withAction(ActionType.BLOCK) - .withExclusions(Arrays.asList(new ManagedRuleExclusion() + .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.EQUALS) + .withSelector("bwnhhtql"), + new ManagedRuleExclusion() + .withMatchVariable(ManagedRuleExclusionMatchVariable.QUERY_STRING_ARG_NAMES) + .withSelectorMatchOperator( + ManagedRuleExclusionSelectorMatchOperator.EQUALS_ANY) + .withSelector("gppipifh"), + new ManagedRuleExclusion() + .withMatchVariable(ManagedRuleExclusionMatchVariable.QUERY_STRING_ARG_NAMES) + .withSelectorMatchOperator( + ManagedRuleExclusionSelectorMatchOperator.EQUALS_ANY) + .withSelector("oajvgcxtxjcs"), + new ManagedRuleExclusion() + .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_COOKIE_NAMES) + .withSelectorMatchOperator( + ManagedRuleExclusionSelectorMatchOperator.ENDS_WITH) + .withSelector("fidltug"))))), + new ManagedRuleGroupOverride().withRuleGroupName("resmkssjhoiftxfk") + .withExclusions(Arrays.asList( + new ManagedRuleExclusion() + .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_BODY_JSON_ARG_NAMES) + .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.CONTAINS) + .withSelector("rhptilluc"), + new ManagedRuleExclusion() + .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_BODY_JSON_ARG_NAMES) + .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.CONTAINS) + .withSelector("tgdqohmcwsldriz"), + new ManagedRuleExclusion() + .withMatchVariable(ManagedRuleExclusionMatchVariable.QUERY_STRING_ARG_NAMES) + .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.CONTAINS) + .withSelector("wbralllibphbqzm"))) + .withRules( + Arrays + .asList( + new ManagedRuleOverride().withRuleId("kakankjpdnjzhaj") + .withEnabledState(ManagedRuleEnabledState.ENABLED) + .withAction(ActionType.REDIRECT) + .withSensitivity(SensitivityType.LOW) + .withExclusions(Arrays.asList( + new ManagedRuleExclusion() + .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_COOKIE_NAMES) + .withSelectorMatchOperator( + ManagedRuleExclusionSelectorMatchOperator.CONTAINS) + .withSelector("primr"), + new ManagedRuleExclusion() .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_HEADER_NAMES) .withSelectorMatchOperator( ManagedRuleExclusionSelectorMatchOperator.ENDS_WITH) - .withSelector("lyxwjkcprbnwbx"), - new ManagedRuleExclusion() - .withMatchVariable( - ManagedRuleExclusionMatchVariable.REQUEST_BODY_POST_ARG_NAMES) - .withSelectorMatchOperator( - ManagedRuleExclusionSelectorMatchOperator.EQUALS_ANY) - .withSelector("tbvpysszdnru"))), - new ManagedRuleOverride().withRuleId("qguhmuo") - .withEnabledState(ManagedRuleEnabledState.DISABLED) - .withAction(ActionType.REDIRECT) - .withExclusions(Arrays.asList(new ManagedRuleExclusion() + .withSelector("teecjmeislst"))))), + new ManagedRuleGroupOverride().withRuleGroupName("asylwx") + .withExclusions(Arrays.asList( + new ManagedRuleExclusion() + .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_HEADER_NAMES) + .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.STARTS_WITH) + .withSelector("weoohguufuzboyj"), + new ManagedRuleExclusion() + .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_COOKIE_NAMES) + .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.ENDS_WITH) + .withSelector("wtzolbaemwmdxmeb"), + new ManagedRuleExclusion() + .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_COOKIE_NAMES) + .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.EQUALS) + .withSelector("cjpahl"), + new ManagedRuleExclusion() + .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_HEADER_NAMES) + .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.ENDS_WITH) + .withSelector("a"))) + .withRules( + Arrays + .asList( + new ManagedRuleOverride().withRuleId("xnmwmqtibxyijddt") + .withEnabledState(ManagedRuleEnabledState.DISABLED) + .withAction(ActionType.CAPTCHA) + .withSensitivity(SensitivityType.MEDIUM) + .withExclusions(Arrays.asList( + new ManagedRuleExclusion() .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_HEADER_NAMES) + .withSelectorMatchOperator( + ManagedRuleExclusionSelectorMatchOperator.EQUALS_ANY) + .withSelector("ukm"), + new ManagedRuleExclusion() + .withMatchVariable(ManagedRuleExclusionMatchVariable.QUERY_STRING_ARG_NAMES) .withSelectorMatchOperator( ManagedRuleExclusionSelectorMatchOperator.STARTS_WITH) - .withSelector("nguitnwuizgazxu"))))), - new ManagedRuleGroupOverride().withRuleGroupName("izuckyfihrfidfvz") - .withExclusions(Arrays.asList(new ManagedRuleExclusion() - .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_BODY_JSON_ARG_NAMES) - .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.ENDS_WITH) - .withSelector("tymw"), - new ManagedRuleExclusion() - .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_HEADER_NAMES) - .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.EQUALS_ANY) - .withSelector("kfthwxmntei"), - new ManagedRuleExclusion() - .withMatchVariable(ManagedRuleExclusionMatchVariable.QUERY_STRING_ARG_NAMES) - .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.ENDS_WITH) - .withSelector("pvkmijcmmxdcuf"), - new ManagedRuleExclusion() - .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_COOKIE_NAMES) - .withSelectorMatchOperator( - ManagedRuleExclusionSelectorMatchOperator.STARTS_WITH) - .withSelector("rpymzidnsez"))) - .withRules(Arrays.asList( - new ManagedRuleOverride().withRuleId("bzsgfyccsne") - .withEnabledState(ManagedRuleEnabledState.ENABLED) - .withAction(ActionType.ANOMALY_SCORING) - .withExclusions(Arrays.asList(new ManagedRuleExclusion() + .withSelector("eekpndz"), + new ManagedRuleExclusion() .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_HEADER_NAMES) .withSelectorMatchOperator( ManagedRuleExclusionSelectorMatchOperator.EQUALS_ANY) - .withSelector("chboosflnrosf"), - new ManagedRuleExclusion() - .withMatchVariable( - ManagedRuleExclusionMatchVariable.REQUEST_COOKIE_NAMES) - .withSelectorMatchOperator( - ManagedRuleExclusionSelectorMatchOperator.EQUALS) - .withSelector("eeh"), - new ManagedRuleExclusion() - .withMatchVariable( - ManagedRuleExclusionMatchVariable.REQUEST_BODY_POST_ARG_NAMES) - .withSelectorMatchOperator( - ManagedRuleExclusionSelectorMatchOperator.CONTAINS) - .withSelector("ypyqrimzinp"), - new ManagedRuleExclusion().withMatchVariable( - ManagedRuleExclusionMatchVariable.REQUEST_BODY_JSON_ARG_NAMES) - .withSelectorMatchOperator( - ManagedRuleExclusionSelectorMatchOperator.EQUALS_ANY) - .withSelector("jdkirsoodqx"))), - new ManagedRuleOverride().withRuleId("crmnohjtckwhds") - .withEnabledState(ManagedRuleEnabledState.ENABLED) - .withAction(ActionType.ANOMALY_SCORING) - .withExclusions(Arrays.asList(new ManagedRuleExclusion() - .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_COOKIE_NAMES) + .withSelector("mudqmeq"), + new ManagedRuleExclusion() + .withMatchVariable(ManagedRuleExclusionMatchVariable.QUERY_STRING_ARG_NAMES) .withSelectorMatchOperator( - ManagedRuleExclusionSelectorMatchOperator.STARTS_WITH) - .withSelector("sqwpgrjb"), - new ManagedRuleExclusion() - .withMatchVariable( - ManagedRuleExclusionMatchVariable.REQUEST_BODY_POST_ARG_NAMES) - .withSelectorMatchOperator( - ManagedRuleExclusionSelectorMatchOperator.CONTAINS) - .withSelector("rcjxvsnbyxqabn"), - new ManagedRuleExclusion() - .withMatchVariable( - ManagedRuleExclusionMatchVariable.QUERY_STRING_ARG_NAMES) - .withSelectorMatchOperator( - ManagedRuleExclusionSelectorMatchOperator.EQUALS_ANY) - .withSelector("pcyshu"), - new ManagedRuleExclusion() - .withMatchVariable( - ManagedRuleExclusionMatchVariable.QUERY_STRING_ARG_NAMES) - .withSelectorMatchOperator( - ManagedRuleExclusionSelectorMatchOperator.EQUALS) - .withSelector("fblj"))), - new ManagedRuleOverride().withRuleId("gpbtoqcjmklj") - .withEnabledState(ManagedRuleEnabledState.DISABLED) - .withAction(ActionType.ALLOW) - .withExclusions(Arrays.asList(new ManagedRuleExclusion() + ManagedRuleExclusionSelectorMatchOperator.EQUALS_ANY) + .withSelector("pibudqwyxebeybpm"))), + new ManagedRuleOverride().withRuleId("znrtffyaqit") + .withEnabledState(ManagedRuleEnabledState.DISABLED) + .withAction(ActionType.BLOCK) + .withSensitivity(SensitivityType.MEDIUM) + .withExclusions(Arrays.asList( + new ManagedRuleExclusion() .withMatchVariable( ManagedRuleExclusionMatchVariable.REQUEST_BODY_POST_ARG_NAMES) .withSelectorMatchOperator( - ManagedRuleExclusionSelectorMatchOperator.STARTS_WITH) - .withSelector("jzyulpk"), - new ManagedRuleExclusion() - .withMatchVariable( - ManagedRuleExclusionMatchVariable.REQUEST_COOKIE_NAMES) - .withSelectorMatchOperator( - ManagedRuleExclusionSelectorMatchOperator.STARTS_WITH) - .withSelector("krlkhbzhfepg"), - new ManagedRuleExclusion() - .withMatchVariable( - ManagedRuleExclusionMatchVariable.QUERY_STRING_ARG_NAMES) - .withSelectorMatchOperator( - ManagedRuleExclusionSelectorMatchOperator.STARTS_WITH) - .withSelector("e"), - new ManagedRuleExclusion() - .withMatchVariable( - ManagedRuleExclusionMatchVariable.REQUEST_BODY_POST_ARG_NAMES) - .withSelectorMatchOperator( - ManagedRuleExclusionSelectorMatchOperator.EQUALS) - .withSelector("ocxscpaierhhbcs"))))), - new ManagedRuleGroupOverride().withRuleGroupName("l") - .withExclusions(Arrays.asList(new ManagedRuleExclusion() - .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_HEADER_NAMES) - .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.ENDS_WITH) - .withSelector("tjaodxobnb"), - new ManagedRuleExclusion() - .withMatchVariable(ManagedRuleExclusionMatchVariable.REQUEST_COOKIE_NAMES) - .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.ENDS_WITH) - .withSelector("qp"))) - .withRules(Arrays.asList( - new ManagedRuleOverride().withRuleId("ajionpimexgstxg") - .withEnabledState(ManagedRuleEnabledState.ENABLED) - .withAction(ActionType.BLOCK) - .withExclusions(Arrays.asList( - new ManagedRuleExclusion() - .withMatchVariable( - ManagedRuleExclusionMatchVariable.REQUEST_HEADER_NAMES) - .withSelectorMatchOperator( - ManagedRuleExclusionSelectorMatchOperator.ENDS_WITH) - .withSelector("r"), - new ManagedRuleExclusion().withMatchVariable( - ManagedRuleExclusionMatchVariable.REQUEST_BODY_JSON_ARG_NAMES) - .withSelectorMatchOperator( - ManagedRuleExclusionSelectorMatchOperator.ENDS_WITH) - .withSelector("jwzrl"))), - new ManagedRuleOverride().withRuleId("vmclw") - .withEnabledState(ManagedRuleEnabledState.DISABLED) - .withAction(ActionType.LOG) - .withExclusions(Arrays.asList( - new ManagedRuleExclusion() - .withMatchVariable( - ManagedRuleExclusionMatchVariable.REQUEST_BODY_POST_ARG_NAMES) - .withSelectorMatchOperator( - ManagedRuleExclusionSelectorMatchOperator.ENDS_WITH) - .withSelector("bzaqsqsycbkbfk"), - new ManagedRuleExclusion() - .withMatchVariable( - ManagedRuleExclusionMatchVariable.REQUEST_BODY_JSON_ARG_NAMES) - .withSelectorMatchOperator( - ManagedRuleExclusionSelectorMatchOperator.STARTS_WITH) - .withSelector("dkexxppofm"))), - new ManagedRuleOverride().withRuleId("axcfjpgddtocjjx") - .withEnabledState(ManagedRuleEnabledState.ENABLED) - .withAction(ActionType.ALLOW) - .withExclusions(Arrays.asList(new ManagedRuleExclusion() + ManagedRuleExclusionSelectorMatchOperator.ENDS_WITH) + .withSelector("seufuqy"), + new ManagedRuleExclusion() .withMatchVariable(ManagedRuleExclusionMatchVariable.QUERY_STRING_ARG_NAMES) .withSelectorMatchOperator( - ManagedRuleExclusionSelectorMatchOperator.ENDS_WITH) - .withSelector("dzxibqeojnxqbzvd"))))))); + ManagedRuleExclusionSelectorMatchOperator.EQUALS_ANY) + .withSelector("dlcgqlsismjqfr"), + new ManagedRuleExclusion() + .withMatchVariable( + ManagedRuleExclusionMatchVariable.REQUEST_BODY_JSON_ARG_NAMES) + .withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator.EQUALS) + .withSelector("amqu"))))))); model = BinaryData.fromObject(model).toObject(ManagedRuleSet.class); - Assertions.assertEquals("pnddhsgcbacphejk", model.ruleSetType()); - Assertions.assertEquals("tynqgoul", model.ruleSetVersion()); - Assertions.assertEquals(ManagedRuleSetActionType.LOG, model.ruleSetAction()); + Assertions.assertEquals("ecdmdqbwpy", model.ruleSetType()); + Assertions.assertEquals("q", model.ruleSetVersion()); + Assertions.assertEquals(ManagedRuleSetActionType.REDIRECT, model.ruleSetAction()); Assertions.assertEquals(ManagedRuleExclusionMatchVariable.REQUEST_HEADER_NAMES, model.exclusions().get(0).matchVariable()); - Assertions.assertEquals(ManagedRuleExclusionSelectorMatchOperator.EQUALS_ANY, + Assertions.assertEquals(ManagedRuleExclusionSelectorMatchOperator.STARTS_WITH, model.exclusions().get(0).selectorMatchOperator()); - Assertions.assertEquals("yqkgfg", model.exclusions().get(0).selector()); - Assertions.assertEquals("adgakeqsrxybz", model.ruleGroupOverrides().get(0).ruleGroupName()); - Assertions.assertEquals(ManagedRuleExclusionMatchVariable.REQUEST_COOKIE_NAMES, + Assertions.assertEquals("b", model.exclusions().get(0).selector()); + Assertions.assertEquals("gsftufqobrjlnacg", model.ruleGroupOverrides().get(0).ruleGroupName()); + Assertions.assertEquals(ManagedRuleExclusionMatchVariable.QUERY_STRING_ARG_NAMES, model.ruleGroupOverrides().get(0).exclusions().get(0).matchVariable()); Assertions.assertEquals(ManagedRuleExclusionSelectorMatchOperator.CONTAINS, model.ruleGroupOverrides().get(0).exclusions().get(0).selectorMatchOperator()); - Assertions.assertEquals("ytb", model.ruleGroupOverrides().get(0).exclusions().get(0).selector()); - Assertions.assertEquals("fouflmmnkzsmo", model.ruleGroupOverrides().get(0).rules().get(0).ruleId()); + Assertions.assertEquals("hxkizvytnrzv", model.ruleGroupOverrides().get(0).exclusions().get(0).selector()); + Assertions.assertEquals("lcdisd", model.ruleGroupOverrides().get(0).rules().get(0).ruleId()); Assertions.assertEquals(ManagedRuleEnabledState.DISABLED, model.ruleGroupOverrides().get(0).rules().get(0).enabledState()); Assertions.assertEquals(ActionType.BLOCK, model.ruleGroupOverrides().get(0).rules().get(0).action()); + Assertions.assertEquals(SensitivityType.HIGH, model.ruleGroupOverrides().get(0).rules().get(0).sensitivity()); Assertions.assertEquals(ManagedRuleExclusionMatchVariable.QUERY_STRING_ARG_NAMES, model.ruleGroupOverrides().get(0).rules().get(0).exclusions().get(0).matchVariable()); Assertions.assertEquals(ManagedRuleExclusionSelectorMatchOperator.STARTS_WITH, model.ruleGroupOverrides().get(0).rules().get(0).exclusions().get(0).selectorMatchOperator()); - Assertions.assertEquals("kwtmutduqktapspw", + Assertions.assertEquals("whryvycytdcl", model.ruleGroupOverrides().get(0).rules().get(0).exclusions().get(0).selector()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleSetsListMockTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleSetsListMockTests.java index 5698db10b51d3..4aeab7a209815 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleSetsListMockTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ManagedRuleSetsListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.frontdoor.FrontDoorManager; import com.azure.resourcemanager.frontdoor.models.ManagedRuleSetDefinition; @@ -22,19 +22,19 @@ public final class ManagedRuleSetsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"vwf\",\"ruleSetId\":\"ayxonsupeujl\",\"ruleSetType\":\"nh\",\"ruleSetVersion\":\"sqltnzo\",\"ruleGroups\":[{\"ruleGroupName\":\"xgnxfyqonmpqoxwd\",\"description\":\"dbxiqx\",\"rules\":[{}]},{\"ruleGroupName\":\"bimhtmwwinhe\",\"description\":\"qpofvwbc\",\"rules\":[{},{}]},{\"ruleGroupName\":\"b\",\"description\":\"bwvqvxkdi\",\"rules\":[{},{}]}]},\"location\":\"heb\",\"tags\":{\"izvcjfe\":\"wbzuwfmdurage\",\"ggbqi\":\"isdju\",\"m\":\"kxkbsazgakgacyr\",\"pv\":\"dmspof\"},\"id\":\"hryl\",\"name\":\"iofrzgbzjedmstk\",\"type\":\"nlvxbcuii\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"lvczu\",\"ruleSetId\":\"ac\",\"ruleSetType\":\"nettepdjxqeskoy\",\"ruleSetVersion\":\"iylpck\",\"ruleGroups\":[{\"ruleGroupName\":\"edveskwxegqp\",\"description\":\"gfnzh\",\"rules\":[{},{}]},{\"ruleGroupName\":\"tsghpbcbcp\",\"description\":\"rpzeqac\",\"rules\":[{},{}]}],\"displayName\":\"zmpypefcpczshnu\",\"status\":\"GA\"},\"location\":\"aizu\",\"tags\":{\"mtvtvegwqiukvzwy\":\"huytuszx\"},\"id\":\"wtthaokgksk\",\"name\":\"i\",\"type\":\"bs\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); FrontDoorManager manager = FrontDoorManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.managedRuleSets().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("heb", response.iterator().next().location()); - Assertions.assertEquals("wbzuwfmdurage", response.iterator().next().tags().get("izvcjfe")); + Assertions.assertEquals("aizu", response.iterator().next().location()); + Assertions.assertEquals("huytuszx", response.iterator().next().tags().get("mtvtvegwqiukvzwy")); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/MatchConditionTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/MatchConditionTests.java index 14508fa786b33..a6fd3ecdbd77e 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/MatchConditionTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/MatchConditionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -16,31 +16,30 @@ public final class MatchConditionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MatchCondition model = BinaryData.fromString( - "{\"matchVariable\":\"PostArgs\",\"selector\":\"jspodmailzyde\",\"operator\":\"Equal\",\"negateCondition\":true,\"matchValue\":[\"ahuxinpm\",\"njaqwixjspro\"],\"transforms\":[\"UrlEncode\",\"RemoveNulls\",\"Trim\",\"RemoveNulls\"]}") + "{\"matchVariable\":\"RemoteAddr\",\"selector\":\"qusrdvetnws\",\"operator\":\"LessThanOrEqual\",\"negateCondition\":true,\"matchValue\":[\"wlduyc\",\"uzhyrmewipmvekdx\",\"kuqgsjjxundxgket\",\"zhhzjhfjmhvvmu\"],\"transforms\":[\"UrlDecode\",\"UrlEncode\"]}") .toObject(MatchCondition.class); - Assertions.assertEquals(MatchVariable.POST_ARGS, model.matchVariable()); - Assertions.assertEquals("jspodmailzyde", model.selector()); - Assertions.assertEquals(Operator.EQUAL, model.operator()); - Assertions.assertEquals(true, model.negateCondition()); - Assertions.assertEquals("ahuxinpm", model.matchValue().get(0)); - Assertions.assertEquals(TransformType.URL_ENCODE, model.transforms().get(0)); + Assertions.assertEquals(MatchVariable.REMOTE_ADDR, model.matchVariable()); + Assertions.assertEquals("qusrdvetnws", model.selector()); + Assertions.assertEquals(Operator.LESS_THAN_OR_EQUAL, model.operator()); + Assertions.assertTrue(model.negateCondition()); + Assertions.assertEquals("wlduyc", model.matchValue().get(0)); + Assertions.assertEquals(TransformType.URL_DECODE, model.transforms().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MatchCondition model = new MatchCondition().withMatchVariable(MatchVariable.POST_ARGS) - .withSelector("jspodmailzyde") - .withOperator(Operator.EQUAL) + MatchCondition model = new MatchCondition().withMatchVariable(MatchVariable.REMOTE_ADDR) + .withSelector("qusrdvetnws") + .withOperator(Operator.LESS_THAN_OR_EQUAL) .withNegateCondition(true) - .withMatchValue(Arrays.asList("ahuxinpm", "njaqwixjspro")) - .withTransforms(Arrays.asList(TransformType.URL_ENCODE, TransformType.REMOVE_NULLS, TransformType.TRIM, - TransformType.REMOVE_NULLS)); + .withMatchValue(Arrays.asList("wlduyc", "uzhyrmewipmvekdx", "kuqgsjjxundxgket", "zhhzjhfjmhvvmu")) + .withTransforms(Arrays.asList(TransformType.URL_DECODE, TransformType.URL_ENCODE)); model = BinaryData.fromObject(model).toObject(MatchCondition.class); - Assertions.assertEquals(MatchVariable.POST_ARGS, model.matchVariable()); - Assertions.assertEquals("jspodmailzyde", model.selector()); - Assertions.assertEquals(Operator.EQUAL, model.operator()); - Assertions.assertEquals(true, model.negateCondition()); - Assertions.assertEquals("ahuxinpm", model.matchValue().get(0)); - Assertions.assertEquals(TransformType.URL_ENCODE, model.transforms().get(0)); + Assertions.assertEquals(MatchVariable.REMOTE_ADDR, model.matchVariable()); + Assertions.assertEquals("qusrdvetnws", model.selector()); + Assertions.assertEquals(Operator.LESS_THAN_OR_EQUAL, model.operator()); + Assertions.assertTrue(model.negateCondition()); + Assertions.assertEquals("wlduyc", model.matchValue().get(0)); + Assertions.assertEquals(TransformType.URL_DECODE, model.transforms().get(0)); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesCreateOrUpdateMockTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesCreateOrUpdateMockTests.java index b81eff3094b56..6bd451321bbed 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesCreateOrUpdateMockTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesCreateOrUpdateMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.frontdoor.FrontDoorManager; import com.azure.resourcemanager.frontdoor.models.Profile; @@ -24,27 +24,27 @@ public final class NetworkExperimentProfilesCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"resourceState\":\"Enabling\",\"enabledState\":\"Disabled\"},\"etag\":\"no\",\"location\":\"pziuwfbzkkdtnh\",\"tags\":{\"pkpbafvafhlbylcc\":\"cljse\",\"fwrsofpltdbmair\":\"evxrhyz\",\"pqigtuujwouhd\":\"hvhfnracw\",\"bvitvqkjya\":\"wsigrbjbxsj\"},\"id\":\"nu\",\"name\":\"tggmuwdchozfnkfe\",\"type\":\"lv\"}"; + = "{\"properties\":{\"resourceState\":\"Disabled\",\"enabledState\":\"Disabled\"},\"etag\":\"kivy\",\"id\":\"rl\",\"name\":\"zji\",\"type\":\"qfhefkwabsol\",\"location\":\"nqqlmgnl\",\"tags\":{\"uqbo\":\"jxtelexh\",\"cnn\":\"oolzqocarkuzl\"}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); FrontDoorManager manager = FrontDoorManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Profile response = manager.networkExperimentProfiles() - .define("bfw") - .withRegion("jwwviy") - .withExistingResourceGroup("rzx") - .withTags(mapOf("jxsqwjhqkbiwetp", "suhbrnn")) - .withEtag("xkrplbjaz") - .withEnabledState(State.ENABLED) + .define("iihjriybmrzo") + .withExistingResourceGroup("wvpsoz") + .withRegion("sbede") + .withTags(mapOf("nul", "xkxbhxvu", "ajsvk", "mnhjevdyzn")) + .withEtag("wnjkgvfn") + .withEnabledState(State.DISABLED) .create(); - Assertions.assertEquals("pziuwfbzkkdtnh", response.location()); - Assertions.assertEquals("cljse", response.tags().get("pkpbafvafhlbylcc")); - Assertions.assertEquals("no", response.etag()); + Assertions.assertEquals("nqqlmgnl", response.location()); + Assertions.assertEquals("jxtelexh", response.tags().get("uqbo")); + Assertions.assertEquals("kivy", response.etag()); Assertions.assertEquals(State.DISABLED, response.enabledState()); } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesDeleteMockTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesDeleteMockTests.java index d68f0abce7234..d70d80ded2773 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesDeleteMockTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesDeleteMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.frontdoor.FrontDoorManager; import java.nio.charset.StandardCharsets; @@ -25,9 +25,9 @@ public void testDelete() throws Exception { FrontDoorManager manager = FrontDoorManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.networkExperimentProfiles().delete("yay", "mmfz", com.azure.core.util.Context.NONE); + manager.networkExperimentProfiles().delete("jjzakzwjiqullqx", "dmvr", com.azure.core.util.Context.NONE); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesGetByResourceGroupWithResponseMockTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesGetByResourceGroupWithResponseMockTests.java index e98163e82cdce..55725b7319656 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesGetByResourceGroupWithResponseMockTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesGetByResourceGroupWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.frontdoor.FrontDoorManager; import com.azure.resourcemanager.frontdoor.models.Profile; @@ -22,22 +22,22 @@ public final class NetworkExperimentProfilesGetByResourceGroupWithResponseMockTe @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"resourceState\":\"Deleting\",\"enabledState\":\"Enabled\"},\"etag\":\"g\",\"location\":\"knlejjjkxybwfd\",\"tags\":{\"nsxfwu\":\"bztensvkzykjtj\",\"bpkuwxeoio\":\"hcdpkupnqrmgj\"},\"id\":\"fiz\",\"name\":\"av\",\"type\":\"jzwfb\"}"; + = "{\"properties\":{\"resourceState\":\"Deleting\",\"enabledState\":\"Enabled\"},\"etag\":\"e\",\"id\":\"uoqujlyeg\",\"name\":\"vn\",\"type\":\"flqqbtnyjpylxd\",\"location\":\"vabm\",\"tags\":{\"lwuhvajmailfe\":\"xbaevwjcnkot\"}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); FrontDoorManager manager = FrontDoorManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Profile response = manager.networkExperimentProfiles() - .getByResourceGroupWithResponse("eeksnbksdqhjvyk", "xeslkhhustcpoqm", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("ubyzn", "lkfk", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("knlejjjkxybwfd", response.location()); - Assertions.assertEquals("bztensvkzykjtj", response.tags().get("nsxfwu")); - Assertions.assertEquals("g", response.etag()); + Assertions.assertEquals("vabm", response.location()); + Assertions.assertEquals("xbaevwjcnkot", response.tags().get("lwuhvajmailfe")); + Assertions.assertEquals("e", response.etag()); Assertions.assertEquals(State.ENABLED, response.enabledState()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesListByResourceGroupMockTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesListByResourceGroupMockTests.java index 83c8166fb23ea..6d7e061943740 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesListByResourceGroupMockTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesListByResourceGroupMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.frontdoor.FrontDoorManager; import com.azure.resourcemanager.frontdoor.models.Profile; @@ -23,21 +23,21 @@ public final class NetworkExperimentProfilesListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"resourceState\":\"Disabling\",\"enabledState\":\"Disabled\"},\"etag\":\"dorvvmqfloy\",\"location\":\"bdgwumgxdgd\",\"tags\":{\"xjd\":\"bgd\",\"wllcolsr\":\"vjsaqwotm\"},\"id\":\"xaptefhexcgjok\",\"name\":\"ljnhvlqj\",\"type\":\"ek\"}]}"; + = "{\"value\":[{\"properties\":{\"resourceState\":\"Disabling\",\"enabledState\":\"Disabled\"},\"etag\":\"nyeofltfnnxrk\",\"id\":\"jfynnfmuiiirip\",\"name\":\"hykfkxbb\",\"type\":\"r\",\"location\":\"iutgnjizbeewoiy\",\"tags\":{\"rsrziuctix\":\"zbju\",\"vka\":\"bdsuifr\",\"qjm\":\"pezkis\"}}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); FrontDoorManager manager = FrontDoorManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response = manager.networkExperimentProfiles() - .listByResourceGroup("gkkileplkcsmkn", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.networkExperimentProfiles().listByResourceGroup("cm", com.azure.core.util.Context.NONE); - Assertions.assertEquals("bdgwumgxdgd", response.iterator().next().location()); - Assertions.assertEquals("bgd", response.iterator().next().tags().get("xjd")); - Assertions.assertEquals("dorvvmqfloy", response.iterator().next().etag()); + Assertions.assertEquals("iutgnjizbeewoiy", response.iterator().next().location()); + Assertions.assertEquals("zbju", response.iterator().next().tags().get("rsrziuctix")); + Assertions.assertEquals("nyeofltfnnxrk", response.iterator().next().etag()); Assertions.assertEquals(State.DISABLED, response.iterator().next().enabledState()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesListMockTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesListMockTests.java index 8cb6dd06867b3..6c42352cca37a 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesListMockTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/NetworkExperimentProfilesListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.frontdoor.FrontDoorManager; import com.azure.resourcemanager.frontdoor.models.Profile; @@ -23,20 +23,20 @@ public final class NetworkExperimentProfilesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"resourceState\":\"Creating\",\"enabledState\":\"Disabled\"},\"etag\":\"dnwqapfg\",\"location\":\"dpcve\",\"tags\":{\"ekvalblhtjq\":\"zhhkuuipldqqc\",\"eh\":\"qyv\",\"mxhzzysevus\":\"a\",\"yzatvfuzkaft\":\"ivzrrryveimipsk\"},\"id\":\"vvruxwi\",\"name\":\"syeipqd\",\"type\":\"mjtgrqg\"}]}"; + = "{\"value\":[{\"properties\":{\"resourceState\":\"Disabling\",\"enabledState\":\"Disabled\"},\"etag\":\"ry\",\"id\":\"ufptb\",\"name\":\"z\",\"type\":\"ciuiyqvldaswv\",\"location\":\"i\",\"tags\":{\"fsrhkhgsnxu\":\"zlgcndhzxrrf\",\"xlb\":\"wkpphefsb\",\"wpfsuqtaaz\":\"xomeikjclwzacn\",\"ezxlhdjzqdca\":\"qbxyxoyfpuqqi\"}}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); FrontDoorManager manager = FrontDoorManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.networkExperimentProfiles().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("dpcve", response.iterator().next().location()); - Assertions.assertEquals("zhhkuuipldqqc", response.iterator().next().tags().get("ekvalblhtjq")); - Assertions.assertEquals("dnwqapfg", response.iterator().next().etag()); + Assertions.assertEquals("i", response.iterator().next().location()); + Assertions.assertEquals("zlgcndhzxrrf", response.iterator().next().tags().get("fsrhkhgsnxu")); + Assertions.assertEquals("ry", response.iterator().next().etag()); Assertions.assertEquals(State.DISABLED, response.iterator().next().enabledState()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/PoliciesDeleteMockTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/PoliciesDeleteMockTests.java index 1a11d1f5ef8d6..363e0bd27b009 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/PoliciesDeleteMockTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/PoliciesDeleteMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.frontdoor.FrontDoorManager; import java.nio.charset.StandardCharsets; @@ -25,9 +25,9 @@ public void testDelete() throws Exception { FrontDoorManager manager = FrontDoorManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.policies().delete("haivm", "yasflvgsgzwy", com.azure.core.util.Context.NONE); + manager.policies().delete("rzzihvwypus", "vjslczwcii", com.azure.core.util.Context.NONE); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/PolicySettingsLogScrubbingTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/PolicySettingsLogScrubbingTests.java index 1e4f7dfaad814..26d51c49ace4f 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/PolicySettingsLogScrubbingTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/PolicySettingsLogScrubbingTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -18,14 +18,14 @@ public final class PolicySettingsLogScrubbingTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PolicySettingsLogScrubbing model = BinaryData.fromString( - "{\"state\":\"Enabled\",\"scrubbingRules\":[{\"matchVariable\":\"RequestUri\",\"selectorMatchOperator\":\"EqualsAny\",\"selector\":\"ybqsoqijg\",\"state\":\"Disabled\"},{\"matchVariable\":\"RequestUri\",\"selectorMatchOperator\":\"Equals\",\"selector\":\"zlobcufpd\",\"state\":\"Enabled\"}]}") + "{\"state\":\"Enabled\",\"scrubbingRules\":[{\"matchVariable\":\"QueryStringArgNames\",\"selectorMatchOperator\":\"EqualsAny\",\"selector\":\"vqagtltdhlf\",\"state\":\"Disabled\"}]}") .toObject(PolicySettingsLogScrubbing.class); Assertions.assertEquals(WebApplicationFirewallScrubbingState.ENABLED, model.state()); - Assertions.assertEquals(ScrubbingRuleEntryMatchVariable.REQUEST_URI, + Assertions.assertEquals(ScrubbingRuleEntryMatchVariable.QUERY_STRING_ARG_NAMES, model.scrubbingRules().get(0).matchVariable()); Assertions.assertEquals(ScrubbingRuleEntryMatchOperator.EQUALS_ANY, model.scrubbingRules().get(0).selectorMatchOperator()); - Assertions.assertEquals("ybqsoqijg", model.scrubbingRules().get(0).selector()); + Assertions.assertEquals("vqagtltdhlf", model.scrubbingRules().get(0).selector()); Assertions.assertEquals(ScrubbingRuleEntryState.DISABLED, model.scrubbingRules().get(0).state()); } @@ -33,24 +33,18 @@ public void testDeserialize() throws Exception { public void testSerialize() throws Exception { PolicySettingsLogScrubbing model = new PolicySettingsLogScrubbing().withState(WebApplicationFirewallScrubbingState.ENABLED) - .withScrubbingRules(Arrays.asList( - new WebApplicationFirewallScrubbingRules() - .withMatchVariable(ScrubbingRuleEntryMatchVariable.REQUEST_URI) - .withSelectorMatchOperator(ScrubbingRuleEntryMatchOperator.EQUALS_ANY) - .withSelector("ybqsoqijg") - .withState(ScrubbingRuleEntryState.DISABLED), - new WebApplicationFirewallScrubbingRules() - .withMatchVariable(ScrubbingRuleEntryMatchVariable.REQUEST_URI) - .withSelectorMatchOperator(ScrubbingRuleEntryMatchOperator.EQUALS) - .withSelector("zlobcufpd") - .withState(ScrubbingRuleEntryState.ENABLED))); + .withScrubbingRules(Arrays.asList(new WebApplicationFirewallScrubbingRules() + .withMatchVariable(ScrubbingRuleEntryMatchVariable.QUERY_STRING_ARG_NAMES) + .withSelectorMatchOperator(ScrubbingRuleEntryMatchOperator.EQUALS_ANY) + .withSelector("vqagtltdhlf") + .withState(ScrubbingRuleEntryState.DISABLED))); model = BinaryData.fromObject(model).toObject(PolicySettingsLogScrubbing.class); Assertions.assertEquals(WebApplicationFirewallScrubbingState.ENABLED, model.state()); - Assertions.assertEquals(ScrubbingRuleEntryMatchVariable.REQUEST_URI, + Assertions.assertEquals(ScrubbingRuleEntryMatchVariable.QUERY_STRING_ARG_NAMES, model.scrubbingRules().get(0).matchVariable()); Assertions.assertEquals(ScrubbingRuleEntryMatchOperator.EQUALS_ANY, model.scrubbingRules().get(0).selectorMatchOperator()); - Assertions.assertEquals("ybqsoqijg", model.scrubbingRules().get(0).selector()); + Assertions.assertEquals("vqagtltdhlf", model.scrubbingRules().get(0).selector()); Assertions.assertEquals(ScrubbingRuleEntryState.DISABLED, model.scrubbingRules().get(0).state()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/PreconfiguredEndpointInnerTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/PreconfiguredEndpointInnerTests.java index ef5b2f8a1f197..aec91bbc6f260 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/PreconfiguredEndpointInnerTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/PreconfiguredEndpointInnerTests.java @@ -1,56 +1,25 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.frontdoor.fluent.models.PreconfiguredEndpointInner; import com.azure.resourcemanager.frontdoor.models.EndpointType; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class PreconfiguredEndpointInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PreconfiguredEndpointInner model = BinaryData.fromString( - "{\"properties\":{\"description\":\"zrcxfailcfxwmdbo\",\"endpoint\":\"fgsftufqob\",\"endpointType\":\"AzureRegion\",\"backend\":\"acgcckknhx\"},\"location\":\"izvy\",\"tags\":{\"aaeranokqgukk\":\"zvulj\",\"oylaxxul\":\"qnvb\"},\"id\":\"disdosfjbjsvgj\",\"name\":\"whryvycytdcl\",\"type\":\"gc\"}") + "{\"properties\":{\"description\":\"ozihmipgawt\",\"endpoint\":\"pkyjcxcjxgrytfm\",\"endpointType\":\"ATM\",\"backend\":\"ilrmcaykggnox\"},\"id\":\"t\",\"name\":\"sxwpndfcpfnznthj\",\"type\":\"kjaosrxuzv\",\"location\":\"mktcqiosmgbza\",\"tags\":{\"laprlt\":\"qdlyrtl\",\"nnbsoqeqa\":\"katbhjm\",\"febwlnbmhyreeudz\":\"arvlagunbt\",\"pdqmjxlyyzglgouw\":\"av\"}}") .toObject(PreconfiguredEndpointInner.class); - Assertions.assertEquals("izvy", model.location()); - Assertions.assertEquals("zvulj", model.tags().get("aaeranokqgukk")); - Assertions.assertEquals("zrcxfailcfxwmdbo", model.description()); - Assertions.assertEquals("fgsftufqob", model.endpoint()); - Assertions.assertEquals(EndpointType.AZURE_REGION, model.endpointType()); - Assertions.assertEquals("acgcckknhx", model.backend()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PreconfiguredEndpointInner model = new PreconfiguredEndpointInner().withLocation("izvy") - .withTags(mapOf("aaeranokqgukk", "zvulj", "oylaxxul", "qnvb")) - .withDescription("zrcxfailcfxwmdbo") - .withEndpoint("fgsftufqob") - .withEndpointType(EndpointType.AZURE_REGION) - .withBackend("acgcckknhx"); - model = BinaryData.fromObject(model).toObject(PreconfiguredEndpointInner.class); - Assertions.assertEquals("izvy", model.location()); - Assertions.assertEquals("zvulj", model.tags().get("aaeranokqgukk")); - Assertions.assertEquals("zrcxfailcfxwmdbo", model.description()); - Assertions.assertEquals("fgsftufqob", model.endpoint()); - Assertions.assertEquals(EndpointType.AZURE_REGION, model.endpointType()); - Assertions.assertEquals("acgcckknhx", model.backend()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("mktcqiosmgbza", model.location()); + Assertions.assertEquals("qdlyrtl", model.tags().get("laprlt")); + Assertions.assertEquals("ozihmipgawt", model.description()); + Assertions.assertEquals("pkyjcxcjxgrytfm", model.endpoint()); + Assertions.assertEquals(EndpointType.ATM, model.endpointType()); + Assertions.assertEquals("ilrmcaykggnox", model.backend()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/PreconfiguredEndpointListTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/PreconfiguredEndpointListTests.java index 45fa4935a8e90..dc4d8580f1fc9 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/PreconfiguredEndpointListTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/PreconfiguredEndpointListTests.java @@ -1,26 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.frontdoor.models.PreconfiguredEndpointList; +import com.azure.resourcemanager.frontdoor.implementation.models.PreconfiguredEndpointList; import org.junit.jupiter.api.Assertions; public final class PreconfiguredEndpointListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PreconfiguredEndpointList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"description\":\"zhzbezkgimsi\",\"endpoint\":\"asi\",\"endpointType\":\"ATM\",\"backend\":\"vvjskgfmocwahp\"},\"location\":\"gat\",\"tags\":{\"zybbj\":\"ahhvjhhna\"},\"id\":\"idjks\",\"name\":\"xkyxvxevblbj\",\"type\":\"dnlj\"},{\"properties\":{\"description\":\"euaulxu\",\"endpoint\":\"mjbnk\",\"endpointType\":\"AzureRegion\",\"backend\":\"nenlsvxeizzg\"},\"location\":\"klnsrmffey\",\"tags\":{\"ymerteeammxq\":\"ktp\"},\"id\":\"ekkkzd\",\"name\":\"rtkgdojbmxvavref\",\"type\":\"eesvecu\"},{\"properties\":{\"description\":\"xtxsuwprtujw\",\"endpoint\":\"wddji\",\"endpointType\":\"AFD\",\"backend\":\"vit\"},\"location\":\"tvtzeexavoxtfg\",\"tags\":{\"pypqtgsfj\":\"dmdqb\"},\"id\":\"cbslhhx\",\"name\":\"db\",\"type\":\"vodhtn\"}],\"nextLink\":\"rudhzmmesckdl\"}") + "{\"value\":[{\"properties\":{\"description\":\"zfylsg\",\"endpoint\":\"pfbcunezzcez\",\"endpointType\":\"CDN\",\"backend\":\"yfwlwxjwet\"},\"id\":\"sihclafzvaylp\",\"name\":\"sqqw\",\"type\":\"cmwqkchcxwa\",\"location\":\"ewzjkjexfd\",\"tags\":{\"bffmbmxz\":\"hpsylkksh\",\"jx\":\"rgywwp\",\"gaao\":\"nptfujgi\",\"wemxswvruunzz\":\"pttaqutd\"}},{\"properties\":{\"description\":\"hkfkimrtixokf\",\"endpoint\":\"yinljqe\",\"endpointType\":\"CDN\",\"backend\":\"ixmonstshiyxg\"},\"id\":\"lfcldu\",\"name\":\"birdsvuwcobiegs\",\"type\":\"ninwjizc\",\"location\":\"nghgshej\",\"tags\":{\"xlxqzvn\":\"xqmul\",\"mikzeb\":\"rsbycucrwn\"}},{\"properties\":{\"description\":\"smswziqgfuh\",\"endpoint\":\"zruswh\",\"endpointType\":\"ATM\",\"backend\":\"znvfbycjsxjww\"},\"id\":\"z\",\"name\":\"mwmxqhndvnoamld\",\"type\":\"haohdjhhflzokxc\",\"location\":\"pelnjetag\",\"tags\":{\"tft\":\"xo\"}}],\"nextLink\":\"pnpbswveflocc\"}") .toObject(PreconfiguredEndpointList.class); - Assertions.assertEquals("rudhzmmesckdl", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PreconfiguredEndpointList model = new PreconfiguredEndpointList().withNextLink("rudhzmmesckdl"); - model = BinaryData.fromObject(model).toObject(PreconfiguredEndpointList.class); - Assertions.assertEquals("rudhzmmesckdl", model.nextLink()); + Assertions.assertEquals("pnpbswveflocc", model.nextLink()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/PreconfiguredEndpointPropertiesTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/PreconfiguredEndpointPropertiesTests.java index 97f17ccf68bf8..27dbaecc53975 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/PreconfiguredEndpointPropertiesTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/PreconfiguredEndpointPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -13,24 +13,11 @@ public final class PreconfiguredEndpointPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PreconfiguredEndpointProperties model = BinaryData.fromString( - "{\"description\":\"nfnw\",\"endpoint\":\"tmvpdvjdhtt\",\"endpointType\":\"ATM\",\"backend\":\"edxihchrphkmcrj\"}") + "{\"description\":\"mjjyuojq\",\"endpoint\":\"baxk\",\"endpointType\":\"CDN\",\"backend\":\"unlbfjkwr\"}") .toObject(PreconfiguredEndpointProperties.class); - Assertions.assertEquals("nfnw", model.description()); - Assertions.assertEquals("tmvpdvjdhtt", model.endpoint()); - Assertions.assertEquals(EndpointType.ATM, model.endpointType()); - Assertions.assertEquals("edxihchrphkmcrj", model.backend()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PreconfiguredEndpointProperties model = new PreconfiguredEndpointProperties().withDescription("nfnw") - .withEndpoint("tmvpdvjdhtt") - .withEndpointType(EndpointType.ATM) - .withBackend("edxihchrphkmcrj"); - model = BinaryData.fromObject(model).toObject(PreconfiguredEndpointProperties.class); - Assertions.assertEquals("nfnw", model.description()); - Assertions.assertEquals("tmvpdvjdhtt", model.endpoint()); - Assertions.assertEquals(EndpointType.ATM, model.endpointType()); - Assertions.assertEquals("edxihchrphkmcrj", model.backend()); + Assertions.assertEquals("mjjyuojq", model.description()); + Assertions.assertEquals("baxk", model.endpoint()); + Assertions.assertEquals(EndpointType.CDN, model.endpointType()); + Assertions.assertEquals("unlbfjkwr", model.backend()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/PreconfiguredEndpointsListMockTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/PreconfiguredEndpointsListMockTests.java index 7cfe85ecaa5d7..4b1bbaa50f59f 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/PreconfiguredEndpointsListMockTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/PreconfiguredEndpointsListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.frontdoor.FrontDoorManager; import com.azure.resourcemanager.frontdoor.models.EndpointType; @@ -23,23 +23,23 @@ public final class PreconfiguredEndpointsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"description\":\"lykwphvxz\",\"endpoint\":\"xhmpejtlkex\",\"endpointType\":\"CDN\",\"backend\":\"ivkcqh\"},\"location\":\"xhxknlc\",\"tags\":{\"qjfkakfqfrkemyi\":\"mkyupijub\",\"dxphlk\":\"dudxjascowvfdjk\"},\"id\":\"snmgzvyfi\",\"name\":\"dkz\",\"type\":\"qnwsithuqolyah\"}]}"; + = "{\"value\":[{\"properties\":{\"description\":\"ytllhdyzmy\",\"endpoint\":\"zexnxakcky\",\"endpointType\":\"ATM\",\"backend\":\"gaabjkdtf\"},\"id\":\"faogz\",\"name\":\"iwr\",\"type\":\"wdyjqurykcrrauee\",\"location\":\"s\",\"tags\":{\"acbcb\":\"ogd\"}}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); FrontDoorManager manager = FrontDoorManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.preconfiguredEndpoints().list("noakiz", "oaiknaqlnuwig", com.azure.core.util.Context.NONE); + = manager.preconfiguredEndpoints().list("t", "nx", com.azure.core.util.Context.NONE); - Assertions.assertEquals("xhxknlc", response.iterator().next().location()); - Assertions.assertEquals("mkyupijub", response.iterator().next().tags().get("qjfkakfqfrkemyi")); - Assertions.assertEquals("lykwphvxz", response.iterator().next().description()); - Assertions.assertEquals("xhmpejtlkex", response.iterator().next().endpoint()); - Assertions.assertEquals(EndpointType.CDN, response.iterator().next().endpointType()); - Assertions.assertEquals("ivkcqh", response.iterator().next().backend()); + Assertions.assertEquals("s", response.iterator().next().location()); + Assertions.assertEquals("ogd", response.iterator().next().tags().get("acbcb")); + Assertions.assertEquals("ytllhdyzmy", response.iterator().next().description()); + Assertions.assertEquals("zexnxakcky", response.iterator().next().endpoint()); + Assertions.assertEquals(EndpointType.ATM, response.iterator().next().endpointType()); + Assertions.assertEquals("gaabjkdtf", response.iterator().next().backend()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ProfileInnerTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ProfileInnerTests.java index 9059c21f7015b..39bcddd4f0a18 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ProfileInnerTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ProfileInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -15,24 +15,24 @@ public final class ProfileInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ProfileInner model = BinaryData.fromString( - "{\"properties\":{\"resourceState\":\"Disabled\",\"enabledState\":\"Disabled\"},\"etag\":\"fwqzdz\",\"location\":\"tilaxh\",\"tags\":{\"wivkxo\":\"qlyvijo\",\"ti\":\"zunbixx\"},\"id\":\"vcpwpgclrc\",\"name\":\"vtsoxf\",\"type\":\"kenx\"}") + "{\"properties\":{\"resourceState\":\"Enabling\",\"enabledState\":\"Disabled\"},\"etag\":\"hcawjutifdwfmv\",\"id\":\"orq\",\"name\":\"ttzhra\",\"type\":\"kafhonqj\",\"location\":\"eickpz\",\"tags\":{\"lnwcltyjed\":\"opmx\"}}") .toObject(ProfileInner.class); - Assertions.assertEquals("tilaxh", model.location()); - Assertions.assertEquals("qlyvijo", model.tags().get("wivkxo")); - Assertions.assertEquals("fwqzdz", model.etag()); + Assertions.assertEquals("eickpz", model.location()); + Assertions.assertEquals("opmx", model.tags().get("lnwcltyjed")); + Assertions.assertEquals("hcawjutifdwfmv", model.etag()); Assertions.assertEquals(State.DISABLED, model.enabledState()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ProfileInner model = new ProfileInner().withLocation("tilaxh") - .withTags(mapOf("wivkxo", "qlyvijo", "ti", "zunbixx")) - .withEtag("fwqzdz") + ProfileInner model = new ProfileInner().withLocation("eickpz") + .withTags(mapOf("lnwcltyjed", "opmx")) + .withEtag("hcawjutifdwfmv") .withEnabledState(State.DISABLED); model = BinaryData.fromObject(model).toObject(ProfileInner.class); - Assertions.assertEquals("tilaxh", model.location()); - Assertions.assertEquals("qlyvijo", model.tags().get("wivkxo")); - Assertions.assertEquals("fwqzdz", model.etag()); + Assertions.assertEquals("eickpz", model.location()); + Assertions.assertEquals("opmx", model.tags().get("lnwcltyjed")); + Assertions.assertEquals("hcawjutifdwfmv", model.etag()); Assertions.assertEquals(State.DISABLED, model.enabledState()); } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ProfileListTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ProfileListTests.java index 8f3bb7bae3823..f6841b4d6ebc2 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ProfileListTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ProfileListTests.java @@ -1,26 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.frontdoor.models.ProfileList; +import com.azure.resourcemanager.frontdoor.implementation.models.ProfileList; import org.junit.jupiter.api.Assertions; public final class ProfileListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ProfileList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"resourceState\":\"Enabled\",\"enabledState\":\"Disabled\"},\"etag\":\"vyi\",\"location\":\"zqodfvpgshox\",\"tags\":{\"xvzflbqv\":\"bpfgzdj\",\"vetnwsdtutn\":\"aqvlgafcqusr\"},\"id\":\"lduycv\",\"name\":\"zhyrmewipmve\",\"type\":\"dxukuqgsjjxundxg\"},{\"properties\":{\"resourceState\":\"Enabling\",\"enabledState\":\"Enabled\"},\"etag\":\"zjhfjmhvv\",\"location\":\"uvgp\",\"tags\":{\"mhfbuzjy\":\"eqsx\",\"ypoh\":\"hsasbhu\"},\"id\":\"uemsly\",\"name\":\"sqy\",\"type\":\"pfoobr\"}],\"nextLink\":\"tyms\"}") + "{\"value\":[{\"properties\":{\"resourceState\":\"Disabled\",\"enabledState\":\"Disabled\"},\"etag\":\"zoibgsxg\",\"id\":\"fyq\",\"name\":\"mpqoxw\",\"type\":\"fdbxiqxeiiqbim\",\"location\":\"mwwinhehfqpofv\",\"tags\":{\"vqihebwtswbzuwf\":\"blembnkbwvqvxkd\",\"felisdjub\":\"duragegizvc\",\"kxkbsazgakgacyr\":\"gbqi\"}},{\"properties\":{\"resourceState\":\"Enabling\",\"enabledState\":\"Disabled\"},\"etag\":\"of\",\"id\":\"vuhrylni\",\"name\":\"rz\",\"type\":\"zjedmstkvnlv\",\"location\":\"c\",\"tags\":{\"dibmikostbzbkiwb\":\"znktwfansnv\"}}],\"nextLink\":\"n\"}") .toObject(ProfileList.class); - Assertions.assertEquals("tyms", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProfileList model = new ProfileList().withNextLink("tyms"); - model = BinaryData.fromObject(model).toObject(ProfileList.class); - Assertions.assertEquals("tyms", model.nextLink()); + Assertions.assertEquals("n", model.nextLink()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ProfilePropertiesTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ProfilePropertiesTests.java index 74ad6cce81a2a..14721aec1898b 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ProfilePropertiesTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ProfilePropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -12,15 +12,16 @@ public final class ProfilePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ProfileProperties model = BinaryData.fromString("{\"resourceState\":\"Enabled\",\"enabledState\":\"Enabled\"}") - .toObject(ProfileProperties.class); - Assertions.assertEquals(State.ENABLED, model.enabledState()); + ProfileProperties model + = BinaryData.fromString("{\"resourceState\":\"Enabling\",\"enabledState\":\"Disabled\"}") + .toObject(ProfileProperties.class); + Assertions.assertEquals(State.DISABLED, model.enabledState()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ProfileProperties model = new ProfileProperties().withEnabledState(State.ENABLED); + ProfileProperties model = new ProfileProperties().withEnabledState(State.DISABLED); model = BinaryData.fromObject(model).toObject(ProfileProperties.class); - Assertions.assertEquals(State.ENABLED, model.enabledState()); + Assertions.assertEquals(State.DISABLED, model.enabledState()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ProfileUpdateModelTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ProfileUpdateModelTests.java index d78ca1202217f..b20f72abff874 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ProfileUpdateModelTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ProfileUpdateModelTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -14,23 +14,20 @@ public final class ProfileUpdateModelTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ProfileUpdateModel model = BinaryData.fromString( - "{\"properties\":{\"enabledState\":\"Enabled\"},\"tags\":{\"pqfrtqlkz\":\"dnqqskawaoqvmmb\",\"kxlzyqdrfeg\":\"egnitg\",\"lwigdivbkbx\":\"ealzxwhcansymoyq\",\"wasqvdaeyyg\":\"omfaj\"}}") + ProfileUpdateModel model = BinaryData + .fromString("{\"properties\":{\"enabledState\":\"Disabled\"},\"tags\":{\"gtayxonsupeujlz\":\"vxmvw\"}}") .toObject(ProfileUpdateModel.class); - Assertions.assertEquals("dnqqskawaoqvmmb", model.tags().get("pqfrtqlkz")); - Assertions.assertEquals(State.ENABLED, model.enabledState()); + Assertions.assertEquals("vxmvw", model.tags().get("gtayxonsupeujlz")); + Assertions.assertEquals(State.DISABLED, model.enabledState()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ProfileUpdateModel model - = new ProfileUpdateModel() - .withTags(mapOf("pqfrtqlkz", "dnqqskawaoqvmmb", "kxlzyqdrfeg", "egnitg", "lwigdivbkbx", - "ealzxwhcansymoyq", "wasqvdaeyyg", "omfaj")) - .withEnabledState(State.ENABLED); + = new ProfileUpdateModel().withTags(mapOf("gtayxonsupeujlz", "vxmvw")).withEnabledState(State.DISABLED); model = BinaryData.fromObject(model).toObject(ProfileUpdateModel.class); - Assertions.assertEquals("dnqqskawaoqvmmb", model.tags().get("pqfrtqlkz")); - Assertions.assertEquals(State.ENABLED, model.enabledState()); + Assertions.assertEquals("vxmvw", model.tags().get("gtayxonsupeujlz")); + Assertions.assertEquals(State.DISABLED, model.enabledState()); } // Use "Map.of" if available diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ProfileUpdatePropertiesTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ProfileUpdatePropertiesTests.java index f6037a858426d..6aafd572db883 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ProfileUpdatePropertiesTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ProfileUpdatePropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -13,14 +13,14 @@ public final class ProfileUpdatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ProfileUpdateProperties model - = BinaryData.fromString("{\"enabledState\":\"Enabled\"}").toObject(ProfileUpdateProperties.class); - Assertions.assertEquals(State.ENABLED, model.enabledState()); + = BinaryData.fromString("{\"enabledState\":\"Disabled\"}").toObject(ProfileUpdateProperties.class); + Assertions.assertEquals(State.DISABLED, model.enabledState()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ProfileUpdateProperties model = new ProfileUpdateProperties().withEnabledState(State.ENABLED); + ProfileUpdateProperties model = new ProfileUpdateProperties().withEnabledState(State.DISABLED); model = BinaryData.fromObject(model).toObject(ProfileUpdateProperties.class); - Assertions.assertEquals(State.ENABLED, model.enabledState()); + Assertions.assertEquals(State.DISABLED, model.enabledState()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/PurgeParametersTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/PurgeParametersTests.java index 70cfcf1bfcea0..1aad4d1ff774e 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/PurgeParametersTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/PurgeParametersTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -13,14 +13,16 @@ public final class PurgeParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PurgeParameters model - = BinaryData.fromString("{\"contentPaths\":[\"hwwn\",\"jhlfzswpchwahf\"]}").toObject(PurgeParameters.class); - Assertions.assertEquals("hwwn", model.contentPaths().get(0)); + = BinaryData.fromString("{\"contentPaths\":[\"maxriz\",\"zob\",\"opxlhslnelxieixy\",\"llxecwc\"]}") + .toObject(PurgeParameters.class); + Assertions.assertEquals("maxriz", model.contentPaths().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PurgeParameters model = new PurgeParameters().withContentPaths(Arrays.asList("hwwn", "jhlfzswpchwahf")); + PurgeParameters model + = new PurgeParameters().withContentPaths(Arrays.asList("maxriz", "zob", "opxlhslnelxieixy", "llxecwc")); model = BinaryData.fromObject(model).toObject(PurgeParameters.class); - Assertions.assertEquals("hwwn", model.contentPaths().get(0)); + Assertions.assertEquals("maxriz", model.contentPaths().get(0)); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RedirectConfigurationTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RedirectConfigurationTests.java index 65f6737aa52d6..5fb533926c6fd 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RedirectConfigurationTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RedirectConfigurationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -14,31 +14,30 @@ public final class RedirectConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RedirectConfiguration model = BinaryData.fromString( - "{\"@odata.type\":\"#Microsoft.Azure.FrontDoor.Models.FrontdoorRedirectConfiguration\",\"redirectType\":\"PermanentRedirect\",\"redirectProtocol\":\"MatchRequest\",\"customHost\":\"hsln\",\"customPath\":\"xieixynllxec\",\"customFragment\":\"rojphslhcawjutif\",\"customQueryString\":\"fmvigorqjbttzh\"}") + "{\"@odata.type\":\"#Microsoft.Azure.FrontDoor.Models.FrontdoorRedirectConfiguration\",\"redirectType\":\"Found\",\"redirectProtocol\":\"MatchRequest\",\"customHost\":\"bsjyofdx\",\"customPath\":\"us\",\"customFragment\":\"touwaboekqv\",\"customQueryString\":\"lns\"}") .toObject(RedirectConfiguration.class); - Assertions.assertEquals(FrontDoorRedirectType.PERMANENT_REDIRECT, model.redirectType()); + Assertions.assertEquals(FrontDoorRedirectType.FOUND, model.redirectType()); Assertions.assertEquals(FrontDoorRedirectProtocol.MATCH_REQUEST, model.redirectProtocol()); - Assertions.assertEquals("hsln", model.customHost()); - Assertions.assertEquals("xieixynllxec", model.customPath()); - Assertions.assertEquals("rojphslhcawjutif", model.customFragment()); - Assertions.assertEquals("fmvigorqjbttzh", model.customQueryString()); + Assertions.assertEquals("bsjyofdx", model.customHost()); + Assertions.assertEquals("us", model.customPath()); + Assertions.assertEquals("touwaboekqv", model.customFragment()); + Assertions.assertEquals("lns", model.customQueryString()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RedirectConfiguration model - = new RedirectConfiguration().withRedirectType(FrontDoorRedirectType.PERMANENT_REDIRECT) - .withRedirectProtocol(FrontDoorRedirectProtocol.MATCH_REQUEST) - .withCustomHost("hsln") - .withCustomPath("xieixynllxec") - .withCustomFragment("rojphslhcawjutif") - .withCustomQueryString("fmvigorqjbttzh"); + RedirectConfiguration model = new RedirectConfiguration().withRedirectType(FrontDoorRedirectType.FOUND) + .withRedirectProtocol(FrontDoorRedirectProtocol.MATCH_REQUEST) + .withCustomHost("bsjyofdx") + .withCustomPath("us") + .withCustomFragment("touwaboekqv") + .withCustomQueryString("lns"); model = BinaryData.fromObject(model).toObject(RedirectConfiguration.class); - Assertions.assertEquals(FrontDoorRedirectType.PERMANENT_REDIRECT, model.redirectType()); + Assertions.assertEquals(FrontDoorRedirectType.FOUND, model.redirectType()); Assertions.assertEquals(FrontDoorRedirectProtocol.MATCH_REQUEST, model.redirectProtocol()); - Assertions.assertEquals("hsln", model.customHost()); - Assertions.assertEquals("xieixynllxec", model.customPath()); - Assertions.assertEquals("rojphslhcawjutif", model.customFragment()); - Assertions.assertEquals("fmvigorqjbttzh", model.customQueryString()); + Assertions.assertEquals("bsjyofdx", model.customHost()); + Assertions.assertEquals("us", model.customPath()); + Assertions.assertEquals("touwaboekqv", model.customFragment()); + Assertions.assertEquals("lns", model.customQueryString()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ReportsGetLatencyScorecardsWithResponseMockTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ReportsGetLatencyScorecardsWithResponseMockTests.java index 4c852d82bcf38..cbb84d033fc58 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ReportsGetLatencyScorecardsWithResponseMockTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ReportsGetLatencyScorecardsWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.frontdoor.FrontDoorManager; import com.azure.resourcemanager.frontdoor.models.LatencyScorecard; @@ -22,21 +22,21 @@ public final class ReportsGetLatencyScorecardsWithResponseMockTests { @Test public void testGetLatencyScorecardsWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"id\":\"shtuwgm\",\"name\":\"uafpwzyifrk\",\"description\":\"ltxeqip\",\"endpointA\":\"zdyi\",\"endpointB\":\"fayorpravkjoges\",\"startDateTimeUTC\":\"2021-02-22T21:03:14Z\",\"endDateTimeUTC\":\"2021-11-12T14:16:13Z\",\"country\":\"jkwynqxaekqsykv\",\"latencyMetrics\":[{\"name\":\"pkevmylt\",\"endDateTimeUTC\":\"rspxklur\",\"aValue\":14.385528,\"bValue\":95.610214,\"delta\":84.517,\"deltaPercent\":3.5500765,\"aCLower95CI\":46.879883,\"aHUpper95CI\":5.04877,\"bCLower95CI\":30.904234,\"bUpper95CI\":72.015144},{\"name\":\"wxigpxv\",\"endDateTimeUTC\":\"maupxvpi\",\"aValue\":2.3832917,\"bValue\":12.627816,\"delta\":46.58986,\"deltaPercent\":61.054115,\"aCLower95CI\":38.121216,\"aHUpper95CI\":31.361979,\"bCLower95CI\":35.442387,\"bUpper95CI\":28.172707}]},\"location\":\"ds\",\"tags\":{\"gvdihoynkrxwetwk\":\"ytoithgygvfl\",\"dqumoenodnai\":\"rcyrucpcunnu\"},\"id\":\"nhq\",\"name\":\"skndnelqkaadlknw\",\"type\":\"oanniyopetxi\"}"; + = "{\"properties\":{\"id\":\"bnfddep\",\"name\":\"wqjnsfzygleexa\",\"description\":\"mywhsb\",\"endpointA\":\"arycsjjzyvoaqa\",\"endpointB\":\"vehzp\",\"startDateTimeUTC\":\"2021-11-07T11:13:51Z\",\"endDateTimeUTC\":\"2021-10-18T15:44Z\",\"country\":\"bhmpfulubefgybp\",\"latencyMetrics\":[{\"name\":\"ununm\",\"endDateTimeUTC\":\"krvfyifkdschl\",\"aValue\":21.684217,\"bValue\":75.01843,\"delta\":88.78915,\"deltaPercent\":48.61586,\"aCLower95CI\":35.021843,\"aHUpper95CI\":89.465034,\"bCLower95CI\":62.32726,\"bUpper95CI\":49.74873},{\"name\":\"kgf\",\"endDateTimeUTC\":\"togmhmjpjscdfpd\",\"aValue\":84.469124,\"bValue\":44.082905,\"delta\":96.79594,\"deltaPercent\":77.698364,\"aCLower95CI\":30.18787,\"aHUpper95CI\":54.777176,\"bCLower95CI\":53.739017,\"bUpper95CI\":36.84585},{\"name\":\"vqnrxtmbpj\",\"endDateTimeUTC\":\"nvwjhrsidqpxl\",\"aValue\":64.574196,\"bValue\":13.625413,\"delta\":68.24198,\"deltaPercent\":51.497208,\"aCLower95CI\":45.26174,\"aHUpper95CI\":84.33736,\"bCLower95CI\":94.449974,\"bUpper95CI\":3.027898}]},\"location\":\"trymd\",\"tags\":{\"cvjqdv\":\"jhp\"},\"id\":\"wkqp\",\"name\":\"drlefgnaavuag\",\"type\":\"tetaoutnpdctuhs\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); FrontDoorManager manager = FrontDoorManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); LatencyScorecard response = manager.reports() - .getLatencyScorecardsWithResponse("udqll", "sauzpjlx", "ehuxiqhzlraym", - LatencyScorecardAggregationInterval.DAILY, "xls", "ihmxrfdsajredn", com.azure.core.util.Context.NONE) + .getLatencyScorecardsWithResponse("ydl", "idywmhmptyril", "fbnrq", + LatencyScorecardAggregationInterval.WEEKLY, "vzt", "bnfnqtxjtoma", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ds", response.location()); - Assertions.assertEquals("ytoithgygvfl", response.tags().get("gvdihoynkrxwetwk")); + Assertions.assertEquals("trymd", response.location()); + Assertions.assertEquals("jhp", response.tags().get("cvjqdv")); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ReportsGetTimeseriesWithResponseMockTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ReportsGetTimeseriesWithResponseMockTests.java index 6f7fb7be21429..f58023a59c052 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ReportsGetTimeseriesWithResponseMockTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ReportsGetTimeseriesWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.frontdoor.FrontDoorManager; import com.azure.resourcemanager.frontdoor.models.AggregationInterval; @@ -24,31 +24,31 @@ public final class ReportsGetTimeseriesWithResponseMockTests { @Test public void testGetTimeseriesWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"endpoint\":\"scxmxeat\",\"startDateTimeUTC\":\"bmwnrdjyibqb\",\"endDateTimeUTC\":\"omhjrmkuhm\",\"aggregationInterval\":\"Daily\",\"timeseriesType\":\"LatencyP95\",\"country\":\"f\",\"timeseriesData\":[{\"dateTimeUTC\":\"mobcan\",\"value\":42.258137},{\"dateTimeUTC\":\"xqcwgax\",\"value\":60.46738},{\"dateTimeUTC\":\"knokzw\",\"value\":69.476006}]},\"location\":\"r\",\"tags\":{\"mmpuj\":\"xldzyyfytpqsix\",\"ovwzdbpqvybefg\":\"vyqlkjuvsmbmslzo\",\"okcvtlubses\":\"mx\"},\"id\":\"vcuartrhun\",\"name\":\"pirykycndzfqiv\",\"type\":\"reuykbbmnwagl\"}"; + = "{\"properties\":{\"endpoint\":\"vslxlh\",\"startDateTimeUTC\":\"vkrmukmyjmkx\",\"endDateTimeUTC\":\"tcsloj\",\"aggregationInterval\":\"Hourly\",\"timeseriesType\":\"LatencyP75\",\"country\":\"qtoqxjhqxcsq\",\"timeseriesData\":[{\"dateTimeUTC\":\"tnq\",\"value\":63.98772}]},\"location\":\"gldmbiipsnaww\",\"tags\":{\"cctkwmuqqoajxe\":\"znxhhllxr\",\"lesrwva\":\"y\",\"rupobehd\":\"xhdctrceqnk\",\"acvumepj\":\"lj\"},\"id\":\"bibnzpphepifex\",\"name\":\"eqir\",\"type\":\"cjclykcgxv\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); FrontDoorManager manager = FrontDoorManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Timeseries response = manager.reports() - .getTimeseriesWithResponse("cnrly", "nucaephblkwqpat", "bqsdtcjbctvi", - OffsetDateTime.parse("2021-04-14T10:23:41Z"), OffsetDateTime.parse("2021-03-17T20:41:42Z"), - TimeseriesAggregationInterval.DAILY, TimeseriesType.MEASUREMENT_COUNTS, "mtuowogtgitsqhzv", "rzcdbanf", + .getTimeseriesWithResponse("fefyihduyeuyld", "hmtybkcgsuthhll", "mwynefxexlfciatx", + OffsetDateTime.parse("2021-11-10T21:29:07Z"), OffsetDateTime.parse("2021-05-27T00:45:49Z"), + TimeseriesAggregationInterval.HOURLY, TimeseriesType.LATENCY_P50, "kmdskjhhxd", "ajfoxc", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("r", response.location()); - Assertions.assertEquals("xldzyyfytpqsix", response.tags().get("mmpuj")); - Assertions.assertEquals("scxmxeat", response.endpoint()); - Assertions.assertEquals("bmwnrdjyibqb", response.startDateTimeUtc()); - Assertions.assertEquals("omhjrmkuhm", response.endDateTimeUtc()); - Assertions.assertEquals(AggregationInterval.DAILY, response.aggregationInterval()); - Assertions.assertEquals(TimeseriesType.LATENCY_P95, response.timeseriesType()); - Assertions.assertEquals("f", response.country()); - Assertions.assertEquals("mobcan", response.timeseriesData().get(0).dateTimeUtc()); - Assertions.assertEquals(42.258137F, response.timeseriesData().get(0).value()); + Assertions.assertEquals("gldmbiipsnaww", response.location()); + Assertions.assertEquals("znxhhllxr", response.tags().get("cctkwmuqqoajxe")); + Assertions.assertEquals("vslxlh", response.endpoint()); + Assertions.assertEquals("vkrmukmyjmkx", response.startDateTimeUtc()); + Assertions.assertEquals("tcsloj", response.endDateTimeUtc()); + Assertions.assertEquals(AggregationInterval.HOURLY, response.aggregationInterval()); + Assertions.assertEquals(TimeseriesType.LATENCY_P75, response.timeseriesType()); + Assertions.assertEquals("qtoqxjhqxcsq", response.country()); + Assertions.assertEquals("tnq", response.timeseriesData().get(0).dateTimeUtc()); + Assertions.assertEquals(63.98772F, response.timeseriesData().get(0).value()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ResourcewithSettableNameTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ResourcewithSettableNameTests.java new file mode 100644 index 0000000000000..9f503a11830ef --- /dev/null +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ResourcewithSettableNameTests.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.frontdoor.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.frontdoor.models.ResourcewithSettableName; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ResourcewithSettableNameTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ResourcewithSettableName model = BinaryData.fromString( + "{\"id\":\"xm\",\"name\":\"mkqscaz\",\"type\":\"wxtzxpuamwab\",\"location\":\"rvxcush\",\"tags\":{\"zwywako\":\"aivmxyasflvgs\",\"ljhlnymzotq\":\"hknsmjbl\"}}") + .toObject(ResourcewithSettableName.class); + Assertions.assertEquals("rvxcush", model.location()); + Assertions.assertEquals("aivmxyasflvgs", model.tags().get("zwywako")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ResourcewithSettableName model = new ResourcewithSettableName().withLocation("rvxcush") + .withTags(mapOf("zwywako", "aivmxyasflvgs", "ljhlnymzotq", "hknsmjbl")); + model = BinaryData.fromObject(model).toObject(ResourcewithSettableName.class); + Assertions.assertEquals("rvxcush", model.location()); + Assertions.assertEquals("aivmxyasflvgs", model.tags().get("zwywako")); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RouteConfigurationTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RouteConfigurationTests.java index 9beeeb4af866e..586afc909f78a 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RouteConfigurationTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RouteConfigurationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RoutingRuleLinkTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RoutingRuleLinkTests.java index 77ff466cb3ca3..3992af4a3e768 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RoutingRuleLinkTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RoutingRuleLinkTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -11,14 +11,7 @@ public final class RoutingRuleLinkTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - RoutingRuleLink model = BinaryData.fromString("{\"id\":\"cgyncocpecf\"}").toObject(RoutingRuleLink.class); - Assertions.assertEquals("cgyncocpecf", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RoutingRuleLink model = new RoutingRuleLink().withId("cgyncocpecf"); - model = BinaryData.fromObject(model).toObject(RoutingRuleLink.class); - Assertions.assertEquals("cgyncocpecf", model.id()); + RoutingRuleLink model = BinaryData.fromString("{\"id\":\"jw\"}").toObject(RoutingRuleLink.class); + Assertions.assertEquals("jw", model.id()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RoutingRulePropertiesTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RoutingRulePropertiesTests.java index 49f3c890446e7..a34da4eb27e92 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RoutingRulePropertiesTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RoutingRulePropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -18,34 +18,34 @@ public final class RoutingRulePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RoutingRuleProperties model = BinaryData.fromString( - "{\"resourceState\":\"Enabling\",\"frontendEndpoints\":[{\"id\":\"db\"},{\"id\":\"vwrdnhfukuvsj\"},{\"id\":\"wsmystuluqypf\"}],\"acceptedProtocols\":[\"Http\",\"Https\"],\"patternsToMatch\":[\"pqbmfpjbab\"],\"enabledState\":\"Enabled\",\"routeConfiguration\":{\"@odata.type\":\"RouteConfiguration\"},\"rulesEngine\":{\"id\":\"sspuunnoxyhkx\"},\"webApplicationFirewallPolicyLink\":{\"id\":\"drihpfhoqcaaewda\"}}") + "{\"resourceState\":\"Enabling\",\"frontendEndpoints\":[{\"id\":\"khfxobbcswsrt\"}],\"acceptedProtocols\":[\"Https\",\"Https\",\"Https\",\"Https\"],\"patternsToMatch\":[\"ewtghfgblcgw\",\"zvlvqhjkbegib\"],\"enabledState\":\"Enabled\",\"routeConfiguration\":{\"@odata.type\":\"RouteConfiguration\"},\"rulesEngine\":{\"id\":\"bwwaloa\"},\"webApplicationFirewallPolicyLink\":{\"id\":\"gwrtzju\"}}") .toObject(RoutingRuleProperties.class); - Assertions.assertEquals("db", model.frontendEndpoints().get(0).id()); - Assertions.assertEquals(FrontDoorProtocol.HTTP, model.acceptedProtocols().get(0)); - Assertions.assertEquals("pqbmfpjbab", model.patternsToMatch().get(0)); + Assertions.assertEquals("khfxobbcswsrt", model.frontendEndpoints().get(0).id()); + Assertions.assertEquals(FrontDoorProtocol.HTTPS, model.acceptedProtocols().get(0)); + Assertions.assertEquals("ewtghfgblcgw", model.patternsToMatch().get(0)); Assertions.assertEquals(RoutingRuleEnabledState.ENABLED, model.enabledState()); - Assertions.assertEquals("sspuunnoxyhkx", model.rulesEngine().id()); - Assertions.assertEquals("drihpfhoqcaaewda", model.webApplicationFirewallPolicyLink().id()); + Assertions.assertEquals("bwwaloa", model.rulesEngine().id()); + Assertions.assertEquals("gwrtzju", model.webApplicationFirewallPolicyLink().id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { RoutingRuleProperties model = new RoutingRuleProperties() - .withFrontendEndpoints(Arrays.asList(new SubResource().withId("db"), - new SubResource().withId("vwrdnhfukuvsj"), new SubResource().withId("wsmystuluqypf"))) - .withAcceptedProtocols(Arrays.asList(FrontDoorProtocol.HTTP, FrontDoorProtocol.HTTPS)) - .withPatternsToMatch(Arrays.asList("pqbmfpjbab")) + .withFrontendEndpoints(Arrays.asList(new SubResource().withId("khfxobbcswsrt"))) + .withAcceptedProtocols(Arrays.asList(FrontDoorProtocol.HTTPS, FrontDoorProtocol.HTTPS, + FrontDoorProtocol.HTTPS, FrontDoorProtocol.HTTPS)) + .withPatternsToMatch(Arrays.asList("ewtghfgblcgw", "zvlvqhjkbegib")) .withEnabledState(RoutingRuleEnabledState.ENABLED) .withRouteConfiguration(new RouteConfiguration()) - .withRulesEngine(new SubResource().withId("sspuunnoxyhkx")) + .withRulesEngine(new SubResource().withId("bwwaloa")) .withWebApplicationFirewallPolicyLink( - new RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink().withId("drihpfhoqcaaewda")); + new RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink().withId("gwrtzju")); model = BinaryData.fromObject(model).toObject(RoutingRuleProperties.class); - Assertions.assertEquals("db", model.frontendEndpoints().get(0).id()); - Assertions.assertEquals(FrontDoorProtocol.HTTP, model.acceptedProtocols().get(0)); - Assertions.assertEquals("pqbmfpjbab", model.patternsToMatch().get(0)); + Assertions.assertEquals("khfxobbcswsrt", model.frontendEndpoints().get(0).id()); + Assertions.assertEquals(FrontDoorProtocol.HTTPS, model.acceptedProtocols().get(0)); + Assertions.assertEquals("ewtghfgblcgw", model.patternsToMatch().get(0)); Assertions.assertEquals(RoutingRuleEnabledState.ENABLED, model.enabledState()); - Assertions.assertEquals("sspuunnoxyhkx", model.rulesEngine().id()); - Assertions.assertEquals("drihpfhoqcaaewda", model.webApplicationFirewallPolicyLink().id()); + Assertions.assertEquals("bwwaloa", model.rulesEngine().id()); + Assertions.assertEquals("gwrtzju", model.webApplicationFirewallPolicyLink().id()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RoutingRuleTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RoutingRuleTests.java index 6d5941d032090..46aab8c3ff610 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RoutingRuleTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RoutingRuleTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -18,39 +18,38 @@ public final class RoutingRuleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RoutingRule model = BinaryData.fromString( - "{\"properties\":{\"resourceState\":\"Enabling\",\"frontendEndpoints\":[{\"id\":\"edabgyvudtjue\"}],\"acceptedProtocols\":[\"Http\",\"Https\",\"Http\"],\"patternsToMatch\":[\"whcjyxcc\",\"bvpa\",\"akkud\"],\"enabledState\":\"Disabled\",\"routeConfiguration\":{\"@odata.type\":\"RouteConfiguration\"},\"rulesEngine\":{\"id\":\"plmag\"},\"webApplicationFirewallPolicyLink\":{\"id\":\"yohpfkyrkdbdgiog\"}},\"name\":\"kmnwqjnobaiyhddv\",\"type\":\"cegfnmntfp\",\"id\":\"memfnczdwvvbalxl\"}") + "{\"properties\":{\"resourceState\":\"Enabling\",\"frontendEndpoints\":[{\"id\":\"it\"}],\"acceptedProtocols\":[\"Http\"],\"patternsToMatch\":[\"gqwgxhniskxfbkp\",\"cg\"],\"enabledState\":\"Enabled\",\"routeConfiguration\":{\"@odata.type\":\"RouteConfiguration\"},\"rulesEngine\":{\"id\":\"hjdauwhvylwz\"},\"webApplicationFirewallPolicyLink\":{\"id\":\"h\"}},\"name\":\"jznb\",\"type\":\"ow\",\"id\":\"przqlveu\"}") .toObject(RoutingRule.class); - Assertions.assertEquals("memfnczdwvvbalxl", model.id()); - Assertions.assertEquals("kmnwqjnobaiyhddv", model.name()); - Assertions.assertEquals("edabgyvudtjue", model.frontendEndpoints().get(0).id()); + Assertions.assertEquals("przqlveu", model.id()); + Assertions.assertEquals("jznb", model.name()); + Assertions.assertEquals("it", model.frontendEndpoints().get(0).id()); Assertions.assertEquals(FrontDoorProtocol.HTTP, model.acceptedProtocols().get(0)); - Assertions.assertEquals("whcjyxcc", model.patternsToMatch().get(0)); - Assertions.assertEquals(RoutingRuleEnabledState.DISABLED, model.enabledState()); - Assertions.assertEquals("plmag", model.rulesEngine().id()); - Assertions.assertEquals("yohpfkyrkdbdgiog", model.webApplicationFirewallPolicyLink().id()); + Assertions.assertEquals("gqwgxhniskxfbkp", model.patternsToMatch().get(0)); + Assertions.assertEquals(RoutingRuleEnabledState.ENABLED, model.enabledState()); + Assertions.assertEquals("hjdauwhvylwz", model.rulesEngine().id()); + Assertions.assertEquals("h", model.webApplicationFirewallPolicyLink().id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RoutingRule model = new RoutingRule().withId("memfnczdwvvbalxl") - .withName("kmnwqjnobaiyhddv") - .withFrontendEndpoints(Arrays.asList(new SubResource().withId("edabgyvudtjue"))) - .withAcceptedProtocols( - Arrays.asList(FrontDoorProtocol.HTTP, FrontDoorProtocol.HTTPS, FrontDoorProtocol.HTTP)) - .withPatternsToMatch(Arrays.asList("whcjyxcc", "bvpa", "akkud")) - .withEnabledState(RoutingRuleEnabledState.DISABLED) + RoutingRule model = new RoutingRule().withId("przqlveu") + .withName("jznb") + .withFrontendEndpoints(Arrays.asList(new SubResource().withId("it"))) + .withAcceptedProtocols(Arrays.asList(FrontDoorProtocol.HTTP)) + .withPatternsToMatch(Arrays.asList("gqwgxhniskxfbkp", "cg")) + .withEnabledState(RoutingRuleEnabledState.ENABLED) .withRouteConfiguration(new RouteConfiguration()) - .withRulesEngine(new SubResource().withId("plmag")) + .withRulesEngine(new SubResource().withId("hjdauwhvylwz")) .withWebApplicationFirewallPolicyLink( - new RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink().withId("yohpfkyrkdbdgiog")); + new RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink().withId("h")); model = BinaryData.fromObject(model).toObject(RoutingRule.class); - Assertions.assertEquals("memfnczdwvvbalxl", model.id()); - Assertions.assertEquals("kmnwqjnobaiyhddv", model.name()); - Assertions.assertEquals("edabgyvudtjue", model.frontendEndpoints().get(0).id()); + Assertions.assertEquals("przqlveu", model.id()); + Assertions.assertEquals("jznb", model.name()); + Assertions.assertEquals("it", model.frontendEndpoints().get(0).id()); Assertions.assertEquals(FrontDoorProtocol.HTTP, model.acceptedProtocols().get(0)); - Assertions.assertEquals("whcjyxcc", model.patternsToMatch().get(0)); - Assertions.assertEquals(RoutingRuleEnabledState.DISABLED, model.enabledState()); - Assertions.assertEquals("plmag", model.rulesEngine().id()); - Assertions.assertEquals("yohpfkyrkdbdgiog", model.webApplicationFirewallPolicyLink().id()); + Assertions.assertEquals("gqwgxhniskxfbkp", model.patternsToMatch().get(0)); + Assertions.assertEquals(RoutingRuleEnabledState.ENABLED, model.enabledState()); + Assertions.assertEquals("hjdauwhvylwz", model.rulesEngine().id()); + Assertions.assertEquals("h", model.webApplicationFirewallPolicyLink().id()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RoutingRuleUpdateParametersTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RoutingRuleUpdateParametersTests.java index c5b816e4036d5..0bbb19cf4153a 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RoutingRuleUpdateParametersTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RoutingRuleUpdateParametersTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -18,33 +18,35 @@ public final class RoutingRuleUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RoutingRuleUpdateParameters model = BinaryData.fromString( - "{\"frontendEndpoints\":[{\"id\":\"vlp\"},{\"id\":\"xkzb\"}],\"acceptedProtocols\":[\"Https\",\"Https\"],\"patternsToMatch\":[\"siykzkdncjdxonbz\",\"ggcula\",\"z\",\"y\"],\"enabledState\":\"Disabled\",\"routeConfiguration\":{\"@odata.type\":\"RouteConfiguration\"},\"rulesEngine\":{\"id\":\"qxepnylbfuaj\"},\"webApplicationFirewallPolicyLink\":{\"id\":\"tlvofq\"}}") + "{\"frontendEndpoints\":[{\"id\":\"zmh\"},{\"id\":\"ongmtsa\"},{\"id\":\"cbpwxqpsrknft\"}],\"acceptedProtocols\":[\"Http\",\"Https\",\"Https\",\"Http\"],\"patternsToMatch\":[\"wmdyvxqtay\",\"iwwroyqbexrmc\",\"ibycno\"],\"enabledState\":\"Enabled\",\"routeConfiguration\":{\"@odata.type\":\"RouteConfiguration\"},\"rulesEngine\":{\"id\":\"fqsgzvahapjy\"},\"webApplicationFirewallPolicyLink\":{\"id\":\"vgqzcjrvxd\"}}") .toObject(RoutingRuleUpdateParameters.class); - Assertions.assertEquals("vlp", model.frontendEndpoints().get(0).id()); - Assertions.assertEquals(FrontDoorProtocol.HTTPS, model.acceptedProtocols().get(0)); - Assertions.assertEquals("siykzkdncjdxonbz", model.patternsToMatch().get(0)); - Assertions.assertEquals(RoutingRuleEnabledState.DISABLED, model.enabledState()); - Assertions.assertEquals("qxepnylbfuaj", model.rulesEngine().id()); - Assertions.assertEquals("tlvofq", model.webApplicationFirewallPolicyLink().id()); + Assertions.assertEquals("zmh", model.frontendEndpoints().get(0).id()); + Assertions.assertEquals(FrontDoorProtocol.HTTP, model.acceptedProtocols().get(0)); + Assertions.assertEquals("wmdyvxqtay", model.patternsToMatch().get(0)); + Assertions.assertEquals(RoutingRuleEnabledState.ENABLED, model.enabledState()); + Assertions.assertEquals("fqsgzvahapjy", model.rulesEngine().id()); + Assertions.assertEquals("vgqzcjrvxd", model.webApplicationFirewallPolicyLink().id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { RoutingRuleUpdateParameters model = new RoutingRuleUpdateParameters() - .withFrontendEndpoints(Arrays.asList(new SubResource().withId("vlp"), new SubResource().withId("xkzb"))) - .withAcceptedProtocols(Arrays.asList(FrontDoorProtocol.HTTPS, FrontDoorProtocol.HTTPS)) - .withPatternsToMatch(Arrays.asList("siykzkdncjdxonbz", "ggcula", "z", "y")) - .withEnabledState(RoutingRuleEnabledState.DISABLED) + .withFrontendEndpoints(Arrays.asList(new SubResource().withId("zmh"), new SubResource().withId("ongmtsa"), + new SubResource().withId("cbpwxqpsrknft"))) + .withAcceptedProtocols(Arrays.asList(FrontDoorProtocol.HTTP, FrontDoorProtocol.HTTPS, + FrontDoorProtocol.HTTPS, FrontDoorProtocol.HTTP)) + .withPatternsToMatch(Arrays.asList("wmdyvxqtay", "iwwroyqbexrmc", "ibycno")) + .withEnabledState(RoutingRuleEnabledState.ENABLED) .withRouteConfiguration(new RouteConfiguration()) - .withRulesEngine(new SubResource().withId("qxepnylbfuaj")) + .withRulesEngine(new SubResource().withId("fqsgzvahapjy")) .withWebApplicationFirewallPolicyLink( - new RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink().withId("tlvofq")); + new RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink().withId("vgqzcjrvxd")); model = BinaryData.fromObject(model).toObject(RoutingRuleUpdateParameters.class); - Assertions.assertEquals("vlp", model.frontendEndpoints().get(0).id()); - Assertions.assertEquals(FrontDoorProtocol.HTTPS, model.acceptedProtocols().get(0)); - Assertions.assertEquals("siykzkdncjdxonbz", model.patternsToMatch().get(0)); - Assertions.assertEquals(RoutingRuleEnabledState.DISABLED, model.enabledState()); - Assertions.assertEquals("qxepnylbfuaj", model.rulesEngine().id()); - Assertions.assertEquals("tlvofq", model.webApplicationFirewallPolicyLink().id()); + Assertions.assertEquals("zmh", model.frontendEndpoints().get(0).id()); + Assertions.assertEquals(FrontDoorProtocol.HTTP, model.acceptedProtocols().get(0)); + Assertions.assertEquals("wmdyvxqtay", model.patternsToMatch().get(0)); + Assertions.assertEquals(RoutingRuleEnabledState.ENABLED, model.enabledState()); + Assertions.assertEquals("fqsgzvahapjy", model.rulesEngine().id()); + Assertions.assertEquals("vgqzcjrvxd", model.webApplicationFirewallPolicyLink().id()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RoutingRuleUpdateParametersWebApplicationFirewallPolicyLinkTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RoutingRuleUpdateParametersWebApplicationFirewallPolicyLinkTests.java index 90a5df6042a28..34c98c778436e 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RoutingRuleUpdateParametersWebApplicationFirewallPolicyLinkTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RoutingRuleUpdateParametersWebApplicationFirewallPolicyLinkTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -12,17 +12,17 @@ public final class RoutingRuleUpdateParametersWebApplicationFirewallPolicyLinkTe @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink model - = BinaryData.fromString("{\"id\":\"vfcibyfmowux\"}") + = BinaryData.fromString("{\"id\":\"bxwyjsflhhcaa\"}") .toObject(RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink.class); - Assertions.assertEquals("vfcibyfmowux", model.id()); + Assertions.assertEquals("bxwyjsflhhcaa", model.id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink model - = new RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink().withId("vfcibyfmowux"); + = new RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink().withId("bxwyjsflhhcaa"); model = BinaryData.fromObject(model).toObject(RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink.class); - Assertions.assertEquals("vfcibyfmowux", model.id()); + Assertions.assertEquals("bxwyjsflhhcaa", model.id()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RuleGroupScopeTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RuleGroupScopeTests.java new file mode 100644 index 0000000000000..ed9f7360e6fef --- /dev/null +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RuleGroupScopeTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.frontdoor.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.frontdoor.models.RuleGroupScope; +import com.azure.resourcemanager.frontdoor.models.RuleScope; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class RuleGroupScopeTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RuleGroupScope model = BinaryData + .fromString("{\"ruleGroupName\":\"clj\",\"ruleScopes\":[{\"ruleId\":\"exaoguya\"},{\"ruleId\":\"p\"}]}") + .toObject(RuleGroupScope.class); + Assertions.assertEquals("clj", model.ruleGroupName()); + Assertions.assertEquals("exaoguya", model.ruleScopes().get(0).ruleId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RuleGroupScope model = new RuleGroupScope().withRuleGroupName("clj") + .withRuleScopes(Arrays.asList(new RuleScope().withRuleId("exaoguya"), new RuleScope().withRuleId("p"))); + model = BinaryData.fromObject(model).toObject(RuleGroupScope.class); + Assertions.assertEquals("clj", model.ruleGroupName()); + Assertions.assertEquals("exaoguya", model.ruleScopes().get(0).ruleId()); + } +} diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RuleScopeTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RuleScopeTests.java new file mode 100644 index 0000000000000..b838130107e89 --- /dev/null +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RuleScopeTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.frontdoor.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.frontdoor.models.RuleScope; +import org.junit.jupiter.api.Assertions; + +public final class RuleScopeTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RuleScope model = BinaryData.fromString("{\"ruleId\":\"dsdaultxijjumf\"}").toObject(RuleScope.class); + Assertions.assertEquals("dsdaultxijjumf", model.ruleId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RuleScope model = new RuleScope().withRuleId("dsdaultxijjumf"); + model = BinaryData.fromObject(model).toObject(RuleScope.class); + Assertions.assertEquals("dsdaultxijjumf", model.ruleId()); + } +} diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RulesEngineActionTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RulesEngineActionTests.java index d257b6772604a..d51bafb647162 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RulesEngineActionTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RulesEngineActionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -16,36 +16,52 @@ public final class RulesEngineActionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RulesEngineAction model = BinaryData.fromString( - "{\"requestHeaderActions\":[{\"headerActionType\":\"Overwrite\",\"headerName\":\"noigbrnjwmwk\",\"value\":\"bsazejjoqka\"},{\"headerActionType\":\"Delete\",\"headerName\":\"hsxttaugzxnf\",\"value\":\"zpxdt\"}],\"responseHeaderActions\":[{\"headerActionType\":\"Delete\",\"headerName\":\"kqjjlwuenvrkp\",\"value\":\"uaibrebqaaysj\"}],\"routeConfigurationOverride\":{\"@odata.type\":\"RouteConfiguration\"}}") + "{\"requestHeaderActions\":[{\"headerActionType\":\"Append\",\"headerName\":\"wueluqhhahhxv\",\"value\":\"mzkwpjg\"},{\"headerActionType\":\"Append\",\"headerName\":\"spughftqsxhq\",\"value\":\"j\"},{\"headerActionType\":\"Delete\",\"headerName\":\"kndxdigrjgu\",\"value\":\"zdmsyqtfi\"},{\"headerActionType\":\"Delete\",\"headerName\":\"hbotzingamvppho\",\"value\":\"qzudphq\"}],\"responseHeaderActions\":[{\"headerActionType\":\"Overwrite\",\"headerName\":\"kfwynw\",\"value\":\"tbvkayhmtnvyq\"},{\"headerActionType\":\"Delete\",\"headerName\":\"tkzwpcnpwzc\",\"value\":\"esgvvsccyaj\"},{\"headerActionType\":\"Append\",\"headerName\":\"qfhwyg\",\"value\":\"vdnkfxusem\"},{\"headerActionType\":\"Append\",\"headerName\":\"zrmuhapfcqdps\",\"value\":\"qvpsvuoymg\"}],\"routeConfigurationOverride\":{\"@odata.type\":\"RouteConfiguration\"}}") .toObject(RulesEngineAction.class); - Assertions.assertEquals(HeaderActionType.OVERWRITE, model.requestHeaderActions().get(0).headerActionType()); - Assertions.assertEquals("noigbrnjwmwk", model.requestHeaderActions().get(0).headerName()); - Assertions.assertEquals("bsazejjoqka", model.requestHeaderActions().get(0).value()); - Assertions.assertEquals(HeaderActionType.DELETE, model.responseHeaderActions().get(0).headerActionType()); - Assertions.assertEquals("kqjjlwuenvrkp", model.responseHeaderActions().get(0).headerName()); - Assertions.assertEquals("uaibrebqaaysj", model.responseHeaderActions().get(0).value()); + Assertions.assertEquals(HeaderActionType.APPEND, model.requestHeaderActions().get(0).headerActionType()); + Assertions.assertEquals("wueluqhhahhxv", model.requestHeaderActions().get(0).headerName()); + Assertions.assertEquals("mzkwpjg", model.requestHeaderActions().get(0).value()); + Assertions.assertEquals(HeaderActionType.OVERWRITE, model.responseHeaderActions().get(0).headerActionType()); + Assertions.assertEquals("kfwynw", model.responseHeaderActions().get(0).headerName()); + Assertions.assertEquals("tbvkayhmtnvyq", model.responseHeaderActions().get(0).value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { RulesEngineAction model = new RulesEngineAction() .withRequestHeaderActions(Arrays.asList( + new HeaderAction().withHeaderActionType(HeaderActionType.APPEND) + .withHeaderName("wueluqhhahhxv") + .withValue("mzkwpjg"), + new HeaderAction().withHeaderActionType(HeaderActionType.APPEND) + .withHeaderName("spughftqsxhq") + .withValue("j"), + new HeaderAction().withHeaderActionType(HeaderActionType.DELETE) + .withHeaderName("kndxdigrjgu") + .withValue("zdmsyqtfi"), + new HeaderAction().withHeaderActionType(HeaderActionType.DELETE) + .withHeaderName("hbotzingamvppho") + .withValue("qzudphq"))) + .withResponseHeaderActions(Arrays.asList( new HeaderAction().withHeaderActionType(HeaderActionType.OVERWRITE) - .withHeaderName("noigbrnjwmwk") - .withValue("bsazejjoqka"), + .withHeaderName("kfwynw") + .withValue("tbvkayhmtnvyq"), new HeaderAction().withHeaderActionType(HeaderActionType.DELETE) - .withHeaderName("hsxttaugzxnf") - .withValue("zpxdt"))) - .withResponseHeaderActions(Arrays.asList(new HeaderAction().withHeaderActionType(HeaderActionType.DELETE) - .withHeaderName("kqjjlwuenvrkp") - .withValue("uaibrebqaaysj"))) + .withHeaderName("tkzwpcnpwzc") + .withValue("esgvvsccyaj"), + new HeaderAction().withHeaderActionType(HeaderActionType.APPEND) + .withHeaderName("qfhwyg") + .withValue("vdnkfxusem"), + new HeaderAction().withHeaderActionType(HeaderActionType.APPEND) + .withHeaderName("zrmuhapfcqdps") + .withValue("qvpsvuoymg"))) .withRouteConfigurationOverride(new RouteConfiguration()); model = BinaryData.fromObject(model).toObject(RulesEngineAction.class); - Assertions.assertEquals(HeaderActionType.OVERWRITE, model.requestHeaderActions().get(0).headerActionType()); - Assertions.assertEquals("noigbrnjwmwk", model.requestHeaderActions().get(0).headerName()); - Assertions.assertEquals("bsazejjoqka", model.requestHeaderActions().get(0).value()); - Assertions.assertEquals(HeaderActionType.DELETE, model.responseHeaderActions().get(0).headerActionType()); - Assertions.assertEquals("kqjjlwuenvrkp", model.responseHeaderActions().get(0).headerName()); - Assertions.assertEquals("uaibrebqaaysj", model.responseHeaderActions().get(0).value()); + Assertions.assertEquals(HeaderActionType.APPEND, model.requestHeaderActions().get(0).headerActionType()); + Assertions.assertEquals("wueluqhhahhxv", model.requestHeaderActions().get(0).headerName()); + Assertions.assertEquals("mzkwpjg", model.requestHeaderActions().get(0).value()); + Assertions.assertEquals(HeaderActionType.OVERWRITE, model.responseHeaderActions().get(0).headerActionType()); + Assertions.assertEquals("kfwynw", model.responseHeaderActions().get(0).headerName()); + Assertions.assertEquals("tbvkayhmtnvyq", model.responseHeaderActions().get(0).value()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RulesEngineInnerTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RulesEngineInnerTests.java index e89261cbb3591..5008398639cf6 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RulesEngineInnerTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RulesEngineInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -23,127 +23,190 @@ public final class RulesEngineInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RulesEngineInner model = BinaryData.fromString( - "{\"properties\":{\"resourceState\":\"Migrating\",\"rules\":[{\"name\":\"f\",\"priority\":1572357139,\"action\":{\"requestHeaderActions\":[{\"headerActionType\":\"Delete\",\"headerName\":\"vpuvks\"},{\"headerActionType\":\"Delete\",\"headerName\":\"lsa\"},{\"headerActionType\":\"Overwrite\",\"headerName\":\"ynfs\"},{\"headerActionType\":\"Overwrite\",\"headerName\":\"ljphuopxodl\"}],\"responseHeaderActions\":[{\"headerActionType\":\"Overwrite\",\"headerName\":\"torzih\"}],\"routeConfigurationOverride\":{\"@odata.type\":\"RouteConfiguration\"}},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"PostArgs\",\"selector\":\"w\",\"rulesEngineOperator\":\"Any\",\"negateCondition\":true,\"rulesEngineMatchValue\":[\"yzrpzbchckqqzq\",\"ox\",\"ysuiizynkedya\",\"rwyhqmibzyhwitsm\"],\"transforms\":[\"UrlEncode\",\"Trim\",\"Uppercase\",\"UrlDecode\"]},{\"rulesEngineMatchVariable\":\"RequestFilenameExtension\",\"selector\":\"umnzgmwznmabik\",\"rulesEngineOperator\":\"LessThan\",\"negateCondition\":false,\"rulesEngineMatchValue\":[\"jhxbld\"],\"transforms\":[\"Lowercase\",\"Lowercase\",\"Uppercase\"]}],\"matchProcessingBehavior\":\"Continue\"},{\"name\":\"m\",\"priority\":1488672187,\"action\":{\"requestHeaderActions\":[{\"headerActionType\":\"Delete\",\"headerName\":\"kotl\"},{\"headerActionType\":\"Delete\",\"headerName\":\"d\"},{\"headerActionType\":\"Overwrite\",\"headerName\":\"gsyocogj\"}],\"responseHeaderActions\":[{\"headerActionType\":\"Delete\",\"headerName\":\"bnnhadoocrkvcik\"},{\"headerActionType\":\"Overwrite\",\"headerName\":\"vpa\"}],\"routeConfigurationOverride\":{\"@odata.type\":\"RouteConfiguration\"}},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"RequestUri\",\"selector\":\"u\",\"rulesEngineOperator\":\"GeoMatch\",\"negateCondition\":true,\"rulesEngineMatchValue\":[\"wggxkallat\",\"elwuipi\"],\"transforms\":[\"Uppercase\",\"Uppercase\"]}],\"matchProcessingBehavior\":\"Continue\"},{\"name\":\"v\",\"priority\":1783583685,\"action\":{\"requestHeaderActions\":[{\"headerActionType\":\"Delete\",\"headerName\":\"ayrhyrnx\"}],\"responseHeaderActions\":[{\"headerActionType\":\"Append\",\"headerName\":\"edndr\"},{\"headerActionType\":\"Overwrite\",\"headerName\":\"stkwqqtch\"},{\"headerActionType\":\"Delete\",\"headerName\":\"lmfmtdaay\"}],\"routeConfigurationOverride\":{\"@odata.type\":\"RouteConfiguration\"}},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"RequestBody\",\"selector\":\"piohgwxrtfu\",\"rulesEngineOperator\":\"EndsWith\",\"negateCondition\":false,\"rulesEngineMatchValue\":[\"gyqagvrvmnpkuk\"],\"transforms\":[\"Lowercase\"]},{\"rulesEngineMatchVariable\":\"RequestFilenameExtension\",\"selector\":\"lxgwimfnjhf\",\"rulesEngineOperator\":\"GreaterThan\",\"negateCondition\":false,\"rulesEngineMatchValue\":[\"zk\",\"foqreyfkzik\",\"jawneaiv\"],\"transforms\":[\"Trim\",\"Uppercase\",\"Trim\"]}],\"matchProcessingBehavior\":\"Continue\"}]},\"id\":\"irels\",\"name\":\"eae\",\"type\":\"wabfatkl\"}") + "{\"properties\":{\"resourceState\":\"Disabled\",\"rules\":[{\"name\":\"tkcnqxwb\",\"priority\":471574486,\"action\":{\"requestHeaderActions\":[{\"headerActionType\":\"Append\",\"headerName\":\"pi\"},{\"headerActionType\":\"Append\",\"headerName\":\"waasip\"}],\"responseHeaderActions\":[{\"headerActionType\":\"Append\",\"headerName\":\"byuqerpqlp\"},{\"headerActionType\":\"Overwrite\",\"headerName\":\"cciuqgbdbutau\"}],\"routeConfigurationOverride\":{\"@odata.type\":\"RouteConfiguration\"}},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"RequestFilename\",\"selector\":\"whhmhykojo\",\"rulesEngineOperator\":\"IPMatch\",\"negateCondition\":false,\"rulesEngineMatchValue\":[\"dlpichkoymkcdyhb\"],\"transforms\":[\"Trim\"]},{\"rulesEngineMatchVariable\":\"RequestHeader\",\"selector\":\"reqnovvqfov\",\"rulesEngineOperator\":\"Equal\",\"negateCondition\":false,\"rulesEngineMatchValue\":[\"suwsyrsnds\",\"tgadgvraeaen\"],\"transforms\":[\"Uppercase\"]},{\"rulesEngineMatchVariable\":\"RequestFilename\",\"selector\":\"rwlqu\",\"rulesEngineOperator\":\"GeoMatch\",\"negateCondition\":false,\"rulesEngineMatchValue\":[\"kacewiipfp\",\"bjibwwiftohq\"],\"transforms\":[\"Uppercase\",\"Trim\"]},{\"rulesEngineMatchVariable\":\"RequestFilename\",\"selector\":\"gplsaknynf\",\"rulesEngineOperator\":\"GreaterThan\",\"negateCondition\":true,\"rulesEngineMatchValue\":[\"ph\",\"op\",\"odlqiyntor\"],\"transforms\":[\"RemoveNulls\",\"UrlDecode\"]}],\"matchProcessingBehavior\":\"Continue\"},{\"name\":\"jswsrmslyz\",\"priority\":1616775247,\"action\":{\"requestHeaderActions\":[{\"headerActionType\":\"Delete\",\"headerName\":\"hckqqzqioxiy\"},{\"headerActionType\":\"Delete\",\"headerName\":\"iizynkedyatrwyh\"},{\"headerActionType\":\"Delete\",\"headerName\":\"ibzyhwitsmyp\"}],\"responseHeaderActions\":[{\"headerActionType\":\"Delete\",\"headerName\":\"cdpu\"},{\"headerActionType\":\"Append\",\"headerName\":\"zgmwznmabikns\"},{\"headerActionType\":\"Append\",\"headerName\":\"gj\"}],\"routeConfigurationOverride\":{\"@odata.type\":\"RouteConfiguration\"}},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"RemoteAddr\",\"selector\":\"lwwrl\",\"rulesEngineOperator\":\"BeginsWith\",\"negateCondition\":false,\"rulesEngineMatchValue\":[\"cvokotllxdyhg\",\"y\",\"cogjltdtbn\",\"hadoocrk\"],\"transforms\":[\"Lowercase\",\"UrlEncode\",\"RemoveNulls\",\"RemoveNulls\"]},{\"rulesEngineMatchVariable\":\"RequestUri\",\"selector\":\"mqg\",\"rulesEngineOperator\":\"LessThanOrEqual\",\"negateCondition\":false,\"rulesEngineMatchValue\":[\"zikywgg\",\"kallatmel\",\"uipiccjzk\"],\"transforms\":[\"RemoveNulls\"]}],\"matchProcessingBehavior\":\"Continue\"},{\"name\":\"c\",\"priority\":2028866606,\"action\":{\"requestHeaderActions\":[{\"headerActionType\":\"Append\",\"headerName\":\"yrnxxmueedn\"},{\"headerActionType\":\"Append\",\"headerName\":\"dvstkw\"},{\"headerActionType\":\"Delete\",\"headerName\":\"tchealmf\"}],\"responseHeaderActions\":[{\"headerActionType\":\"Delete\",\"headerName\":\"aygdvwvgpioh\"}],\"routeConfigurationOverride\":{\"@odata.type\":\"RouteConfiguration\"}},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"RequestScheme\",\"selector\":\"udxepxgyqagv\",\"rulesEngineOperator\":\"GreaterThanOrEqual\",\"negateCondition\":true,\"rulesEngineMatchValue\":[\"k\",\"kghimdblxgwimfnj\"],\"transforms\":[\"UrlDecode\"]},{\"rulesEngineMatchVariable\":\"RequestUri\",\"selector\":\"szkkfoqre\",\"rulesEngineOperator\":\"EndsWith\",\"negateCondition\":false,\"rulesEngineMatchValue\":[\"kf\"],\"transforms\":[\"Lowercase\",\"Uppercase\"]},{\"rulesEngineMatchVariable\":\"PostArgs\",\"selector\":\"vxwc\",\"rulesEngineOperator\":\"GreaterThan\",\"negateCondition\":true,\"rulesEngineMatchValue\":[\"irels\"],\"transforms\":[\"Lowercase\",\"Lowercase\"]}],\"matchProcessingBehavior\":\"Continue\"},{\"name\":\"bfatklddxbjhwu\",\"priority\":435205940,\"action\":{\"requestHeaderActions\":[{\"headerActionType\":\"Append\",\"headerName\":\"jos\"}],\"responseHeaderActions\":[{\"headerActionType\":\"Append\",\"headerName\":\"ulpjr\"},{\"headerActionType\":\"Append\",\"headerName\":\"ag\"}],\"routeConfigurationOverride\":{\"@odata.type\":\"RouteConfiguration\"}},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"RequestMethod\",\"selector\":\"wosytxitcskf\",\"rulesEngineOperator\":\"IPMatch\",\"negateCondition\":false,\"rulesEngineMatchValue\":[\"miekkezzikhlyfjh\",\"gqggebdunygae\",\"idb\"],\"transforms\":[\"Trim\",\"RemoveNulls\"]},{\"rulesEngineMatchVariable\":\"RequestScheme\",\"selector\":\"lr\",\"rulesEngineOperator\":\"EndsWith\",\"negateCondition\":false,\"rulesEngineMatchValue\":[\"oadsuvar\",\"ywdmjsjqbjh\",\"yxxrwlycoduh\"],\"transforms\":[\"Uppercase\",\"Trim\",\"UrlEncode\",\"Lowercase\"]}],\"matchProcessingBehavior\":\"Continue\"}]},\"id\":\"qnajxqugj\",\"name\":\"ycubeddgs\",\"type\":\"fwqmzqalkrmn\"}") .toObject(RulesEngineInner.class); - Assertions.assertEquals("f", model.rules().get(0).name()); - Assertions.assertEquals(1572357139, model.rules().get(0).priority()); - Assertions.assertEquals(HeaderActionType.DELETE, + Assertions.assertEquals("tkcnqxwb", model.rules().get(0).name()); + Assertions.assertEquals(471574486, model.rules().get(0).priority()); + Assertions.assertEquals(HeaderActionType.APPEND, model.rules().get(0).action().requestHeaderActions().get(0).headerActionType()); - Assertions.assertEquals("vpuvks", model.rules().get(0).action().requestHeaderActions().get(0).headerName()); - Assertions.assertEquals(HeaderActionType.OVERWRITE, + Assertions.assertEquals("pi", model.rules().get(0).action().requestHeaderActions().get(0).headerName()); + Assertions.assertEquals(HeaderActionType.APPEND, model.rules().get(0).action().responseHeaderActions().get(0).headerActionType()); - Assertions.assertEquals("torzih", model.rules().get(0).action().responseHeaderActions().get(0).headerName()); - Assertions.assertEquals(RulesEngineMatchVariable.POST_ARGS, + Assertions.assertEquals("byuqerpqlp", + model.rules().get(0).action().responseHeaderActions().get(0).headerName()); + Assertions.assertEquals(RulesEngineMatchVariable.REQUEST_FILENAME, model.rules().get(0).matchConditions().get(0).rulesEngineMatchVariable()); - Assertions.assertEquals("w", model.rules().get(0).matchConditions().get(0).selector()); - Assertions.assertEquals(RulesEngineOperator.ANY, + Assertions.assertEquals("whhmhykojo", model.rules().get(0).matchConditions().get(0).selector()); + Assertions.assertEquals(RulesEngineOperator.IPMATCH, model.rules().get(0).matchConditions().get(0).rulesEngineOperator()); - Assertions.assertEquals(true, model.rules().get(0).matchConditions().get(0).negateCondition()); - Assertions.assertEquals("yzrpzbchckqqzq", + Assertions.assertFalse(model.rules().get(0).matchConditions().get(0).negateCondition()); + Assertions.assertEquals("dlpichkoymkcdyhb", model.rules().get(0).matchConditions().get(0).rulesEngineMatchValue().get(0)); - Assertions.assertEquals(Transform.URL_ENCODE, - model.rules().get(0).matchConditions().get(0).transforms().get(0)); + Assertions.assertEquals(Transform.TRIM, model.rules().get(0).matchConditions().get(0).transforms().get(0)); Assertions.assertEquals(MatchProcessingBehavior.CONTINUE, model.rules().get(0).matchProcessingBehavior()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RulesEngineInner model = new RulesEngineInner().withRules(Arrays.asList( - new RulesEngineRule().withName("f") - .withPriority(1572357139) - .withAction(new RulesEngineAction() - .withRequestHeaderActions(Arrays.asList( - new HeaderAction().withHeaderActionType(HeaderActionType.DELETE).withHeaderName("vpuvks"), - new HeaderAction().withHeaderActionType(HeaderActionType.DELETE).withHeaderName("lsa"), - new HeaderAction().withHeaderActionType(HeaderActionType.OVERWRITE).withHeaderName("ynfs"), - new HeaderAction().withHeaderActionType(HeaderActionType.OVERWRITE) - .withHeaderName("ljphuopxodl"))) - .withResponseHeaderActions(Arrays.asList( - new HeaderAction().withHeaderActionType(HeaderActionType.OVERWRITE).withHeaderName("torzih"))) - .withRouteConfigurationOverride(new RouteConfiguration())) - .withMatchConditions(Arrays.asList( - new RulesEngineMatchCondition().withRulesEngineMatchVariable(RulesEngineMatchVariable.POST_ARGS) - .withSelector("w") - .withRulesEngineOperator(RulesEngineOperator.ANY) - .withNegateCondition(true) - .withRulesEngineMatchValue( - Arrays.asList("yzrpzbchckqqzq", "ox", "ysuiizynkedya", "rwyhqmibzyhwitsm")) - .withTransforms(Arrays.asList(Transform.URL_ENCODE, Transform.TRIM, Transform.UPPERCASE, - Transform.URL_DECODE)), - new RulesEngineMatchCondition() - .withRulesEngineMatchVariable(RulesEngineMatchVariable.REQUEST_FILENAME_EXTENSION) - .withSelector("umnzgmwznmabik") - .withRulesEngineOperator(RulesEngineOperator.LESS_THAN) - .withNegateCondition(false) - .withRulesEngineMatchValue(Arrays.asList("jhxbld")) - .withTransforms(Arrays.asList(Transform.LOWERCASE, Transform.LOWERCASE, Transform.UPPERCASE)))) - .withMatchProcessingBehavior(MatchProcessingBehavior.CONTINUE), - new RulesEngineRule().withName("m") - .withPriority(1488672187) - .withAction( - new RulesEngineAction() - .withRequestHeaderActions(Arrays.asList( - new HeaderAction().withHeaderActionType(HeaderActionType.DELETE).withHeaderName("kotl"), - new HeaderAction().withHeaderActionType(HeaderActionType.DELETE).withHeaderName("d"), - new HeaderAction().withHeaderActionType(HeaderActionType.OVERWRITE) - .withHeaderName("gsyocogj"))) - .withResponseHeaderActions(Arrays.asList( + RulesEngineInner model + = new RulesEngineInner() + .withRules(Arrays.asList( + new RulesEngineRule().withName("tkcnqxwb") + .withPriority(471574486) + .withAction(new RulesEngineAction() + .withRequestHeaderActions(Arrays.asList( + new HeaderAction().withHeaderActionType(HeaderActionType.APPEND).withHeaderName("pi"), + new HeaderAction().withHeaderActionType(HeaderActionType.APPEND) + .withHeaderName("waasip"))) + .withResponseHeaderActions(Arrays.asList( + new HeaderAction().withHeaderActionType(HeaderActionType.APPEND) + .withHeaderName("byuqerpqlp"), + new HeaderAction().withHeaderActionType(HeaderActionType.OVERWRITE) + .withHeaderName("cciuqgbdbutau"))) + .withRouteConfigurationOverride(new RouteConfiguration())) + .withMatchConditions(Arrays.asList(new RulesEngineMatchCondition() + .withRulesEngineMatchVariable(RulesEngineMatchVariable.REQUEST_FILENAME) + .withSelector("whhmhykojo") + .withRulesEngineOperator(RulesEngineOperator.IPMATCH) + .withNegateCondition(false) + .withRulesEngineMatchValue(Arrays.asList("dlpichkoymkcdyhb")) + .withTransforms(Arrays.asList(Transform.TRIM)), + new RulesEngineMatchCondition() + .withRulesEngineMatchVariable(RulesEngineMatchVariable.REQUEST_HEADER) + .withSelector("reqnovvqfov") + .withRulesEngineOperator(RulesEngineOperator.EQUAL) + .withNegateCondition(false) + .withRulesEngineMatchValue(Arrays.asList("suwsyrsnds", "tgadgvraeaen")) + .withTransforms(Arrays.asList(Transform.UPPERCASE)), + new RulesEngineMatchCondition() + .withRulesEngineMatchVariable(RulesEngineMatchVariable.REQUEST_FILENAME) + .withSelector("rwlqu") + .withRulesEngineOperator(RulesEngineOperator.GEO_MATCH) + .withNegateCondition(false) + .withRulesEngineMatchValue(Arrays.asList("kacewiipfp", "bjibwwiftohq")) + .withTransforms(Arrays.asList(Transform.UPPERCASE, Transform.TRIM)), + new RulesEngineMatchCondition() + .withRulesEngineMatchVariable(RulesEngineMatchVariable.REQUEST_FILENAME) + .withSelector("gplsaknynf") + .withRulesEngineOperator(RulesEngineOperator.GREATER_THAN) + .withNegateCondition(true) + .withRulesEngineMatchValue(Arrays.asList("ph", "op", "odlqiyntor")) + .withTransforms(Arrays.asList(Transform.REMOVE_NULLS, Transform.URL_DECODE)))) + .withMatchProcessingBehavior(MatchProcessingBehavior.CONTINUE), + new RulesEngineRule().withName("jswsrmslyz") + .withPriority(1616775247) + .withAction(new RulesEngineAction() + .withRequestHeaderActions(Arrays.asList( + new HeaderAction().withHeaderActionType(HeaderActionType.DELETE) + .withHeaderName("hckqqzqioxiy"), + new HeaderAction().withHeaderActionType(HeaderActionType.DELETE) + .withHeaderName("iizynkedyatrwyh"), + new HeaderAction().withHeaderActionType(HeaderActionType.DELETE) + .withHeaderName("ibzyhwitsmyp"))) + .withResponseHeaderActions(Arrays.asList( + new HeaderAction().withHeaderActionType(HeaderActionType.DELETE).withHeaderName("cdpu"), + new HeaderAction().withHeaderActionType(HeaderActionType.APPEND) + .withHeaderName("zgmwznmabikns"), + new HeaderAction().withHeaderActionType(HeaderActionType.APPEND).withHeaderName("gj"))) + .withRouteConfigurationOverride(new RouteConfiguration())) + .withMatchConditions(Arrays.asList(new RulesEngineMatchCondition() + .withRulesEngineMatchVariable(RulesEngineMatchVariable.REMOTE_ADDR) + .withSelector("lwwrl") + .withRulesEngineOperator(RulesEngineOperator.BEGINS_WITH) + .withNegateCondition(false) + .withRulesEngineMatchValue(Arrays.asList("cvokotllxdyhg", "y", "cogjltdtbn", "hadoocrk")) + .withTransforms(Arrays.asList(Transform.LOWERCASE, Transform.URL_ENCODE, + Transform.REMOVE_NULLS, Transform.REMOVE_NULLS)), + new RulesEngineMatchCondition() + .withRulesEngineMatchVariable(RulesEngineMatchVariable.REQUEST_URI) + .withSelector("mqg") + .withRulesEngineOperator(RulesEngineOperator.LESS_THAN_OR_EQUAL) + .withNegateCondition(false) + .withRulesEngineMatchValue(Arrays.asList("zikywgg", "kallatmel", "uipiccjzk")) + .withTransforms(Arrays.asList(Transform.REMOVE_NULLS)))) + .withMatchProcessingBehavior(MatchProcessingBehavior.CONTINUE), + new RulesEngineRule().withName("c") + .withPriority(2028866606) + .withAction(new RulesEngineAction().withRequestHeaderActions(Arrays.asList( + new HeaderAction().withHeaderActionType(HeaderActionType.APPEND) + .withHeaderName("yrnxxmueedn"), + new HeaderAction().withHeaderActionType(HeaderActionType.APPEND).withHeaderName("dvstkw"), new HeaderAction().withHeaderActionType(HeaderActionType.DELETE) - .withHeaderName("bnnhadoocrkvcik"), - new HeaderAction().withHeaderActionType(HeaderActionType.OVERWRITE).withHeaderName("vpa"))) - .withRouteConfigurationOverride(new RouteConfiguration())) - .withMatchConditions(Arrays.asList( - new RulesEngineMatchCondition().withRulesEngineMatchVariable(RulesEngineMatchVariable.REQUEST_URI) - .withSelector("u") - .withRulesEngineOperator(RulesEngineOperator.GEO_MATCH) - .withNegateCondition(true) - .withRulesEngineMatchValue(Arrays.asList("wggxkallat", "elwuipi")) - .withTransforms(Arrays.asList(Transform.UPPERCASE, Transform.UPPERCASE)))) - .withMatchProcessingBehavior(MatchProcessingBehavior.CONTINUE), - new RulesEngineRule().withName("v") - .withPriority(1783583685) - .withAction(new RulesEngineAction() - .withRequestHeaderActions(Arrays.asList( - new HeaderAction().withHeaderActionType(HeaderActionType.DELETE).withHeaderName("ayrhyrnx"))) - .withResponseHeaderActions(Arrays.asList( - new HeaderAction().withHeaderActionType(HeaderActionType.APPEND).withHeaderName("edndr"), - new HeaderAction().withHeaderActionType(HeaderActionType.OVERWRITE).withHeaderName("stkwqqtch"), - new HeaderAction().withHeaderActionType(HeaderActionType.DELETE).withHeaderName("lmfmtdaay"))) - .withRouteConfigurationOverride(new RouteConfiguration())) - .withMatchConditions(Arrays.asList( - new RulesEngineMatchCondition().withRulesEngineMatchVariable(RulesEngineMatchVariable.REQUEST_BODY) - .withSelector("piohgwxrtfu") - .withRulesEngineOperator(RulesEngineOperator.ENDS_WITH) - .withNegateCondition(false) - .withRulesEngineMatchValue(Arrays.asList("gyqagvrvmnpkuk")) - .withTransforms(Arrays.asList(Transform.LOWERCASE)), - new RulesEngineMatchCondition() - .withRulesEngineMatchVariable(RulesEngineMatchVariable.REQUEST_FILENAME_EXTENSION) - .withSelector("lxgwimfnjhf") - .withRulesEngineOperator(RulesEngineOperator.GREATER_THAN) - .withNegateCondition(false) - .withRulesEngineMatchValue(Arrays.asList("zk", "foqreyfkzik", "jawneaiv")) - .withTransforms(Arrays.asList(Transform.TRIM, Transform.UPPERCASE, Transform.TRIM)))) - .withMatchProcessingBehavior(MatchProcessingBehavior.CONTINUE))); + .withHeaderName("tchealmf"))) + .withResponseHeaderActions( + Arrays.asList(new HeaderAction().withHeaderActionType(HeaderActionType.DELETE) + .withHeaderName("aygdvwvgpioh"))) + .withRouteConfigurationOverride(new RouteConfiguration())) + .withMatchConditions(Arrays.asList(new RulesEngineMatchCondition() + .withRulesEngineMatchVariable(RulesEngineMatchVariable.REQUEST_SCHEME) + .withSelector("udxepxgyqagv") + .withRulesEngineOperator(RulesEngineOperator.GREATER_THAN_OR_EQUAL) + .withNegateCondition(true) + .withRulesEngineMatchValue(Arrays.asList("k", "kghimdblxgwimfnj")) + .withTransforms(Arrays.asList(Transform.URL_DECODE)), + new RulesEngineMatchCondition() + .withRulesEngineMatchVariable(RulesEngineMatchVariable.REQUEST_URI) + .withSelector("szkkfoqre") + .withRulesEngineOperator(RulesEngineOperator.ENDS_WITH) + .withNegateCondition(false) + .withRulesEngineMatchValue(Arrays.asList("kf")) + .withTransforms(Arrays.asList(Transform.LOWERCASE, Transform.UPPERCASE)), + new RulesEngineMatchCondition() + .withRulesEngineMatchVariable(RulesEngineMatchVariable.POST_ARGS) + .withSelector("vxwc") + .withRulesEngineOperator(RulesEngineOperator.GREATER_THAN) + .withNegateCondition(true) + .withRulesEngineMatchValue(Arrays.asList("irels")) + .withTransforms(Arrays.asList(Transform.LOWERCASE, Transform.LOWERCASE)))) + .withMatchProcessingBehavior(MatchProcessingBehavior.CONTINUE), + new RulesEngineRule().withName("bfatklddxbjhwu") + .withPriority(435205940) + .withAction(new RulesEngineAction() + .withRequestHeaderActions(Arrays.asList( + new HeaderAction().withHeaderActionType(HeaderActionType.APPEND).withHeaderName("jos"))) + .withResponseHeaderActions(Arrays.asList( + new HeaderAction().withHeaderActionType(HeaderActionType.APPEND) + .withHeaderName("ulpjr"), + new HeaderAction().withHeaderActionType(HeaderActionType.APPEND).withHeaderName("ag"))) + .withRouteConfigurationOverride(new RouteConfiguration())) + .withMatchConditions( + Arrays.asList( + new RulesEngineMatchCondition() + .withRulesEngineMatchVariable(RulesEngineMatchVariable.REQUEST_METHOD) + .withSelector("wosytxitcskf") + .withRulesEngineOperator(RulesEngineOperator.IPMATCH) + .withNegateCondition(false) + .withRulesEngineMatchValue( + Arrays.asList("miekkezzikhlyfjh", "gqggebdunygae", "idb")) + .withTransforms(Arrays.asList(Transform.TRIM, Transform.REMOVE_NULLS)), + new RulesEngineMatchCondition() + .withRulesEngineMatchVariable(RulesEngineMatchVariable.REQUEST_SCHEME) + .withSelector("lr") + .withRulesEngineOperator(RulesEngineOperator.ENDS_WITH) + .withNegateCondition(false) + .withRulesEngineMatchValue(Arrays.asList("oadsuvar", "ywdmjsjqbjh", "yxxrwlycoduh")) + .withTransforms(Arrays.asList(Transform.UPPERCASE, Transform.TRIM, + Transform.URL_ENCODE, Transform.LOWERCASE)))) + .withMatchProcessingBehavior(MatchProcessingBehavior.CONTINUE))); model = BinaryData.fromObject(model).toObject(RulesEngineInner.class); - Assertions.assertEquals("f", model.rules().get(0).name()); - Assertions.assertEquals(1572357139, model.rules().get(0).priority()); - Assertions.assertEquals(HeaderActionType.DELETE, + Assertions.assertEquals("tkcnqxwb", model.rules().get(0).name()); + Assertions.assertEquals(471574486, model.rules().get(0).priority()); + Assertions.assertEquals(HeaderActionType.APPEND, model.rules().get(0).action().requestHeaderActions().get(0).headerActionType()); - Assertions.assertEquals("vpuvks", model.rules().get(0).action().requestHeaderActions().get(0).headerName()); - Assertions.assertEquals(HeaderActionType.OVERWRITE, + Assertions.assertEquals("pi", model.rules().get(0).action().requestHeaderActions().get(0).headerName()); + Assertions.assertEquals(HeaderActionType.APPEND, model.rules().get(0).action().responseHeaderActions().get(0).headerActionType()); - Assertions.assertEquals("torzih", model.rules().get(0).action().responseHeaderActions().get(0).headerName()); - Assertions.assertEquals(RulesEngineMatchVariable.POST_ARGS, + Assertions.assertEquals("byuqerpqlp", + model.rules().get(0).action().responseHeaderActions().get(0).headerName()); + Assertions.assertEquals(RulesEngineMatchVariable.REQUEST_FILENAME, model.rules().get(0).matchConditions().get(0).rulesEngineMatchVariable()); - Assertions.assertEquals("w", model.rules().get(0).matchConditions().get(0).selector()); - Assertions.assertEquals(RulesEngineOperator.ANY, + Assertions.assertEquals("whhmhykojo", model.rules().get(0).matchConditions().get(0).selector()); + Assertions.assertEquals(RulesEngineOperator.IPMATCH, model.rules().get(0).matchConditions().get(0).rulesEngineOperator()); - Assertions.assertEquals(true, model.rules().get(0).matchConditions().get(0).negateCondition()); - Assertions.assertEquals("yzrpzbchckqqzq", + Assertions.assertFalse(model.rules().get(0).matchConditions().get(0).negateCondition()); + Assertions.assertEquals("dlpichkoymkcdyhb", model.rules().get(0).matchConditions().get(0).rulesEngineMatchValue().get(0)); - Assertions.assertEquals(Transform.URL_ENCODE, - model.rules().get(0).matchConditions().get(0).transforms().get(0)); + Assertions.assertEquals(Transform.TRIM, model.rules().get(0).matchConditions().get(0).transforms().get(0)); Assertions.assertEquals(MatchProcessingBehavior.CONTINUE, model.rules().get(0).matchProcessingBehavior()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RulesEngineListResultTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RulesEngineListResultTests.java index 6885b621844f3..262ecb7b2a5ac 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RulesEngineListResultTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RulesEngineListResultTests.java @@ -1,26 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.frontdoor.models.RulesEngineListResult; +import com.azure.resourcemanager.frontdoor.implementation.models.RulesEngineListResult; import org.junit.jupiter.api.Assertions; public final class RulesEngineListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RulesEngineListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"resourceState\":\"Migrated\",\"rules\":[{\"name\":\"orxvxcjzhqiz\",\"priority\":1212582847,\"action\":{},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"RequestUri\",\"rulesEngineOperator\":\"LessThanOrEqual\",\"rulesEngineMatchValue\":[]},{\"rulesEngineMatchVariable\":\"RequestFilenameExtension\",\"rulesEngineOperator\":\"Any\",\"rulesEngineMatchValue\":[]},{\"rulesEngineMatchVariable\":\"IsMobile\",\"rulesEngineOperator\":\"Equal\",\"rulesEngineMatchValue\":[]},{\"rulesEngineMatchVariable\":\"RequestScheme\",\"rulesEngineOperator\":\"Equal\",\"rulesEngineMatchValue\":[]}],\"matchProcessingBehavior\":\"Continue\"}]},\"id\":\"juhdqazkmtgguwpi\",\"name\":\"r\",\"type\":\"jcivmmg\"}],\"nextLink\":\"cf\"}") + "{\"value\":[{\"properties\":{\"resourceState\":\"Disabling\",\"rules\":[{\"name\":\"sttktlahbqa\",\"priority\":485437008,\"action\":{},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"RequestUri\",\"rulesEngineOperator\":\"Any\",\"rulesEngineMatchValue\":[]},{\"rulesEngineMatchVariable\":\"QueryString\",\"rulesEngineOperator\":\"IPMatch\",\"rulesEngineMatchValue\":[]},{\"rulesEngineMatchVariable\":\"RequestPath\",\"rulesEngineOperator\":\"Any\",\"rulesEngineMatchValue\":[]}],\"matchProcessingBehavior\":\"Stop\"},{\"name\":\"m\",\"priority\":287881704,\"action\":{},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"IsMobile\",\"rulesEngineOperator\":\"EndsWith\",\"rulesEngineMatchValue\":[]},{\"rulesEngineMatchVariable\":\"RequestBody\",\"rulesEngineOperator\":\"Any\",\"rulesEngineMatchValue\":[]},{\"rulesEngineMatchVariable\":\"QueryString\",\"rulesEngineOperator\":\"GreaterThanOrEqual\",\"rulesEngineMatchValue\":[]}],\"matchProcessingBehavior\":\"Stop\"},{\"name\":\"xcpjuisavokqdzf\",\"priority\":1797695866,\"action\":{},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"RequestBody\",\"rulesEngineOperator\":\"Equal\",\"rulesEngineMatchValue\":[]},{\"rulesEngineMatchVariable\":\"RequestUri\",\"rulesEngineOperator\":\"Contains\",\"rulesEngineMatchValue\":[]},{\"rulesEngineMatchVariable\":\"RemoteAddr\",\"rulesEngineOperator\":\"BeginsWith\",\"rulesEngineMatchValue\":[]},{\"rulesEngineMatchVariable\":\"RequestMethod\",\"rulesEngineOperator\":\"Contains\",\"rulesEngineMatchValue\":[]}],\"matchProcessingBehavior\":\"Continue\"}]},\"id\":\"lkatnwxyiopidkqq\",\"name\":\"uvscxkdmligov\",\"type\":\"rxkpmloazuruoc\"},{\"properties\":{\"resourceState\":\"Disabling\",\"rules\":[{\"name\":\"te\",\"priority\":1838309541,\"action\":{},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"RequestHeader\",\"rulesEngineOperator\":\"IPMatch\",\"rulesEngineMatchValue\":[]},{\"rulesEngineMatchVariable\":\"RequestFilename\",\"rulesEngineOperator\":\"Contains\",\"rulesEngineMatchValue\":[]},{\"rulesEngineMatchVariable\":\"IsMobile\",\"rulesEngineOperator\":\"LessThanOrEqual\",\"rulesEngineMatchValue\":[]}],\"matchProcessingBehavior\":\"Stop\"},{\"name\":\"gslordilmyww\",\"priority\":1226938011,\"action\":{},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"IsMobile\",\"rulesEngineOperator\":\"BeginsWith\",\"rulesEngineMatchValue\":[]}],\"matchProcessingBehavior\":\"Stop\"}]},\"id\":\"abgyvudt\",\"name\":\"ewbcihxuuw\",\"type\":\"j\"},{\"properties\":{\"resourceState\":\"Migrated\",\"rules\":[{\"name\":\"vpayakkudzpx\",\"priority\":1395161469,\"action\":{},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"RequestHeader\",\"rulesEngineOperator\":\"EndsWith\",\"rulesEngineMatchValue\":[]},{\"rulesEngineMatchVariable\":\"RequestPath\",\"rulesEngineOperator\":\"IPMatch\",\"rulesEngineMatchValue\":[]}],\"matchProcessingBehavior\":\"Stop\"}]},\"id\":\"yohpfkyrkdbdgiog\",\"name\":\"kmnwqjnobaiyhddv\",\"type\":\"cegfnmntfp\"}],\"nextLink\":\"memfnczdwvvbalxl\"}") .toObject(RulesEngineListResult.class); - Assertions.assertEquals("cf", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RulesEngineListResult model = new RulesEngineListResult().withNextLink("cf"); - model = BinaryData.fromObject(model).toObject(RulesEngineListResult.class); - Assertions.assertEquals("cf", model.nextLink()); + Assertions.assertEquals("memfnczdwvvbalxl", model.nextLink()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RulesEngineMatchConditionTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RulesEngineMatchConditionTests.java index 839d26b2dd6a2..6f058d5e1c41c 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RulesEngineMatchConditionTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RulesEngineMatchConditionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -16,31 +16,31 @@ public final class RulesEngineMatchConditionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RulesEngineMatchCondition model = BinaryData.fromString( - "{\"rulesEngineMatchVariable\":\"PostArgs\",\"selector\":\"jpqqmted\",\"rulesEngineOperator\":\"GreaterThanOrEqual\",\"negateCondition\":true,\"rulesEngineMatchValue\":[\"ihyeozphvw\"],\"transforms\":[\"Trim\"]}") + "{\"rulesEngineMatchVariable\":\"PostArgs\",\"selector\":\"rqwky\",\"rulesEngineOperator\":\"GreaterThanOrEqual\",\"negateCondition\":true,\"rulesEngineMatchValue\":[\"pg\",\"edkowepbqpcrfk\",\"wccsnjvcdwxlpqek\"],\"transforms\":[\"UrlDecode\",\"UrlEncode\",\"Uppercase\"]}") .toObject(RulesEngineMatchCondition.class); Assertions.assertEquals(RulesEngineMatchVariable.POST_ARGS, model.rulesEngineMatchVariable()); - Assertions.assertEquals("jpqqmted", model.selector()); + Assertions.assertEquals("rqwky", model.selector()); Assertions.assertEquals(RulesEngineOperator.GREATER_THAN_OR_EQUAL, model.rulesEngineOperator()); - Assertions.assertEquals(true, model.negateCondition()); - Assertions.assertEquals("ihyeozphvw", model.rulesEngineMatchValue().get(0)); - Assertions.assertEquals(Transform.TRIM, model.transforms().get(0)); + Assertions.assertTrue(model.negateCondition()); + Assertions.assertEquals("pg", model.rulesEngineMatchValue().get(0)); + Assertions.assertEquals(Transform.URL_DECODE, model.transforms().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { RulesEngineMatchCondition model = new RulesEngineMatchCondition().withRulesEngineMatchVariable(RulesEngineMatchVariable.POST_ARGS) - .withSelector("jpqqmted") + .withSelector("rqwky") .withRulesEngineOperator(RulesEngineOperator.GREATER_THAN_OR_EQUAL) .withNegateCondition(true) - .withRulesEngineMatchValue(Arrays.asList("ihyeozphvw")) - .withTransforms(Arrays.asList(Transform.TRIM)); + .withRulesEngineMatchValue(Arrays.asList("pg", "edkowepbqpcrfk", "wccsnjvcdwxlpqek")) + .withTransforms(Arrays.asList(Transform.URL_DECODE, Transform.URL_ENCODE, Transform.UPPERCASE)); model = BinaryData.fromObject(model).toObject(RulesEngineMatchCondition.class); Assertions.assertEquals(RulesEngineMatchVariable.POST_ARGS, model.rulesEngineMatchVariable()); - Assertions.assertEquals("jpqqmted", model.selector()); + Assertions.assertEquals("rqwky", model.selector()); Assertions.assertEquals(RulesEngineOperator.GREATER_THAN_OR_EQUAL, model.rulesEngineOperator()); - Assertions.assertEquals(true, model.negateCondition()); - Assertions.assertEquals("ihyeozphvw", model.rulesEngineMatchValue().get(0)); - Assertions.assertEquals(Transform.TRIM, model.transforms().get(0)); + Assertions.assertTrue(model.negateCondition()); + Assertions.assertEquals("pg", model.rulesEngineMatchValue().get(0)); + Assertions.assertEquals(Transform.URL_DECODE, model.transforms().get(0)); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RulesEnginePropertiesTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RulesEnginePropertiesTests.java index aee1ffac4ccde..d3e31f6b212c1 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RulesEnginePropertiesTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RulesEnginePropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -23,25 +23,26 @@ public final class RulesEnginePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RulesEngineProperties model = BinaryData.fromString( - "{\"resourceState\":\"Migrated\",\"rules\":[{\"name\":\"hwuaanozjosp\",\"priority\":1082355314,\"action\":{\"requestHeaderActions\":[{\"headerActionType\":\"Append\",\"headerName\":\"pjrvxagl\",\"value\":\"imjwosyt\"},{\"headerActionType\":\"Delete\",\"headerName\":\"tcs\",\"value\":\"cktqumiekkezzi\"}],\"responseHeaderActions\":[{\"headerActionType\":\"Append\",\"headerName\":\"fjhdg\",\"value\":\"gebdunygaeq\"}],\"routeConfigurationOverride\":{\"@odata.type\":\"RouteConfiguration\"}},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"RequestPath\",\"selector\":\"t\",\"rulesEngineOperator\":\"Any\",\"negateCondition\":false,\"rulesEngineMatchValue\":[\"xcyjmoadsuvarmy\",\"dmjsjqb\",\"hhyxxrw\"],\"transforms\":[\"UrlEncode\"]},{\"rulesEngineMatchVariable\":\"IsMobile\",\"selector\":\"hp\",\"rulesEngineOperator\":\"IPMatch\",\"negateCondition\":false,\"rulesEngineMatchValue\":[\"mareqnajxqugj\",\"ky\",\"ubeddg\",\"sofwqmzqalkrmnji\"],\"transforms\":[\"Uppercase\",\"Trim\",\"UrlEncode\"]},{\"rulesEngineMatchVariable\":\"RequestMethod\",\"selector\":\"dfnbyxbaaabjyv\",\"rulesEngineOperator\":\"BeginsWith\",\"negateCondition\":true,\"rulesEngineMatchValue\":[\"m\",\"zrtuzq\",\"gsexne\"],\"transforms\":[\"Uppercase\"]},{\"rulesEngineMatchVariable\":\"RequestFilename\",\"selector\":\"wmewzsyy\",\"rulesEngineOperator\":\"GeoMatch\",\"negateCondition\":true,\"rulesEngineMatchValue\":[\"oibjudpfrxtrthz\",\"aytdwkqbrq\",\"bpaxhexiilivpdt\"],\"transforms\":[\"RemoveNulls\"]}],\"matchProcessingBehavior\":\"Continue\"},{\"name\":\"qoaxoruzfgs\",\"priority\":2005280896,\"action\":{\"requestHeaderActions\":[{\"headerActionType\":\"Delete\",\"headerName\":\"rxxle\",\"value\":\"ramxjezwlwnw\"},{\"headerActionType\":\"Append\",\"headerName\":\"qlcvydy\",\"value\":\"tdooaoj\"}],\"responseHeaderActions\":[{\"headerActionType\":\"Overwrite\",\"headerName\":\"dkooebwnu\",\"value\":\"emmsbvdkc\"},{\"headerActionType\":\"Append\",\"headerName\":\"dtjinfw\",\"value\":\"fltkacjv\"},{\"headerActionType\":\"Delete\",\"headerName\":\"kdlfoa\",\"value\":\"gkfpaga\"},{\"headerActionType\":\"Append\",\"headerName\":\"pulpqblylsyxk\",\"value\":\"nsj\"}],\"routeConfigurationOverride\":{\"@odata.type\":\"RouteConfiguration\"}},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"RequestHeader\",\"selector\":\"gxsds\",\"rulesEngineOperator\":\"EndsWith\",\"negateCondition\":true,\"rulesEngineMatchValue\":[\"sbzkf\",\"beyvpnqicvinvkjj\",\"dxrbuukzcle\",\"yhmlwpaztzp\"],\"transforms\":[\"RemoveNulls\",\"Trim\"]},{\"rulesEngineMatchVariable\":\"RequestFilenameExtension\",\"selector\":\"yfzqwhxxbu\",\"rulesEngineOperator\":\"LessThan\",\"negateCondition\":false,\"rulesEngineMatchValue\":[\"feqztppriol\",\"or\",\"altol\"],\"transforms\":[\"Lowercase\",\"Trim\",\"Trim\"]}],\"matchProcessingBehavior\":\"Stop\"},{\"name\":\"wcsdbnwdcfhucq\",\"priority\":895561091,\"action\":{\"requestHeaderActions\":[{\"headerActionType\":\"Overwrite\",\"headerName\":\"glsbjjc\",\"value\":\"vxb\"},{\"headerActionType\":\"Overwrite\",\"headerName\":\"vudutncor\",\"value\":\"lxqtvcofudfl\"},{\"headerActionType\":\"Overwrite\",\"headerName\":\"gj\",\"value\":\"gdknnqv\"},{\"headerActionType\":\"Delete\",\"headerName\":\"znqntoru\",\"value\":\"gsahmkycgrauw\"}],\"responseHeaderActions\":[{\"headerActionType\":\"Append\",\"headerName\":\"aeburuvdmo\",\"value\":\"mz\"},{\"headerActionType\":\"Delete\",\"headerName\":\"wabm\",\"value\":\"efkifr\"}],\"routeConfigurationOverride\":{\"@odata.type\":\"RouteConfiguration\"}},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"IsMobile\",\"selector\":\"jmqlgkfb\",\"rulesEngineOperator\":\"LessThanOrEqual\",\"negateCondition\":false,\"rulesEngineMatchValue\":[\"ongbjcnt\",\"jitcjedftwwaez\"],\"transforms\":[\"RemoveNulls\",\"RemoveNulls\",\"Uppercase\",\"UrlEncode\"]}],\"matchProcessingBehavior\":\"Stop\"}]}") + "{\"resourceState\":\"Deleting\",\"rules\":[{\"name\":\"zrtuzq\",\"priority\":1575788840,\"action\":{\"requestHeaderActions\":[{\"headerActionType\":\"Overwrite\",\"headerName\":\"nevfdnw\",\"value\":\"mewzsyyc\"}],\"responseHeaderActions\":[{\"headerActionType\":\"Overwrite\",\"headerName\":\"oibjudpfrxtrthz\",\"value\":\"ytdw\"},{\"headerActionType\":\"Overwrite\",\"headerName\":\"brqubp\",\"value\":\"h\"},{\"headerActionType\":\"Append\",\"headerName\":\"iilivpdtiirqtd\",\"value\":\"axoruzfgsquy\"},{\"headerActionType\":\"Delete\",\"headerName\":\"rxxle\",\"value\":\"ramxjezwlwnw\"}],\"routeConfigurationOverride\":{\"@odata.type\":\"RouteConfiguration\"}},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"RemoteAddr\",\"selector\":\"y\",\"rulesEngineOperator\":\"LessThan\",\"negateCondition\":true,\"rulesEngineMatchValue\":[\"dooaojkniodko\",\"ebwnujhe\"],\"transforms\":[\"UrlEncode\",\"RemoveNulls\",\"UrlDecode\",\"Uppercase\"]},{\"rulesEngineMatchVariable\":\"RequestPath\",\"selector\":\"odtji\",\"rulesEngineOperator\":\"GeoMatch\",\"negateCondition\":true,\"rulesEngineMatchValue\":[\"fltkacjv\",\"f\"],\"transforms\":[\"UrlDecode\",\"RemoveNulls\"]}],\"matchProcessingBehavior\":\"Continue\"},{\"name\":\"ggkfpagaowpul\",\"priority\":593695187,\"action\":{\"requestHeaderActions\":[{\"headerActionType\":\"Overwrite\",\"headerName\":\"lsyxkqjnsjervt\",\"value\":\"gxsds\"}],\"responseHeaderActions\":[{\"headerActionType\":\"Append\",\"headerName\":\"psbzkfzbeyvpn\",\"value\":\"cvinvkjjxdxrbuuk\"}],\"routeConfigurationOverride\":{\"@odata.type\":\"RouteConfiguration\"}},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"PostArgs\",\"selector\":\"hmlwpaztzpo\",\"rulesEngineOperator\":\"GreaterThanOrEqual\",\"negateCondition\":false,\"rulesEngineMatchValue\":[\"wyfzqwhxxbuyqa\",\"zfeqztppri\",\"lxorjaltolmncws\",\"bqwcsdbnwdcf\"],\"transforms\":[\"UrlEncode\",\"Trim\"]},{\"rulesEngineMatchVariable\":\"RequestHeader\",\"selector\":\"uvglsbjjcanvx\",\"rulesEngineOperator\":\"Equal\",\"negateCondition\":true,\"rulesEngineMatchValue\":[\"dut\",\"cormr\"],\"transforms\":[\"Lowercase\",\"Uppercase\",\"RemoveNulls\",\"UrlEncode\"]}],\"matchProcessingBehavior\":\"Stop\"},{\"name\":\"dflvkg\",\"priority\":264333959,\"action\":{\"requestHeaderActions\":[{\"headerActionType\":\"Overwrite\",\"headerName\":\"knnqvsaznq\",\"value\":\"orudsgsa\"},{\"headerActionType\":\"Append\",\"headerName\":\"kycgrauwj\",\"value\":\"taeburuvdm\"}],\"responseHeaderActions\":[{\"headerActionType\":\"Append\",\"headerName\":\"zlxwabmqoefkifr\",\"value\":\"puqujmqlgkfbtn\"}],\"routeConfigurationOverride\":{\"@odata.type\":\"RouteConfiguration\"}},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"RequestBody\",\"selector\":\"bjcntujitc\",\"rulesEngineOperator\":\"GreaterThan\",\"negateCondition\":true,\"rulesEngineMatchValue\":[\"wwa\",\"zkoj\",\"dcpzfoqo\",\"i\"],\"transforms\":[\"Uppercase\",\"RemoveNulls\",\"Trim\",\"Uppercase\"]},{\"rulesEngineMatchVariable\":\"RemoteAddr\",\"selector\":\"zuf\",\"rulesEngineOperator\":\"Equal\",\"negateCondition\":true,\"rulesEngineMatchValue\":[\"opidoamciodh\"],\"transforms\":[\"Trim\",\"RemoveNulls\",\"Uppercase\",\"UrlEncode\"]}],\"matchProcessingBehavior\":\"Continue\"}]}") .toObject(RulesEngineProperties.class); - Assertions.assertEquals("hwuaanozjosp", model.rules().get(0).name()); - Assertions.assertEquals(1082355314, model.rules().get(0).priority()); - Assertions.assertEquals(HeaderActionType.APPEND, + Assertions.assertEquals("zrtuzq", model.rules().get(0).name()); + Assertions.assertEquals(1575788840, model.rules().get(0).priority()); + Assertions.assertEquals(HeaderActionType.OVERWRITE, model.rules().get(0).action().requestHeaderActions().get(0).headerActionType()); - Assertions.assertEquals("pjrvxagl", model.rules().get(0).action().requestHeaderActions().get(0).headerName()); - Assertions.assertEquals("imjwosyt", model.rules().get(0).action().requestHeaderActions().get(0).value()); - Assertions.assertEquals(HeaderActionType.APPEND, + Assertions.assertEquals("nevfdnw", model.rules().get(0).action().requestHeaderActions().get(0).headerName()); + Assertions.assertEquals("mewzsyyc", model.rules().get(0).action().requestHeaderActions().get(0).value()); + Assertions.assertEquals(HeaderActionType.OVERWRITE, model.rules().get(0).action().responseHeaderActions().get(0).headerActionType()); - Assertions.assertEquals("fjhdg", model.rules().get(0).action().responseHeaderActions().get(0).headerName()); - Assertions.assertEquals("gebdunygaeq", model.rules().get(0).action().responseHeaderActions().get(0).value()); - Assertions.assertEquals(RulesEngineMatchVariable.REQUEST_PATH, + Assertions.assertEquals("oibjudpfrxtrthz", + model.rules().get(0).action().responseHeaderActions().get(0).headerName()); + Assertions.assertEquals("ytdw", model.rules().get(0).action().responseHeaderActions().get(0).value()); + Assertions.assertEquals(RulesEngineMatchVariable.REMOTE_ADDR, model.rules().get(0).matchConditions().get(0).rulesEngineMatchVariable()); - Assertions.assertEquals("t", model.rules().get(0).matchConditions().get(0).selector()); - Assertions.assertEquals(RulesEngineOperator.ANY, + Assertions.assertEquals("y", model.rules().get(0).matchConditions().get(0).selector()); + Assertions.assertEquals(RulesEngineOperator.LESS_THAN, model.rules().get(0).matchConditions().get(0).rulesEngineOperator()); - Assertions.assertEquals(false, model.rules().get(0).matchConditions().get(0).negateCondition()); - Assertions.assertEquals("xcyjmoadsuvarmy", + Assertions.assertTrue(model.rules().get(0).matchConditions().get(0).negateCondition()); + Assertions.assertEquals("dooaojkniodko", model.rules().get(0).matchConditions().get(0).rulesEngineMatchValue().get(0)); Assertions.assertEquals(Transform.URL_ENCODE, model.rules().get(0).matchConditions().get(0).transforms().get(0)); @@ -51,141 +52,121 @@ public void testDeserialize() throws Exception { @org.junit.jupiter.api.Test public void testSerialize() throws Exception { RulesEngineProperties model = new RulesEngineProperties().withRules(Arrays.asList( - new RulesEngineRule().withName("hwuaanozjosp") - .withPriority(1082355314) + new RulesEngineRule().withName("zrtuzq") + .withPriority(1575788840) .withAction(new RulesEngineAction() - .withRequestHeaderActions(Arrays.asList( + .withRequestHeaderActions( + Arrays.asList(new HeaderAction().withHeaderActionType(HeaderActionType.OVERWRITE) + .withHeaderName("nevfdnw") + .withValue("mewzsyyc"))) + .withResponseHeaderActions(Arrays.asList( + new HeaderAction().withHeaderActionType(HeaderActionType.OVERWRITE) + .withHeaderName("oibjudpfrxtrthz") + .withValue("ytdw"), + new HeaderAction().withHeaderActionType(HeaderActionType.OVERWRITE) + .withHeaderName("brqubp") + .withValue("h"), new HeaderAction().withHeaderActionType(HeaderActionType.APPEND) - .withHeaderName("pjrvxagl") - .withValue("imjwosyt"), + .withHeaderName("iilivpdtiirqtd") + .withValue("axoruzfgsquy"), new HeaderAction().withHeaderActionType(HeaderActionType.DELETE) - .withHeaderName("tcs") - .withValue("cktqumiekkezzi"))) - .withResponseHeaderActions( - Arrays.asList(new HeaderAction().withHeaderActionType(HeaderActionType.APPEND) - .withHeaderName("fjhdg") - .withValue("gebdunygaeq"))) + .withHeaderName("rxxle") + .withValue("ramxjezwlwnw"))) .withRouteConfigurationOverride(new RouteConfiguration())) - .withMatchConditions(Arrays.asList(new RulesEngineMatchCondition() - .withRulesEngineMatchVariable(RulesEngineMatchVariable.REQUEST_PATH) - .withSelector("t") - .withRulesEngineOperator(RulesEngineOperator.ANY) - .withNegateCondition(false) - .withRulesEngineMatchValue(Arrays.asList("xcyjmoadsuvarmy", "dmjsjqb", "hhyxxrw")) - .withTransforms(Arrays.asList(Transform.URL_ENCODE)), - new RulesEngineMatchCondition().withRulesEngineMatchVariable(RulesEngineMatchVariable.IS_MOBILE) - .withSelector("hp") - .withRulesEngineOperator(RulesEngineOperator.IPMATCH) - .withNegateCondition(false) - .withRulesEngineMatchValue(Arrays.asList("mareqnajxqugj", "ky", "ubeddg", "sofwqmzqalkrmnji")) - .withTransforms(Arrays.asList(Transform.UPPERCASE, Transform.TRIM, Transform.URL_ENCODE)), - new RulesEngineMatchCondition() - .withRulesEngineMatchVariable(RulesEngineMatchVariable.REQUEST_METHOD) - .withSelector("dfnbyxbaaabjyv") - .withRulesEngineOperator(RulesEngineOperator.BEGINS_WITH) + .withMatchConditions(Arrays.asList( + new RulesEngineMatchCondition().withRulesEngineMatchVariable(RulesEngineMatchVariable.REMOTE_ADDR) + .withSelector("y") + .withRulesEngineOperator(RulesEngineOperator.LESS_THAN) .withNegateCondition(true) - .withRulesEngineMatchValue(Arrays.asList("m", "zrtuzq", "gsexne")) - .withTransforms(Arrays.asList(Transform.UPPERCASE)), - new RulesEngineMatchCondition() - .withRulesEngineMatchVariable(RulesEngineMatchVariable.REQUEST_FILENAME) - .withSelector("wmewzsyy") + .withRulesEngineMatchValue(Arrays.asList("dooaojkniodko", "ebwnujhe")) + .withTransforms(Arrays.asList(Transform.URL_ENCODE, Transform.REMOVE_NULLS, + Transform.URL_DECODE, Transform.UPPERCASE)), + new RulesEngineMatchCondition().withRulesEngineMatchVariable(RulesEngineMatchVariable.REQUEST_PATH) + .withSelector("odtji") .withRulesEngineOperator(RulesEngineOperator.GEO_MATCH) .withNegateCondition(true) - .withRulesEngineMatchValue(Arrays.asList("oibjudpfrxtrthz", "aytdwkqbrq", "bpaxhexiilivpdt")) - .withTransforms(Arrays.asList(Transform.REMOVE_NULLS)))) + .withRulesEngineMatchValue(Arrays.asList("fltkacjv", "f")) + .withTransforms(Arrays.asList(Transform.URL_DECODE, Transform.REMOVE_NULLS)))) .withMatchProcessingBehavior(MatchProcessingBehavior.CONTINUE), - new RulesEngineRule().withName("qoaxoruzfgs") - .withPriority(2005280896) + new RulesEngineRule().withName("ggkfpagaowpul") + .withPriority(593695187) .withAction(new RulesEngineAction() - .withRequestHeaderActions(Arrays.asList( - new HeaderAction().withHeaderActionType(HeaderActionType.DELETE) - .withHeaderName("rxxle") - .withValue("ramxjezwlwnw"), - new HeaderAction().withHeaderActionType(HeaderActionType.APPEND) - .withHeaderName("qlcvydy") - .withValue("tdooaoj"))) - .withResponseHeaderActions(Arrays.asList( - new HeaderAction().withHeaderActionType(HeaderActionType.OVERWRITE) - .withHeaderName("dkooebwnu") - .withValue("emmsbvdkc"), - new HeaderAction().withHeaderActionType(HeaderActionType.APPEND) - .withHeaderName("dtjinfw") - .withValue("fltkacjv"), - new HeaderAction().withHeaderActionType(HeaderActionType.DELETE) - .withHeaderName("kdlfoa") - .withValue("gkfpaga"), - new HeaderAction().withHeaderActionType(HeaderActionType.APPEND) - .withHeaderName("pulpqblylsyxk") - .withValue("nsj"))) + .withRequestHeaderActions( + Arrays.asList(new HeaderAction().withHeaderActionType(HeaderActionType.OVERWRITE) + .withHeaderName("lsyxkqjnsjervt") + .withValue("gxsds"))) + .withResponseHeaderActions( + Arrays.asList(new HeaderAction().withHeaderActionType(HeaderActionType.APPEND) + .withHeaderName("psbzkfzbeyvpn") + .withValue("cvinvkjjxdxrbuuk"))) .withRouteConfigurationOverride(new RouteConfiguration())) .withMatchConditions(Arrays.asList( + new RulesEngineMatchCondition().withRulesEngineMatchVariable(RulesEngineMatchVariable.POST_ARGS) + .withSelector("hmlwpaztzpo") + .withRulesEngineOperator(RulesEngineOperator.GREATER_THAN_OR_EQUAL) + .withNegateCondition(false) + .withRulesEngineMatchValue( + Arrays.asList("wyfzqwhxxbuyqa", "zfeqztppri", "lxorjaltolmncws", "bqwcsdbnwdcf")) + .withTransforms(Arrays.asList(Transform.URL_ENCODE, Transform.TRIM)), new RulesEngineMatchCondition() .withRulesEngineMatchVariable(RulesEngineMatchVariable.REQUEST_HEADER) - .withSelector("gxsds") - .withRulesEngineOperator(RulesEngineOperator.ENDS_WITH) + .withSelector("uvglsbjjcanvx") + .withRulesEngineOperator(RulesEngineOperator.EQUAL) .withNegateCondition(true) - .withRulesEngineMatchValue( - Arrays.asList("sbzkf", "beyvpnqicvinvkjj", "dxrbuukzcle", "yhmlwpaztzp")) - .withTransforms(Arrays.asList(Transform.REMOVE_NULLS, Transform.TRIM)), - new RulesEngineMatchCondition() - .withRulesEngineMatchVariable(RulesEngineMatchVariable.REQUEST_FILENAME_EXTENSION) - .withSelector("yfzqwhxxbu") - .withRulesEngineOperator(RulesEngineOperator.LESS_THAN) - .withNegateCondition(false) - .withRulesEngineMatchValue(Arrays.asList("feqztppriol", "or", "altol")) - .withTransforms(Arrays.asList(Transform.LOWERCASE, Transform.TRIM, Transform.TRIM)))) + .withRulesEngineMatchValue(Arrays.asList("dut", "cormr")) + .withTransforms(Arrays.asList(Transform.LOWERCASE, Transform.UPPERCASE, Transform.REMOVE_NULLS, + Transform.URL_ENCODE)))) .withMatchProcessingBehavior(MatchProcessingBehavior.STOP), - new RulesEngineRule().withName("wcsdbnwdcfhucq") - .withPriority(895561091) + new RulesEngineRule().withName("dflvkg") + .withPriority(264333959) .withAction(new RulesEngineAction() .withRequestHeaderActions(Arrays.asList( new HeaderAction().withHeaderActionType(HeaderActionType.OVERWRITE) - .withHeaderName("glsbjjc") - .withValue("vxb"), - new HeaderAction().withHeaderActionType(HeaderActionType.OVERWRITE) - .withHeaderName("vudutncor") - .withValue("lxqtvcofudfl"), - new HeaderAction().withHeaderActionType(HeaderActionType.OVERWRITE) - .withHeaderName("gj") - .withValue("gdknnqv"), - new HeaderAction().withHeaderActionType(HeaderActionType.DELETE) - .withHeaderName("znqntoru") - .withValue("gsahmkycgrauw"))) - .withResponseHeaderActions(Arrays.asList( + .withHeaderName("knnqvsaznq") + .withValue("orudsgsa"), new HeaderAction().withHeaderActionType(HeaderActionType.APPEND) - .withHeaderName("aeburuvdmo") - .withValue("mz"), - new HeaderAction().withHeaderActionType(HeaderActionType.DELETE) - .withHeaderName("wabm") - .withValue("efkifr"))) + .withHeaderName("kycgrauwj") + .withValue("taeburuvdm"))) + .withResponseHeaderActions( + Arrays.asList(new HeaderAction().withHeaderActionType(HeaderActionType.APPEND) + .withHeaderName("zlxwabmqoefkifr") + .withValue("puqujmqlgkfbtn"))) .withRouteConfigurationOverride(new RouteConfiguration())) .withMatchConditions(Arrays.asList( - new RulesEngineMatchCondition().withRulesEngineMatchVariable(RulesEngineMatchVariable.IS_MOBILE) - .withSelector("jmqlgkfb") - .withRulesEngineOperator(RulesEngineOperator.LESS_THAN_OR_EQUAL) - .withNegateCondition(false) - .withRulesEngineMatchValue(Arrays.asList("ongbjcnt", "jitcjedftwwaez")) - .withTransforms(Arrays.asList(Transform.REMOVE_NULLS, Transform.REMOVE_NULLS, - Transform.UPPERCASE, Transform.URL_ENCODE)))) - .withMatchProcessingBehavior(MatchProcessingBehavior.STOP))); + new RulesEngineMatchCondition().withRulesEngineMatchVariable(RulesEngineMatchVariable.REQUEST_BODY) + .withSelector("bjcntujitc") + .withRulesEngineOperator(RulesEngineOperator.GREATER_THAN) + .withNegateCondition(true) + .withRulesEngineMatchValue(Arrays.asList("wwa", "zkoj", "dcpzfoqo", "i")) + .withTransforms(Arrays.asList(Transform.UPPERCASE, Transform.REMOVE_NULLS, Transform.TRIM, + Transform.UPPERCASE)), + new RulesEngineMatchCondition().withRulesEngineMatchVariable(RulesEngineMatchVariable.REMOTE_ADDR) + .withSelector("zuf") + .withRulesEngineOperator(RulesEngineOperator.EQUAL) + .withNegateCondition(true) + .withRulesEngineMatchValue(Arrays.asList("opidoamciodh")) + .withTransforms(Arrays.asList(Transform.TRIM, Transform.REMOVE_NULLS, Transform.UPPERCASE, + Transform.URL_ENCODE)))) + .withMatchProcessingBehavior(MatchProcessingBehavior.CONTINUE))); model = BinaryData.fromObject(model).toObject(RulesEngineProperties.class); - Assertions.assertEquals("hwuaanozjosp", model.rules().get(0).name()); - Assertions.assertEquals(1082355314, model.rules().get(0).priority()); - Assertions.assertEquals(HeaderActionType.APPEND, + Assertions.assertEquals("zrtuzq", model.rules().get(0).name()); + Assertions.assertEquals(1575788840, model.rules().get(0).priority()); + Assertions.assertEquals(HeaderActionType.OVERWRITE, model.rules().get(0).action().requestHeaderActions().get(0).headerActionType()); - Assertions.assertEquals("pjrvxagl", model.rules().get(0).action().requestHeaderActions().get(0).headerName()); - Assertions.assertEquals("imjwosyt", model.rules().get(0).action().requestHeaderActions().get(0).value()); - Assertions.assertEquals(HeaderActionType.APPEND, + Assertions.assertEquals("nevfdnw", model.rules().get(0).action().requestHeaderActions().get(0).headerName()); + Assertions.assertEquals("mewzsyyc", model.rules().get(0).action().requestHeaderActions().get(0).value()); + Assertions.assertEquals(HeaderActionType.OVERWRITE, model.rules().get(0).action().responseHeaderActions().get(0).headerActionType()); - Assertions.assertEquals("fjhdg", model.rules().get(0).action().responseHeaderActions().get(0).headerName()); - Assertions.assertEquals("gebdunygaeq", model.rules().get(0).action().responseHeaderActions().get(0).value()); - Assertions.assertEquals(RulesEngineMatchVariable.REQUEST_PATH, + Assertions.assertEquals("oibjudpfrxtrthz", + model.rules().get(0).action().responseHeaderActions().get(0).headerName()); + Assertions.assertEquals("ytdw", model.rules().get(0).action().responseHeaderActions().get(0).value()); + Assertions.assertEquals(RulesEngineMatchVariable.REMOTE_ADDR, model.rules().get(0).matchConditions().get(0).rulesEngineMatchVariable()); - Assertions.assertEquals("t", model.rules().get(0).matchConditions().get(0).selector()); - Assertions.assertEquals(RulesEngineOperator.ANY, + Assertions.assertEquals("y", model.rules().get(0).matchConditions().get(0).selector()); + Assertions.assertEquals(RulesEngineOperator.LESS_THAN, model.rules().get(0).matchConditions().get(0).rulesEngineOperator()); - Assertions.assertEquals(false, model.rules().get(0).matchConditions().get(0).negateCondition()); - Assertions.assertEquals("xcyjmoadsuvarmy", + Assertions.assertTrue(model.rules().get(0).matchConditions().get(0).negateCondition()); + Assertions.assertEquals("dooaojkniodko", model.rules().get(0).matchConditions().get(0).rulesEngineMatchValue().get(0)); Assertions.assertEquals(Transform.URL_ENCODE, model.rules().get(0).matchConditions().get(0).transforms().get(0)); diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RulesEngineRuleTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RulesEngineRuleTests.java index 2f9e9d3da4340..3ad0bf0efc8a5 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RulesEngineRuleTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RulesEngineRuleTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -22,85 +22,85 @@ public final class RulesEngineRuleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RulesEngineRule model = BinaryData.fromString( - "{\"name\":\"rwxkvtkkgl\",\"priority\":2106281603,\"action\":{\"requestHeaderActions\":[{\"headerActionType\":\"Delete\",\"headerName\":\"gvjayvblmh\",\"value\":\"zuhbxvvyhgsopb\"},{\"headerActionType\":\"Delete\",\"headerName\":\"qufegxuvwzfbn\",\"value\":\"mctlpdngitv\"},{\"headerActionType\":\"Overwrite\",\"headerName\":\"mhrixkwmyijejve\",\"value\":\"hbpnaixexccbd\"}],\"responseHeaderActions\":[{\"headerActionType\":\"Overwrite\",\"headerName\":\"hcexdrrvqa\",\"value\":\"kghtpwijnh\"}],\"routeConfigurationOverride\":{\"@odata.type\":\"RouteConfiguration\"}},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"RequestHeader\",\"selector\":\"cxzbfvoowvr\",\"rulesEngineOperator\":\"Equal\",\"negateCondition\":false,\"rulesEngineMatchValue\":[\"qp\",\"y\",\"s\",\"ronzmyhgfip\"],\"transforms\":[\"RemoveNulls\",\"Lowercase\",\"Trim\",\"Trim\"]},{\"rulesEngineMatchVariable\":\"IsMobile\",\"selector\":\"krrjrea\",\"rulesEngineOperator\":\"Any\",\"negateCondition\":true,\"rulesEngineMatchValue\":[\"umh\",\"glikkxwslolb\",\"pvuzlmv\",\"elfk\"],\"transforms\":[\"UrlDecode\",\"Uppercase\",\"UrlEncode\",\"RemoveNulls\"]}],\"matchProcessingBehavior\":\"Stop\"}") + "{\"name\":\"mpipaslthaqfxs\",\"priority\":400254725,\"action\":{\"requestHeaderActions\":[{\"headerActionType\":\"Append\",\"headerName\":\"wbdsr\",\"value\":\"pdrhne\"}],\"responseHeaderActions\":[{\"headerActionType\":\"Delete\",\"headerName\":\"q\",\"value\":\"wyt\"},{\"headerActionType\":\"Overwrite\",\"headerName\":\"ib\",\"value\":\"cgpik\"},{\"headerActionType\":\"Append\",\"headerName\":\"imejzanl\",\"value\":\"xi\"}],\"routeConfigurationOverride\":{\"@odata.type\":\"RouteConfiguration\"}},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"RequestBody\",\"selector\":\"onok\",\"rulesEngineOperator\":\"LessThan\",\"negateCondition\":false,\"rulesEngineMatchValue\":[\"cirgzp\"],\"transforms\":[\"UrlDecode\",\"Trim\"]},{\"rulesEngineMatchVariable\":\"RequestHeader\",\"selector\":\"rnwoiindfp\",\"rulesEngineOperator\":\"Equal\",\"negateCondition\":true,\"rulesEngineMatchValue\":[\"wbtlhflsjcdh\",\"zfjvfbgofe\"],\"transforms\":[\"Trim\"]},{\"rulesEngineMatchVariable\":\"PostArgs\",\"selector\":\"mqhldvrii\",\"rulesEngineOperator\":\"LessThan\",\"negateCondition\":true,\"rulesEngineMatchValue\":[\"lg\"],\"transforms\":[\"Lowercase\",\"RemoveNulls\",\"UrlDecode\"]}],\"matchProcessingBehavior\":\"Continue\"}") .toObject(RulesEngineRule.class); - Assertions.assertEquals("rwxkvtkkgl", model.name()); - Assertions.assertEquals(2106281603, model.priority()); - Assertions.assertEquals(HeaderActionType.DELETE, + Assertions.assertEquals("mpipaslthaqfxs", model.name()); + Assertions.assertEquals(400254725, model.priority()); + Assertions.assertEquals(HeaderActionType.APPEND, model.action().requestHeaderActions().get(0).headerActionType()); - Assertions.assertEquals("gvjayvblmh", model.action().requestHeaderActions().get(0).headerName()); - Assertions.assertEquals("zuhbxvvyhgsopb", model.action().requestHeaderActions().get(0).value()); - Assertions.assertEquals(HeaderActionType.OVERWRITE, + Assertions.assertEquals("wbdsr", model.action().requestHeaderActions().get(0).headerName()); + Assertions.assertEquals("pdrhne", model.action().requestHeaderActions().get(0).value()); + Assertions.assertEquals(HeaderActionType.DELETE, model.action().responseHeaderActions().get(0).headerActionType()); - Assertions.assertEquals("hcexdrrvqa", model.action().responseHeaderActions().get(0).headerName()); - Assertions.assertEquals("kghtpwijnh", model.action().responseHeaderActions().get(0).value()); - Assertions.assertEquals(RulesEngineMatchVariable.REQUEST_HEADER, + Assertions.assertEquals("q", model.action().responseHeaderActions().get(0).headerName()); + Assertions.assertEquals("wyt", model.action().responseHeaderActions().get(0).value()); + Assertions.assertEquals(RulesEngineMatchVariable.REQUEST_BODY, model.matchConditions().get(0).rulesEngineMatchVariable()); - Assertions.assertEquals("cxzbfvoowvr", model.matchConditions().get(0).selector()); - Assertions.assertEquals(RulesEngineOperator.EQUAL, model.matchConditions().get(0).rulesEngineOperator()); - Assertions.assertEquals(false, model.matchConditions().get(0).negateCondition()); - Assertions.assertEquals("qp", model.matchConditions().get(0).rulesEngineMatchValue().get(0)); - Assertions.assertEquals(Transform.REMOVE_NULLS, model.matchConditions().get(0).transforms().get(0)); - Assertions.assertEquals(MatchProcessingBehavior.STOP, model.matchProcessingBehavior()); + Assertions.assertEquals("onok", model.matchConditions().get(0).selector()); + Assertions.assertEquals(RulesEngineOperator.LESS_THAN, model.matchConditions().get(0).rulesEngineOperator()); + Assertions.assertFalse(model.matchConditions().get(0).negateCondition()); + Assertions.assertEquals("cirgzp", model.matchConditions().get(0).rulesEngineMatchValue().get(0)); + Assertions.assertEquals(Transform.URL_DECODE, model.matchConditions().get(0).transforms().get(0)); + Assertions.assertEquals(MatchProcessingBehavior.CONTINUE, model.matchProcessingBehavior()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RulesEngineRule model = new RulesEngineRule().withName("rwxkvtkkgl") - .withPriority(2106281603) + RulesEngineRule model = new RulesEngineRule().withName("mpipaslthaqfxs") + .withPriority(400254725) .withAction(new RulesEngineAction() - .withRequestHeaderActions(Arrays.asList( - new HeaderAction().withHeaderActionType(HeaderActionType.DELETE) - .withHeaderName("gvjayvblmh") - .withValue("zuhbxvvyhgsopb"), + .withRequestHeaderActions(Arrays.asList(new HeaderAction().withHeaderActionType(HeaderActionType.APPEND) + .withHeaderName("wbdsr") + .withValue("pdrhne"))) + .withResponseHeaderActions(Arrays.asList( new HeaderAction().withHeaderActionType(HeaderActionType.DELETE) - .withHeaderName("qufegxuvwzfbn") - .withValue("mctlpdngitv"), + .withHeaderName("q") + .withValue("wyt"), new HeaderAction().withHeaderActionType(HeaderActionType.OVERWRITE) - .withHeaderName("mhrixkwmyijejve") - .withValue("hbpnaixexccbd"))) - .withResponseHeaderActions( - Arrays.asList(new HeaderAction().withHeaderActionType(HeaderActionType.OVERWRITE) - .withHeaderName("hcexdrrvqa") - .withValue("kghtpwijnh"))) + .withHeaderName("ib") + .withValue("cgpik"), + new HeaderAction().withHeaderActionType(HeaderActionType.APPEND) + .withHeaderName("imejzanl") + .withValue("xi"))) .withRouteConfigurationOverride(new RouteConfiguration())) - .withMatchConditions( - Arrays - .asList( - new RulesEngineMatchCondition() - .withRulesEngineMatchVariable(RulesEngineMatchVariable.REQUEST_HEADER) - .withSelector("cxzbfvoowvr") - .withRulesEngineOperator(RulesEngineOperator.EQUAL) - .withNegateCondition(false) - .withRulesEngineMatchValue(Arrays.asList("qp", "y", "s", "ronzmyhgfip")) - .withTransforms(Arrays.asList(Transform.REMOVE_NULLS, Transform.LOWERCASE, Transform.TRIM, - Transform.TRIM)), - new RulesEngineMatchCondition().withRulesEngineMatchVariable(RulesEngineMatchVariable.IS_MOBILE) - .withSelector("krrjrea") - .withRulesEngineOperator(RulesEngineOperator.ANY) - .withNegateCondition(true) - .withRulesEngineMatchValue(Arrays.asList("umh", "glikkxwslolb", "pvuzlmv", "elfk")) - .withTransforms(Arrays.asList(Transform.URL_DECODE, Transform.UPPERCASE, - Transform.URL_ENCODE, Transform.REMOVE_NULLS)))) - .withMatchProcessingBehavior(MatchProcessingBehavior.STOP); + .withMatchConditions(Arrays.asList( + new RulesEngineMatchCondition().withRulesEngineMatchVariable(RulesEngineMatchVariable.REQUEST_BODY) + .withSelector("onok") + .withRulesEngineOperator(RulesEngineOperator.LESS_THAN) + .withNegateCondition(false) + .withRulesEngineMatchValue(Arrays.asList("cirgzp")) + .withTransforms(Arrays.asList(Transform.URL_DECODE, Transform.TRIM)), + new RulesEngineMatchCondition().withRulesEngineMatchVariable(RulesEngineMatchVariable.REQUEST_HEADER) + .withSelector("rnwoiindfp") + .withRulesEngineOperator(RulesEngineOperator.EQUAL) + .withNegateCondition(true) + .withRulesEngineMatchValue(Arrays.asList("wbtlhflsjcdh", "zfjvfbgofe")) + .withTransforms(Arrays.asList(Transform.TRIM)), + new RulesEngineMatchCondition().withRulesEngineMatchVariable(RulesEngineMatchVariable.POST_ARGS) + .withSelector("mqhldvrii") + .withRulesEngineOperator(RulesEngineOperator.LESS_THAN) + .withNegateCondition(true) + .withRulesEngineMatchValue(Arrays.asList("lg")) + .withTransforms(Arrays.asList(Transform.LOWERCASE, Transform.REMOVE_NULLS, Transform.URL_DECODE)))) + .withMatchProcessingBehavior(MatchProcessingBehavior.CONTINUE); model = BinaryData.fromObject(model).toObject(RulesEngineRule.class); - Assertions.assertEquals("rwxkvtkkgl", model.name()); - Assertions.assertEquals(2106281603, model.priority()); - Assertions.assertEquals(HeaderActionType.DELETE, + Assertions.assertEquals("mpipaslthaqfxs", model.name()); + Assertions.assertEquals(400254725, model.priority()); + Assertions.assertEquals(HeaderActionType.APPEND, model.action().requestHeaderActions().get(0).headerActionType()); - Assertions.assertEquals("gvjayvblmh", model.action().requestHeaderActions().get(0).headerName()); - Assertions.assertEquals("zuhbxvvyhgsopb", model.action().requestHeaderActions().get(0).value()); - Assertions.assertEquals(HeaderActionType.OVERWRITE, + Assertions.assertEquals("wbdsr", model.action().requestHeaderActions().get(0).headerName()); + Assertions.assertEquals("pdrhne", model.action().requestHeaderActions().get(0).value()); + Assertions.assertEquals(HeaderActionType.DELETE, model.action().responseHeaderActions().get(0).headerActionType()); - Assertions.assertEquals("hcexdrrvqa", model.action().responseHeaderActions().get(0).headerName()); - Assertions.assertEquals("kghtpwijnh", model.action().responseHeaderActions().get(0).value()); - Assertions.assertEquals(RulesEngineMatchVariable.REQUEST_HEADER, + Assertions.assertEquals("q", model.action().responseHeaderActions().get(0).headerName()); + Assertions.assertEquals("wyt", model.action().responseHeaderActions().get(0).value()); + Assertions.assertEquals(RulesEngineMatchVariable.REQUEST_BODY, model.matchConditions().get(0).rulesEngineMatchVariable()); - Assertions.assertEquals("cxzbfvoowvr", model.matchConditions().get(0).selector()); - Assertions.assertEquals(RulesEngineOperator.EQUAL, model.matchConditions().get(0).rulesEngineOperator()); - Assertions.assertEquals(false, model.matchConditions().get(0).negateCondition()); - Assertions.assertEquals("qp", model.matchConditions().get(0).rulesEngineMatchValue().get(0)); - Assertions.assertEquals(Transform.REMOVE_NULLS, model.matchConditions().get(0).transforms().get(0)); - Assertions.assertEquals(MatchProcessingBehavior.STOP, model.matchProcessingBehavior()); + Assertions.assertEquals("onok", model.matchConditions().get(0).selector()); + Assertions.assertEquals(RulesEngineOperator.LESS_THAN, model.matchConditions().get(0).rulesEngineOperator()); + Assertions.assertFalse(model.matchConditions().get(0).negateCondition()); + Assertions.assertEquals("cirgzp", model.matchConditions().get(0).rulesEngineMatchValue().get(0)); + Assertions.assertEquals(Transform.URL_DECODE, model.matchConditions().get(0).transforms().get(0)); + Assertions.assertEquals(MatchProcessingBehavior.CONTINUE, model.matchProcessingBehavior()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RulesEngineUpdateParametersTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RulesEngineUpdateParametersTests.java index e3b94436198d1..cecfef22a130d 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RulesEngineUpdateParametersTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RulesEngineUpdateParametersTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -23,272 +23,167 @@ public final class RulesEngineUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RulesEngineUpdateParameters model = BinaryData.fromString( - "{\"rules\":[{\"name\":\"ouicybxarzgszu\",\"priority\":1813944379,\"action\":{\"requestHeaderActions\":[{\"headerActionType\":\"Append\",\"headerName\":\"q\",\"value\":\"idoamciodhkha\"},{\"headerActionType\":\"Overwrite\",\"headerName\":\"khnzbonlw\",\"value\":\"oegokdwbwh\"},{\"headerActionType\":\"Append\",\"headerName\":\"z\",\"value\":\"mrv\"}],\"responseHeaderActions\":[{\"headerActionType\":\"Delete\",\"headerName\":\"vbtqgsfraoyzk\",\"value\":\"wtl\"},{\"headerActionType\":\"Append\",\"headerName\":\"guxawqaldsyuuxi\",\"value\":\"rqf\"},{\"headerActionType\":\"Delete\",\"headerName\":\"wyznkbyku\",\"value\":\"pfhpagmhrskdsnfd\"}],\"routeConfigurationOverride\":{\"@odata.type\":\"RouteConfiguration\"}},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"RequestFilenameExtension\",\"selector\":\"tdlmkkzevd\",\"rulesEngineOperator\":\"GreaterThanOrEqual\",\"negateCondition\":true,\"rulesEngineMatchValue\":[\"usdsttwv\",\"gvbbejdcng\"],\"transforms\":[\"Trim\"]},{\"rulesEngineMatchVariable\":\"PostArgs\",\"selector\":\"ufgmjzrwrdg\",\"rulesEngineOperator\":\"GeoMatch\",\"negateCondition\":false,\"rulesEngineMatchValue\":[\"nuuzkopbm\",\"nrfdw\",\"yuhhziu\"],\"transforms\":[\"Uppercase\",\"Lowercase\",\"Uppercase\",\"RemoveNulls\"]},{\"rulesEngineMatchVariable\":\"RequestFilename\",\"selector\":\"smlmzqhoftrm\",\"rulesEngineOperator\":\"GreaterThanOrEqual\",\"negateCondition\":false,\"rulesEngineMatchValue\":[\"ah\",\"icslfaoq\"],\"transforms\":[\"Lowercase\",\"UrlEncode\",\"UrlEncode\",\"UrlDecode\"]},{\"rulesEngineMatchVariable\":\"RemoteAddr\",\"selector\":\"nswhcc\",\"rulesEngineOperator\":\"LessThanOrEqual\",\"negateCondition\":false,\"rulesEngineMatchValue\":[\"ivwitqscywugg\",\"oluhczbwemh\",\"i\"],\"transforms\":[\"UrlDecode\"]}],\"matchProcessingBehavior\":\"Continue\"},{\"name\":\"dwmsweypqwd\",\"priority\":840450646,\"action\":{\"requestHeaderActions\":[{\"headerActionType\":\"Delete\",\"headerName\":\"ccnxqhuex\",\"value\":\"ttlstvlzywemhz\"},{\"headerActionType\":\"Overwrite\",\"headerName\":\"csdtclusiypbs\",\"value\":\"ytguslf\"}],\"responseHeaderActions\":[{\"headerActionType\":\"Overwrite\",\"headerName\":\"ygqukyhejh\",\"value\":\"sx\"},{\"headerActionType\":\"Overwrite\",\"headerName\":\"pelol\",\"value\":\"vk\"},{\"headerActionType\":\"Delete\",\"headerName\":\"pqvujzraehtwdwrf\",\"value\":\"wib\"},{\"headerActionType\":\"Append\",\"headerName\":\"cdl\",\"value\":\"shfwpracstwity\"}],\"routeConfigurationOverride\":{\"@odata.type\":\"RouteConfiguration\"}},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"RequestUri\",\"selector\":\"cedcpnmdy\",\"rulesEngineOperator\":\"LessThanOrEqual\",\"negateCondition\":false,\"rulesEngineMatchValue\":[\"xltjcvnhltiu\",\"cxnavv\"],\"transforms\":[\"UrlEncode\"]},{\"rulesEngineMatchVariable\":\"RequestPath\",\"selector\":\"qunyowxwlmdjr\",\"rulesEngineOperator\":\"LessThanOrEqual\",\"negateCondition\":false,\"rulesEngineMatchValue\":[\"vfvpdbodaciz\",\"j\",\"lhkrribdeibqipqk\"],\"transforms\":[\"Uppercase\",\"Uppercase\"]}],\"matchProcessingBehavior\":\"Continue\"},{\"name\":\"wm\",\"priority\":1680310004,\"action\":{\"requestHeaderActions\":[{\"headerActionType\":\"Delete\",\"headerName\":\"jpjorwkqnyhgb\",\"value\":\"tjivfxzsjabib\"},{\"headerActionType\":\"Delete\",\"headerName\":\"stawfsdjpvkv\",\"value\":\"jxbkzbzkdvn\"},{\"headerActionType\":\"Overwrite\",\"headerName\":\"abudurgk\",\"value\":\"mokzhjjklf\"}],\"responseHeaderActions\":[{\"headerActionType\":\"Delete\",\"headerName\":\"uwqlgzrfzeey\",\"value\":\"izikayuhq\"},{\"headerActionType\":\"Append\",\"headerName\":\"jbsybbqw\",\"value\":\"t\"},{\"headerActionType\":\"Delete\",\"headerName\":\"gmfpgvmp\",\"value\":\"as\"},{\"headerActionType\":\"Delete\",\"headerName\":\"haq\",\"value\":\"ss\"}],\"routeConfigurationOverride\":{\"@odata.type\":\"RouteConfiguration\"}},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"RemoteAddr\",\"selector\":\"dsrezpdrhneuyow\",\"rulesEngineOperator\":\"Equal\",\"negateCondition\":false,\"rulesEngineMatchValue\":[\"t\",\"sibircgpi\"],\"transforms\":[\"Uppercase\",\"Trim\",\"Trim\"]},{\"rulesEngineMatchVariable\":\"RequestPath\",\"selector\":\"anlfzxiavrmbz\",\"rulesEngineOperator\":\"Contains\",\"negateCondition\":false,\"rulesEngineMatchValue\":[\"xrjqcirgzpfrlazs\"],\"transforms\":[\"UrlDecode\",\"Trim\"]},{\"rulesEngineMatchVariable\":\"IsMobile\",\"selector\":\"ndfpwpj\",\"rulesEngineOperator\":\"EndsWith\",\"negateCondition\":false,\"rulesEngineMatchValue\":[\"lhflsjcdhszfjvf\",\"gofel\",\"a\",\"rqmq\"],\"transforms\":[\"Uppercase\",\"UrlDecode\",\"Uppercase\"]},{\"rulesEngineMatchVariable\":\"PostArgs\",\"selector\":\"ojnal\",\"rulesEngineOperator\":\"Contains\",\"negateCondition\":true,\"rulesEngineMatchValue\":[\"tvsexsowuel\",\"qhhahhxvrhmzkwpj\",\"wws\",\"ughftqsx\"],\"transforms\":[\"RemoveNulls\",\"Trim\"]}],\"matchProcessingBehavior\":\"Stop\"},{\"name\":\"kndxdigrjgu\",\"priority\":1040551397,\"action\":{\"requestHeaderActions\":[{\"headerActionType\":\"Append\",\"headerName\":\"syqtfi\",\"value\":\"hbotzingamvppho\"},{\"headerActionType\":\"Overwrite\",\"headerName\":\"qzudphq\",\"value\":\"vdkfwynwcvtbvk\"},{\"headerActionType\":\"Append\",\"headerName\":\"hmtnvy\",\"value\":\"atkzwpcnpw\"},{\"headerActionType\":\"Append\",\"headerName\":\"jaesgvvsccya\",\"value\":\"uq\"}],\"responseHeaderActions\":[{\"headerActionType\":\"Append\",\"headerName\":\"gzlvdnkfxu\",\"value\":\"mdwzrmuhapfcqdps\"},{\"headerActionType\":\"Append\",\"headerName\":\"qvpsvuoymg\",\"value\":\"elvezrypq\"},{\"headerActionType\":\"Overwrite\",\"headerName\":\"feo\",\"value\":\"rqwky\"},{\"headerActionType\":\"Overwrite\",\"headerName\":\"ob\",\"value\":\"gxedkow\"}],\"routeConfigurationOverride\":{\"@odata.type\":\"RouteConfiguration\"}},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"RequestFilenameExtension\",\"selector\":\"rfkbwccsnjvcdwxl\",\"rulesEngineOperator\":\"BeginsWith\",\"negateCondition\":true,\"rulesEngineMatchValue\":[\"tn\",\"htjsying\"],\"transforms\":[\"Lowercase\",\"Lowercase\",\"RemoveNulls\"]},{\"rulesEngineMatchVariable\":\"RequestBody\",\"selector\":\"htmdvy\",\"rulesEngineOperator\":\"GreaterThanOrEqual\",\"negateCondition\":true,\"rulesEngineMatchValue\":[\"gszywk\",\"irryuzhlh\",\"joqrvqqaatj\",\"nrvgoupmfiibfgg\"],\"transforms\":[\"Trim\"]}],\"matchProcessingBehavior\":\"Continue\"}]}") + "{\"rules\":[{\"name\":\"nlwntoe\",\"priority\":1273575692,\"action\":{\"requestHeaderActions\":[{\"headerActionType\":\"Overwrite\",\"headerName\":\"bwh\",\"value\":\"z\"},{\"headerActionType\":\"Delete\",\"headerName\":\"mrv\",\"value\":\"ztvbtqgsfr\"},{\"headerActionType\":\"Delete\",\"headerName\":\"yzkoowtlmngu\",\"value\":\"wqaldsyu\"},{\"headerActionType\":\"Overwrite\",\"headerName\":\"imerqfobwyznk\",\"value\":\"kutwpf\"}],\"responseHeaderActions\":[{\"headerActionType\":\"Append\",\"headerName\":\"m\",\"value\":\"skdsnfdsdoakg\"}],\"routeConfigurationOverride\":{\"@odata.type\":\"RouteConfiguration\"}},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"IsMobile\",\"selector\":\"zev\",\"rulesEngineOperator\":\"GreaterThan\",\"negateCondition\":true,\"rulesEngineMatchValue\":[\"pusdstt\",\"vogvbbejdcngqqmo\",\"kufgmj\",\"rwr\"],\"transforms\":[\"Uppercase\",\"Uppercase\",\"Trim\"]},{\"rulesEngineMatchVariable\":\"IsMobile\",\"selector\":\"u\",\"rulesEngineOperator\":\"Contains\",\"negateCondition\":true,\"rulesEngineMatchValue\":[\"bminrfdwoyuhhzi\",\"iefozbhdmsml\"],\"transforms\":[\"UrlEncode\",\"UrlDecode\",\"Lowercase\",\"Uppercase\"]},{\"rulesEngineMatchVariable\":\"RequestUri\",\"selector\":\"ae\",\"rulesEngineOperator\":\"GreaterThanOrEqual\",\"negateCondition\":false,\"rulesEngineMatchValue\":[\"xicslfao\",\"z\",\"iyylhalnswhccsp\"],\"transforms\":[\"UrlEncode\",\"UrlEncode\",\"Uppercase\"]}],\"matchProcessingBehavior\":\"Continue\"},{\"name\":\"qscywu\",\"priority\":904154901,\"action\":{\"requestHeaderActions\":[{\"headerActionType\":\"Append\",\"headerName\":\"uhczbwemh\",\"value\":\"rsbrgzdwm\"},{\"headerActionType\":\"Overwrite\",\"headerName\":\"eypqwdxggicccn\",\"value\":\"huexmk\"},{\"headerActionType\":\"Append\",\"headerName\":\"lstvlzywe\",\"value\":\"zrncsdt\"}],\"responseHeaderActions\":[{\"headerActionType\":\"Append\",\"headerName\":\"iypbsfgytgusl\",\"value\":\"adcy\"}],\"routeConfigurationOverride\":{\"@odata.type\":\"RouteConfiguration\"}},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"IsMobile\",\"selector\":\"ejhzisxg\",\"rulesEngineOperator\":\"GreaterThan\",\"negateCondition\":false,\"rulesEngineMatchValue\":[\"lppvksrpq\",\"ujzra\",\"htwdwrftswibyrcd\",\"bhshfwpracstwity\"],\"transforms\":[\"Lowercase\",\"RemoveNulls\",\"Uppercase\"]},{\"rulesEngineMatchVariable\":\"PostArgs\",\"selector\":\"dcpnmdyodnw\",\"rulesEngineOperator\":\"Equal\",\"negateCondition\":false,\"rulesEngineMatchValue\":[\"cvnhltiugc\"],\"transforms\":[\"UrlEncode\",\"UrlDecode\"]},{\"rulesEngineMatchVariable\":\"RemoteAddr\",\"selector\":\"qiby\",\"rulesEngineOperator\":\"GreaterThanOrEqual\",\"negateCondition\":false,\"rulesEngineMatchValue\":[\"wxwlmdjrkvfgb\"],\"transforms\":[\"RemoveNulls\",\"Uppercase\",\"UrlDecode\"]}],\"matchProcessingBehavior\":\"Continue\"},{\"name\":\"acizsjqlhkrr\",\"priority\":268834532,\"action\":{\"requestHeaderActions\":[{\"headerActionType\":\"Overwrite\",\"headerName\":\"b\",\"value\":\"p\"}],\"responseHeaderActions\":[{\"headerActionType\":\"Overwrite\",\"headerName\":\"vxndz\",\"value\":\"krefajpjo\"},{\"headerActionType\":\"Delete\",\"headerName\":\"kqnyh\",\"value\":\"ij\"},{\"headerActionType\":\"Overwrite\",\"headerName\":\"ivfxzsjabibsyst\",\"value\":\"fsdjpvkvp\"},{\"headerActionType\":\"Delete\",\"headerName\":\"xbkzbzkdvncj\",\"value\":\"udurgkakmokz\"}],\"routeConfigurationOverride\":{\"@odata.type\":\"RouteConfiguration\"}},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"RequestMethod\",\"selector\":\"fhmouwq\",\"rulesEngineOperator\":\"GeoMatch\",\"negateCondition\":false,\"rulesEngineMatchValue\":[\"zeeyebi\",\"ikayuhqlbjbsybb\",\"wrv\"],\"transforms\":[\"RemoveNulls\",\"Lowercase\",\"UrlEncode\",\"Uppercase\"]}],\"matchProcessingBehavior\":\"Continue\"}]}") .toObject(RulesEngineUpdateParameters.class); - Assertions.assertEquals("ouicybxarzgszu", model.rules().get(0).name()); - Assertions.assertEquals(1813944379, model.rules().get(0).priority()); - Assertions.assertEquals(HeaderActionType.APPEND, + Assertions.assertEquals("nlwntoe", model.rules().get(0).name()); + Assertions.assertEquals(1273575692, model.rules().get(0).priority()); + Assertions.assertEquals(HeaderActionType.OVERWRITE, model.rules().get(0).action().requestHeaderActions().get(0).headerActionType()); - Assertions.assertEquals("q", model.rules().get(0).action().requestHeaderActions().get(0).headerName()); - Assertions.assertEquals("idoamciodhkha", model.rules().get(0).action().requestHeaderActions().get(0).value()); - Assertions.assertEquals(HeaderActionType.DELETE, + Assertions.assertEquals("bwh", model.rules().get(0).action().requestHeaderActions().get(0).headerName()); + Assertions.assertEquals("z", model.rules().get(0).action().requestHeaderActions().get(0).value()); + Assertions.assertEquals(HeaderActionType.APPEND, model.rules().get(0).action().responseHeaderActions().get(0).headerActionType()); - Assertions.assertEquals("vbtqgsfraoyzk", - model.rules().get(0).action().responseHeaderActions().get(0).headerName()); - Assertions.assertEquals("wtl", model.rules().get(0).action().responseHeaderActions().get(0).value()); - Assertions.assertEquals(RulesEngineMatchVariable.REQUEST_FILENAME_EXTENSION, + Assertions.assertEquals("m", model.rules().get(0).action().responseHeaderActions().get(0).headerName()); + Assertions.assertEquals("skdsnfdsdoakg", model.rules().get(0).action().responseHeaderActions().get(0).value()); + Assertions.assertEquals(RulesEngineMatchVariable.IS_MOBILE, model.rules().get(0).matchConditions().get(0).rulesEngineMatchVariable()); - Assertions.assertEquals("tdlmkkzevd", model.rules().get(0).matchConditions().get(0).selector()); - Assertions.assertEquals(RulesEngineOperator.GREATER_THAN_OR_EQUAL, + Assertions.assertEquals("zev", model.rules().get(0).matchConditions().get(0).selector()); + Assertions.assertEquals(RulesEngineOperator.GREATER_THAN, model.rules().get(0).matchConditions().get(0).rulesEngineOperator()); - Assertions.assertEquals(true, model.rules().get(0).matchConditions().get(0).negateCondition()); - Assertions.assertEquals("usdsttwv", + Assertions.assertTrue(model.rules().get(0).matchConditions().get(0).negateCondition()); + Assertions.assertEquals("pusdstt", model.rules().get(0).matchConditions().get(0).rulesEngineMatchValue().get(0)); - Assertions.assertEquals(Transform.TRIM, model.rules().get(0).matchConditions().get(0).transforms().get(0)); + Assertions.assertEquals(Transform.UPPERCASE, model.rules().get(0).matchConditions().get(0).transforms().get(0)); Assertions.assertEquals(MatchProcessingBehavior.CONTINUE, model.rules().get(0).matchProcessingBehavior()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RulesEngineUpdateParameters model - = new RulesEngineUpdateParameters() - .withRules( - Arrays - .asList( - new RulesEngineRule().withName("ouicybxarzgszu") - .withPriority(1813944379) - .withAction( - new RulesEngineAction() - .withRequestHeaderActions(Arrays.asList( - new HeaderAction().withHeaderActionType(HeaderActionType.APPEND) - .withHeaderName("q") - .withValue("idoamciodhkha"), - new HeaderAction().withHeaderActionType(HeaderActionType.OVERWRITE) - .withHeaderName("khnzbonlw") - .withValue("oegokdwbwh"), - new HeaderAction().withHeaderActionType(HeaderActionType.APPEND) - .withHeaderName("z") - .withValue("mrv"))) - .withResponseHeaderActions(Arrays.asList( - new HeaderAction().withHeaderActionType(HeaderActionType.DELETE) - .withHeaderName("vbtqgsfraoyzk") - .withValue("wtl"), - new HeaderAction().withHeaderActionType(HeaderActionType.APPEND) - .withHeaderName("guxawqaldsyuuxi") - .withValue("rqf"), - new HeaderAction().withHeaderActionType(HeaderActionType.DELETE) - .withHeaderName("wyznkbyku") - .withValue("pfhpagmhrskdsnfd"))) - .withRouteConfigurationOverride(new RouteConfiguration())) - .withMatchConditions( - Arrays.asList( - new RulesEngineMatchCondition() - .withRulesEngineMatchVariable( - RulesEngineMatchVariable.REQUEST_FILENAME_EXTENSION) - .withSelector("tdlmkkzevd") - .withRulesEngineOperator(RulesEngineOperator.GREATER_THAN_OR_EQUAL) - .withNegateCondition(true) - .withRulesEngineMatchValue(Arrays.asList("usdsttwv", "gvbbejdcng")) - .withTransforms(Arrays.asList(Transform.TRIM)), - new RulesEngineMatchCondition() - .withRulesEngineMatchVariable(RulesEngineMatchVariable.POST_ARGS) - .withSelector("ufgmjzrwrdg") - .withRulesEngineOperator(RulesEngineOperator.GEO_MATCH) - .withNegateCondition(false) - .withRulesEngineMatchValue(Arrays.asList("nuuzkopbm", "nrfdw", "yuhhziu")) - .withTransforms(Arrays.asList(Transform.UPPERCASE, Transform.LOWERCASE, - Transform.UPPERCASE, Transform.REMOVE_NULLS)), - new RulesEngineMatchCondition() - .withRulesEngineMatchVariable(RulesEngineMatchVariable.REQUEST_FILENAME) - .withSelector("smlmzqhoftrm") - .withRulesEngineOperator(RulesEngineOperator.GREATER_THAN_OR_EQUAL) - .withNegateCondition(false) - .withRulesEngineMatchValue(Arrays.asList("ah", "icslfaoq")) - .withTransforms(Arrays.asList(Transform.LOWERCASE, Transform.URL_ENCODE, - Transform.URL_ENCODE, Transform.URL_DECODE)), - new RulesEngineMatchCondition() - .withRulesEngineMatchVariable(RulesEngineMatchVariable.REMOTE_ADDR) - .withSelector("nswhcc") - .withRulesEngineOperator(RulesEngineOperator.LESS_THAN_OR_EQUAL) - .withNegateCondition(false) - .withRulesEngineMatchValue(Arrays.asList("ivwitqscywugg", "oluhczbwemh", - "i")) - .withTransforms(Arrays.asList(Transform.URL_DECODE)))) - .withMatchProcessingBehavior(MatchProcessingBehavior.CONTINUE), - new RulesEngineRule().withName("dwmsweypqwd") - .withPriority(840450646) - .withAction(new RulesEngineAction() - .withRequestHeaderActions(Arrays.asList( - new HeaderAction().withHeaderActionType(HeaderActionType.DELETE) - .withHeaderName("ccnxqhuex") - .withValue("ttlstvlzywemhz"), - new HeaderAction().withHeaderActionType(HeaderActionType.OVERWRITE) - .withHeaderName("csdtclusiypbs") - .withValue("ytguslf"))) - .withResponseHeaderActions(Arrays.asList( - new HeaderAction().withHeaderActionType(HeaderActionType.OVERWRITE) - .withHeaderName("ygqukyhejh") - .withValue("sx"), - new HeaderAction().withHeaderActionType(HeaderActionType.OVERWRITE) - .withHeaderName("pelol") - .withValue("vk"), - new HeaderAction().withHeaderActionType(HeaderActionType.DELETE) - .withHeaderName("pqvujzraehtwdwrf") - .withValue("wib"), - new HeaderAction().withHeaderActionType(HeaderActionType.APPEND) - .withHeaderName("cdl") - .withValue("shfwpracstwity"))) - .withRouteConfigurationOverride(new RouteConfiguration())) - .withMatchConditions( - Arrays.asList( - new RulesEngineMatchCondition() - .withRulesEngineMatchVariable(RulesEngineMatchVariable.REQUEST_URI) - .withSelector("cedcpnmdy") - .withRulesEngineOperator(RulesEngineOperator.LESS_THAN_OR_EQUAL) - .withNegateCondition(false) - .withRulesEngineMatchValue(Arrays.asList("xltjcvnhltiu", "cxnavv")) - .withTransforms(Arrays.asList(Transform.URL_ENCODE)), - new RulesEngineMatchCondition() - .withRulesEngineMatchVariable(RulesEngineMatchVariable.REQUEST_PATH) - .withSelector("qunyowxwlmdjr") - .withRulesEngineOperator(RulesEngineOperator.LESS_THAN_OR_EQUAL) - .withNegateCondition(false) - .withRulesEngineMatchValue( - Arrays.asList("vfvpdbodaciz", "j", "lhkrribdeibqipqk")) - .withTransforms(Arrays.asList(Transform.UPPERCASE, Transform.UPPERCASE)))) - .withMatchProcessingBehavior(MatchProcessingBehavior.CONTINUE), - new RulesEngineRule().withName("wm") - .withPriority(1680310004) - .withAction(new RulesEngineAction() - .withRequestHeaderActions(Arrays.asList( - new HeaderAction().withHeaderActionType(HeaderActionType.DELETE) - .withHeaderName("jpjorwkqnyhgb") - .withValue("tjivfxzsjabib"), - new HeaderAction().withHeaderActionType(HeaderActionType.DELETE) - .withHeaderName("stawfsdjpvkv") - .withValue("jxbkzbzkdvn"), - new HeaderAction().withHeaderActionType(HeaderActionType.OVERWRITE) - .withHeaderName("abudurgk") - .withValue("mokzhjjklf"))) - .withResponseHeaderActions(Arrays.asList( - new HeaderAction().withHeaderActionType(HeaderActionType.DELETE) - .withHeaderName("uwqlgzrfzeey") - .withValue("izikayuhq"), - new HeaderAction().withHeaderActionType(HeaderActionType.APPEND) - .withHeaderName("jbsybbqw") - .withValue("t"), - new HeaderAction().withHeaderActionType(HeaderActionType.DELETE) - .withHeaderName("gmfpgvmp") - .withValue("as"), - new HeaderAction().withHeaderActionType(HeaderActionType.DELETE) - .withHeaderName("haq") - .withValue("ss"))) - .withRouteConfigurationOverride(new RouteConfiguration())) - .withMatchConditions( - Arrays.asList( - new RulesEngineMatchCondition() - .withRulesEngineMatchVariable(RulesEngineMatchVariable.REMOTE_ADDR) - .withSelector("dsrezpdrhneuyow") - .withRulesEngineOperator(RulesEngineOperator.EQUAL) - .withNegateCondition(false) - .withRulesEngineMatchValue(Arrays.asList("t", "sibircgpi")) - .withTransforms( - Arrays.asList(Transform.UPPERCASE, Transform.TRIM, Transform.TRIM)), - new RulesEngineMatchCondition() - .withRulesEngineMatchVariable(RulesEngineMatchVariable.REQUEST_PATH) - .withSelector("anlfzxiavrmbz") - .withRulesEngineOperator(RulesEngineOperator.CONTAINS) - .withNegateCondition(false) - .withRulesEngineMatchValue(Arrays.asList("xrjqcirgzpfrlazs")) - .withTransforms(Arrays.asList(Transform.URL_DECODE, Transform.TRIM)), - new RulesEngineMatchCondition() - .withRulesEngineMatchVariable(RulesEngineMatchVariable.IS_MOBILE) - .withSelector("ndfpwpj") - .withRulesEngineOperator(RulesEngineOperator.ENDS_WITH) - .withNegateCondition(false) - .withRulesEngineMatchValue( - Arrays.asList("lhflsjcdhszfjvf", "gofel", "a", "rqmq")) - .withTransforms(Arrays.asList(Transform.UPPERCASE, Transform.URL_DECODE, - Transform.UPPERCASE)), - new RulesEngineMatchCondition() - .withRulesEngineMatchVariable(RulesEngineMatchVariable.POST_ARGS) - .withSelector("ojnal") - .withRulesEngineOperator(RulesEngineOperator.CONTAINS) - .withNegateCondition(true) - .withRulesEngineMatchValue(Arrays.asList("tvsexsowuel", "qhhahhxvrhmzkwpj", - "wws", "ughftqsx")) - .withTransforms(Arrays.asList(Transform.REMOVE_NULLS, Transform.TRIM)))) - .withMatchProcessingBehavior(MatchProcessingBehavior.STOP), - new RulesEngineRule().withName("kndxdigrjgu") - .withPriority(1040551397) - .withAction(new RulesEngineAction() - .withRequestHeaderActions(Arrays.asList( - new HeaderAction().withHeaderActionType(HeaderActionType.APPEND) - .withHeaderName("syqtfi") - .withValue("hbotzingamvppho"), - new HeaderAction().withHeaderActionType(HeaderActionType.OVERWRITE) - .withHeaderName("qzudphq") - .withValue("vdkfwynwcvtbvk"), - new HeaderAction().withHeaderActionType(HeaderActionType.APPEND) - .withHeaderName("hmtnvy") - .withValue("atkzwpcnpw"), - new HeaderAction().withHeaderActionType(HeaderActionType.APPEND) - .withHeaderName("jaesgvvsccya") - .withValue("uq"))) - .withResponseHeaderActions(Arrays.asList( - new HeaderAction().withHeaderActionType(HeaderActionType.APPEND) - .withHeaderName("gzlvdnkfxu") - .withValue("mdwzrmuhapfcqdps"), - new HeaderAction().withHeaderActionType(HeaderActionType.APPEND) - .withHeaderName("qvpsvuoymg") - .withValue("elvezrypq"), - new HeaderAction().withHeaderActionType(HeaderActionType.OVERWRITE) - .withHeaderName("feo") - .withValue("rqwky"), - new HeaderAction().withHeaderActionType(HeaderActionType.OVERWRITE) - .withHeaderName("ob") - .withValue("gxedkow"))) - .withRouteConfigurationOverride(new RouteConfiguration())) - .withMatchConditions(Arrays.asList( - new RulesEngineMatchCondition() - .withRulesEngineMatchVariable( - RulesEngineMatchVariable.REQUEST_FILENAME_EXTENSION) - .withSelector("rfkbwccsnjvcdwxl") - .withRulesEngineOperator(RulesEngineOperator.BEGINS_WITH) - .withNegateCondition(true) - .withRulesEngineMatchValue(Arrays.asList("tn", "htjsying")) - .withTransforms(Arrays.asList(Transform.LOWERCASE, Transform.LOWERCASE, - Transform.REMOVE_NULLS)), - new RulesEngineMatchCondition() - .withRulesEngineMatchVariable(RulesEngineMatchVariable.REQUEST_BODY) - .withSelector("htmdvy") - .withRulesEngineOperator(RulesEngineOperator.GREATER_THAN_OR_EQUAL) - .withNegateCondition(true) - .withRulesEngineMatchValue( - Arrays.asList("gszywk", "irryuzhlh", "joqrvqqaatj", "nrvgoupmfiibfgg")) - .withTransforms(Arrays.asList(Transform.TRIM)))) - .withMatchProcessingBehavior(MatchProcessingBehavior.CONTINUE))); + RulesEngineUpdateParameters model = new RulesEngineUpdateParameters().withRules(Arrays.asList( + new RulesEngineRule().withName("nlwntoe") + .withPriority(1273575692) + .withAction(new RulesEngineAction() + .withRequestHeaderActions(Arrays.asList( + new HeaderAction().withHeaderActionType(HeaderActionType.OVERWRITE) + .withHeaderName("bwh") + .withValue("z"), + new HeaderAction().withHeaderActionType(HeaderActionType.DELETE) + .withHeaderName("mrv") + .withValue("ztvbtqgsfr"), + new HeaderAction().withHeaderActionType(HeaderActionType.DELETE) + .withHeaderName("yzkoowtlmngu") + .withValue("wqaldsyu"), + new HeaderAction().withHeaderActionType(HeaderActionType.OVERWRITE) + .withHeaderName("imerqfobwyznk") + .withValue("kutwpf"))) + .withResponseHeaderActions( + Arrays.asList(new HeaderAction().withHeaderActionType(HeaderActionType.APPEND) + .withHeaderName("m") + .withValue("skdsnfdsdoakg"))) + .withRouteConfigurationOverride(new RouteConfiguration())) + .withMatchConditions(Arrays.asList( + new RulesEngineMatchCondition().withRulesEngineMatchVariable(RulesEngineMatchVariable.IS_MOBILE) + .withSelector("zev") + .withRulesEngineOperator(RulesEngineOperator.GREATER_THAN) + .withNegateCondition(true) + .withRulesEngineMatchValue(Arrays.asList("pusdstt", "vogvbbejdcngqqmo", "kufgmj", "rwr")) + .withTransforms(Arrays.asList(Transform.UPPERCASE, Transform.UPPERCASE, Transform.TRIM)), + new RulesEngineMatchCondition().withRulesEngineMatchVariable(RulesEngineMatchVariable.IS_MOBILE) + .withSelector("u") + .withRulesEngineOperator(RulesEngineOperator.CONTAINS) + .withNegateCondition(true) + .withRulesEngineMatchValue(Arrays.asList("bminrfdwoyuhhzi", "iefozbhdmsml")) + .withTransforms(Arrays.asList(Transform.URL_ENCODE, Transform.URL_DECODE, Transform.LOWERCASE, + Transform.UPPERCASE)), + new RulesEngineMatchCondition().withRulesEngineMatchVariable(RulesEngineMatchVariable.REQUEST_URI) + .withSelector("ae") + .withRulesEngineOperator(RulesEngineOperator.GREATER_THAN_OR_EQUAL) + .withNegateCondition(false) + .withRulesEngineMatchValue(Arrays.asList("xicslfao", "z", "iyylhalnswhccsp")) + .withTransforms( + Arrays.asList(Transform.URL_ENCODE, Transform.URL_ENCODE, Transform.UPPERCASE)))) + .withMatchProcessingBehavior(MatchProcessingBehavior.CONTINUE), + new RulesEngineRule().withName("qscywu") + .withPriority(904154901) + .withAction(new RulesEngineAction() + .withRequestHeaderActions(Arrays.asList( + new HeaderAction().withHeaderActionType(HeaderActionType.APPEND) + .withHeaderName("uhczbwemh") + .withValue("rsbrgzdwm"), + new HeaderAction().withHeaderActionType(HeaderActionType.OVERWRITE) + .withHeaderName("eypqwdxggicccn") + .withValue("huexmk"), + new HeaderAction().withHeaderActionType(HeaderActionType.APPEND) + .withHeaderName("lstvlzywe") + .withValue("zrncsdt"))) + .withResponseHeaderActions( + Arrays.asList(new HeaderAction().withHeaderActionType(HeaderActionType.APPEND) + .withHeaderName("iypbsfgytgusl") + .withValue("adcy"))) + .withRouteConfigurationOverride(new RouteConfiguration())) + .withMatchConditions(Arrays.asList( + new RulesEngineMatchCondition().withRulesEngineMatchVariable(RulesEngineMatchVariable.IS_MOBILE) + .withSelector("ejhzisxg") + .withRulesEngineOperator(RulesEngineOperator.GREATER_THAN) + .withNegateCondition(false) + .withRulesEngineMatchValue( + Arrays.asList("lppvksrpq", "ujzra", "htwdwrftswibyrcd", "bhshfwpracstwity")) + .withTransforms( + Arrays.asList(Transform.LOWERCASE, Transform.REMOVE_NULLS, Transform.UPPERCASE)), + new RulesEngineMatchCondition().withRulesEngineMatchVariable(RulesEngineMatchVariable.POST_ARGS) + .withSelector("dcpnmdyodnw") + .withRulesEngineOperator(RulesEngineOperator.EQUAL) + .withNegateCondition(false) + .withRulesEngineMatchValue(Arrays.asList("cvnhltiugc")) + .withTransforms(Arrays.asList(Transform.URL_ENCODE, Transform.URL_DECODE)), + new RulesEngineMatchCondition().withRulesEngineMatchVariable(RulesEngineMatchVariable.REMOTE_ADDR) + .withSelector("qiby") + .withRulesEngineOperator(RulesEngineOperator.GREATER_THAN_OR_EQUAL) + .withNegateCondition(false) + .withRulesEngineMatchValue(Arrays.asList("wxwlmdjrkvfgb")) + .withTransforms( + Arrays.asList(Transform.REMOVE_NULLS, Transform.UPPERCASE, Transform.URL_DECODE)))) + .withMatchProcessingBehavior(MatchProcessingBehavior.CONTINUE), + new RulesEngineRule().withName("acizsjqlhkrr") + .withPriority(268834532) + .withAction(new RulesEngineAction() + .withRequestHeaderActions( + Arrays.asList(new HeaderAction().withHeaderActionType(HeaderActionType.OVERWRITE) + .withHeaderName("b") + .withValue("p"))) + .withResponseHeaderActions(Arrays.asList( + new HeaderAction().withHeaderActionType(HeaderActionType.OVERWRITE) + .withHeaderName("vxndz") + .withValue("krefajpjo"), + new HeaderAction().withHeaderActionType(HeaderActionType.DELETE) + .withHeaderName("kqnyh") + .withValue("ij"), + new HeaderAction().withHeaderActionType(HeaderActionType.OVERWRITE) + .withHeaderName("ivfxzsjabibsyst") + .withValue("fsdjpvkvp"), + new HeaderAction().withHeaderActionType(HeaderActionType.DELETE) + .withHeaderName("xbkzbzkdvncj") + .withValue("udurgkakmokz"))) + .withRouteConfigurationOverride(new RouteConfiguration())) + .withMatchConditions(Arrays.asList(new RulesEngineMatchCondition() + .withRulesEngineMatchVariable(RulesEngineMatchVariable.REQUEST_METHOD) + .withSelector("fhmouwq") + .withRulesEngineOperator(RulesEngineOperator.GEO_MATCH) + .withNegateCondition(false) + .withRulesEngineMatchValue(Arrays.asList("zeeyebi", "ikayuhqlbjbsybb", "wrv")) + .withTransforms(Arrays.asList(Transform.REMOVE_NULLS, Transform.LOWERCASE, Transform.URL_ENCODE, + Transform.UPPERCASE)))) + .withMatchProcessingBehavior(MatchProcessingBehavior.CONTINUE))); model = BinaryData.fromObject(model).toObject(RulesEngineUpdateParameters.class); - Assertions.assertEquals("ouicybxarzgszu", model.rules().get(0).name()); - Assertions.assertEquals(1813944379, model.rules().get(0).priority()); - Assertions.assertEquals(HeaderActionType.APPEND, + Assertions.assertEquals("nlwntoe", model.rules().get(0).name()); + Assertions.assertEquals(1273575692, model.rules().get(0).priority()); + Assertions.assertEquals(HeaderActionType.OVERWRITE, model.rules().get(0).action().requestHeaderActions().get(0).headerActionType()); - Assertions.assertEquals("q", model.rules().get(0).action().requestHeaderActions().get(0).headerName()); - Assertions.assertEquals("idoamciodhkha", model.rules().get(0).action().requestHeaderActions().get(0).value()); - Assertions.assertEquals(HeaderActionType.DELETE, + Assertions.assertEquals("bwh", model.rules().get(0).action().requestHeaderActions().get(0).headerName()); + Assertions.assertEquals("z", model.rules().get(0).action().requestHeaderActions().get(0).value()); + Assertions.assertEquals(HeaderActionType.APPEND, model.rules().get(0).action().responseHeaderActions().get(0).headerActionType()); - Assertions.assertEquals("vbtqgsfraoyzk", - model.rules().get(0).action().responseHeaderActions().get(0).headerName()); - Assertions.assertEquals("wtl", model.rules().get(0).action().responseHeaderActions().get(0).value()); - Assertions.assertEquals(RulesEngineMatchVariable.REQUEST_FILENAME_EXTENSION, + Assertions.assertEquals("m", model.rules().get(0).action().responseHeaderActions().get(0).headerName()); + Assertions.assertEquals("skdsnfdsdoakg", model.rules().get(0).action().responseHeaderActions().get(0).value()); + Assertions.assertEquals(RulesEngineMatchVariable.IS_MOBILE, model.rules().get(0).matchConditions().get(0).rulesEngineMatchVariable()); - Assertions.assertEquals("tdlmkkzevd", model.rules().get(0).matchConditions().get(0).selector()); - Assertions.assertEquals(RulesEngineOperator.GREATER_THAN_OR_EQUAL, + Assertions.assertEquals("zev", model.rules().get(0).matchConditions().get(0).selector()); + Assertions.assertEquals(RulesEngineOperator.GREATER_THAN, model.rules().get(0).matchConditions().get(0).rulesEngineOperator()); - Assertions.assertEquals(true, model.rules().get(0).matchConditions().get(0).negateCondition()); - Assertions.assertEquals("usdsttwv", + Assertions.assertTrue(model.rules().get(0).matchConditions().get(0).negateCondition()); + Assertions.assertEquals("pusdstt", model.rules().get(0).matchConditions().get(0).rulesEngineMatchValue().get(0)); - Assertions.assertEquals(Transform.TRIM, model.rules().get(0).matchConditions().get(0).transforms().get(0)); + Assertions.assertEquals(Transform.UPPERCASE, model.rules().get(0).matchConditions().get(0).transforms().get(0)); Assertions.assertEquals(MatchProcessingBehavior.CONTINUE, model.rules().get(0).matchProcessingBehavior()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RulesEnginesCreateOrUpdateMockTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RulesEnginesCreateOrUpdateMockTests.java index b24b25cfd169d..e1bb46eb7e125 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RulesEnginesCreateOrUpdateMockTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RulesEnginesCreateOrUpdateMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.frontdoor.FrontDoorManager; import com.azure.resourcemanager.frontdoor.models.HeaderAction; @@ -31,86 +31,107 @@ public final class RulesEnginesCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"resourceState\":\"Disabled\",\"rules\":[{\"name\":\"leseyqrhvyeldo\",\"priority\":353685526,\"action\":{\"requestHeaderActions\":[{\"headerActionType\":\"Delete\",\"headerName\":\"wiswskukjtasbvw\"},{\"headerActionType\":\"Delete\",\"headerName\":\"pkxkdtxfk\"}],\"responseHeaderActions\":[{\"headerActionType\":\"Overwrite\",\"headerName\":\"vtwknvgmmbugt\"}],\"routeConfigurationOverride\":{\"@odata.type\":\"RouteConfiguration\"}},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"RequestUri\",\"rulesEngineOperator\":\"Contains\",\"rulesEngineMatchValue\":[]}],\"matchProcessingBehavior\":\"Stop\"},{\"name\":\"kueatgroeshoy\",\"priority\":1486961645,\"action\":{\"requestHeaderActions\":[{\"headerActionType\":\"Append\",\"headerName\":\"fqxkfaoyteh\"},{\"headerActionType\":\"Delete\",\"headerName\":\"uvjmv\"},{\"headerActionType\":\"Append\",\"headerName\":\"tdwckygr\"}],\"responseHeaderActions\":[{\"headerActionType\":\"Append\",\"headerName\":\"ndljdjuskbr\"}],\"routeConfigurationOverride\":{\"@odata.type\":\"RouteConfiguration\"}},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"RequestPath\",\"rulesEngineOperator\":\"GeoMatch\",\"rulesEngineMatchValue\":[]},{\"rulesEngineMatchVariable\":\"RequestBody\",\"rulesEngineOperator\":\"BeginsWith\",\"rulesEngineMatchValue\":[]},{\"rulesEngineMatchVariable\":\"RequestPath\",\"rulesEngineOperator\":\"LessThanOrEqual\",\"rulesEngineMatchValue\":[]},{\"rulesEngineMatchVariable\":\"RequestBody\",\"rulesEngineOperator\":\"Any\",\"rulesEngineMatchValue\":[]}],\"matchProcessingBehavior\":\"Continue\"},{\"name\":\"gplwr\",\"priority\":614396820,\"action\":{\"requestHeaderActions\":[{\"headerActionType\":\"Overwrite\",\"headerName\":\"d\"}],\"responseHeaderActions\":[{\"headerActionType\":\"Overwrite\",\"headerName\":\"gkqu\"},{\"headerActionType\":\"Append\",\"headerName\":\"bwptdacarvvlf\"}],\"routeConfigurationOverride\":{\"@odata.type\":\"RouteConfiguration\"}},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"IsMobile\",\"rulesEngineOperator\":\"EndsWith\",\"rulesEngineMatchValue\":[]}],\"matchProcessingBehavior\":\"Stop\"}]},\"id\":\"wenaz\",\"name\":\"r\",\"type\":\"hzr\"}"; + = "{\"properties\":{\"resourceState\":\"Enabling\",\"rules\":[{\"name\":\"zd\",\"priority\":1360910741,\"action\":{\"requestHeaderActions\":[{\"headerActionType\":\"Delete\",\"headerName\":\"ixh\"},{\"headerActionType\":\"Delete\",\"headerName\":\"ratqxmbjro\"}],\"responseHeaderActions\":[{\"headerActionType\":\"Delete\",\"headerName\":\"n\"},{\"headerActionType\":\"Delete\",\"headerName\":\"l\"}],\"routeConfigurationOverride\":{\"@odata.type\":\"RouteConfiguration\"}},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"RequestUri\",\"rulesEngineOperator\":\"GreaterThanOrEqual\",\"rulesEngineMatchValue\":[]},{\"rulesEngineMatchVariable\":\"RequestScheme\",\"rulesEngineOperator\":\"LessThanOrEqual\",\"rulesEngineMatchValue\":[]}],\"matchProcessingBehavior\":\"Continue\"},{\"name\":\"njt\",\"priority\":1129414423,\"action\":{\"requestHeaderActions\":[{\"headerActionType\":\"Overwrite\",\"headerName\":\"ywpvt\"},{\"headerActionType\":\"Append\",\"headerName\":\"tzbpdbollgry\"},{\"headerActionType\":\"Overwrite\",\"headerName\":\"iuas\"},{\"headerActionType\":\"Append\",\"headerName\":\"rowsocnequy\"}],\"responseHeaderActions\":[{\"headerActionType\":\"Overwrite\",\"headerName\":\"oqgrmtqjkqevadr\"}],\"routeConfigurationOverride\":{\"@odata.type\":\"RouteConfiguration\"}},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"IsMobile\",\"rulesEngineOperator\":\"EndsWith\",\"rulesEngineMatchValue\":[]},{\"rulesEngineMatchVariable\":\"PostArgs\",\"rulesEngineOperator\":\"Equal\",\"rulesEngineMatchValue\":[]}],\"matchProcessingBehavior\":\"Stop\"}]},\"id\":\"z\",\"name\":\"iidisczskoswoqiq\",\"type\":\"ugam\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); FrontDoorManager manager = FrontDoorManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); RulesEngine response = manager.rulesEngines() - .define("liuhqawmoaiancz") - .withExistingFrontDoor("ewj", "s") + .define("gukvlbpkt") + .withExistingFrontDoor("w", "iytxt") .withRules(Arrays.asList( - new RulesEngineRule().withName("slblxydkxrxvvb") - .withPriority(611172975) - .withAction(new RulesEngineAction() - .withRequestHeaderActions(Arrays.asList( - new HeaderAction().withHeaderActionType(HeaderActionType.APPEND) - .withHeaderName("fbqljnqkh"), - new HeaderAction().withHeaderActionType(HeaderActionType.DELETE).withHeaderName("h"), + new RulesEngineRule().withName("uambewreswmowegm") + .withPriority(272093848) + .withAction(new RulesEngineAction().withRequestHeaderActions(Arrays.asList( + new HeaderAction().withHeaderActionType(HeaderActionType.APPEND).withHeaderName("xeyg"), + new HeaderAction().withHeaderActionType(HeaderActionType.DELETE) + .withHeaderName("igijiitnspxlz"), + new HeaderAction().withHeaderActionType(HeaderActionType.APPEND).withHeaderName("sygrijwa"))) + .withResponseHeaderActions(Arrays.asList( + new HeaderAction().withHeaderActionType(HeaderActionType.DELETE).withHeaderName("n"), + new HeaderAction().withHeaderActionType(HeaderActionType.OVERWRITE) + .withHeaderName("ybfueqfrojsydgr"), new HeaderAction().withHeaderActionType(HeaderActionType.DELETE) - .withHeaderName("okulehurqlrqf"))) + .withHeaderName("dkygywezski"))) + .withRouteConfigurationOverride(new RouteConfiguration())) + .withMatchConditions(Arrays.asList(new RulesEngineMatchCondition() + .withRulesEngineMatchVariable(RulesEngineMatchVariable.REQUEST_URI) + .withRulesEngineOperator(RulesEngineOperator.GREATER_THAN_OR_EQUAL) + .withRulesEngineMatchValue(Arrays.asList()))) + .withMatchProcessingBehavior(MatchProcessingBehavior.CONTINUE), + new RulesEngineRule().withName("xieqv") + .withPriority(835601294) + .withAction(new RulesEngineAction() + .withRequestHeaderActions( + Arrays.asList(new HeaderAction().withHeaderActionType(HeaderActionType.OVERWRITE) + .withHeaderName("lixqcah"))) .withResponseHeaderActions(Arrays.asList( - new HeaderAction().withHeaderActionType(HeaderActionType.APPEND).withHeaderName("yur"), - new HeaderAction().withHeaderActionType(HeaderActionType.OVERWRITE).withHeaderName("hy"), - new HeaderAction().withHeaderActionType(HeaderActionType.DELETE).withHeaderName("xra"))) + new HeaderAction().withHeaderActionType(HeaderActionType.OVERWRITE).withHeaderName("lyb"), + new HeaderAction().withHeaderActionType(HeaderActionType.DELETE) + .withHeaderName("woijpodtbl"), + new HeaderAction().withHeaderActionType(HeaderActionType.DELETE) + .withHeaderName("kkwjdjodq"), + new HeaderAction().withHeaderActionType(HeaderActionType.APPEND) + .withHeaderName("kincnremeh"))) .withRouteConfigurationOverride(new RouteConfiguration())) .withMatchConditions(Arrays.asList( - new RulesEngineMatchCondition().withRulesEngineMatchVariable(RulesEngineMatchVariable.POST_ARGS) - .withRulesEngineOperator(RulesEngineOperator.ANY) + new RulesEngineMatchCondition() + .withRulesEngineMatchVariable(RulesEngineMatchVariable.REMOTE_ADDR) + .withRulesEngineOperator(RulesEngineOperator.IPMATCH) .withRulesEngineMatchValue(Arrays.asList()), new RulesEngineMatchCondition() - .withRulesEngineMatchVariable(RulesEngineMatchVariable.REQUEST_SCHEME) - .withRulesEngineOperator(RulesEngineOperator.BEGINS_WITH) + .withRulesEngineMatchVariable(RulesEngineMatchVariable.REQUEST_METHOD) + .withRulesEngineOperator(RulesEngineOperator.LESS_THAN) .withRulesEngineMatchValue(Arrays.asList()), new RulesEngineMatchCondition() - .withRulesEngineMatchVariable(RulesEngineMatchVariable.REMOTE_ADDR) - .withRulesEngineOperator(RulesEngineOperator.LESS_THAN_OR_EQUAL) + .withRulesEngineMatchVariable(RulesEngineMatchVariable.REQUEST_METHOD) + .withRulesEngineOperator(RulesEngineOperator.GREATER_THAN_OR_EQUAL) .withRulesEngineMatchValue(Arrays.asList()))) .withMatchProcessingBehavior(MatchProcessingBehavior.STOP), - new RulesEngineRule().withName("hbapxkiyf") - .withPriority(73723123) - .withAction(new RulesEngineAction() - .withRequestHeaderActions(Arrays.asList( - new HeaderAction().withHeaderActionType(HeaderActionType.DELETE).withHeaderName("jbuscg"), - new HeaderAction().withHeaderActionType(HeaderActionType.APPEND).withHeaderName("u"), - new HeaderAction().withHeaderActionType(HeaderActionType.APPEND) - .withHeaderName("oycblevpmc"), - new HeaderAction().withHeaderActionType(HeaderActionType.APPEND).withHeaderName("jy"))) + new RulesEngineRule().withName("dkadppyibn") + .withPriority(1861946101) + .withAction(new RulesEngineAction().withRequestHeaderActions(Arrays.asList( + new HeaderAction().withHeaderActionType(HeaderActionType.DELETE).withHeaderName("ywrxw"), + new HeaderAction().withHeaderActionType(HeaderActionType.DELETE) + .withHeaderName("dtluvvadswzsn"), + new HeaderAction().withHeaderActionType(HeaderActionType.APPEND).withHeaderName("emlowuowhl"))) .withResponseHeaderActions(Arrays.asList( - new HeaderAction().withHeaderActionType(HeaderActionType.OVERWRITE) - .withHeaderName("lzgsjgkzzlt"), + new HeaderAction().withHeaderActionType(HeaderActionType.DELETE).withHeaderName("y"), new HeaderAction().withHeaderActionType(HeaderActionType.APPEND) - .withHeaderName("hbzffovwmbjlzqs"))) + .withHeaderName("ouvblgmo"))) .withRouteConfigurationOverride(new RouteConfiguration())) .withMatchConditions(Arrays.asList( - new RulesEngineMatchCondition().withRulesEngineMatchVariable(RulesEngineMatchVariable.IS_MOBILE) - .withRulesEngineOperator(RulesEngineOperator.EQUAL) + new RulesEngineMatchCondition() + .withRulesEngineMatchVariable(RulesEngineMatchVariable.REMOTE_ADDR) + .withRulesEngineOperator(RulesEngineOperator.LESS_THAN_OR_EQUAL) .withRulesEngineMatchValue(Arrays.asList()), new RulesEngineMatchCondition() - .withRulesEngineMatchVariable(RulesEngineMatchVariable.REQUEST_HEADER) - .withRulesEngineOperator(RulesEngineOperator.CONTAINS) + .withRulesEngineMatchVariable(RulesEngineMatchVariable.QUERY_STRING) + .withRulesEngineOperator(RulesEngineOperator.GREATER_THAN_OR_EQUAL) + .withRulesEngineMatchValue(Arrays.asList()), + new RulesEngineMatchCondition() + .withRulesEngineMatchVariable(RulesEngineMatchVariable.REQUEST_BODY) + .withRulesEngineOperator(RulesEngineOperator.LESS_THAN) .withRulesEngineMatchValue(Arrays.asList()))) .withMatchProcessingBehavior(MatchProcessingBehavior.STOP))) .create(); - Assertions.assertEquals("leseyqrhvyeldo", response.rules().get(0).name()); - Assertions.assertEquals(353685526, response.rules().get(0).priority()); + Assertions.assertEquals("zd", response.rules().get(0).name()); + Assertions.assertEquals(1360910741, response.rules().get(0).priority()); Assertions.assertEquals(HeaderActionType.DELETE, response.rules().get(0).action().requestHeaderActions().get(0).headerActionType()); - Assertions.assertEquals("wiswskukjtasbvw", - response.rules().get(0).action().requestHeaderActions().get(0).headerName()); - Assertions.assertEquals(HeaderActionType.OVERWRITE, + Assertions.assertEquals("ixh", response.rules().get(0).action().requestHeaderActions().get(0).headerName()); + Assertions.assertEquals(HeaderActionType.DELETE, response.rules().get(0).action().responseHeaderActions().get(0).headerActionType()); - Assertions.assertEquals("vtwknvgmmbugt", - response.rules().get(0).action().responseHeaderActions().get(0).headerName()); + Assertions.assertEquals("n", response.rules().get(0).action().responseHeaderActions().get(0).headerName()); Assertions.assertEquals(RulesEngineMatchVariable.REQUEST_URI, response.rules().get(0).matchConditions().get(0).rulesEngineMatchVariable()); - Assertions.assertEquals(RulesEngineOperator.CONTAINS, + Assertions.assertEquals(RulesEngineOperator.GREATER_THAN_OR_EQUAL, response.rules().get(0).matchConditions().get(0).rulesEngineOperator()); - Assertions.assertEquals(MatchProcessingBehavior.STOP, response.rules().get(0).matchProcessingBehavior()); + Assertions.assertEquals(MatchProcessingBehavior.CONTINUE, response.rules().get(0).matchProcessingBehavior()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RulesEnginesGetWithResponseMockTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RulesEnginesGetWithResponseMockTests.java index a609b4e4fdf21..4d65de0fdd6b2 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RulesEnginesGetWithResponseMockTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RulesEnginesGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.frontdoor.FrontDoorManager; import com.azure.resourcemanager.frontdoor.models.HeaderActionType; @@ -25,33 +25,32 @@ public final class RulesEnginesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"resourceState\":\"Deleting\",\"rules\":[{\"name\":\"cnhz\",\"priority\":1513584029,\"action\":{\"requestHeaderActions\":[{\"headerActionType\":\"Overwrite\",\"headerName\":\"jzcfyjzptwr\"},{\"headerActionType\":\"Delete\",\"headerName\":\"h\"},{\"headerActionType\":\"Overwrite\",\"headerName\":\"qinfszpyglqd\"}],\"responseHeaderActions\":[{\"headerActionType\":\"Append\",\"headerName\":\"zralcxpjbyyps\"},{\"headerActionType\":\"Overwrite\",\"headerName\":\"qcjenkyhf\"}],\"routeConfigurationOverride\":{\"@odata.type\":\"RouteConfiguration\"}},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"PostArgs\",\"rulesEngineOperator\":\"GreaterThan\",\"rulesEngineMatchValue\":[]},{\"rulesEngineMatchVariable\":\"RequestScheme\",\"rulesEngineOperator\":\"Equal\",\"rulesEngineMatchValue\":[]},{\"rulesEngineMatchVariable\":\"RequestScheme\",\"rulesEngineOperator\":\"LessThan\",\"rulesEngineMatchValue\":[]},{\"rulesEngineMatchVariable\":\"RequestPath\",\"rulesEngineOperator\":\"IPMatch\",\"rulesEngineMatchValue\":[]}],\"matchProcessingBehavior\":\"Stop\"},{\"name\":\"pzqjhhhq\",\"priority\":663285814,\"action\":{\"requestHeaderActions\":[{\"headerActionType\":\"Overwrite\",\"headerName\":\"cacoyvivbsiz\"}],\"responseHeaderActions\":[{\"headerActionType\":\"Overwrite\",\"headerName\":\"zlbscmnlziji\"},{\"headerActionType\":\"Overwrite\",\"headerName\":\"ehgmvflnwyv\"}],\"routeConfigurationOverride\":{\"@odata.type\":\"RouteConfiguration\"}},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"QueryString\",\"rulesEngineOperator\":\"EndsWith\",\"rulesEngineMatchValue\":[]},{\"rulesEngineMatchVariable\":\"RequestScheme\",\"rulesEngineOperator\":\"GreaterThanOrEqual\",\"rulesEngineMatchValue\":[]}],\"matchProcessingBehavior\":\"Continue\"},{\"name\":\"lylyfwxzutgqz\",\"priority\":1687298742,\"action\":{\"requestHeaderActions\":[{\"headerActionType\":\"Append\",\"headerName\":\"mupgxy\"}],\"responseHeaderActions\":[{\"headerActionType\":\"Overwrite\",\"headerName\":\"xabb\"}],\"routeConfigurationOverride\":{\"@odata.type\":\"RouteConfiguration\"}},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"RequestHeader\",\"rulesEngineOperator\":\"LessThanOrEqual\",\"rulesEngineMatchValue\":[]},{\"rulesEngineMatchVariable\":\"QueryString\",\"rulesEngineOperator\":\"LessThan\",\"rulesEngineMatchValue\":[]}],\"matchProcessingBehavior\":\"Continue\"},{\"name\":\"klqpx\",\"priority\":1851207538,\"action\":{\"requestHeaderActions\":[{\"headerActionType\":\"Append\",\"headerName\":\"e\"},{\"headerActionType\":\"Delete\",\"headerName\":\"wwnlzafwxudgnh\"},{\"headerActionType\":\"Append\",\"headerName\":\"okrtalvnb\"}],\"responseHeaderActions\":[{\"headerActionType\":\"Append\",\"headerName\":\"emeluclv\"},{\"headerActionType\":\"Overwrite\",\"headerName\":\"jukyrdn\"}],\"routeConfigurationOverride\":{\"@odata.type\":\"RouteConfiguration\"}},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"RequestFilename\",\"rulesEngineOperator\":\"IPMatch\",\"rulesEngineMatchValue\":[]},{\"rulesEngineMatchVariable\":\"QueryString\",\"rulesEngineOperator\":\"Contains\",\"rulesEngineMatchValue\":[]},{\"rulesEngineMatchVariable\":\"RequestFilename\",\"rulesEngineOperator\":\"Contains\",\"rulesEngineMatchValue\":[]},{\"rulesEngineMatchVariable\":\"IsMobile\",\"rulesEngineOperator\":\"Any\",\"rulesEngineMatchValue\":[]}],\"matchProcessingBehavior\":\"Stop\"}]},\"id\":\"vzoqgyipemchgavs\",\"name\":\"zuejd\",\"type\":\"xptlghwzho\"}"; + = "{\"properties\":{\"resourceState\":\"Enabled\",\"rules\":[{\"name\":\"hgygvfltgvd\",\"priority\":1085088177,\"action\":{\"requestHeaderActions\":[{\"headerActionType\":\"Overwrite\",\"headerName\":\"krxwet\"},{\"headerActionType\":\"Delete\",\"headerName\":\"drcyrucpcun\"},{\"headerActionType\":\"Delete\",\"headerName\":\"zdqumoe\"}],\"responseHeaderActions\":[{\"headerActionType\":\"Append\",\"headerName\":\"aienhqhsknd\"},{\"headerActionType\":\"Overwrite\",\"headerName\":\"lqkaadlknwf\"},{\"headerActionType\":\"Overwrite\",\"headerName\":\"nniyopetxi\"},{\"headerActionType\":\"Delete\",\"headerName\":\"nrlyxnuc\"}],\"routeConfigurationOverride\":{\"@odata.type\":\"RouteConfiguration\"}},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"RequestFilename\",\"rulesEngineOperator\":\"EndsWith\",\"rulesEngineMatchValue\":[]},{\"rulesEngineMatchVariable\":\"RequestFilename\",\"rulesEngineOperator\":\"Contains\",\"rulesEngineMatchValue\":[]},{\"rulesEngineMatchVariable\":\"IsMobile\",\"rulesEngineOperator\":\"GreaterThan\",\"rulesEngineMatchValue\":[]}],\"matchProcessingBehavior\":\"Continue\"},{\"name\":\"vbqsdt\",\"priority\":690521109,\"action\":{\"requestHeaderActions\":[{\"headerActionType\":\"Overwrite\",\"headerName\":\"vivuzqymtuowo\"},{\"headerActionType\":\"Overwrite\",\"headerName\":\"gitsqh\"},{\"headerActionType\":\"Delete\",\"headerName\":\"b\"},{\"headerActionType\":\"Delete\",\"headerName\":\"cdb\"}],\"responseHeaderActions\":[{\"headerActionType\":\"Delete\",\"headerName\":\"ndscxmxeatk\"},{\"headerActionType\":\"Overwrite\",\"headerName\":\"mwnrdj\"},{\"headerActionType\":\"Overwrite\",\"headerName\":\"bqbnaomhjrmkuh\"},{\"headerActionType\":\"Overwrite\",\"headerName\":\"xljalfihc\"}],\"routeConfigurationOverride\":{\"@odata.type\":\"RouteConfiguration\"}},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"RequestHeader\",\"rulesEngineOperator\":\"IPMatch\",\"rulesEngineMatchValue\":[]}],\"matchProcessingBehavior\":\"Continue\"},{\"name\":\"de\",\"priority\":1706912474,\"action\":{\"requestHeaderActions\":[{\"headerActionType\":\"Append\",\"headerName\":\"gaxfgva\"}],\"responseHeaderActions\":[{\"headerActionType\":\"Overwrite\",\"headerName\":\"zwjjzr\"},{\"headerActionType\":\"Delete\",\"headerName\":\"ixldzyyfy\"},{\"headerActionType\":\"Delete\",\"headerName\":\"qsix\"}],\"routeConfigurationOverride\":{\"@odata.type\":\"RouteConfiguration\"}},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"RequestUri\",\"rulesEngineOperator\":\"LessThan\",\"rulesEngineMatchValue\":[]}],\"matchProcessingBehavior\":\"Stop\"},{\"name\":\"yqlkju\",\"priority\":250948378,\"action\":{\"requestHeaderActions\":[{\"headerActionType\":\"Append\",\"headerName\":\"slzoyov\"},{\"headerActionType\":\"Overwrite\",\"headerName\":\"dbpqvybefgvm\"},{\"headerActionType\":\"Overwrite\",\"headerName\":\"okcvtlubses\"}],\"responseHeaderActions\":[{\"headerActionType\":\"Append\",\"headerName\":\"artr\"}],\"routeConfigurationOverride\":{\"@odata.type\":\"RouteConfiguration\"}},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"RemoteAddr\",\"rulesEngineOperator\":\"Any\",\"rulesEngineMatchValue\":[]}],\"matchProcessingBehavior\":\"Stop\"}]},\"id\":\"ycndzf\",\"name\":\"vjreuykbbmnw\",\"type\":\"ltbxoeeonqlnfw\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); FrontDoorManager manager = FrontDoorManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); RulesEngine response = manager.rulesEngines() - .getWithResponse("mffjkutycyarn", "oohguabzoghkt", "pyc", com.azure.core.util.Context.NONE) + .getWithResponse("dfaifyzyzeyuube", "ds", "l", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("cnhz", response.rules().get(0).name()); - Assertions.assertEquals(1513584029, response.rules().get(0).priority()); + Assertions.assertEquals("hgygvfltgvd", response.rules().get(0).name()); + Assertions.assertEquals(1085088177, response.rules().get(0).priority()); Assertions.assertEquals(HeaderActionType.OVERWRITE, response.rules().get(0).action().requestHeaderActions().get(0).headerActionType()); - Assertions.assertEquals("jzcfyjzptwr", - response.rules().get(0).action().requestHeaderActions().get(0).headerName()); + Assertions.assertEquals("krxwet", response.rules().get(0).action().requestHeaderActions().get(0).headerName()); Assertions.assertEquals(HeaderActionType.APPEND, response.rules().get(0).action().responseHeaderActions().get(0).headerActionType()); - Assertions.assertEquals("zralcxpjbyyps", + Assertions.assertEquals("aienhqhsknd", response.rules().get(0).action().responseHeaderActions().get(0).headerName()); - Assertions.assertEquals(RulesEngineMatchVariable.POST_ARGS, + Assertions.assertEquals(RulesEngineMatchVariable.REQUEST_FILENAME, response.rules().get(0).matchConditions().get(0).rulesEngineMatchVariable()); - Assertions.assertEquals(RulesEngineOperator.GREATER_THAN, + Assertions.assertEquals(RulesEngineOperator.ENDS_WITH, response.rules().get(0).matchConditions().get(0).rulesEngineOperator()); - Assertions.assertEquals(MatchProcessingBehavior.STOP, response.rules().get(0).matchProcessingBehavior()); + Assertions.assertEquals(MatchProcessingBehavior.CONTINUE, response.rules().get(0).matchProcessingBehavior()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RulesEnginesListByFrontDoorMockTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RulesEnginesListByFrontDoorMockTests.java index 49c4c7229656b..3ab6b3518bc01 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RulesEnginesListByFrontDoorMockTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/RulesEnginesListByFrontDoorMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.frontdoor.FrontDoorManager; import com.azure.resourcemanager.frontdoor.models.HeaderActionType; @@ -26,33 +26,33 @@ public final class RulesEnginesListByFrontDoorMockTests { @Test public void testListByFrontDoor() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"resourceState\":\"Creating\",\"rules\":[{\"name\":\"tvlxhrpqh\",\"priority\":1760825319,\"action\":{\"requestHeaderActions\":[{\"headerActionType\":\"Overwrite\",\"headerName\":\"ouq\"},{\"headerActionType\":\"Append\",\"headerName\":\"bhbcdszir\"},{\"headerActionType\":\"Append\",\"headerName\":\"an\"},{\"headerActionType\":\"Append\",\"headerName\":\"ypmbltoormkfq\"}],\"responseHeaderActions\":[{\"headerActionType\":\"Append\",\"headerName\":\"dykalsygaolnjpnn\"},{\"headerActionType\":\"Delete\",\"headerName\":\"jksibjg\"},{\"headerActionType\":\"Overwrite\",\"headerName\":\"jxxahmrnad\"},{\"headerActionType\":\"Delete\",\"headerName\":\"qegxyivpin\"}],\"routeConfigurationOverride\":{\"@odata.type\":\"RouteConfiguration\"}},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"RequestMethod\",\"rulesEngineOperator\":\"BeginsWith\",\"rulesEngineMatchValue\":[]},{\"rulesEngineMatchVariable\":\"RequestFilename\",\"rulesEngineOperator\":\"LessThan\",\"rulesEngineMatchValue\":[]}],\"matchProcessingBehavior\":\"Stop\"},{\"name\":\"qxnhmb\",\"priority\":2095777913,\"action\":{\"requestHeaderActions\":[{\"headerActionType\":\"Append\",\"headerName\":\"aujvaa\"},{\"headerActionType\":\"Append\",\"headerName\":\"ggiycwkdtaawxwf\"},{\"headerActionType\":\"Delete\",\"headerName\":\"aumrrqmbzmqkrat\"}],\"responseHeaderActions\":[{\"headerActionType\":\"Overwrite\",\"headerName\":\"bjsidb\"},{\"headerActionType\":\"Append\",\"headerName\":\"kfpksokdgo\"}],\"routeConfigurationOverride\":{\"@odata.type\":\"RouteConfiguration\"}},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"RequestPath\",\"rulesEngineOperator\":\"LessThanOrEqual\",\"rulesEngineMatchValue\":[]},{\"rulesEngineMatchVariable\":\"RequestPath\",\"rulesEngineOperator\":\"EndsWith\",\"rulesEngineMatchValue\":[]},{\"rulesEngineMatchVariable\":\"RequestScheme\",\"rulesEngineOperator\":\"GreaterThanOrEqual\",\"rulesEngineMatchValue\":[]},{\"rulesEngineMatchVariable\":\"QueryString\",\"rulesEngineOperator\":\"Any\",\"rulesEngineMatchValue\":[]}],\"matchProcessingBehavior\":\"Stop\"}]},\"id\":\"zkye\",\"name\":\"nfnzhhh\",\"type\":\"o\"}]}"; + = "{\"value\":[{\"properties\":{\"resourceState\":\"Migrated\",\"rules\":[{\"name\":\"zhddubbnqf\",\"priority\":1720447278,\"action\":{\"requestHeaderActions\":[{\"headerActionType\":\"Delete\",\"headerName\":\"lehpavawu\"},{\"headerActionType\":\"Overwrite\",\"headerName\":\"qjtiogqgdm\"}],\"responseHeaderActions\":[{\"headerActionType\":\"Delete\",\"headerName\":\"tteajohiygs\"}],\"routeConfigurationOverride\":{\"@odata.type\":\"RouteConfiguration\"}},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"RequestPath\",\"rulesEngineOperator\":\"BeginsWith\",\"rulesEngineMatchValue\":[]},{\"rulesEngineMatchVariable\":\"RequestScheme\",\"rulesEngineOperator\":\"GeoMatch\",\"rulesEngineMatchValue\":[]}],\"matchProcessingBehavior\":\"Continue\"},{\"name\":\"kmktpvwxqcseh\",\"priority\":1490718793,\"action\":{\"requestHeaderActions\":[{\"headerActionType\":\"Delete\",\"headerName\":\"fmpqumqyjg\"},{\"headerActionType\":\"Delete\",\"headerName\":\"zulo\"}],\"responseHeaderActions\":[{\"headerActionType\":\"Overwrite\",\"headerName\":\"uzanhsfnhsenwphp\"},{\"headerActionType\":\"Overwrite\",\"headerName\":\"ngqjclidf\"}],\"routeConfigurationOverride\":{\"@odata.type\":\"RouteConfiguration\"}},\"matchConditions\":[{\"rulesEngineMatchVariable\":\"RequestBody\",\"rulesEngineOperator\":\"Contains\",\"rulesEngineMatchValue\":[]},{\"rulesEngineMatchVariable\":\"QueryString\",\"rulesEngineOperator\":\"BeginsWith\",\"rulesEngineMatchValue\":[]}],\"matchProcessingBehavior\":\"Stop\"}]},\"id\":\"qrkuor\",\"name\":\"ssruqnmdvhazcvj\",\"type\":\"iqswbqer\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); FrontDoorManager manager = FrontDoorManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.rulesEngines().listByFrontDoor("br", "ffg", com.azure.core.util.Context.NONE); + = manager.rulesEngines().listByFrontDoor("y", "mvqdbpbhfckdvez", com.azure.core.util.Context.NONE); - Assertions.assertEquals("tvlxhrpqh", response.iterator().next().rules().get(0).name()); - Assertions.assertEquals(1760825319, response.iterator().next().rules().get(0).priority()); - Assertions.assertEquals(HeaderActionType.OVERWRITE, + Assertions.assertEquals("zhddubbnqf", response.iterator().next().rules().get(0).name()); + Assertions.assertEquals(1720447278, response.iterator().next().rules().get(0).priority()); + Assertions.assertEquals(HeaderActionType.DELETE, response.iterator().next().rules().get(0).action().requestHeaderActions().get(0).headerActionType()); - Assertions.assertEquals("ouq", + Assertions.assertEquals("lehpavawu", response.iterator().next().rules().get(0).action().requestHeaderActions().get(0).headerName()); - Assertions.assertEquals(HeaderActionType.APPEND, + Assertions.assertEquals(HeaderActionType.DELETE, response.iterator().next().rules().get(0).action().responseHeaderActions().get(0).headerActionType()); - Assertions.assertEquals("dykalsygaolnjpnn", + Assertions.assertEquals("tteajohiygs", response.iterator().next().rules().get(0).action().responseHeaderActions().get(0).headerName()); - Assertions.assertEquals(RulesEngineMatchVariable.REQUEST_METHOD, + Assertions.assertEquals(RulesEngineMatchVariable.REQUEST_PATH, response.iterator().next().rules().get(0).matchConditions().get(0).rulesEngineMatchVariable()); Assertions.assertEquals(RulesEngineOperator.BEGINS_WITH, response.iterator().next().rules().get(0).matchConditions().get(0).rulesEngineOperator()); - Assertions.assertEquals(MatchProcessingBehavior.STOP, + Assertions.assertEquals(MatchProcessingBehavior.CONTINUE, response.iterator().next().rules().get(0).matchProcessingBehavior()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/SecurityPolicyLinkTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/SecurityPolicyLinkTests.java index 317088eea0c08..20828bd3a26bb 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/SecurityPolicyLinkTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/SecurityPolicyLinkTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -11,14 +11,7 @@ public final class SecurityPolicyLinkTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - SecurityPolicyLink model = BinaryData.fromString("{\"id\":\"mcoo\"}").toObject(SecurityPolicyLink.class); - Assertions.assertEquals("mcoo", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SecurityPolicyLink model = new SecurityPolicyLink().withId("mcoo"); - model = BinaryData.fromObject(model).toObject(SecurityPolicyLink.class); - Assertions.assertEquals("mcoo", model.id()); + SecurityPolicyLink model = BinaryData.fromString("{\"id\":\"yfu\"}").toObject(SecurityPolicyLink.class); + Assertions.assertEquals("yfu", model.id()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/SkuTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/SkuTests.java index 711c9d470ccf5..75a027ec5612d 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/SkuTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/SkuTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -12,14 +12,14 @@ public final class SkuTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - Sku model = BinaryData.fromString("{\"name\":\"Premium_AzureFrontDoor\"}").toObject(Sku.class); - Assertions.assertEquals(SkuName.PREMIUM_AZURE_FRONT_DOOR, model.name()); + Sku model = BinaryData.fromString("{\"name\":\"Standard_AzureFrontDoor\"}").toObject(Sku.class); + Assertions.assertEquals(SkuName.STANDARD_AZURE_FRONT_DOOR, model.name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Sku model = new Sku().withName(SkuName.PREMIUM_AZURE_FRONT_DOOR); + Sku model = new Sku().withName(SkuName.STANDARD_AZURE_FRONT_DOOR); model = BinaryData.fromObject(model).toObject(Sku.class); - Assertions.assertEquals(SkuName.PREMIUM_AZURE_FRONT_DOOR, model.name()); + Assertions.assertEquals(SkuName.STANDARD_AZURE_FRONT_DOOR, model.name()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/TagsObjectTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/TagsObjectTests.java index 2bc7fe7deb8bf..934be2b0c7386 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/TagsObjectTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/TagsObjectTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -13,16 +13,18 @@ public final class TagsObjectTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - TagsObject model = BinaryData.fromString("{\"tags\":{\"bcypmi\":\"evgbmqjq\",\"acfi\":\"kwlzuvccfwnfn\"}}") + TagsObject model = BinaryData.fromString( + "{\"tags\":{\"ikzhajqglcfhmlrq\":\"t\",\"zrdpsovwxznptgoe\":\"yxynq\",\"vntjlrigjk\":\"ybbabpfhvfsl\"}}") .toObject(TagsObject.class); - Assertions.assertEquals("evgbmqjq", model.tags().get("bcypmi")); + Assertions.assertEquals("t", model.tags().get("ikzhajqglcfhmlrq")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TagsObject model = new TagsObject().withTags(mapOf("bcypmi", "evgbmqjq", "acfi", "kwlzuvccfwnfn")); + TagsObject model = new TagsObject() + .withTags(mapOf("ikzhajqglcfhmlrq", "t", "zrdpsovwxznptgoe", "yxynq", "vntjlrigjk", "ybbabpfhvfsl")); model = BinaryData.fromObject(model).toObject(TagsObject.class); - Assertions.assertEquals("evgbmqjq", model.tags().get("bcypmi")); + Assertions.assertEquals("t", model.tags().get("ikzhajqglcfhmlrq")); } // Use "Map.of" if available diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/TimeseriesDataPointTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/TimeseriesDataPointTests.java index 24d4b909a0bd0..a02cdb1331c8b 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/TimeseriesDataPointTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/TimeseriesDataPointTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -11,17 +11,9 @@ public final class TimeseriesDataPointTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - TimeseriesDataPoint model = BinaryData.fromString("{\"dateTimeUTC\":\"xznptgoeiyb\",\"value\":11.274921}") + TimeseriesDataPoint model = BinaryData.fromString("{\"dateTimeUTC\":\"ndviauogphuartvt\",\"value\":94.33986}") .toObject(TimeseriesDataPoint.class); - Assertions.assertEquals("xznptgoeiyb", model.dateTimeUtc()); - Assertions.assertEquals(11.274921F, model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TimeseriesDataPoint model = new TimeseriesDataPoint().withDateTimeUtc("xznptgoeiyb").withValue(11.274921F); - model = BinaryData.fromObject(model).toObject(TimeseriesDataPoint.class); - Assertions.assertEquals("xznptgoeiyb", model.dateTimeUtc()); - Assertions.assertEquals(11.274921F, model.value()); + Assertions.assertEquals("ndviauogphuartvt", model.dateTimeUtc()); + Assertions.assertEquals(94.33986F, model.value()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/TimeseriesInnerTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/TimeseriesInnerTests.java index 02df9be0582cd..cb3e8ac582b7c 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/TimeseriesInnerTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/TimeseriesInnerTests.java @@ -1,73 +1,30 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.frontdoor.fluent.models.TimeseriesInner; import com.azure.resourcemanager.frontdoor.models.AggregationInterval; -import com.azure.resourcemanager.frontdoor.models.TimeseriesDataPoint; import com.azure.resourcemanager.frontdoor.models.TimeseriesType; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class TimeseriesInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TimeseriesInner model = BinaryData.fromString( - "{\"properties\":{\"endpoint\":\"zmqpnodawopqhewj\",\"startDateTimeUTC\":\"mcgsbostzelnd\",\"endDateTimeUTC\":\"tutmzl\",\"aggregationInterval\":\"Daily\",\"timeseriesType\":\"LatencyP50\",\"country\":\"fhrbbpneqvcw\",\"timeseriesData\":[{\"dateTimeUTC\":\"r\",\"value\":23.208946},{\"dateTimeUTC\":\"ppr\",\"value\":61.050842},{\"dateTimeUTC\":\"mo\",\"value\":51.150536},{\"dateTimeUTC\":\"ejnhlbkpb\",\"value\":30.076385}]},\"location\":\"piljhahzvech\",\"tags\":{\"uubw\":\"nwieholewjw\",\"aqtferr\":\"fqsfa\",\"nobpudcdabtqwpw\":\"wexjkmfxapjwogq\"},\"id\":\"awbzasqb\",\"name\":\"clj\",\"type\":\"kyexaoguyaipi\"}") + "{\"properties\":{\"endpoint\":\"cbfrm\",\"startDateTimeUTC\":\"dths\",\"endDateTimeUTC\":\"gvriibakclac\",\"aggregationInterval\":\"Daily\",\"timeseriesType\":\"LatencyP75\",\"country\":\"usx\",\"timeseriesData\":[{\"dateTimeUTC\":\"wvsgmwohqfzizvu\",\"value\":6.7612767},{\"dateTimeUTC\":\"jsvthnwpzteko\",\"value\":19.782698},{\"dateTimeUTC\":\"biattgplucfotan\",\"value\":56.629055},{\"dateTimeUTC\":\"nykzcugswvxwlm\",\"value\":49.0777}]},\"location\":\"m\",\"tags\":{\"ynpdkvgfab\":\"njmxmcuqudtcvcl\",\"uzphdugnei\":\"iyji\"},\"id\":\"n\",\"name\":\"gox\",\"type\":\"jiuqhibtozi\"}") .toObject(TimeseriesInner.class); - Assertions.assertEquals("piljhahzvech", model.location()); - Assertions.assertEquals("nwieholewjw", model.tags().get("uubw")); - Assertions.assertEquals("zmqpnodawopqhewj", model.endpoint()); - Assertions.assertEquals("mcgsbostzelnd", model.startDateTimeUtc()); - Assertions.assertEquals("tutmzl", model.endDateTimeUtc()); + Assertions.assertEquals("m", model.location()); + Assertions.assertEquals("njmxmcuqudtcvcl", model.tags().get("ynpdkvgfab")); + Assertions.assertEquals("cbfrm", model.endpoint()); + Assertions.assertEquals("dths", model.startDateTimeUtc()); + Assertions.assertEquals("gvriibakclac", model.endDateTimeUtc()); Assertions.assertEquals(AggregationInterval.DAILY, model.aggregationInterval()); - Assertions.assertEquals(TimeseriesType.LATENCY_P50, model.timeseriesType()); - Assertions.assertEquals("fhrbbpneqvcw", model.country()); - Assertions.assertEquals("r", model.timeseriesData().get(0).dateTimeUtc()); - Assertions.assertEquals(23.208946F, model.timeseriesData().get(0).value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TimeseriesInner model = new TimeseriesInner().withLocation("piljhahzvech") - .withTags(mapOf("uubw", "nwieholewjw", "aqtferr", "fqsfa", "nobpudcdabtqwpw", "wexjkmfxapjwogq")) - .withEndpoint("zmqpnodawopqhewj") - .withStartDateTimeUtc("mcgsbostzelnd") - .withEndDateTimeUtc("tutmzl") - .withAggregationInterval(AggregationInterval.DAILY) - .withTimeseriesType(TimeseriesType.LATENCY_P50) - .withCountry("fhrbbpneqvcw") - .withTimeseriesData(Arrays.asList(new TimeseriesDataPoint().withDateTimeUtc("r").withValue(23.208946F), - new TimeseriesDataPoint().withDateTimeUtc("ppr").withValue(61.050842F), - new TimeseriesDataPoint().withDateTimeUtc("mo").withValue(51.150536F), - new TimeseriesDataPoint().withDateTimeUtc("ejnhlbkpb").withValue(30.076385F))); - model = BinaryData.fromObject(model).toObject(TimeseriesInner.class); - Assertions.assertEquals("piljhahzvech", model.location()); - Assertions.assertEquals("nwieholewjw", model.tags().get("uubw")); - Assertions.assertEquals("zmqpnodawopqhewj", model.endpoint()); - Assertions.assertEquals("mcgsbostzelnd", model.startDateTimeUtc()); - Assertions.assertEquals("tutmzl", model.endDateTimeUtc()); - Assertions.assertEquals(AggregationInterval.DAILY, model.aggregationInterval()); - Assertions.assertEquals(TimeseriesType.LATENCY_P50, model.timeseriesType()); - Assertions.assertEquals("fhrbbpneqvcw", model.country()); - Assertions.assertEquals("r", model.timeseriesData().get(0).dateTimeUtc()); - Assertions.assertEquals(23.208946F, model.timeseriesData().get(0).value()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals(TimeseriesType.LATENCY_P75, model.timeseriesType()); + Assertions.assertEquals("usx", model.country()); + Assertions.assertEquals("wvsgmwohqfzizvu", model.timeseriesData().get(0).dateTimeUtc()); + Assertions.assertEquals(6.7612767F, model.timeseriesData().get(0).value()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/TimeseriesPropertiesTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/TimeseriesPropertiesTests.java index 4e1ebfaf1c7f5..691e2c4cbe97a 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/TimeseriesPropertiesTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/TimeseriesPropertiesTests.java @@ -1,54 +1,28 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.frontdoor.fluent.models.TimeseriesProperties; import com.azure.resourcemanager.frontdoor.models.AggregationInterval; -import com.azure.resourcemanager.frontdoor.models.TimeseriesDataPoint; import com.azure.resourcemanager.frontdoor.models.TimeseriesType; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class TimeseriesPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TimeseriesProperties model = BinaryData.fromString( - "{\"endpoint\":\"daultxijjumfq\",\"startDateTimeUTC\":\"z\",\"endDateTimeUTC\":\"qnmcjngzqdqx\",\"aggregationInterval\":\"Hourly\",\"timeseriesType\":\"MeasurementCounts\",\"country\":\"yfu\",\"timeseriesData\":[{\"dateTimeUTC\":\"vtuikzhajq\",\"value\":72.3863},{\"dateTimeUTC\":\"hm\",\"value\":36.039417},{\"dateTimeUTC\":\"yxynq\",\"value\":8.290434},{\"dateTimeUTC\":\"p\",\"value\":27.988852}]}") + "{\"endpoint\":\"wjedmurrxxgew\",\"startDateTimeUTC\":\"tvqylkmqpzoyhlfb\",\"endDateTimeUTC\":\"wgcloxoebqinji\",\"aggregationInterval\":\"Hourly\",\"timeseriesType\":\"LatencyP75\",\"country\":\"jqlafcbahhpzp\",\"timeseriesData\":[{\"dateTimeUTC\":\"yjwpfilkmkkh\",\"value\":53.896057}]}") .toObject(TimeseriesProperties.class); - Assertions.assertEquals("daultxijjumfq", model.endpoint()); - Assertions.assertEquals("z", model.startDateTimeUtc()); - Assertions.assertEquals("qnmcjngzqdqx", model.endDateTimeUtc()); + Assertions.assertEquals("wjedmurrxxgew", model.endpoint()); + Assertions.assertEquals("tvqylkmqpzoyhlfb", model.startDateTimeUtc()); + Assertions.assertEquals("wgcloxoebqinji", model.endDateTimeUtc()); Assertions.assertEquals(AggregationInterval.HOURLY, model.aggregationInterval()); - Assertions.assertEquals(TimeseriesType.MEASUREMENT_COUNTS, model.timeseriesType()); - Assertions.assertEquals("yfu", model.country()); - Assertions.assertEquals("vtuikzhajq", model.timeseriesData().get(0).dateTimeUtc()); - Assertions.assertEquals(72.3863F, model.timeseriesData().get(0).value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TimeseriesProperties model = new TimeseriesProperties().withEndpoint("daultxijjumfq") - .withStartDateTimeUtc("z") - .withEndDateTimeUtc("qnmcjngzqdqx") - .withAggregationInterval(AggregationInterval.HOURLY) - .withTimeseriesType(TimeseriesType.MEASUREMENT_COUNTS) - .withCountry("yfu") - .withTimeseriesData( - Arrays.asList(new TimeseriesDataPoint().withDateTimeUtc("vtuikzhajq").withValue(72.3863F), - new TimeseriesDataPoint().withDateTimeUtc("hm").withValue(36.039417F), - new TimeseriesDataPoint().withDateTimeUtc("yxynq").withValue(8.290434F), - new TimeseriesDataPoint().withDateTimeUtc("p").withValue(27.988852F))); - model = BinaryData.fromObject(model).toObject(TimeseriesProperties.class); - Assertions.assertEquals("daultxijjumfq", model.endpoint()); - Assertions.assertEquals("z", model.startDateTimeUtc()); - Assertions.assertEquals("qnmcjngzqdqx", model.endDateTimeUtc()); - Assertions.assertEquals(AggregationInterval.HOURLY, model.aggregationInterval()); - Assertions.assertEquals(TimeseriesType.MEASUREMENT_COUNTS, model.timeseriesType()); - Assertions.assertEquals("yfu", model.country()); - Assertions.assertEquals("vtuikzhajq", model.timeseriesData().get(0).dateTimeUtc()); - Assertions.assertEquals(72.3863F, model.timeseriesData().get(0).value()); + Assertions.assertEquals(TimeseriesType.LATENCY_P75, model.timeseriesType()); + Assertions.assertEquals("jqlafcbahhpzp", model.country()); + Assertions.assertEquals("yjwpfilkmkkh", model.timeseriesData().get(0).dateTimeUtc()); + Assertions.assertEquals(53.896057F, model.timeseriesData().get(0).value()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ValidateCustomDomainInputTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ValidateCustomDomainInputTests.java index 16e4a86b673c2..1f2ea4e942145 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ValidateCustomDomainInputTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ValidateCustomDomainInputTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -12,14 +12,14 @@ public final class ValidateCustomDomainInputTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ValidateCustomDomainInput model - = BinaryData.fromString("{\"hostName\":\"ousnfepgfewe\"}").toObject(ValidateCustomDomainInput.class); - Assertions.assertEquals("ousnfepgfewe", model.hostname()); + = BinaryData.fromString("{\"hostName\":\"sks\"}").toObject(ValidateCustomDomainInput.class); + Assertions.assertEquals("sks", model.hostname()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ValidateCustomDomainInput model = new ValidateCustomDomainInput().withHostname("ousnfepgfewe"); + ValidateCustomDomainInput model = new ValidateCustomDomainInput().withHostname("sks"); model = BinaryData.fromObject(model).toObject(ValidateCustomDomainInput.class); - Assertions.assertEquals("ousnfepgfewe", model.hostname()); + Assertions.assertEquals("sks", model.hostname()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ValidateCustomDomainOutputInnerTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ValidateCustomDomainOutputInnerTests.java index dd1191bd24052..dfea161c0e685 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ValidateCustomDomainOutputInnerTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/ValidateCustomDomainOutputInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -10,14 +10,8 @@ public final class ValidateCustomDomainOutputInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ValidateCustomDomainOutputInner model - = BinaryData.fromString("{\"customDomainValidated\":false,\"reason\":\"xgncxyk\",\"message\":\"djhlimm\"}") - .toObject(ValidateCustomDomainOutputInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ValidateCustomDomainOutputInner model = new ValidateCustomDomainOutputInner(); - model = BinaryData.fromObject(model).toObject(ValidateCustomDomainOutputInner.class); + ValidateCustomDomainOutputInner model = BinaryData + .fromString("{\"customDomainValidated\":false,\"reason\":\"lqol\",\"message\":\"kcgxxlxsffgcvi\"}") + .toObject(ValidateCustomDomainOutputInner.class); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/WebApplicationFirewallScrubbingRulesTests.java b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/WebApplicationFirewallScrubbingRulesTests.java index 397e23cdc5541..3d37c73ed3c6b 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/WebApplicationFirewallScrubbingRulesTests.java +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/src/test/java/com/azure/resourcemanager/frontdoor/generated/WebApplicationFirewallScrubbingRulesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.frontdoor.generated; @@ -15,11 +15,11 @@ public final class WebApplicationFirewallScrubbingRulesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WebApplicationFirewallScrubbingRules model = BinaryData.fromString( - "{\"matchVariable\":\"RequestBodyJsonArgNames\",\"selectorMatchOperator\":\"EqualsAny\",\"selector\":\"qqjnqgl\",\"state\":\"Enabled\"}") + "{\"matchVariable\":\"RequestBodyJsonArgNames\",\"selectorMatchOperator\":\"EqualsAny\",\"selector\":\"kvgtrdcn\",\"state\":\"Enabled\"}") .toObject(WebApplicationFirewallScrubbingRules.class); Assertions.assertEquals(ScrubbingRuleEntryMatchVariable.REQUEST_BODY_JSON_ARG_NAMES, model.matchVariable()); Assertions.assertEquals(ScrubbingRuleEntryMatchOperator.EQUALS_ANY, model.selectorMatchOperator()); - Assertions.assertEquals("qqjnqgl", model.selector()); + Assertions.assertEquals("kvgtrdcn", model.selector()); Assertions.assertEquals(ScrubbingRuleEntryState.ENABLED, model.state()); } @@ -28,12 +28,12 @@ public void testSerialize() throws Exception { WebApplicationFirewallScrubbingRules model = new WebApplicationFirewallScrubbingRules() .withMatchVariable(ScrubbingRuleEntryMatchVariable.REQUEST_BODY_JSON_ARG_NAMES) .withSelectorMatchOperator(ScrubbingRuleEntryMatchOperator.EQUALS_ANY) - .withSelector("qqjnqgl") + .withSelector("kvgtrdcn") .withState(ScrubbingRuleEntryState.ENABLED); model = BinaryData.fromObject(model).toObject(WebApplicationFirewallScrubbingRules.class); Assertions.assertEquals(ScrubbingRuleEntryMatchVariable.REQUEST_BODY_JSON_ARG_NAMES, model.matchVariable()); Assertions.assertEquals(ScrubbingRuleEntryMatchOperator.EQUALS_ANY, model.selectorMatchOperator()); - Assertions.assertEquals("qqjnqgl", model.selector()); + Assertions.assertEquals("kvgtrdcn", model.selector()); Assertions.assertEquals(ScrubbingRuleEntryState.ENABLED, model.state()); } } diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/tsp-location.yaml b/sdk/frontdoor/azure-resourcemanager-frontdoor/tsp-location.yaml new file mode 100644 index 0000000000000..57784878cdfb8 --- /dev/null +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/frontdoor/resource-manager/Microsoft.Network/FrontDoor +commit: 530ebfb31d6cf1b28f2c475013b0657d1a01c2a6 +repo: Azure/azure-rest-api-specs +additionalDirectories: