diff --git a/eng/lintingconfigs/revapi/track2/revapi.json b/eng/lintingconfigs/revapi/track2/revapi.json index b15d38971ec1..1b6e1621d501 100644 --- a/eng/lintingconfigs/revapi/track2/revapi.json +++ b/eng/lintingconfigs/revapi/track2/revapi.json @@ -874,6 +874,73 @@ "match": "class com\\.azure\\.resourcemanager\\.containerregistry\\.models\\..*ListResult" }, "justification": "Pageable models moved to implementation package. Unlikely used by user." + }, + { + "code": "java.method.visibilityReduced", + "old" : { + "matcher": "regex", + "match": "method void com\\.azure\\.resourcemanager\\.cdn\\.models\\..*\\:\\:\\\\(\\)" + }, + "justification": "Output-only immutable models' constructors are now private." + }, + { + "code": "java.method.visibilityReduced", + "old" : { + "matcher": "regex", + "match": "method .* com\\.azure\\.resourcemanager\\.cdn\\.models\\..*\\:\\:with.*\\(.*\\).*" + }, + "justification": "Output-only immutable models' setters are now package-private if it's being used by child class." + }, + { + "code": "java.method.removed", + "old" : { + "matcher": "regex", + "match": "method .* com\\.azure\\.resourcemanager\\.cdn\\.models\\..*\\:\\:with.*\\(.*\\).*" + }, + "justification": "Output-only immutable models' setters are removed if no explicit usage." + }, + { + "code": "java.class.removed", + "old" : { + "matcher": "regex", + "match": "class com\\.azure\\.resourcemanager\\.cdn\\.models\\..*ListResult" + }, + "justification": "Pageable models moved to implementation package. Unlikely used by user." + }, + { + "code": "java.class.removed", + "old" : { + "matcher": "regex", + "match": "class com\\.azure\\.resourcemanager\\.cdn\\.models\\..*(List|Result)$" + }, + "justification": "Pageable models moved to implementation package. Unlikely used by user." + }, + { + "regex": true, + "code": "java\\.missing\\.(oldSuperType|newSuperType)", + "old" : "class com\\.azure\\.resourcemanager\\.cdn\\.models\\..*", + "justification": "TypeSpec fix for base resource class." + }, + { + "code": "java.method.returnTypeChanged", + "old" : { + "matcher": "regex", + "match": "method .* com\\.azure\\.resourcemanager\\.cdn\\.models\\..*\\:\\:typeName\\(\\)" + }, + "justification": "TypeSpec uses proper enum types for discriminator fields instead of raw strings." + }, + { + "code": "java.method.parameterTypeChanged", + "old" : { + "matcher": "regex", + "match": "parameter .* com\\.azure\\.resourcemanager\\.cdn\\.models\\..*\\:\\:withTypeName\\(.*\\)" + }, + "justification": "TypeSpec uses proper enum types for discriminator fields instead of raw strings." + }, + { + "code": "java.method.removed", + "old" : "method com.azure.resourcemanager.cdn.models.PolicySettingsDefaultCustomBlockResponseStatusCode com.azure.resourcemanager.cdn.models.PolicySettingsDefaultCustomBlockResponseStatusCode::fromInt(int)", + "justification": "ExpandableStringEnum changed to ExpandableEnum. Use fromValue(Integer) instead." } ] } diff --git a/sdk/cdn/azure-resourcemanager-cdn/CHANGELOG.md b/sdk/cdn/azure-resourcemanager-cdn/CHANGELOG.md index 945c86825d0e..cffb950bc597 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/CHANGELOG.md +++ b/sdk/cdn/azure-resourcemanager-cdn/CHANGELOG.md @@ -4,11 +4,13 @@ ### Features Added -### Breaking Changes +- Supported `defineNewAfdEndpoint` and `defineAfdOriginGroup` method in `CdnProfile` for Azure Front Door Standard/Premium Sku. -### Bugs Fixed +### Breaking Changes -### Other Changes +- Changed `typeName()` return type from `String` to enum types (`DeliveryRuleActionParametersType`, `DeliveryRuleConditionParametersType`, `CertificateSourceParametersType`, `KeyVaultSigningKeyParametersType`) in condition/action parameter classes. +- Changed `withTypeName(String)` parameter type to corresponding enum type in condition/action parameter classes. +- Removed `fromInt(int)` method from `PolicySettingsDefaultCustomBlockResponseStatusCode` class. Use `fromValue(Integer)` instead. ## 2.53.6 (2026-01-29) diff --git a/sdk/cdn/azure-resourcemanager-cdn/README.md b/sdk/cdn/azure-resourcemanager-cdn/README.md index 0a200cf74644..a79bdb94e720 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/README.md +++ b/sdk/cdn/azure-resourcemanager-cdn/README.md @@ -18,7 +18,7 @@ For documentation on how to use this package, please see [Azure Management Libra com.azure.resourcemanager azure-resourcemanager-cdn - 2.53.1 + 2.54.0-beta.1 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/cdn/azure-resourcemanager-cdn/assets.json b/sdk/cdn/azure-resourcemanager-cdn/assets.json index 1ac3c98c911d..571453bd98d7 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/assets.json +++ b/sdk/cdn/azure-resourcemanager-cdn/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/cdn/azure-resourcemanager-cdn", - "Tag": "java/cdn/azure-resourcemanager-cdn_b5d3e5ac71" + "Tag": "java/cdn/azure-resourcemanager-cdn_a7419d8753" } diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/AfdCustomDomainsClient.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/AfdCustomDomainsClient.java index 753370870b88..95dcd9ba0d1d 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/AfdCustomDomainsClient.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/AfdCustomDomainsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent; @@ -23,56 +23,13 @@ * An instance of this class provides access to all the operations defined in AfdCustomDomainsClient. */ public interface AfdCustomDomainsClient { - /** - * Lists existing AzureFrontDoor domains. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list domains as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByProfileAsync(String resourceGroupName, String profileName); - - /** - * Lists existing AzureFrontDoor domains. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list domains as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByProfile(String resourceGroupName, String profileName); - - /** - * Lists existing AzureFrontDoor domains. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list domains as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByProfile(String resourceGroupName, String profileName, Context context); - /** * Gets an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource * group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -88,9 +45,9 @@ Mono> getWithResponseAsync(String resourceGroupName, St * Gets an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource * group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -105,9 +62,9 @@ Mono> getWithResponseAsync(String resourceGroupName, St * Gets an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource * group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -124,9 +81,9 @@ Response getWithResponse(String resourceGroupName, String profil * Gets an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource * group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -140,9 +97,9 @@ Response getWithResponse(String resourceGroupName, String profil /** * Creates a new domain within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param customDomain Domain properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -158,9 +115,9 @@ Mono>> createWithResponseAsync(String resourceGroupNam /** * Creates a new domain within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param customDomain Domain properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -176,9 +133,9 @@ PollerFlux, AfdDomainInner> beginCreateAsync(String r /** * Creates a new domain within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param customDomain Domain properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -194,9 +151,9 @@ SyncPoller, AfdDomainInner> beginCreate(String resour /** * Creates a new domain within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param customDomain Domain properties. * @param context The context to associate with this operation. @@ -213,9 +170,9 @@ SyncPoller, AfdDomainInner> beginCreate(String resour /** * Creates a new domain within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param customDomain Domain properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -231,9 +188,9 @@ Mono createAsync(String resourceGroupName, String profileName, S /** * Creates a new domain within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param customDomain Domain properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -249,9 +206,9 @@ AfdDomainInner create(String resourceGroupName, String profileName, String custo /** * Creates a new domain within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param customDomain Domain properties. * @param context The context to associate with this operation. @@ -268,9 +225,9 @@ AfdDomainInner create(String resourceGroupName, String profileName, String custo /** * Updates an existing domain within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param customDomainUpdateProperties Domain properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -286,9 +243,9 @@ Mono>> updateWithResponseAsync(String resourceGroupNam /** * Updates an existing domain within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param customDomainUpdateProperties Domain properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -304,9 +261,9 @@ PollerFlux, AfdDomainInner> beginUpdateAsync(String r /** * Updates an existing domain within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param customDomainUpdateProperties Domain properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -322,9 +279,9 @@ SyncPoller, AfdDomainInner> beginUpdate(String resour /** * Updates an existing domain within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param customDomainUpdateProperties Domain properties. * @param context The context to associate with this operation. @@ -341,9 +298,9 @@ SyncPoller, AfdDomainInner> beginUpdate(String resour /** * Updates an existing domain within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param customDomainUpdateProperties Domain properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -359,9 +316,9 @@ Mono updateAsync(String resourceGroupName, String profileName, S /** * Updates an existing domain within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param customDomainUpdateProperties Domain properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -377,9 +334,9 @@ AfdDomainInner update(String resourceGroupName, String profileName, String custo /** * Updates an existing domain within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param customDomainUpdateProperties Domain properties. * @param context The context to associate with this operation. @@ -397,9 +354,9 @@ AfdDomainInner update(String resourceGroupName, String profileName, String custo * Deletes an existing AzureFrontDoor domain with the specified domain name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -414,9 +371,9 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam * Deletes an existing AzureFrontDoor domain with the specified domain name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -431,9 +388,9 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St * Deletes an existing AzureFrontDoor domain with the specified domain name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -448,9 +405,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * Deletes an existing AzureFrontDoor domain with the specified domain name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -466,9 +423,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * Deletes an existing AzureFrontDoor domain with the specified domain name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -482,9 +439,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * Deletes an existing AzureFrontDoor domain with the specified domain name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -497,9 +454,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * Deletes an existing AzureFrontDoor domain with the specified domain name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -509,12 +466,55 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String profileName, String customDomainName, Context context); + /** + * Lists existing AzureFrontDoor domains. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AFDDomain list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByProfileAsync(String resourceGroupName, String profileName); + + /** + * Lists existing AzureFrontDoor domains. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AFDDomain list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByProfile(String resourceGroupName, String profileName); + + /** + * Lists existing AzureFrontDoor domains. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AFDDomain list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByProfile(String resourceGroupName, String profileName, Context context); + /** * Updates the domain validation token. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -528,9 +528,9 @@ Mono>> refreshValidationTokenWithResponseAsync(String /** * Updates the domain validation token. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -544,9 +544,9 @@ PollerFlux, Void> beginRefreshValidationTokenAsync(String resou /** * Updates the domain validation token. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -560,9 +560,9 @@ SyncPoller, Void> beginRefreshValidationToken(String resourceGr /** * Updates the domain validation token. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -577,9 +577,9 @@ SyncPoller, Void> beginRefreshValidationToken(String resourceGr /** * Updates the domain validation token. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -592,9 +592,9 @@ SyncPoller, Void> beginRefreshValidationToken(String resourceGr /** * Updates the domain validation token. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -606,9 +606,9 @@ SyncPoller, Void> beginRefreshValidationToken(String resourceGr /** * Updates the domain validation token. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/AfdEndpointsClient.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/AfdEndpointsClient.java index 60aceea4fb5a..c182590544d9 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/AfdEndpointsClient.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/AfdEndpointsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent; @@ -27,56 +27,13 @@ * An instance of this class provides access to all the operations defined in AfdEndpointsClient. */ public interface AfdEndpointsClient { - /** - * Lists existing AzureFrontDoor endpoints. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list endpoints as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByProfileAsync(String resourceGroupName, String profileName); - - /** - * Lists existing AzureFrontDoor endpoints. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list endpoints as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByProfile(String resourceGroupName, String profileName); - - /** - * Lists existing AzureFrontDoor endpoints. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list endpoints as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByProfile(String resourceGroupName, String profileName, Context context); - /** * Gets an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -92,9 +49,9 @@ Mono> getWithResponseAsync(String resourceGroupName, * Gets an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -109,9 +66,9 @@ Mono> getWithResponseAsync(String resourceGroupName, * Gets an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -128,9 +85,9 @@ Response getWithResponse(String resourceGroupName, String prof * Gets an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -145,9 +102,9 @@ Response getWithResponse(String resourceGroupName, String prof * Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource * group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointParam Endpoint properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -165,9 +122,9 @@ Mono>> createWithResponseAsync(String resourceGroupNam * Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource * group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointParam Endpoint properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -184,9 +141,9 @@ PollerFlux, AfdEndpointInner> beginCreateAsync(Stri * Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource * group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointParam Endpoint properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -203,9 +160,9 @@ SyncPoller, AfdEndpointInner> beginCreate(String re * Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource * group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointParam Endpoint properties. * @param context The context to associate with this operation. @@ -223,9 +180,9 @@ SyncPoller, AfdEndpointInner> beginCreate(String re * Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource * group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointParam Endpoint properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -243,9 +200,9 @@ Mono createAsync(String resourceGroupName, String profileName, * Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource * group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointParam Endpoint properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -262,9 +219,9 @@ AfdEndpointInner create(String resourceGroupName, String profileName, String end * Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource * group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointParam Endpoint properties. * @param context The context to associate with this operation. @@ -284,9 +241,9 @@ AfdEndpointInner create(String resourceGroupName, String profileName, String end * Update Origin operation. To update origin groups, use the Update Origin group operation. To update domains, use * the Update Custom Domain operation. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointUpdateProperties Endpoint update properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -306,9 +263,9 @@ Mono>> updateWithResponseAsync(String resourceGroupNam * Update Origin operation. To update origin groups, use the Update Origin group operation. To update domains, use * the Update Custom Domain operation. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointUpdateProperties Endpoint update properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -327,9 +284,9 @@ PollerFlux, AfdEndpointInner> beginUpdateAsync(Stri * Update Origin operation. To update origin groups, use the Update Origin group operation. To update domains, use * the Update Custom Domain operation. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointUpdateProperties Endpoint update properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -348,9 +305,9 @@ SyncPoller, AfdEndpointInner> beginUpdate(String re * Update Origin operation. To update origin groups, use the Update Origin group operation. To update domains, use * the Update Custom Domain operation. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointUpdateProperties Endpoint update properties. * @param context The context to associate with this operation. @@ -370,9 +327,9 @@ SyncPoller, AfdEndpointInner> beginUpdate(String re * Update Origin operation. To update origin groups, use the Update Origin group operation. To update domains, use * the Update Custom Domain operation. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointUpdateProperties Endpoint update properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -392,9 +349,9 @@ Mono updateAsync(String resourceGroupName, String profileName, * Update Origin operation. To update origin groups, use the Update Origin group operation. To update domains, use * the Update Custom Domain operation. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointUpdateProperties Endpoint update properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -413,9 +370,9 @@ AfdEndpointInner update(String resourceGroupName, String profileName, String end * Update Origin operation. To update origin groups, use the Update Origin group operation. To update domains, use * the Update Custom Domain operation. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointUpdateProperties Endpoint update properties. * @param context The context to associate with this operation. @@ -433,9 +390,9 @@ AfdEndpointInner update(String resourceGroupName, String profileName, String end * Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -450,9 +407,9 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam * Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -467,9 +424,9 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St * Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -483,9 +440,9 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St * Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -501,9 +458,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -517,9 +474,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -532,9 +489,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -544,12 +501,55 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String profileName, String endpointName, Context context); + /** + * Lists existing AzureFrontDoor endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AFDEndpoint list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByProfileAsync(String resourceGroupName, String profileName); + + /** + * Lists existing AzureFrontDoor endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AFDEndpoint list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByProfile(String resourceGroupName, String profileName); + + /** + * Lists existing AzureFrontDoor endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AFDEndpoint list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByProfile(String resourceGroupName, String profileName, Context context); + /** * Removes a content from AzureFrontDoor. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param contents The list of paths to the content and the list of linked domains 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/*' @@ -566,9 +566,9 @@ Mono>> purgeContentWithResponseAsync(String resourceGr /** * Removes a content from AzureFrontDoor. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param contents The list of paths to the content and the list of linked domains 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/*' @@ -585,9 +585,9 @@ PollerFlux, Void> beginPurgeContentAsync(String resourceGroupNa /** * Removes a content from AzureFrontDoor. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param contents The list of paths to the content and the list of linked domains 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/*' @@ -604,9 +604,9 @@ SyncPoller, Void> beginPurgeContent(String resourceGroupName, S /** * Removes a content from AzureFrontDoor. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param contents The list of paths to the content and the list of linked domains 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/*' @@ -624,9 +624,9 @@ SyncPoller, Void> beginPurgeContent(String resourceGroupName, S /** * Removes a content from AzureFrontDoor. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param contents The list of paths to the content and the list of linked domains 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/*' @@ -643,9 +643,9 @@ Mono purgeContentAsync(String resourceGroupName, String profileName, Strin /** * Removes a content from AzureFrontDoor. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param contents The list of paths to the content and the list of linked domains 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/*' @@ -660,9 +660,9 @@ Mono purgeContentAsync(String resourceGroupName, String profileName, Strin /** * Removes a content from AzureFrontDoor. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param contents The list of paths to the content and the list of linked domains 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/*' @@ -679,9 +679,9 @@ void purgeContent(String resourceGroupName, String profileName, String endpointN /** * Checks the quota and actual usage of endpoints under the given Azure Front Door profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -694,9 +694,9 @@ void purgeContent(String resourceGroupName, String profileName, String endpointN /** * Checks the quota and actual usage of endpoints under the given Azure Front Door profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -709,9 +709,9 @@ void purgeContent(String resourceGroupName, String profileName, String endpointN /** * Checks the quota and actual usage of endpoints under the given Azure Front Door profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -726,9 +726,9 @@ PagedIterable listResourceUsage(String resourceGroupName, String pro /** * Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in DNS. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainProperties Custom domain to be validated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -743,9 +743,9 @@ Mono> validateCustomDomainWithResponse /** * Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in DNS. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainProperties Custom domain to be validated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -760,9 +760,9 @@ Mono validateCustomDomainAsync(String resourceG /** * Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in DNS. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainProperties Custom domain to be validated. * @param context The context to associate with this operation. @@ -778,9 +778,9 @@ Response validateCustomDomainWithResponse(Strin /** * Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in DNS. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainProperties Custom domain to be validated. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/AfdOriginGroupsClient.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/AfdOriginGroupsClient.java index 025a120cf35d..b88919425aef 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/AfdOriginGroupsClient.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/AfdOriginGroupsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent; @@ -24,55 +24,12 @@ * An instance of this class provides access to all the operations defined in AfdOriginGroupsClient. */ public interface AfdOriginGroupsClient { - /** - * Lists all of the existing origin groups within a profile. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list origin groups as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByProfileAsync(String resourceGroupName, String profileName); - - /** - * Lists all of the existing origin groups within a profile. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list origin groups as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByProfile(String resourceGroupName, String profileName); - - /** - * Lists all of the existing origin groups within a profile. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list origin groups as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByProfile(String resourceGroupName, String profileName, Context context); - /** * Gets an existing origin group within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param originGroupName Name of the origin group which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -87,9 +44,9 @@ Mono> getWithResponseAsync(String resourceGroupNam /** * Gets an existing origin group within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param originGroupName Name of the origin group which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -102,9 +59,9 @@ Mono> getWithResponseAsync(String resourceGroupNam /** * Gets an existing origin group within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -119,9 +76,9 @@ Response getWithResponse(String resourceGroupName, String p /** * Gets an existing origin group within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param originGroupName Name of the origin group which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -134,9 +91,9 @@ Response getWithResponse(String resourceGroupName, String p /** * Creates a new origin group within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroup Origin group properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -152,9 +109,9 @@ Mono>> createWithResponseAsync(String resourceGroupNam /** * Creates a new origin group within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroup Origin group properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -170,9 +127,9 @@ PollerFlux, AfdOriginGroupInner> beginCreateAsyn /** * Creates a new origin group within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroup Origin group properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -188,9 +145,9 @@ SyncPoller, AfdOriginGroupInner> beginCreate(Str /** * Creates a new origin group within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroup Origin group properties. * @param context The context to associate with this operation. @@ -207,9 +164,9 @@ SyncPoller, AfdOriginGroupInner> beginCreate(Str /** * Creates a new origin group within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroup Origin group properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -225,9 +182,9 @@ Mono createAsync(String resourceGroupName, String profileNa /** * Creates a new origin group within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroup Origin group properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -243,9 +200,9 @@ AfdOriginGroupInner create(String resourceGroupName, String profileName, String /** * Creates a new origin group within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroup Origin group properties. * @param context The context to associate with this operation. @@ -262,10 +219,10 @@ AfdOriginGroupInner create(String resourceGroupName, String profileName, String /** * Updates an existing origin group within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroupUpdateProperties Origin group properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -280,10 +237,10 @@ Mono>> updateWithResponseAsync(String resourceGroupNam /** * Updates an existing origin group within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroupUpdateProperties Origin group properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -298,10 +255,10 @@ PollerFlux, AfdOriginGroupInner> beginUpdateAsyn /** * Updates an existing origin group within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroupUpdateProperties Origin group properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -316,10 +273,10 @@ SyncPoller, AfdOriginGroupInner> beginUpdate(Str /** * Updates an existing origin group within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroupUpdateProperties Origin group properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -336,10 +293,10 @@ SyncPoller, AfdOriginGroupInner> beginUpdate(Str /** * Updates an existing origin group within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroupUpdateProperties Origin group properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -354,10 +311,10 @@ Mono updateAsync(String resourceGroupName, String profileNa /** * Updates an existing origin group within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroupUpdateProperties Origin group properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -372,10 +329,10 @@ AfdOriginGroupInner update(String resourceGroupName, String profileName, String /** * Updates an existing origin group within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroupUpdateProperties Origin group properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -391,10 +348,10 @@ AfdOriginGroupInner update(String resourceGroupName, String profileName, String /** * Deletes an existing origin group within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -407,10 +364,10 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam /** * Deletes an existing origin group within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -423,10 +380,10 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St /** * Deletes an existing origin group within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -439,10 +396,10 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an existing origin group within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -456,10 +413,10 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an existing origin group within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -471,10 +428,10 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an existing origin group within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -485,10 +442,10 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an existing origin group within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -498,11 +455,54 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String profileName, String originGroupName, Context context); /** - * Checks the quota and actual usage of endpoints under the given Azure Front Door profile.. + * Lists all of the existing origin groups within a profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AFDOriginGroup list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByProfileAsync(String resourceGroupName, String profileName); + + /** + * Lists all of the existing origin groups within a profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AFDOriginGroup list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByProfile(String resourceGroupName, String profileName); + + /** + * Lists all of the existing origin groups within a profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AFDOriginGroup list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByProfile(String resourceGroupName, String profileName, Context context); + + /** + * Checks the quota and actual usage of endpoints under the given Azure Front Door profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param originGroupName Name of the origin group which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -513,11 +513,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String PagedFlux listResourceUsageAsync(String resourceGroupName, String profileName, String originGroupName); /** - * Checks the quota and actual usage of endpoints under the given Azure Front Door profile.. + * Checks the quota and actual usage of endpoints under the given Azure Front Door profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param originGroupName Name of the origin group which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -528,11 +528,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String PagedIterable listResourceUsage(String resourceGroupName, String profileName, String originGroupName); /** - * Checks the quota and actual usage of endpoints under the given Azure Front Door profile.. + * Checks the quota and actual usage of endpoints under the given Azure Front Door profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/AfdOriginsClient.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/AfdOriginsClient.java index 49512ca708b2..e1cc25c4ceba 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/AfdOriginsClient.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/AfdOriginsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent; @@ -23,62 +23,13 @@ * An instance of this class provides access to all the operations defined in AfdOriginsClient. */ public interface AfdOriginsClient { - /** - * Lists all of the existing origins within an origin group. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 origins as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByOriginGroupAsync(String resourceGroupName, String profileName, - String originGroupName); - - /** - * Lists all of the existing origins within an origin group. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 origins as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByOriginGroup(String resourceGroupName, String profileName, - String originGroupName); - - /** - * Lists all of the existing origins within an origin group. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 origins as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByOriginGroup(String resourceGroupName, String profileName, - String originGroupName, Context context); - /** * Gets an existing origin within an origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originName Name of the origin which is unique within the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -93,10 +44,10 @@ Mono> getWithResponseAsync(String resourceGroupName, St /** * Gets an existing origin within an origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originName Name of the origin which is unique within the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -110,10 +61,10 @@ Mono getAsync(String resourceGroupName, String profileName, Stri /** * Gets an existing origin within an origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originName Name of the origin which is unique within the profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -128,10 +79,10 @@ Response getWithResponse(String resourceGroupName, String profil /** * Gets an existing origin within an origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originName Name of the origin which is unique within the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -144,11 +95,11 @@ Response getWithResponse(String resourceGroupName, String profil /** * Creates a new origin within the specified origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. - * @param originName Name of the origin that is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. + * @param originName Name of the origin which is unique within the profile. * @param origin Origin properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -163,11 +114,11 @@ Mono>> createWithResponseAsync(String resourceGroupNam /** * Creates a new origin within the specified origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. - * @param originName Name of the origin that is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. + * @param originName Name of the origin which is unique within the profile. * @param origin Origin properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -182,11 +133,11 @@ PollerFlux, AfdOriginInner> beginCreateAsync(String r /** * Creates a new origin within the specified origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. - * @param originName Name of the origin that is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. + * @param originName Name of the origin which is unique within the profile. * @param origin Origin properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -201,11 +152,11 @@ SyncPoller, AfdOriginInner> beginCreate(String resour /** * Creates a new origin within the specified origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. - * @param originName Name of the origin that is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. + * @param originName Name of the origin which is unique within the profile. * @param origin Origin properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -221,11 +172,11 @@ SyncPoller, AfdOriginInner> beginCreate(String resour /** * Creates a new origin within the specified origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. - * @param originName Name of the origin that is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. + * @param originName Name of the origin which is unique within the profile. * @param origin Origin properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -240,11 +191,11 @@ Mono createAsync(String resourceGroupName, String profileName, S /** * Creates a new origin within the specified origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. - * @param originName Name of the origin that is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. + * @param originName Name of the origin which is unique within the profile. * @param origin Origin properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -258,11 +209,11 @@ AfdOriginInner create(String resourceGroupName, String profileName, String origi /** * Creates a new origin within the specified origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. - * @param originName Name of the origin that is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. + * @param originName Name of the origin which is unique within the profile. * @param origin Origin properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -277,10 +228,10 @@ AfdOriginInner create(String resourceGroupName, String profileName, String origi /** * Updates an existing origin within an origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originName Name of the origin which is unique within the profile. * @param originUpdateProperties Origin properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -296,10 +247,10 @@ Mono>> updateWithResponseAsync(String resourceGroupNam /** * Updates an existing origin within an origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originName Name of the origin which is unique within the profile. * @param originUpdateProperties Origin properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -316,10 +267,10 @@ PollerFlux, AfdOriginInner> beginUpdateAsync(String r /** * Updates an existing origin within an origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originName Name of the origin which is unique within the profile. * @param originUpdateProperties Origin properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -335,10 +286,10 @@ SyncPoller, AfdOriginInner> beginUpdate(String resour /** * Updates an existing origin within an origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originName Name of the origin which is unique within the profile. * @param originUpdateProperties Origin properties. * @param context The context to associate with this operation. @@ -355,10 +306,10 @@ SyncPoller, AfdOriginInner> beginUpdate(String resour /** * Updates an existing origin within an origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originName Name of the origin which is unique within the profile. * @param originUpdateProperties Origin properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -374,10 +325,10 @@ Mono updateAsync(String resourceGroupName, String profileName, S /** * Updates an existing origin within an origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originName Name of the origin which is unique within the profile. * @param originUpdateProperties Origin properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -392,10 +343,10 @@ AfdOriginInner update(String resourceGroupName, String profileName, String origi /** * Updates an existing origin within an origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originName Name of the origin which is unique within the profile. * @param originUpdateProperties Origin properties. * @param context The context to associate with this operation. @@ -411,10 +362,10 @@ AfdOriginInner update(String resourceGroupName, String profileName, String origi /** * Deletes an existing origin within an origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originName Name of the origin which is unique within the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -428,10 +379,10 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam /** * Deletes an existing origin within an origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originName Name of the origin which is unique within the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -445,10 +396,10 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St /** * Deletes an existing origin within an origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originName Name of the origin which is unique within the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -462,10 +413,10 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an existing origin within an origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originName Name of the origin which is unique within the profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -480,10 +431,10 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an existing origin within an origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originName Name of the origin which is unique within the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -496,10 +447,10 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an existing origin within an origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originName Name of the origin which is unique within the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -511,10 +462,10 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an existing origin within an origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originName Name of the origin which is unique within the profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -524,4 +475,53 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String profileName, String originGroupName, String originName, Context context); + + /** + * Lists all of the existing origins within an origin group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AFDOrigin list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByOriginGroupAsync(String resourceGroupName, String profileName, + String originGroupName); + + /** + * Lists all of the existing origins within an origin group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AFDOrigin list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByOriginGroup(String resourceGroupName, String profileName, + String originGroupName); + + /** + * Lists all of the existing origins within an origin group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AFDOrigin list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByOriginGroup(String resourceGroupName, String profileName, + String originGroupName, Context context); } diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/AfdProfilesClient.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/AfdProfilesClient.java index a95b8e136f80..7b99b7b9c129 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/AfdProfilesClient.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/AfdProfilesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent; @@ -33,9 +33,9 @@ public interface AfdProfilesClient { /** * Check the availability of an afdx endpoint name, and return the globally unique endpoint host name. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the - * resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param checkEndpointNameAvailabilityInput Input to check. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -51,9 +51,9 @@ Mono> checkEndpointNameAvaila /** * Check the availability of an afdx endpoint name, and return the globally unique endpoint host name. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the - * resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param checkEndpointNameAvailabilityInput Input to check. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -67,9 +67,9 @@ Mono checkEndpointNameAvailabilityAsyn /** * Check the availability of an afdx endpoint name, and return the globally unique endpoint host name. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the - * resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param checkEndpointNameAvailabilityInput Input to check. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -85,9 +85,9 @@ Response checkEndpointNameAvailability /** * Check the availability of an afdx endpoint name, and return the globally unique endpoint host name. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the - * resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param checkEndpointNameAvailabilityInput Input to check. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -101,9 +101,9 @@ CheckEndpointNameAvailabilityOutputInner checkEndpointNameAvailability(String re /** * Checks the quota and actual usage of endpoints under the given Azure Front Door profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -115,9 +115,9 @@ CheckEndpointNameAvailabilityOutputInner checkEndpointNameAvailability(String re /** * Checks the quota and actual usage of endpoints under the given Azure Front Door profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -129,9 +129,9 @@ CheckEndpointNameAvailabilityOutputInner checkEndpointNameAvailability(String re /** * Checks the quota and actual usage of endpoints under the given Azure Front Door profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -144,10 +144,10 @@ CheckEndpointNameAvailabilityOutputInner checkEndpointNameAvailability(String re /** * Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in DNS. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param checkHostnameAvailabilityInput Custom domain to be validated. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param checkHostNameAvailabilityInput Custom domain to be validated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -156,15 +156,15 @@ CheckEndpointNameAvailabilityOutputInner checkEndpointNameAvailability(String re */ @ServiceMethod(returns = ReturnType.SINGLE) Mono> checkHostnameAvailabilityWithResponseAsync( - String resourceGroupName, String profileName, CheckHostnameAvailabilityInput checkHostnameAvailabilityInput); + String resourceGroupName, String profileName, CheckHostnameAvailabilityInput checkHostNameAvailabilityInput); /** * Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in DNS. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param checkHostnameAvailabilityInput Custom domain to be validated. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param checkHostNameAvailabilityInput Custom domain to be validated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -172,15 +172,15 @@ Mono> checkHostnameAvailabilityWithRe */ @ServiceMethod(returns = ReturnType.SINGLE) Mono checkHostnameAvailabilityAsync(String resourceGroupName, String profileName, - CheckHostnameAvailabilityInput checkHostnameAvailabilityInput); + CheckHostnameAvailabilityInput checkHostNameAvailabilityInput); /** * Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in DNS. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param checkHostnameAvailabilityInput Custom domain to be validated. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param checkHostNameAvailabilityInput Custom domain to be validated. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -189,15 +189,15 @@ Mono checkHostnameAvailabilityAsync(String res */ @ServiceMethod(returns = ReturnType.SINGLE) Response checkHostnameAvailabilityWithResponse(String resourceGroupName, - String profileName, CheckHostnameAvailabilityInput checkHostnameAvailabilityInput, Context context); + String profileName, CheckHostnameAvailabilityInput checkHostNameAvailabilityInput, Context context); /** * Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in DNS. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param checkHostnameAvailabilityInput Custom domain to be validated. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param checkHostNameAvailabilityInput Custom domain to be validated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -205,14 +205,14 @@ Response checkHostnameAvailabilityWithResponse */ @ServiceMethod(returns = ReturnType.SINGLE) CheckNameAvailabilityOutputInner checkHostnameAvailability(String resourceGroupName, String profileName, - CheckHostnameAvailabilityInput checkHostnameAvailabilityInput); + CheckHostnameAvailabilityInput checkHostNameAvailabilityInput); /** * Validate a Secret in the profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the - * resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param validateSecretInput The Secret source. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -226,9 +226,9 @@ Mono> validateSecretWithResponseAsync(String /** * Validate a Secret in the profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the - * resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param validateSecretInput The Secret source. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -242,9 +242,9 @@ Mono validateSecretAsync(String resourceGroupName, St /** * Validate a Secret in the profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the - * resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param validateSecretInput The Secret source. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -259,9 +259,9 @@ Response validateSecretWithResponse(String resourceGr /** * Validate a Secret in the profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the - * resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param validateSecretInput The Secret source. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -275,9 +275,9 @@ ValidateSecretOutputInner validateSecret(String resourceGroupName, String profil /** * Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the - * resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param profileUpgradeParameters Profile upgrade input parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -292,9 +292,9 @@ Mono>> upgradeWithResponseAsync(String resourceGroupNa /** * Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the - * resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param profileUpgradeParameters Profile upgrade input parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -309,9 +309,9 @@ PollerFlux, ProfileInner> beginUpgradeAsync(String reso /** * Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the - * resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param profileUpgradeParameters Profile upgrade input parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -326,9 +326,9 @@ SyncPoller, ProfileInner> beginUpgrade(String resourceG /** * Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the - * resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param profileUpgradeParameters Profile upgrade input parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -344,9 +344,9 @@ SyncPoller, ProfileInner> beginUpgrade(String resourceG /** * Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the - * resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param profileUpgradeParameters Profile upgrade input parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -361,9 +361,9 @@ Mono upgradeAsync(String resourceGroupName, String profileName, /** * Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the - * resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param profileUpgradeParameters Profile upgrade input parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -377,9 +377,9 @@ ProfileInner upgrade(String resourceGroupName, String profileName, /** * Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the - * resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param profileUpgradeParameters Profile upgrade input parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/CdnManagementClient.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/CdnManagementClient.java index c7a6742c4ee3..794795972124 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/CdnManagementClient.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/CdnManagementClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent; @@ -23,26 +23,26 @@ */ public interface CdnManagementClient { /** - * Gets Azure Subscription ID. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ String getEndpoint(); /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ String getApiVersion(); + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); + /** * Gets The HTTP pipeline to send requests through. * @@ -58,18 +58,18 @@ public interface CdnManagementClient { Duration getDefaultPollInterval(); /** - * Gets the AfdProfilesClient object to access its operations. + * Gets the OperationsClient object to access its operations. * - * @return the AfdProfilesClient object. + * @return the OperationsClient object. */ - AfdProfilesClient getAfdProfiles(); + OperationsClient getOperations(); /** - * Gets the AfdCustomDomainsClient object to access its operations. + * Gets the ProfilesClient object to access its operations. * - * @return the AfdCustomDomainsClient object. + * @return the ProfilesClient object. */ - AfdCustomDomainsClient getAfdCustomDomains(); + ProfilesClient getProfiles(); /** * Gets the AfdEndpointsClient object to access its operations. @@ -128,18 +128,18 @@ public interface CdnManagementClient { SecretsClient getSecrets(); /** - * Gets the LogAnalyticsClient object to access its operations. + * Gets the KeyGroupsClient object to access its operations. * - * @return the LogAnalyticsClient object. + * @return the KeyGroupsClient object. */ - LogAnalyticsClient getLogAnalytics(); + KeyGroupsClient getKeyGroups(); /** - * Gets the ProfilesClient object to access its operations. + * Gets the DeploymentVersionsClient object to access its operations. * - * @return the ProfilesClient object. + * @return the DeploymentVersionsClient object. */ - ProfilesClient getProfiles(); + DeploymentVersionsClient getDeploymentVersions(); /** * Gets the EndpointsClient object to access its operations. @@ -170,25 +170,46 @@ public interface CdnManagementClient { CustomDomainsClient getCustomDomains(); /** - * Gets the ResourceUsagesClient object to access its operations. + * Gets the ProfileAgentsClient object to access its operations. * - * @return the ResourceUsagesClient object. + * @return the ProfileAgentsClient object. */ - ResourceUsagesClient getResourceUsages(); + ProfileAgentsClient getProfileAgents(); /** - * Gets the OperationsClient object to access its operations. + * Gets the WebAgentsClient object to access its operations. * - * @return the OperationsClient object. + * @return the WebAgentsClient object. */ - OperationsClient getOperations(); + WebAgentsClient getWebAgents(); /** - * Gets the EdgeNodesClient object to access its operations. + * Gets the KnowledgeSourcesClient object to access its operations. * - * @return the EdgeNodesClient object. + * @return the KnowledgeSourcesClient object. */ - EdgeNodesClient getEdgeNodes(); + KnowledgeSourcesClient getKnowledgeSources(); + + /** + * Gets the AfdCustomDomainsClient object to access its operations. + * + * @return the AfdCustomDomainsClient object. + */ + AfdCustomDomainsClient getAfdCustomDomains(); + + /** + * Gets the AfdProfilesClient object to access its operations. + * + * @return the AfdProfilesClient object. + */ + AfdProfilesClient getAfdProfiles(); + + /** + * Gets the LogAnalyticsClient object to access its operations. + * + * @return the LogAnalyticsClient object. + */ + LogAnalyticsClient getLogAnalytics(); /** * Gets the PoliciesClient object to access its operations. @@ -197,6 +218,20 @@ public interface CdnManagementClient { */ PoliciesClient getPolicies(); + /** + * Gets the ResourceUsagesClient object to access its operations. + * + * @return the ResourceUsagesClient object. + */ + ResourceUsagesClient getResourceUsages(); + + /** + * Gets the EdgeNodesClient object to access its operations. + * + * @return the EdgeNodesClient object. + */ + EdgeNodesClient getEdgeNodes(); + /** * Gets the ManagedRuleSetsClient object to access its operations. * @@ -208,7 +243,7 @@ public interface CdnManagementClient { * Check the availability of a resource name. This is needed for resources where name is globally unique, such as a * afdx endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param checkEndpointNameAvailabilityInput Input to check. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -224,7 +259,7 @@ Mono> checkEndpointNameAvaila * Check the availability of a resource name. This is needed for resources where name is globally unique, such as a * afdx endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param checkEndpointNameAvailabilityInput Input to check. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -239,7 +274,7 @@ Mono checkEndpointNameAvailabilityAsyn * Check the availability of a resource name. This is needed for resources where name is globally unique, such as a * afdx endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param checkEndpointNameAvailabilityInput Input to check. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -256,7 +291,7 @@ Response checkEndpointNameAvailability * Check the availability of a resource name. This is needed for resources where name is globally unique, such as a * afdx endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param checkEndpointNameAvailabilityInput Input to check. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -271,7 +306,7 @@ CheckEndpointNameAvailabilityOutputInner checkEndpointNameAvailability(String re * Check the availability of a resource name. This is needed for resources where name is globally unique, such as a * CDN endpoint. * - * @param checkNameAvailabilityInput Input to check. + * @param checkNameAvailabilityInput 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. @@ -286,7 +321,7 @@ CheckEndpointNameAvailabilityOutputInner checkEndpointNameAvailability(String re * Check the availability of a resource name. This is needed for resources where name is globally unique, such as a * CDN endpoint. * - * @param checkNameAvailabilityInput Input to check. + * @param checkNameAvailabilityInput 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. @@ -300,7 +335,7 @@ CheckEndpointNameAvailabilityOutputInner checkEndpointNameAvailability(String re * Check the availability of a resource name. This is needed for resources where name is globally unique, such as a * CDN endpoint. * - * @param checkNameAvailabilityInput Input to check. + * @param checkNameAvailabilityInput 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. @@ -315,7 +350,7 @@ CheckEndpointNameAvailabilityOutputInner checkEndpointNameAvailability(String re * Check the availability of a resource name. This is needed for resources where name is globally unique, such as a * CDN endpoint. * - * @param checkNameAvailabilityInput Input to check. + * @param checkNameAvailabilityInput 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. @@ -328,7 +363,7 @@ CheckEndpointNameAvailabilityOutputInner checkEndpointNameAvailability(String re * Check the availability of a resource name. This is needed for resources where name is globally unique, such as a * CDN endpoint. * - * @param checkNameAvailabilityInput Input to check. + * @param checkNameAvailabilityInput 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. @@ -343,7 +378,7 @@ CheckEndpointNameAvailabilityOutputInner checkEndpointNameAvailability(String re * Check the availability of a resource name. This is needed for resources where name is globally unique, such as a * CDN endpoint. * - * @param checkNameAvailabilityInput Input to check. + * @param checkNameAvailabilityInput 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. @@ -357,7 +392,7 @@ CheckEndpointNameAvailabilityOutputInner checkEndpointNameAvailability(String re * Check the availability of a resource name. This is needed for resources where name is globally unique, such as a * CDN endpoint. * - * @param checkNameAvailabilityInput Input to check. + * @param checkNameAvailabilityInput 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. @@ -372,7 +407,7 @@ Response checkNameAvailabilityWithSubscription * Check the availability of a resource name. This is needed for resources where name is globally unique, such as a * CDN endpoint. * - * @param checkNameAvailabilityInput Input to check. + * @param checkNameAvailabilityInput 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. @@ -387,7 +422,7 @@ Response checkNameAvailabilityWithSubscription * the origin server to help accelerate the delivery of dynamic content via the CDN endpoint. This path is relative * to the origin path specified in the endpoint configuration. * - * @param validateProbeInput Input to check. + * @param validateProbeInput 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. @@ -401,7 +436,7 @@ Response checkNameAvailabilityWithSubscription * the origin server to help accelerate the delivery of dynamic content via the CDN endpoint. This path is relative * to the origin path specified in the endpoint configuration. * - * @param validateProbeInput Input to check. + * @param validateProbeInput 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. @@ -415,7 +450,7 @@ Response checkNameAvailabilityWithSubscription * the origin server to help accelerate the delivery of dynamic content via the CDN endpoint. This path is relative * to the origin path specified in the endpoint configuration. * - * @param validateProbeInput Input to check. + * @param validateProbeInput 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. @@ -431,7 +466,7 @@ Response validateProbeWithResponse(ValidateProbeInput * the origin server to help accelerate the delivery of dynamic content via the CDN endpoint. This path is relative * to the origin path specified in the endpoint configuration. * - * @param validateProbeInput Input to check. + * @param validateProbeInput 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/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/CustomDomainsClient.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/CustomDomainsClient.java index 8614ebc5e746..9efd543a8189 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/CustomDomainsClient.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/CustomDomainsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent; @@ -24,55 +24,12 @@ * An instance of this class provides access to all the operations defined in CustomDomainsClient. */ public interface CustomDomainsClient { - /** - * Lists all of the existing custom domains within an endpoint. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. - * @param endpointName Name of the endpoint under the profile which is unique globally. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 custom domains as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByEndpointAsync(String resourceGroupName, String profileName, String endpointName); - - /** - * Lists all of the existing custom domains within an endpoint. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. - * @param endpointName Name of the endpoint under the profile which is unique globally. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 custom domains as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByEndpoint(String resourceGroupName, String profileName, String endpointName); - - /** - * Lists all of the existing custom domains within an endpoint. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. - * @param endpointName Name of the endpoint under the profile which is unique globally. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 custom domains as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByEndpoint(String resourceGroupName, String profileName, String endpointName, - Context context); - /** * Gets an existing custom domain within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -88,8 +45,9 @@ Mono> getWithResponseAsync(String resourceGroupName, /** * Gets an existing custom domain within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -104,8 +62,9 @@ Mono getAsync(String resourceGroupName, String profileName, S /** * Gets an existing custom domain within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param context The context to associate with this operation. @@ -121,8 +80,9 @@ Response getWithResponse(String resourceGroupName, String pro /** * Gets an existing custom domain within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -136,8 +96,9 @@ Response getWithResponse(String resourceGroupName, String pro /** * Creates a new custom domain within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param customDomainProperties Properties required to create a new custom domain. @@ -154,8 +115,9 @@ Mono>> createWithResponseAsync(String resourceGroupNam /** * Creates a new custom domain within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param customDomainProperties Properties required to create a new custom domain. @@ -173,8 +135,9 @@ PollerFlux, CustomDomainInner> beginCreateAsync(St /** * Creates a new custom domain within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param customDomainProperties Properties required to create a new custom domain. @@ -192,8 +155,9 @@ SyncPoller, CustomDomainInner> beginCreate(String /** * Creates a new custom domain within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param customDomainProperties Properties required to create a new custom domain. @@ -212,8 +176,9 @@ SyncPoller, CustomDomainInner> beginCreate(String /** * Creates a new custom domain within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param customDomainProperties Properties required to create a new custom domain. @@ -230,8 +195,9 @@ Mono createAsync(String resourceGroupName, String profileName /** * Creates a new custom domain within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param customDomainProperties Properties required to create a new custom domain. @@ -248,8 +214,9 @@ CustomDomainInner create(String resourceGroupName, String profileName, String en /** * Creates a new custom domain within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param customDomainProperties Properties required to create a new custom domain. @@ -267,8 +234,9 @@ CustomDomainInner create(String resourceGroupName, String profileName, String en /** * Deletes an existing custom domain within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -283,8 +251,9 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam /** * Deletes an existing custom domain within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -293,14 +262,15 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, CustomDomainInner> beginDeleteAsync(String resourceGroupName, - String profileName, String endpointName, String customDomainName); + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String profileName, + String endpointName, String customDomainName); /** * Deletes an existing custom domain within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -309,14 +279,15 @@ PollerFlux, CustomDomainInner> beginDeleteAsync(St * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CustomDomainInner> beginDelete(String resourceGroupName, - String profileName, String endpointName, String customDomainName); + SyncPoller, Void> beginDelete(String resourceGroupName, String profileName, String endpointName, + String customDomainName); /** * Deletes an existing custom domain within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param context The context to associate with this operation. @@ -326,63 +297,110 @@ SyncPoller, CustomDomainInner> beginDelete(String * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CustomDomainInner> beginDelete(String resourceGroupName, - String profileName, String endpointName, String customDomainName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String profileName, String endpointName, + String customDomainName, Context context); /** * Deletes an existing custom domain within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String profileName, String endpointName, - String customDomainName); + Mono deleteAsync(String resourceGroupName, String profileName, String endpointName, String customDomainName); /** * Deletes an existing custom domain within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CustomDomainInner delete(String resourceGroupName, String profileName, String endpointName, - String customDomainName); + void delete(String resourceGroupName, String profileName, String endpointName, String customDomainName); /** * Deletes an existing custom domain within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CustomDomainInner delete(String resourceGroupName, String profileName, String endpointName, String customDomainName, + void delete(String resourceGroupName, String profileName, String endpointName, String customDomainName, + Context context); + + /** + * Lists all of the existing custom domains within an endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CustomDomain list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByEndpointAsync(String resourceGroupName, String profileName, String endpointName); + + /** + * Lists all of the existing custom domains within an endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CustomDomain list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByEndpoint(String resourceGroupName, String profileName, String endpointName); + + /** + * Lists all of the existing custom domains within an endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CustomDomain list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByEndpoint(String resourceGroupName, String profileName, String endpointName, Context context); /** * Disable https delivery of the custom domain. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -398,8 +416,9 @@ Mono>> disableCustomHttpsWithResponseAsync(String reso /** * Disable https delivery of the custom domain. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -415,8 +434,9 @@ PollerFlux, CustomDomainInner> beginDisableCustomH /** * Disable https delivery of the custom domain. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -432,8 +452,9 @@ SyncPoller, CustomDomainInner> beginDisableCustomH /** * Disable https delivery of the custom domain. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param context The context to associate with this operation. @@ -450,8 +471,9 @@ SyncPoller, CustomDomainInner> beginDisableCustomH /** * Disable https delivery of the custom domain. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -467,8 +489,9 @@ Mono disableCustomHttpsAsync(String resourceGroupName, String /** * Disable https delivery of the custom domain. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -484,8 +507,9 @@ CustomDomainInner disableCustomHttps(String resourceGroupName, String profileNam /** * Disable https delivery of the custom domain. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param context The context to associate with this operation. @@ -502,8 +526,9 @@ CustomDomainInner disableCustomHttps(String resourceGroupName, String profileNam /** * Enable https delivery of the custom domain. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param customDomainHttpsParameters The configuration specifying how to enable HTTPS for the custom domain - using @@ -522,8 +547,9 @@ Mono>> enableCustomHttpsWithResponseAsync(String resou /** * Enable https delivery of the custom domain. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param customDomainHttpsParameters The configuration specifying how to enable HTTPS for the custom domain - using @@ -543,8 +569,9 @@ PollerFlux, CustomDomainInner> beginEnableCustomHt /** * Enable https delivery of the custom domain. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -560,8 +587,9 @@ PollerFlux, CustomDomainInner> beginEnableCustomHt /** * Enable https delivery of the custom domain. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -577,8 +605,9 @@ SyncPoller, CustomDomainInner> beginEnableCustomHt /** * Enable https delivery of the custom domain. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param customDomainHttpsParameters The configuration specifying how to enable HTTPS for the custom domain - using @@ -599,8 +628,9 @@ SyncPoller, CustomDomainInner> beginEnableCustomHt /** * Enable https delivery of the custom domain. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param customDomainHttpsParameters The configuration specifying how to enable HTTPS for the custom domain - using @@ -619,8 +649,9 @@ Mono enableCustomHttpsAsync(String resourceGroupName, String /** * Enable https delivery of the custom domain. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -636,8 +667,9 @@ Mono enableCustomHttpsAsync(String resourceGroupName, String /** * Enable https delivery of the custom domain. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -653,8 +685,9 @@ CustomDomainInner enableCustomHttps(String resourceGroupName, String profileName /** * Enable https delivery of the custom domain. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param customDomainHttpsParameters The configuration specifying how to enable HTTPS for the custom domain - using diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/DeploymentVersionsClient.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/DeploymentVersionsClient.java new file mode 100644 index 000000000000..8003dd207756 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/DeploymentVersionsClient.java @@ -0,0 +1,388 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.cdn.fluent.models.CompareDeploymentVersionsResponseInner; +import com.azure.resourcemanager.cdn.fluent.models.DeploymentVersionInner; +import com.azure.resourcemanager.cdn.models.CompareDeploymentVersionsParameter; +import com.azure.resourcemanager.cdn.models.DeploymentVersionUpdate; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in DeploymentVersionsClient. + */ +public interface DeploymentVersionsClient { + /** + * Get an existing DeploymentVersion with the specified version name under the specified subscription, resource + * group and profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 existing DeploymentVersion with the specified version name under the specified subscription, resource + * group and profile along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String profileName, + String versionName); + + /** + * Get an existing DeploymentVersion with the specified version name under the specified subscription, resource + * group and profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 existing DeploymentVersion with the specified version name under the specified subscription, resource + * group and profile on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String profileName, String versionName); + + /** + * Get an existing DeploymentVersion with the specified version name under the specified subscription, resource + * group and profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the profile. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 existing DeploymentVersion with the specified version name under the specified subscription, resource + * group and profile along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String profileName, String versionName, + Context context); + + /** + * Get an existing DeploymentVersion with the specified version name under the specified subscription, resource + * group and profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 existing DeploymentVersion with the specified version name under the specified subscription, resource + * group and profile. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeploymentVersionInner get(String resourceGroupName, String profileName, String versionName); + + /** + * Update an existing DeploymentVersion within a profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the profile. + * @param deploymentVersionUpdateProperties Deployment version properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployment version object along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> updateWithResponseAsync(String resourceGroupName, String profileName, + String versionName, DeploymentVersionUpdate deploymentVersionUpdateProperties); + + /** + * Update an existing DeploymentVersion within a profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the profile. + * @param deploymentVersionUpdateProperties Deployment version properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployment version object on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono updateAsync(String resourceGroupName, String profileName, String versionName, + DeploymentVersionUpdate deploymentVersionUpdateProperties); + + /** + * Update an existing DeploymentVersion within a profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the profile. + * @param deploymentVersionUpdateProperties Deployment version properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployment version object along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse(String resourceGroupName, String profileName, + String versionName, DeploymentVersionUpdate deploymentVersionUpdateProperties, Context context); + + /** + * Update an existing DeploymentVersion within a profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the profile. + * @param deploymentVersionUpdateProperties Deployment version properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployment version object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeploymentVersionInner update(String resourceGroupName, String profileName, String versionName, + DeploymentVersionUpdate deploymentVersionUpdateProperties); + + /** + * Lists existing deployment versions by profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentVersion list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByProfileAsync(String resourceGroupName, String profileName); + + /** + * Lists existing deployment versions by profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentVersion list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByProfile(String resourceGroupName, String profileName); + + /** + * Lists existing deployment versions by profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentVersion list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByProfile(String resourceGroupName, String profileName, Context context); + + /** + * Approve the deployment of the version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> approveWithResponseAsync(String resourceGroupName, String profileName, + String versionName); + + /** + * Approve the deployment of the version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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) + PollerFlux, Void> beginApproveAsync(String resourceGroupName, String profileName, + String versionName); + + /** + * Approve the deployment of the version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginApprove(String resourceGroupName, String profileName, String versionName); + + /** + * Approve the deployment of the version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the profile. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginApprove(String resourceGroupName, String profileName, String versionName, + Context context); + + /** + * Approve the deployment of the version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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) + Mono approveAsync(String resourceGroupName, String profileName, String versionName); + + /** + * Approve the deployment of the version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void approve(String resourceGroupName, String profileName, String versionName); + + /** + * Approve the deployment of the version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the profile. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void approve(String resourceGroupName, String profileName, String versionName, Context context); + + /** + * Compare the deployment version to another deployment version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the profile. + * @param compareDeploymentVersionsParameter The deployment version to be compared to. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return compare deployment versions response along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> compareWithResponseAsync(String resourceGroupName, + String profileName, String versionName, CompareDeploymentVersionsParameter compareDeploymentVersionsParameter); + + /** + * Compare the deployment version to another deployment version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the profile. + * @param compareDeploymentVersionsParameter The deployment version to be compared to. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return compare deployment versions response on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono compareAsync(String resourceGroupName, String profileName, + String versionName, CompareDeploymentVersionsParameter compareDeploymentVersionsParameter); + + /** + * Compare the deployment version to another deployment version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the profile. + * @param compareDeploymentVersionsParameter The deployment version to be compared to. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return compare deployment versions response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response compareWithResponse(String resourceGroupName, String profileName, + String versionName, CompareDeploymentVersionsParameter compareDeploymentVersionsParameter, Context context); + + /** + * Compare the deployment version to another deployment version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the profile. + * @param compareDeploymentVersionsParameter The deployment version to be compared to. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return compare deployment versions response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CompareDeploymentVersionsResponseInner compare(String resourceGroupName, String profileName, String versionName, + CompareDeploymentVersionsParameter compareDeploymentVersionsParameter); +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/EdgeNodesClient.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/EdgeNodesClient.java index 0a500f917575..e5f31cee6956 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/EdgeNodesClient.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/EdgeNodesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/EndpointsClient.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/EndpointsClient.java index 3c76bf517f90..a5cd1526a1b5 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/EndpointsClient.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/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.cdn.fluent; @@ -28,52 +28,13 @@ * An instance of this class provides access to all the operations defined in EndpointsClient. */ public interface EndpointsClient { - /** - * Lists existing CDN endpoints. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list endpoints as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByProfileAsync(String resourceGroupName, String profileName); - - /** - * Lists existing CDN endpoints. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list endpoints as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByProfile(String resourceGroupName, String profileName); - - /** - * Lists existing CDN endpoints. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list endpoints as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByProfile(String resourceGroupName, String profileName, Context context); - /** * Gets an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group * and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -89,8 +50,9 @@ Mono> getWithResponseAsync(String resourceGroupName, Str * Gets an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group * and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -105,8 +67,9 @@ Mono> getWithResponseAsync(String resourceGroupName, Str * Gets an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group * and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -123,8 +86,9 @@ Response getWithResponse(String resourceGroupName, String profile * Gets an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group * and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -139,8 +103,9 @@ Response getWithResponse(String resourceGroupName, String profile * Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and * profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointParam Endpoint properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -158,8 +123,9 @@ Mono>> createWithResponseAsync(String resourceGroupNam * Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and * profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointParam Endpoint properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -176,8 +142,9 @@ PollerFlux, EndpointInner> beginCreateAsync(String res * Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and * profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointParam Endpoint properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -194,8 +161,9 @@ SyncPoller, EndpointInner> beginCreate(String resource * Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and * profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointParam Endpoint properties. * @param context The context to associate with this operation. @@ -213,8 +181,9 @@ SyncPoller, EndpointInner> beginCreate(String resource * Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and * profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointParam Endpoint properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -231,8 +200,9 @@ Mono createAsync(String resourceGroupName, String profileName, St * Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and * profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointParam Endpoint properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -249,8 +219,9 @@ EndpointInner create(String resourceGroupName, String profileName, String endpoi * Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and * profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointParam Endpoint properties. * @param context The context to associate with this operation. @@ -270,8 +241,9 @@ EndpointInner create(String resourceGroupName, String profileName, String endpoi * operation. To update origin groups, use the Update Origin group operation. To update custom domains, use the * Update Custom Domain operation. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointUpdateProperties Endpoint update properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -291,8 +263,9 @@ Mono>> updateWithResponseAsync(String resourceGroupNam * operation. To update origin groups, use the Update Origin group operation. To update custom domains, use the * Update Custom Domain operation. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointUpdateProperties Endpoint update properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -311,8 +284,9 @@ PollerFlux, EndpointInner> beginUpdateAsync(String res * operation. To update origin groups, use the Update Origin group operation. To update custom domains, use the * Update Custom Domain operation. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointUpdateProperties Endpoint update properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -331,8 +305,9 @@ SyncPoller, EndpointInner> beginUpdate(String resource * operation. To update origin groups, use the Update Origin group operation. To update custom domains, use the * Update Custom Domain operation. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointUpdateProperties Endpoint update properties. * @param context The context to associate with this operation. @@ -352,8 +327,9 @@ SyncPoller, EndpointInner> beginUpdate(String resource * operation. To update origin groups, use the Update Origin group operation. To update custom domains, use the * Update Custom Domain operation. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointUpdateProperties Endpoint update properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -372,8 +348,9 @@ Mono updateAsync(String resourceGroupName, String profileName, St * operation. To update origin groups, use the Update Origin group operation. To update custom domains, use the * Update Custom Domain operation. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointUpdateProperties Endpoint update properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -392,8 +369,9 @@ EndpointInner update(String resourceGroupName, String profileName, String endpoi * operation. To update origin groups, use the Update Origin group operation. To update custom domains, use the * Update Custom Domain operation. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointUpdateProperties Endpoint update properties. * @param context The context to associate with this operation. @@ -411,8 +389,9 @@ EndpointInner update(String resourceGroupName, String profileName, String endpoi * Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource * group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -427,8 +406,9 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam * Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource * group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -443,8 +423,9 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St * Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource * group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -458,8 +439,9 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St * Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource * group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -475,8 +457,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource * group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -490,8 +473,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource * group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -504,8 +488,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource * group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -515,11 +500,55 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String profileName, String endpointName, Context context); + /** + * Lists existing CDN endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Endpoint list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByProfileAsync(String resourceGroupName, String profileName); + + /** + * Lists existing CDN endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Endpoint list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByProfile(String resourceGroupName, String profileName); + + /** + * Lists existing CDN endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Endpoint list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByProfile(String resourceGroupName, String profileName, Context context); + /** * Starts an existing CDN endpoint that is on a stopped state. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -535,8 +564,9 @@ Mono>> startWithResponseAsync(String resourceGroupName /** * Starts an existing CDN endpoint that is on a stopped state. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -551,8 +581,9 @@ PollerFlux, EndpointInner> beginStartAsync(String reso /** * Starts an existing CDN endpoint that is on a stopped state. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -567,8 +598,9 @@ SyncPoller, EndpointInner> beginStart(String resourceG /** * Starts an existing CDN endpoint that is on a stopped state. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -584,8 +616,9 @@ SyncPoller, EndpointInner> beginStart(String resourceG /** * Starts an existing CDN endpoint that is on a stopped state. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -599,8 +632,9 @@ SyncPoller, EndpointInner> beginStart(String resourceG /** * Starts an existing CDN endpoint that is on a stopped state. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -614,8 +648,9 @@ SyncPoller, EndpointInner> beginStart(String resourceG /** * Starts an existing CDN endpoint that is on a stopped state. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -630,8 +665,9 @@ SyncPoller, EndpointInner> beginStart(String resourceG /** * Stops an existing running CDN endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -647,8 +683,9 @@ Mono>> stopWithResponseAsync(String resourceGroupName, /** * Stops an existing running CDN endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -663,8 +700,9 @@ PollerFlux, EndpointInner> beginStopAsync(String resou /** * Stops an existing running CDN endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -679,8 +717,9 @@ SyncPoller, EndpointInner> beginStop(String resourceGr /** * Stops an existing running CDN endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -696,8 +735,9 @@ SyncPoller, EndpointInner> beginStop(String resourceGr /** * Stops an existing running CDN endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -711,8 +751,9 @@ SyncPoller, EndpointInner> beginStop(String resourceGr /** * Stops an existing running CDN endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -726,8 +767,9 @@ SyncPoller, EndpointInner> beginStop(String resourceGr /** * Stops an existing running CDN endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -742,8 +784,9 @@ SyncPoller, EndpointInner> beginStop(String resourceGr /** * Removes a content from CDN. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @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 @@ -760,8 +803,9 @@ Mono>> purgeContentWithResponseAsync(String resourceGr /** * Removes a content from CDN. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @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 @@ -778,8 +822,9 @@ PollerFlux, Void> beginPurgeContentAsync(String resourceGroupNa /** * Removes a content from CDN. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @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 @@ -796,8 +841,9 @@ SyncPoller, Void> beginPurgeContent(String resourceGroupName, S /** * Removes a content from CDN. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @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 @@ -815,8 +861,9 @@ SyncPoller, Void> beginPurgeContent(String resourceGroupName, S /** * Removes a content from CDN. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @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 @@ -833,8 +880,9 @@ Mono purgeContentAsync(String resourceGroupName, String profileName, Strin /** * Removes a content from CDN. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @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 @@ -850,8 +898,9 @@ void purgeContent(String resourceGroupName, String profileName, String endpointN /** * Removes a content from CDN. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @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 @@ -868,8 +917,9 @@ void purgeContent(String resourceGroupName, String profileName, String endpointN /** * Pre-loads a content to CDN. Available for Verizon Profiles. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param contentFilePaths The path to the content to be loaded. Path should be a full URL, e.g. * ‘/pictures/city.png' which loads a single file. @@ -885,8 +935,9 @@ Mono>> loadContentWithResponseAsync(String resourceGro /** * Pre-loads a content to CDN. Available for Verizon Profiles. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param contentFilePaths The path to the content to be loaded. Path should be a full URL, e.g. * ‘/pictures/city.png' which loads a single file. @@ -902,8 +953,9 @@ PollerFlux, Void> beginLoadContentAsync(String resourceGroupNam /** * Pre-loads a content to CDN. Available for Verizon Profiles. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param contentFilePaths The path to the content to be loaded. Path should be a full URL, e.g. * ‘/pictures/city.png' which loads a single file. @@ -919,8 +971,9 @@ SyncPoller, Void> beginLoadContent(String resourceGroupName, St /** * Pre-loads a content to CDN. Available for Verizon Profiles. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param contentFilePaths The path to the content to be loaded. Path should be a full URL, e.g. * ‘/pictures/city.png' which loads a single file. @@ -937,8 +990,9 @@ SyncPoller, Void> beginLoadContent(String resourceGroupName, St /** * Pre-loads a content to CDN. Available for Verizon Profiles. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param contentFilePaths The path to the content to be loaded. Path should be a full URL, e.g. * ‘/pictures/city.png' which loads a single file. @@ -954,8 +1008,9 @@ Mono loadContentAsync(String resourceGroupName, String profileName, String /** * Pre-loads a content to CDN. Available for Verizon Profiles. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param contentFilePaths The path to the content to be loaded. Path should be a full URL, e.g. * ‘/pictures/city.png' which loads a single file. @@ -970,8 +1025,9 @@ void loadContent(String resourceGroupName, String profileName, String endpointNa /** * Pre-loads a content to CDN. Available for Verizon Profiles. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param contentFilePaths The path to the content to be loaded. Path should be a full URL, e.g. * ‘/pictures/city.png' which loads a single file. @@ -987,8 +1043,9 @@ void loadContent(String resourceGroupName, String profileName, String endpointNa /** * Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainProperties Custom domain to be validated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1003,8 +1060,9 @@ Mono> validateCustomDomainWithResponse /** * Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainProperties Custom domain to be validated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1019,8 +1077,9 @@ Mono validateCustomDomainAsync(String resourceG /** * Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainProperties Custom domain to be validated. * @param context The context to associate with this operation. @@ -1036,8 +1095,9 @@ Response validateCustomDomainWithResponse(Strin /** * Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainProperties Custom domain to be validated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1052,8 +1112,9 @@ ValidateCustomDomainOutputInner validateCustomDomain(String resourceGroupName, S /** * Checks the quota and usage of geo filters and custom domains under the given endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -1067,8 +1128,9 @@ PagedFlux listResourceUsageAsync(String resourceGroupName, S /** * Checks the quota and usage of geo filters and custom domains under the given endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -1082,8 +1144,9 @@ PagedIterable listResourceUsage(String resourceGroupName, St /** * Checks the quota and usage of geo filters and custom domains under the given endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/KeyGroupsClient.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/KeyGroupsClient.java new file mode 100644 index 000000000000..f596203508b4 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/KeyGroupsClient.java @@ -0,0 +1,481 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.cdn.fluent.models.KeyGroupInner; +import com.azure.resourcemanager.cdn.models.KeyGroupUpdatePropertiesParameters; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in KeyGroupsClient. + */ +public interface KeyGroupsClient { + /** + * Gets an existing KeyGroup within a profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 existing KeyGroup within a profile along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String profileName, + String keyGroupName); + + /** + * Gets an existing KeyGroup within a profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 existing KeyGroup within a profile on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String profileName, String keyGroupName); + + /** + * Gets an existing KeyGroup within a profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 existing KeyGroup within a profile along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String profileName, String keyGroupName, + Context context); + + /** + * Gets an existing KeyGroup within a profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 existing KeyGroup within a profile. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + KeyGroupInner get(String resourceGroupName, String profileName, String keyGroupName); + + /** + * Creates or updates a new KeyGroup within the specified profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @param keyGroup The KeyGroup properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return contains a list of references of UrlSigningKey type secret objects along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> createUpdateWithResponseAsync(String resourceGroupName, String profileName, + String keyGroupName, KeyGroupInner keyGroup); + + /** + * Creates or updates a new KeyGroup within the specified profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @param keyGroup The KeyGroup properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 contains a list of references of UrlSigningKey type secret objects. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginCreateUpdateAsync(String resourceGroupName, String profileName, + String keyGroupName, KeyGroupInner keyGroup); + + /** + * Creates or updates a new KeyGroup within the specified profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @param keyGroup The KeyGroup properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of contains a list of references of UrlSigningKey type secret objects. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginCreateUpdate(String resourceGroupName, String profileName, + String keyGroupName, KeyGroupInner keyGroup); + + /** + * Creates or updates a new KeyGroup within the specified profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @param keyGroup The KeyGroup properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of contains a list of references of UrlSigningKey type secret objects. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginCreateUpdate(String resourceGroupName, String profileName, + String keyGroupName, KeyGroupInner keyGroup, Context context); + + /** + * Creates or updates a new KeyGroup within the specified profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @param keyGroup The KeyGroup properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return contains a list of references of UrlSigningKey type secret objects on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createUpdateAsync(String resourceGroupName, String profileName, String keyGroupName, + KeyGroupInner keyGroup); + + /** + * Creates or updates a new KeyGroup within the specified profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @param keyGroup The KeyGroup properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void createUpdate(String resourceGroupName, String profileName, String keyGroupName, KeyGroupInner keyGroup); + + /** + * Creates or updates a new KeyGroup within the specified profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @param keyGroup The KeyGroup properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void createUpdate(String resourceGroupName, String profileName, String keyGroupName, KeyGroupInner keyGroup, + Context context); + + /** + * Updates an existing KeyGroup within the specified profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @param keyGroupUpdateProperties The KeyGroup properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return contains a list of references of UrlSigningKey type secret objects along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> updateWithResponseAsync(String resourceGroupName, String profileName, + String keyGroupName, KeyGroupUpdatePropertiesParameters keyGroupUpdateProperties); + + /** + * Updates an existing KeyGroup within the specified profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @param keyGroupUpdateProperties The KeyGroup properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 contains a list of references of UrlSigningKey type secret objects. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginUpdateAsync(String resourceGroupName, String profileName, + String keyGroupName, KeyGroupUpdatePropertiesParameters keyGroupUpdateProperties); + + /** + * Updates an existing KeyGroup within the specified profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @param keyGroupUpdateProperties The KeyGroup properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of contains a list of references of UrlSigningKey type secret objects. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginUpdate(String resourceGroupName, String profileName, String keyGroupName, + KeyGroupUpdatePropertiesParameters keyGroupUpdateProperties); + + /** + * Updates an existing KeyGroup within the specified profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @param keyGroupUpdateProperties The KeyGroup properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of contains a list of references of UrlSigningKey type secret objects. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginUpdate(String resourceGroupName, String profileName, String keyGroupName, + KeyGroupUpdatePropertiesParameters keyGroupUpdateProperties, Context context); + + /** + * Updates an existing KeyGroup within the specified profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @param keyGroupUpdateProperties The KeyGroup properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return contains a list of references of UrlSigningKey type secret objects on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono updateAsync(String resourceGroupName, String profileName, String keyGroupName, + KeyGroupUpdatePropertiesParameters keyGroupUpdateProperties); + + /** + * Updates an existing KeyGroup within the specified profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @param keyGroupUpdateProperties The KeyGroup properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void update(String resourceGroupName, String profileName, String keyGroupName, + KeyGroupUpdatePropertiesParameters keyGroupUpdateProperties); + + /** + * Updates an existing KeyGroup within the specified profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @param keyGroupUpdateProperties The KeyGroup properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void update(String resourceGroupName, String profileName, String keyGroupName, + KeyGroupUpdatePropertiesParameters keyGroupUpdateProperties, Context context); + + /** + * Deletes an existing KeyGroup within profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> deleteWithResponseAsync(String resourceGroupName, String profileName, + String keyGroupName); + + /** + * Deletes an existing KeyGroup within profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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) + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String profileName, + String keyGroupName); + + /** + * Deletes an existing KeyGroup within profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String profileName, String keyGroupName); + + /** + * Deletes an existing KeyGroup within profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String profileName, String keyGroupName, + Context context); + + /** + * Deletes an existing KeyGroup within profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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) + Mono deleteAsync(String resourceGroupName, String profileName, String keyGroupName); + + /** + * Deletes an existing KeyGroup within profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String profileName, String keyGroupName); + + /** + * Deletes an existing KeyGroup within profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String profileName, String keyGroupName, Context context); + + /** + * Lists existing AzureFrontDoor KeyGroups. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a KeyGroup list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByProfileAsync(String resourceGroupName, String profileName); + + /** + * Lists existing AzureFrontDoor KeyGroups. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a KeyGroup list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByProfile(String resourceGroupName, String profileName); + + /** + * Lists existing AzureFrontDoor KeyGroups. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a KeyGroup list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByProfile(String resourceGroupName, String profileName, Context context); +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/KnowledgeSourcesClient.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/KnowledgeSourcesClient.java new file mode 100644 index 000000000000..06860dc2a586 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/KnowledgeSourcesClient.java @@ -0,0 +1,558 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.cdn.fluent.models.KnowledgeSourceInner; +import com.azure.resourcemanager.cdn.models.KnowledgeSourceUpdateParameters; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in KnowledgeSourcesClient. + */ +public interface KnowledgeSourcesClient { + /** + * Gets a knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 knowledge source with the specified name within a web agent along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String webAgentName, + String knowledgeSourceName); + + /** + * Gets a knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 knowledge source with the specified name within a web agent on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String webAgentName, String knowledgeSourceName); + + /** + * Gets a knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 knowledge source with the specified name within a web agent along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String webAgentName, + String knowledgeSourceName, Context context); + + /** + * Gets a knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 knowledge source with the specified name within a web agent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + KnowledgeSourceInner get(String resourceGroupName, String webAgentName, String knowledgeSourceName); + + /** + * Creates or updates a knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param knowledgeSource Knowledge source to be created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 knowledge source resource for a web agent along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String webAgentName, + String knowledgeSourceName, KnowledgeSourceInner knowledgeSource); + + /** + * Creates or updates a knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param knowledgeSource Knowledge source to be created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 a knowledge source resource for a web agent. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, KnowledgeSourceInner> beginCreateOrUpdateAsync( + String resourceGroupName, String webAgentName, String knowledgeSourceName, + KnowledgeSourceInner knowledgeSource); + + /** + * Creates or updates a knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param knowledgeSource Knowledge source to be created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of defines a knowledge source resource for a web agent. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, KnowledgeSourceInner> beginCreateOrUpdate(String resourceGroupName, + String webAgentName, String knowledgeSourceName, KnowledgeSourceInner knowledgeSource); + + /** + * Creates or updates a knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param knowledgeSource Knowledge source to be created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of defines a knowledge source resource for a web agent. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, KnowledgeSourceInner> beginCreateOrUpdate(String resourceGroupName, + String webAgentName, String knowledgeSourceName, KnowledgeSourceInner knowledgeSource, Context context); + + /** + * Creates or updates a knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param knowledgeSource Knowledge source to be created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 knowledge source resource for a web agent on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createOrUpdateAsync(String resourceGroupName, String webAgentName, + String knowledgeSourceName, KnowledgeSourceInner knowledgeSource); + + /** + * Creates or updates a knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param knowledgeSource Knowledge source to be created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 knowledge source resource for a web agent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + KnowledgeSourceInner createOrUpdate(String resourceGroupName, String webAgentName, String knowledgeSourceName, + KnowledgeSourceInner knowledgeSource); + + /** + * Creates or updates a knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param knowledgeSource Knowledge source to be created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 knowledge source resource for a web agent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + KnowledgeSourceInner createOrUpdate(String resourceGroupName, String webAgentName, String knowledgeSourceName, + KnowledgeSourceInner knowledgeSource, Context context); + + /** + * Updates an existing knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param knowledgeSourceUpdateParameters Knowledge source parameters to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 knowledge source resource for a web agent along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> updateWithResponseAsync(String resourceGroupName, String webAgentName, + String knowledgeSourceName, KnowledgeSourceUpdateParameters knowledgeSourceUpdateParameters); + + /** + * Updates an existing knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param knowledgeSourceUpdateParameters Knowledge source parameters to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 a knowledge source resource for a web agent. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginUpdateAsync(String resourceGroupName, String webAgentName, + String knowledgeSourceName, KnowledgeSourceUpdateParameters knowledgeSourceUpdateParameters); + + /** + * Updates an existing knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param knowledgeSourceUpdateParameters Knowledge source parameters to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of defines a knowledge source resource for a web agent. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginUpdate(String resourceGroupName, String webAgentName, + String knowledgeSourceName, KnowledgeSourceUpdateParameters knowledgeSourceUpdateParameters); + + /** + * Updates an existing knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param knowledgeSourceUpdateParameters Knowledge source parameters to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of defines a knowledge source resource for a web agent. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginUpdate(String resourceGroupName, String webAgentName, + String knowledgeSourceName, KnowledgeSourceUpdateParameters knowledgeSourceUpdateParameters, Context context); + + /** + * Updates an existing knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param knowledgeSourceUpdateParameters Knowledge source parameters to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 knowledge source resource for a web agent on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono updateAsync(String resourceGroupName, String webAgentName, String knowledgeSourceName, + KnowledgeSourceUpdateParameters knowledgeSourceUpdateParameters); + + /** + * Updates an existing knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param knowledgeSourceUpdateParameters Knowledge source parameters to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void update(String resourceGroupName, String webAgentName, String knowledgeSourceName, + KnowledgeSourceUpdateParameters knowledgeSourceUpdateParameters); + + /** + * Updates an existing knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param knowledgeSourceUpdateParameters Knowledge source parameters to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void update(String resourceGroupName, String webAgentName, String knowledgeSourceName, + KnowledgeSourceUpdateParameters knowledgeSourceUpdateParameters, Context context); + + /** + * Deletes a knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> deleteWithResponseAsync(String resourceGroupName, String webAgentName, + String knowledgeSourceName); + + /** + * Deletes a knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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) + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String webAgentName, + String knowledgeSourceName); + + /** + * Deletes a knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String webAgentName, + String knowledgeSourceName); + + /** + * Deletes a knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String webAgentName, + String knowledgeSourceName, Context context); + + /** + * Deletes a knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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) + Mono deleteAsync(String resourceGroupName, String webAgentName, String knowledgeSourceName); + + /** + * Deletes a knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String webAgentName, String knowledgeSourceName); + + /** + * Deletes a knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String webAgentName, String knowledgeSourceName, Context context); + + /** + * Lists all knowledge sources within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 knowledge sources as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByWebAgentAsync(String resourceGroupName, String webAgentName); + + /** + * Lists all knowledge sources within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 knowledge sources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByWebAgent(String resourceGroupName, String webAgentName); + + /** + * Lists all knowledge sources within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 knowledge sources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByWebAgent(String resourceGroupName, String webAgentName, Context context); + + /** + * Remove the cache of a knowledge source. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> purgeWithResponseAsync(String resourceGroupName, String webAgentName, + String knowledgeSourceName); + + /** + * Remove the cache of a knowledge source. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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) + PollerFlux, Void> beginPurgeAsync(String resourceGroupName, String webAgentName, + String knowledgeSourceName); + + /** + * Remove the cache of a knowledge source. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginPurge(String resourceGroupName, String webAgentName, + String knowledgeSourceName); + + /** + * Remove the cache of a knowledge source. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginPurge(String resourceGroupName, String webAgentName, + String knowledgeSourceName, Context context); + + /** + * Remove the cache of a knowledge source. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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) + Mono purgeAsync(String resourceGroupName, String webAgentName, String knowledgeSourceName); + + /** + * Remove the cache of a knowledge source. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void purge(String resourceGroupName, String webAgentName, String knowledgeSourceName); + + /** + * Remove the cache of a knowledge source. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void purge(String resourceGroupName, String webAgentName, String knowledgeSourceName, Context context); +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/LogAnalyticsClient.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/LogAnalyticsClient.java index a793ddf7aceb..73411a3767e4 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/LogAnalyticsClient.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/LogAnalyticsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent; @@ -36,9 +36,9 @@ public interface LogAnalyticsClient { /** * Get log report for AFD profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param metrics The metrics parameter. * @param dateTimeBegin The dateTimeBegin parameter. * @param dateTimeEnd The dateTimeEnd parameter. @@ -62,9 +62,9 @@ Mono> getLogAnalyticsMetricsWithResponseAsync(Str /** * Get log report for AFD profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param metrics The metrics parameter. * @param dateTimeBegin The dateTimeBegin parameter. * @param dateTimeEnd The dateTimeEnd parameter. @@ -84,9 +84,9 @@ Mono getLogAnalyticsMetricsAsync(String resourceGroupName, /** * Get log report for AFD profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param metrics The metrics parameter. * @param dateTimeBegin The dateTimeBegin parameter. * @param dateTimeEnd The dateTimeEnd parameter. @@ -111,9 +111,9 @@ Response getLogAnalyticsMetricsWithResponse(String resourc /** * Get log report for AFD profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param metrics The metrics parameter. * @param dateTimeBegin The dateTimeBegin parameter. * @param dateTimeEnd The dateTimeEnd parameter. @@ -133,9 +133,9 @@ MetricsResponseInner getLogAnalyticsMetrics(String resourceGroupName, String pro /** * Get log analytics ranking report for AFD profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param rankings The rankings parameter. * @param metrics The metrics parameter. * @param maxRanking The maxRanking parameter. @@ -156,9 +156,9 @@ Mono> getLogAnalyticsRankingsWithResponseAsync(S /** * Get log analytics ranking report for AFD profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param rankings The rankings parameter. * @param metrics The metrics parameter. * @param maxRanking The maxRanking parameter. @@ -177,9 +177,9 @@ Mono getLogAnalyticsRankingsAsync(String resourceGroupNam /** * Get log analytics ranking report for AFD profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param rankings The rankings parameter. * @param metrics The metrics parameter. * @param maxRanking The maxRanking parameter. @@ -200,9 +200,9 @@ Response getLogAnalyticsRankingsWithResponse(String resou /** * Get log analytics ranking report for AFD profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param rankings The rankings parameter. * @param metrics The metrics parameter. * @param maxRanking The maxRanking parameter. @@ -221,9 +221,9 @@ RankingsResponseInner getLogAnalyticsRankings(String resourceGroupName, String p /** * Get all available location names for AFD log analytics report. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -237,9 +237,9 @@ Mono> getLogAnalyticsLocationsWithResponseAsyn /** * Get all available location names for AFD log analytics report. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -251,9 +251,9 @@ Mono> getLogAnalyticsLocationsWithResponseAsyn /** * Get all available location names for AFD log analytics report. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -267,9 +267,9 @@ Response getLogAnalyticsLocationsWithResponse(String re /** * Get all available location names for AFD log analytics report. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -281,9 +281,9 @@ Response getLogAnalyticsLocationsWithResponse(String re /** * Get all endpoints and custom domains available for AFD log report. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -297,9 +297,9 @@ Mono> getLogAnalyticsResourcesWithResponseAsync /** * Get all endpoints and custom domains available for AFD log report. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -311,9 +311,9 @@ Mono> getLogAnalyticsResourcesWithResponseAsync /** * Get all endpoints and custom domains available for AFD log report. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -327,9 +327,9 @@ Response getLogAnalyticsResourcesWithResponse(String res /** * Get all endpoints and custom domains available for AFD log report. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -341,9 +341,9 @@ Response getLogAnalyticsResourcesWithResponse(String res /** * Get Waf related log analytics report for AFD profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param metrics The metrics parameter. * @param dateTimeBegin The dateTimeBegin parameter. * @param dateTimeEnd The dateTimeEnd parameter. @@ -366,9 +366,9 @@ Mono> getWafLogAnalyticsMetricsWithResponseAsy /** * Get Waf related log analytics report for AFD profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param metrics The metrics parameter. * @param dateTimeBegin The dateTimeBegin parameter. * @param dateTimeEnd The dateTimeEnd parameter. @@ -385,9 +385,9 @@ Mono getWafLogAnalyticsMetricsAsync(String resourceGrou /** * Get Waf related log analytics report for AFD profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param metrics The metrics parameter. * @param dateTimeBegin The dateTimeBegin parameter. * @param dateTimeEnd The dateTimeEnd parameter. @@ -410,9 +410,9 @@ Response getWafLogAnalyticsMetricsWithResponse(String r /** * Get Waf related log analytics report for AFD profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param metrics The metrics parameter. * @param dateTimeBegin The dateTimeBegin parameter. * @param dateTimeEnd The dateTimeEnd parameter. @@ -429,9 +429,9 @@ WafMetricsResponseInner getWafLogAnalyticsMetrics(String resourceGroupName, Stri /** * Get WAF log analytics charts for AFD profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param metrics The metrics parameter. * @param dateTimeBegin The dateTimeBegin parameter. * @param dateTimeEnd The dateTimeEnd parameter. @@ -453,9 +453,9 @@ Mono> getWafLogAnalyticsRankingsWithResponseA /** * Get WAF log analytics charts for AFD profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param metrics The metrics parameter. * @param dateTimeBegin The dateTimeBegin parameter. * @param dateTimeEnd The dateTimeEnd parameter. @@ -474,9 +474,9 @@ Mono getWafLogAnalyticsRankingsAsync(String resourceGr /** * Get WAF log analytics charts for AFD profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param metrics The metrics parameter. * @param dateTimeBegin The dateTimeBegin parameter. * @param dateTimeEnd The dateTimeEnd parameter. @@ -499,9 +499,9 @@ Response getWafLogAnalyticsRankingsWithResponse(String /** * Get WAF log analytics charts for AFD profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param metrics The metrics parameter. * @param dateTimeBegin The dateTimeBegin parameter. * @param dateTimeEnd The dateTimeEnd parameter. diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/ManagedRuleSetsClient.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/ManagedRuleSetsClient.java index 8f593643296a..35d45964e6d1 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/ManagedRuleSetsClient.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/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.cdn.fluent; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/OperationsClient.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/OperationsClient.java index 6d222aa64626..2940c5ae06ad 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/OperationsClient.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/OperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent; @@ -16,7 +16,7 @@ */ public interface OperationsClient { /** - * Lists all of the available CDN REST API operations. + * List the operations for the provider. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -26,7 +26,7 @@ public interface OperationsClient { PagedFlux listAsync(); /** - * Lists all of the available CDN REST API operations. + * List the operations for the provider. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -36,7 +36,7 @@ public interface OperationsClient { PagedIterable list(); /** - * Lists all of the available CDN REST API operations. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/OriginGroupsClient.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/OriginGroupsClient.java index 01a9497f4532..ec90b6b8083d 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/OriginGroupsClient.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/OriginGroupsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent; @@ -23,55 +23,12 @@ * An instance of this class provides access to all the operations defined in OriginGroupsClient. */ public interface OriginGroupsClient { - /** - * Lists all of the existing origin groups within an endpoint. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. - * @param endpointName Name of the endpoint under the profile which is unique globally. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 origin groups as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByEndpointAsync(String resourceGroupName, String profileName, String endpointName); - - /** - * Lists all of the existing origin groups within an endpoint. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. - * @param endpointName Name of the endpoint under the profile which is unique globally. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 origin groups as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByEndpoint(String resourceGroupName, String profileName, String endpointName); - - /** - * Lists all of the existing origin groups within an endpoint. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. - * @param endpointName Name of the endpoint under the profile which is unique globally. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 origin groups as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByEndpoint(String resourceGroupName, String profileName, String endpointName, - Context context); - /** * Gets an existing origin group within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -87,8 +44,9 @@ Mono> getWithResponseAsync(String resourceGroupName, /** * Gets an existing origin group within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -103,8 +61,9 @@ Mono getAsync(String resourceGroupName, String profileName, St /** * Gets an existing origin group within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param context The context to associate with this operation. @@ -120,8 +79,9 @@ Response getWithResponse(String resourceGroupName, String prof /** * Gets an existing origin group within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -135,8 +95,9 @@ Response getWithResponse(String resourceGroupName, String prof /** * Creates a new origin group within the specified endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroup Origin group properties. @@ -153,8 +114,9 @@ Mono>> createWithResponseAsync(String resourceGroupNam /** * Creates a new origin group within the specified endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroup Origin group properties. @@ -171,8 +133,9 @@ PollerFlux, OriginGroupInner> beginCreateAsync(Stri /** * Creates a new origin group within the specified endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroup Origin group properties. @@ -189,8 +152,9 @@ SyncPoller, OriginGroupInner> beginCreate(String re /** * Creates a new origin group within the specified endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroup Origin group properties. @@ -208,8 +172,9 @@ SyncPoller, OriginGroupInner> beginCreate(String re /** * Creates a new origin group within the specified endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroup Origin group properties. @@ -226,8 +191,9 @@ Mono createAsync(String resourceGroupName, String profileName, /** * Creates a new origin group within the specified endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroup Origin group properties. @@ -244,8 +210,9 @@ OriginGroupInner create(String resourceGroupName, String profileName, String end /** * Creates a new origin group within the specified endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroup Origin group properties. @@ -263,8 +230,9 @@ OriginGroupInner create(String resourceGroupName, String profileName, String end /** * Updates an existing origin group within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroupUpdateProperties Origin group properties. @@ -281,8 +249,9 @@ Mono>> updateWithResponseAsync(String resourceGroupNam /** * Updates an existing origin group within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroupUpdateProperties Origin group properties. @@ -300,8 +269,9 @@ PollerFlux, OriginGroupInner> beginUpdateAsync(Stri /** * Updates an existing origin group within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroupUpdateProperties Origin group properties. @@ -318,8 +288,9 @@ SyncPoller, OriginGroupInner> beginUpdate(String re /** * Updates an existing origin group within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroupUpdateProperties Origin group properties. @@ -338,8 +309,9 @@ SyncPoller, OriginGroupInner> beginUpdate(String re /** * Updates an existing origin group within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroupUpdateProperties Origin group properties. @@ -356,8 +328,9 @@ Mono updateAsync(String resourceGroupName, String profileName, /** * Updates an existing origin group within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroupUpdateProperties Origin group properties. @@ -374,8 +347,9 @@ OriginGroupInner update(String resourceGroupName, String profileName, String end /** * Updates an existing origin group within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroupUpdateProperties Origin group properties. @@ -393,8 +367,9 @@ OriginGroupInner update(String resourceGroupName, String profileName, String end /** * Deletes an existing origin group within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -409,8 +384,9 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam /** * Deletes an existing origin group within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -425,8 +401,9 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St /** * Deletes an existing origin group within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -441,8 +418,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an existing origin group within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param context The context to associate with this operation. @@ -458,8 +436,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an existing origin group within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -473,8 +452,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an existing origin group within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -487,8 +467,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an existing origin group within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param context The context to associate with this operation. @@ -499,4 +480,51 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String profileName, String endpointName, String originGroupName, Context context); + + /** + * Lists all of the existing origin groups within an endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a OriginGroup list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByEndpointAsync(String resourceGroupName, String profileName, String endpointName); + + /** + * Lists all of the existing origin groups within an endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a OriginGroup list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByEndpoint(String resourceGroupName, String profileName, String endpointName); + + /** + * Lists all of the existing origin groups within an endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a OriginGroup list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByEndpoint(String resourceGroupName, String profileName, String endpointName, + Context context); } diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/OriginsClient.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/OriginsClient.java index 77f40d63f25a..233a326f5967 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/OriginsClient.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/OriginsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent; @@ -23,55 +23,12 @@ * An instance of this class provides access to all the operations defined in OriginsClient. */ public interface OriginsClient { - /** - * Lists all of the existing origins within an endpoint. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. - * @param endpointName Name of the endpoint under the profile which is unique globally. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 origins as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByEndpointAsync(String resourceGroupName, String profileName, String endpointName); - - /** - * Lists all of the existing origins within an endpoint. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. - * @param endpointName Name of the endpoint under the profile which is unique globally. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 origins as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByEndpoint(String resourceGroupName, String profileName, String endpointName); - - /** - * Lists all of the existing origins within an endpoint. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. - * @param endpointName Name of the endpoint under the profile which is unique globally. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 origins as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByEndpoint(String resourceGroupName, String profileName, String endpointName, - Context context); - /** * Gets an existing origin within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -87,8 +44,9 @@ Mono> getWithResponseAsync(String resourceGroupName, Strin /** * Gets an existing origin within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -102,8 +60,9 @@ Mono> getWithResponseAsync(String resourceGroupName, Strin /** * Gets an existing origin within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @param context The context to associate with this operation. @@ -119,8 +78,9 @@ Response getWithResponse(String resourceGroupName, String profileNa /** * Gets an existing origin within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -134,10 +94,11 @@ Response getWithResponse(String resourceGroupName, String profileNa /** * Creates a new origin within the specified endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. - * @param originName Name of the origin that is unique within the endpoint. + * @param originName Name of the origin which is unique within the endpoint. * @param origin Origin properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -152,10 +113,11 @@ Mono>> createWithResponseAsync(String resourceGroupNam /** * Creates a new origin within the specified endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. - * @param originName Name of the origin that is unique within the endpoint. + * @param originName Name of the origin which is unique within the endpoint. * @param origin Origin properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -169,10 +131,11 @@ PollerFlux, OriginInner> beginCreateAsync(String resourc /** * Creates a new origin within the specified endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. - * @param originName Name of the origin that is unique within the endpoint. + * @param originName Name of the origin which is unique within the endpoint. * @param origin Origin properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -186,10 +149,11 @@ SyncPoller, OriginInner> beginCreate(String resourceGrou /** * Creates a new origin within the specified endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. - * @param originName Name of the origin that is unique within the endpoint. + * @param originName Name of the origin which is unique within the endpoint. * @param origin Origin properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -204,10 +168,11 @@ SyncPoller, OriginInner> beginCreate(String resourceGrou /** * Creates a new origin within the specified endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. - * @param originName Name of the origin that is unique within the endpoint. + * @param originName Name of the origin which is unique within the endpoint. * @param origin Origin properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -221,10 +186,11 @@ Mono createAsync(String resourceGroupName, String profileName, Stri /** * Creates a new origin within the specified endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. - * @param originName Name of the origin that is unique within the endpoint. + * @param originName Name of the origin which is unique within the endpoint. * @param origin Origin properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -238,10 +204,11 @@ OriginInner create(String resourceGroupName, String profileName, String endpoint /** * Creates a new origin within the specified endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. - * @param originName Name of the origin that is unique within the endpoint. + * @param originName Name of the origin which is unique within the endpoint. * @param origin Origin properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -256,8 +223,9 @@ OriginInner create(String resourceGroupName, String profileName, String endpoint /** * Updates an existing origin within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @param originUpdateProperties Origin properties. @@ -274,8 +242,9 @@ Mono>> updateWithResponseAsync(String resourceGroupNam /** * Updates an existing origin within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @param originUpdateProperties Origin properties. @@ -291,8 +260,9 @@ PollerFlux, OriginInner> beginUpdateAsync(String resourc /** * Updates an existing origin within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @param originUpdateProperties Origin properties. @@ -308,8 +278,9 @@ SyncPoller, OriginInner> beginUpdate(String resourceGrou /** * Updates an existing origin within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @param originUpdateProperties Origin properties. @@ -326,8 +297,9 @@ SyncPoller, OriginInner> beginUpdate(String resourceGrou /** * Updates an existing origin within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @param originUpdateProperties Origin properties. @@ -343,8 +315,9 @@ Mono updateAsync(String resourceGroupName, String profileName, Stri /** * Updates an existing origin within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @param originUpdateProperties Origin properties. @@ -360,8 +333,9 @@ OriginInner update(String resourceGroupName, String profileName, String endpoint /** * Updates an existing origin within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @param originUpdateProperties Origin properties. @@ -378,8 +352,9 @@ OriginInner update(String resourceGroupName, String profileName, String endpoint /** * Deletes an existing origin within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -394,8 +369,9 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam /** * Deletes an existing origin within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -410,8 +386,9 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St /** * Deletes an existing origin within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -426,8 +403,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an existing origin within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @param context The context to associate with this operation. @@ -443,8 +421,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an existing origin within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -458,8 +437,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an existing origin within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -472,8 +452,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an existing origin within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @param context The context to associate with this operation. @@ -483,4 +464,51 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String profileName, String endpointName, String originName, Context context); + + /** + * Lists all of the existing origins within an endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Origin list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByEndpointAsync(String resourceGroupName, String profileName, String endpointName); + + /** + * Lists all of the existing origins within an endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Origin list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByEndpoint(String resourceGroupName, String profileName, String endpointName); + + /** + * Lists all of the existing origins within an endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Origin list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByEndpoint(String resourceGroupName, String profileName, String endpointName, + Context context); } diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/PoliciesClient.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/PoliciesClient.java index 48bab8dcfc82..a9e58babc8c8 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/PoliciesClient.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/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.cdn.fluent; @@ -26,50 +26,10 @@ */ public interface PoliciesClient extends InnerSupportsGet, InnerSupportsDelete { - /** - * 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 for Azure CDN as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupAsync(String resourceGroupName); - - /** - * 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 for Azure CDN 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 for Azure CDN as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, 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 CdnWebApplicationFirewallPolicy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -84,7 +44,7 @@ Mono> getByResourceGroupWithRespo /** * 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 CdnWebApplicationFirewallPolicy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -97,7 +57,7 @@ Mono> getByResourceGroupWithRespo /** * 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 CdnWebApplicationFirewallPolicy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -112,7 +72,7 @@ Response getByResourceGroupWithResponse(St /** * 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 CdnWebApplicationFirewallPolicy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -125,7 +85,7 @@ Response getByResourceGroupWithResponse(St /** * 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 CdnWebApplicationFirewallPolicy. * @param cdnWebApplicationFirewallPolicy Policy to be created. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -141,7 +101,7 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * 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 CdnWebApplicationFirewallPolicy. * @param cdnWebApplicationFirewallPolicy Policy to be created. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -157,7 +117,7 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * 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 CdnWebApplicationFirewallPolicy. * @param cdnWebApplicationFirewallPolicy Policy to be created. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -173,7 +133,7 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * 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 CdnWebApplicationFirewallPolicy. * @param cdnWebApplicationFirewallPolicy Policy to be created. * @param context The context to associate with this operation. @@ -190,7 +150,7 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * 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 CdnWebApplicationFirewallPolicy. * @param cdnWebApplicationFirewallPolicy Policy to be created. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -205,7 +165,7 @@ Mono createOrUpdateAsync(String resourceGr /** * 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 CdnWebApplicationFirewallPolicy. * @param cdnWebApplicationFirewallPolicy Policy to be created. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -220,7 +180,7 @@ CdnWebApplicationFirewallPolicyInner createOrUpdate(String resourceGroupName, St /** * 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 CdnWebApplicationFirewallPolicy. * @param cdnWebApplicationFirewallPolicy Policy to be created. * @param context The context to associate with this operation. @@ -237,7 +197,7 @@ CdnWebApplicationFirewallPolicyInner createOrUpdate(String resourceGroupName, St * Update an existing CdnWebApplicationFirewallPolicy with the specified policy 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 policyName The name of the CdnWebApplicationFirewallPolicy. * @param cdnWebApplicationFirewallPolicyPatchParameters CdnWebApplicationFirewallPolicy parameters to be patched. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -254,7 +214,7 @@ Mono>> updateWithResponseAsync(String resourceGroupNam * Update an existing CdnWebApplicationFirewallPolicy with the specified policy 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 policyName The name of the CdnWebApplicationFirewallPolicy. * @param cdnWebApplicationFirewallPolicyPatchParameters CdnWebApplicationFirewallPolicy parameters to be patched. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -271,7 +231,7 @@ PollerFlux, CdnWebApplicationFi * Update an existing CdnWebApplicationFirewallPolicy with the specified policy 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 policyName The name of the CdnWebApplicationFirewallPolicy. * @param cdnWebApplicationFirewallPolicyPatchParameters CdnWebApplicationFirewallPolicy parameters to be patched. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -288,7 +248,7 @@ SyncPoller, CdnWebApplicationFi * Update an existing CdnWebApplicationFirewallPolicy with the specified policy 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 policyName The name of the CdnWebApplicationFirewallPolicy. * @param cdnWebApplicationFirewallPolicyPatchParameters CdnWebApplicationFirewallPolicy parameters to be patched. * @param context The context to associate with this operation. @@ -306,7 +266,7 @@ SyncPoller, CdnWebApplicationFi * Update an existing CdnWebApplicationFirewallPolicy with the specified policy 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 policyName The name of the CdnWebApplicationFirewallPolicy. * @param cdnWebApplicationFirewallPolicyPatchParameters CdnWebApplicationFirewallPolicy parameters to be patched. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -322,7 +282,7 @@ Mono updateAsync(String resourceGroupName, * Update an existing CdnWebApplicationFirewallPolicy with the specified policy 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 policyName The name of the CdnWebApplicationFirewallPolicy. * @param cdnWebApplicationFirewallPolicyPatchParameters CdnWebApplicationFirewallPolicy parameters to be patched. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -338,7 +298,7 @@ CdnWebApplicationFirewallPolicyInner update(String resourceGroupName, String pol * Update an existing CdnWebApplicationFirewallPolicy with the specified policy 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 policyName The name of the CdnWebApplicationFirewallPolicy. * @param cdnWebApplicationFirewallPolicyPatchParameters CdnWebApplicationFirewallPolicy parameters to be patched. * @param context The context to associate with this operation. @@ -354,7 +314,7 @@ CdnWebApplicationFirewallPolicyInner update(String resourceGroupName, String pol /** * 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 CdnWebApplicationFirewallPolicy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -367,7 +327,7 @@ CdnWebApplicationFirewallPolicyInner update(String resourceGroupName, String pol /** * 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 CdnWebApplicationFirewallPolicy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -380,7 +340,7 @@ CdnWebApplicationFirewallPolicyInner update(String resourceGroupName, String pol /** * 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 CdnWebApplicationFirewallPolicy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -394,7 +354,7 @@ CdnWebApplicationFirewallPolicyInner update(String resourceGroupName, String pol /** * 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 CdnWebApplicationFirewallPolicy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -402,4 +362,44 @@ CdnWebApplicationFirewallPolicyInner update(String resourceGroupName, String pol */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String policyName); + + /** + * 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 for Azure CDN as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByResourceGroupAsync(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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 for Azure CDN 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 for Azure CDN as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); } diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/ProfileAgentsClient.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/ProfileAgentsClient.java new file mode 100644 index 000000000000..8b4adc319ae6 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/ProfileAgentsClient.java @@ -0,0 +1,481 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.cdn.fluent.models.ProfileAgentInner; +import com.azure.resourcemanager.cdn.models.ProfileAgentUpdateParameters; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ProfileAgentsClient. + */ +public interface ProfileAgentsClient { + /** + * Gets an agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 agent link (web agent association) within a CDN profile along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String profileName, + String agentName); + + /** + * Gets an agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 agent link (web agent association) within a CDN profile on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String profileName, String agentName); + + /** + * Gets an agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 agent link (web agent association) within a CDN profile along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String profileName, String agentName, + Context context); + + /** + * Gets an agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 agent link (web agent association) within a CDN profile. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ProfileAgentInner get(String resourceGroupName, String profileName, String agentName); + + /** + * Creates or updates an agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param profileAgent Profile agent association properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 agent link (web agent association) within a CDN profile along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String profileName, + String agentName, ProfileAgentInner profileAgent); + + /** + * Creates or updates an agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param profileAgent Profile agent association properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 an agent link (web agent association) within a CDN profile. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, ProfileAgentInner> beginCreateOrUpdateAsync(String resourceGroupName, + String profileName, String agentName, ProfileAgentInner profileAgent); + + /** + * Creates or updates an agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param profileAgent Profile agent association properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an agent link (web agent association) within a CDN profile. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ProfileAgentInner> beginCreateOrUpdate(String resourceGroupName, + String profileName, String agentName, ProfileAgentInner profileAgent); + + /** + * Creates or updates an agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param profileAgent Profile agent association properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an agent link (web agent association) within a CDN profile. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ProfileAgentInner> beginCreateOrUpdate(String resourceGroupName, + String profileName, String agentName, ProfileAgentInner profileAgent, Context context); + + /** + * Creates or updates an agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param profileAgent Profile agent association properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 agent link (web agent association) within a CDN profile on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createOrUpdateAsync(String resourceGroupName, String profileName, String agentName, + ProfileAgentInner profileAgent); + + /** + * Creates or updates an agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param profileAgent Profile agent association properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 agent link (web agent association) within a CDN profile. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ProfileAgentInner createOrUpdate(String resourceGroupName, String profileName, String agentName, + ProfileAgentInner profileAgent); + + /** + * Creates or updates an agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param profileAgent Profile agent association properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 agent link (web agent association) within a CDN profile. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ProfileAgentInner createOrUpdate(String resourceGroupName, String profileName, String agentName, + ProfileAgentInner profileAgent, Context context); + + /** + * Updates an existing agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param profileAgentUpdateParameters Profile agent association update properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 agent link (web agent association) within a CDN profile along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> updateWithResponseAsync(String resourceGroupName, String profileName, + String agentName, ProfileAgentUpdateParameters profileAgentUpdateParameters); + + /** + * Updates an existing agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param profileAgentUpdateParameters Profile agent association update properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 an agent link (web agent association) within a CDN profile. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginUpdateAsync(String resourceGroupName, String profileName, String agentName, + ProfileAgentUpdateParameters profileAgentUpdateParameters); + + /** + * Updates an existing agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param profileAgentUpdateParameters Profile agent association update properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an agent link (web agent association) within a CDN profile. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginUpdate(String resourceGroupName, String profileName, String agentName, + ProfileAgentUpdateParameters profileAgentUpdateParameters); + + /** + * Updates an existing agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param profileAgentUpdateParameters Profile agent association update properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an agent link (web agent association) within a CDN profile. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginUpdate(String resourceGroupName, String profileName, String agentName, + ProfileAgentUpdateParameters profileAgentUpdateParameters, Context context); + + /** + * Updates an existing agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param profileAgentUpdateParameters Profile agent association update properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 agent link (web agent association) within a CDN profile on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono updateAsync(String resourceGroupName, String profileName, String agentName, + ProfileAgentUpdateParameters profileAgentUpdateParameters); + + /** + * Updates an existing agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param profileAgentUpdateParameters Profile agent association update properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void update(String resourceGroupName, String profileName, String agentName, + ProfileAgentUpdateParameters profileAgentUpdateParameters); + + /** + * Updates an existing agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param profileAgentUpdateParameters Profile agent association update properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void update(String resourceGroupName, String profileName, String agentName, + ProfileAgentUpdateParameters profileAgentUpdateParameters, Context context); + + /** + * Deletes an existing agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> deleteWithResponseAsync(String resourceGroupName, String profileName, + String agentName); + + /** + * Deletes an existing agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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) + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String profileName, String agentName); + + /** + * Deletes an existing agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String profileName, String agentName); + + /** + * Deletes an existing agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String profileName, String agentName, + Context context); + + /** + * Deletes an existing agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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) + Mono deleteAsync(String resourceGroupName, String profileName, String agentName); + + /** + * Deletes an existing agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String profileName, String agentName); + + /** + * Deletes an existing agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String profileName, String agentName, Context context); + + /** + * Lists all agent links (web agent associations) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ProfileAgent list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByProfileAsync(String resourceGroupName, String profileName); + + /** + * Lists all agent links (web agent associations) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ProfileAgent list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByProfile(String resourceGroupName, String profileName); + + /** + * Lists all agent links (web agent associations) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ProfileAgent list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByProfile(String resourceGroupName, String profileName, Context context); +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/ProfilesClient.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/ProfilesClient.java index fa9a22df3dd1..ed5f27b08bae 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/ProfilesClient.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/ProfilesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent; @@ -20,6 +20,7 @@ import com.azure.resourcemanager.cdn.fluent.models.SsoUriInner; import com.azure.resourcemanager.cdn.fluent.models.SupportedOptimizationTypesListResultInner; import com.azure.resourcemanager.cdn.models.CanMigrateParameters; +import com.azure.resourcemanager.cdn.models.CdnMigrationToAfdParameters; import com.azure.resourcemanager.cdn.models.MigrationParameters; import com.azure.resourcemanager.cdn.models.ProfileUpdateParameters; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; @@ -34,83 +35,11 @@ */ public interface ProfilesClient extends InnerSupportsGet, InnerSupportsListing, InnerSupportsDelete { - /** - * Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles 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 profiles as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(); - - /** - * Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles 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 profiles as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles 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 profiles as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles 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 result of the request to list profiles as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupAsync(String resourceGroupName); - - /** - * Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles 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 result of the request to list profiles as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles 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 result of the request to list profiles as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - /** * Gets an Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile 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 profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -127,7 +56,7 @@ public interface ProfilesClient * Gets an Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile 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 profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -143,7 +72,7 @@ public interface ProfilesClient * Gets an Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile 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 profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. * @param context The context to associate with this operation. @@ -161,7 +90,7 @@ Response getByResourceGroupWithResponse(String resourceGroupName, * Gets an Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile 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 profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -177,7 +106,7 @@ Response getByResourceGroupWithResponse(String resourceGroupName, * Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a profile 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 profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. * @param profile Profile properties needed to create a new profile. @@ -195,7 +124,7 @@ Mono>> createWithResponseAsync(String resourceGroupNam * Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a profile 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 profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. * @param profile Profile properties needed to create a new profile. @@ -213,7 +142,7 @@ PollerFlux, ProfileInner> beginCreateAsync(String resou * Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a profile 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 profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. * @param profile Profile properties needed to create a new profile. @@ -231,7 +160,7 @@ SyncPoller, ProfileInner> beginCreate(String resourceGr * Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a profile 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 profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. * @param profile Profile properties needed to create a new profile. @@ -250,7 +179,7 @@ SyncPoller, ProfileInner> beginCreate(String resourceGr * Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a profile 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 profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. * @param profile Profile properties needed to create a new profile. @@ -267,7 +196,7 @@ SyncPoller, ProfileInner> beginCreate(String resourceGr * Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a profile 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 profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. * @param profile Profile properties needed to create a new profile. @@ -283,7 +212,7 @@ SyncPoller, ProfileInner> beginCreate(String resourceGr * Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a profile 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 profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. * @param profile Profile properties needed to create a new profile. @@ -300,7 +229,7 @@ SyncPoller, ProfileInner> beginCreate(String resourceGr * Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified * profile 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 profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. * @param profileUpdateParameters Profile properties needed to update an existing profile. @@ -318,7 +247,7 @@ Mono>> updateWithResponseAsync(String resourceGroupNam * Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified * profile 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 profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. * @param profileUpdateParameters Profile properties needed to update an existing profile. @@ -336,7 +265,7 @@ PollerFlux, ProfileInner> beginUpdateAsync(String resou * Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified * profile 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 profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. * @param profileUpdateParameters Profile properties needed to update an existing profile. @@ -354,7 +283,7 @@ SyncPoller, ProfileInner> beginUpdate(String resourceGr * Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified * profile 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 profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. * @param profileUpdateParameters Profile properties needed to update an existing profile. @@ -373,7 +302,7 @@ SyncPoller, ProfileInner> beginUpdate(String resourceGr * Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified * profile 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 profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. * @param profileUpdateParameters Profile properties needed to update an existing profile. @@ -391,7 +320,7 @@ Mono updateAsync(String resourceGroupName, String profileName, * Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified * profile 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 profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. * @param profileUpdateParameters Profile properties needed to update an existing profile. @@ -407,7 +336,7 @@ Mono updateAsync(String resourceGroupName, String profileName, * Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified * profile 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 profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. * @param profileUpdateParameters Profile properties needed to update an existing profile. @@ -426,7 +355,7 @@ ProfileInner update(String resourceGroupName, String profileName, ProfileUpdateP * parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, * origins and custom domains. * - * @param 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 Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -442,7 +371,7 @@ ProfileInner update(String resourceGroupName, String profileName, ProfileUpdateP * parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, * origins and custom domains. * - * @param 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 Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -458,7 +387,7 @@ ProfileInner update(String resourceGroupName, String profileName, ProfileUpdateP * parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, * origins and custom domains. * - * @param 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 Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -474,7 +403,7 @@ ProfileInner update(String resourceGroupName, String profileName, ProfileUpdateP * parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, * origins and custom domains. * - * @param 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 Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. * @param context The context to associate with this operation. @@ -491,7 +420,7 @@ ProfileInner update(String resourceGroupName, String profileName, ProfileUpdateP * parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, * origins and custom domains. * - * @param 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 Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -507,7 +436,7 @@ ProfileInner update(String resourceGroupName, String profileName, ProfileUpdateP * parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, * origins and custom domains. * - * @param 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 Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -522,7 +451,7 @@ ProfileInner update(String resourceGroupName, String profileName, ProfileUpdateP * parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, * origins and custom domains. * - * @param 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 Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. * @param context The context to associate with this operation. @@ -534,205 +463,83 @@ ProfileInner update(String resourceGroupName, String profileName, ProfileUpdateP void delete(String resourceGroupName, String profileName, Context context); /** - * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param canMigrateParameters Properties needed to check if cdn profile or classic frontdoor can be migrated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 for canMigrate operation along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> canMigrateWithResponseAsync(String resourceGroupName, - CanMigrateParameters canMigrateParameters); - - /** - * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param canMigrateParameters Properties needed to check if cdn profile or classic frontdoor can be migrated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown 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 result for canMigrate operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, CanMigrateResultInner> beginCanMigrateAsync(String resourceGroupName, - CanMigrateParameters canMigrateParameters); - - /** - * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param canMigrateParameters Properties needed to check if cdn profile or classic frontdoor can be migrated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of result for canMigrate operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CanMigrateResultInner> beginCanMigrate(String resourceGroupName, - CanMigrateParameters canMigrateParameters); - - /** - * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param canMigrateParameters Properties needed to check if cdn profile or classic frontdoor can be migrated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of result for canMigrate operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CanMigrateResultInner> beginCanMigrate(String resourceGroupName, - CanMigrateParameters canMigrateParameters, Context context); - - /** - * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param canMigrateParameters Properties needed to check if cdn profile or classic frontdoor can be migrated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 for canMigrate operation on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono canMigrateAsync(String resourceGroupName, CanMigrateParameters canMigrateParameters); - - /** - * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param canMigrateParameters Properties needed to check if cdn profile or classic frontdoor can be migrated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 for canMigrate operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CanMigrateResultInner canMigrate(String resourceGroupName, CanMigrateParameters canMigrateParameters); - - /** - * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param canMigrateParameters Properties needed to check if cdn profile or classic frontdoor can be migrated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 for canMigrate operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CanMigrateResultInner canMigrate(String resourceGroupName, CanMigrateParameters canMigrateParameters, - Context context); - - /** - * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param migrationParameters Properties needed to migrate the profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 for migrate operation along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> migrateWithResponseAsync(String resourceGroupName, - MigrationParameters migrationParameters); - - /** - * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. + * Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within a resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param migrationParameters Properties needed to migrate the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of result for migrate operation. + * @return the response of a Profile list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, MigrateResultInner> beginMigrateAsync(String resourceGroupName, - MigrationParameters migrationParameters); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByResourceGroupAsync(String resourceGroupName); /** - * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. + * Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within a resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param migrationParameters Properties needed to migrate the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of result for migrate operation. + * @return the response of a Profile list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, MigrateResultInner> beginMigrate(String resourceGroupName, - MigrationParameters migrationParameters); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. + * Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within a resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param migrationParameters Properties needed to migrate the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of result for migrate operation. + * @return the response of a Profile list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, MigrateResultInner> beginMigrate(String resourceGroupName, - MigrationParameters migrationParameters, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. + * Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within an Azure + * subscription. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param migrationParameters Properties needed to migrate the profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 for migrate operation on successful completion of {@link Mono}. + * @return the response of a Profile list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono migrateAsync(String resourceGroupName, MigrationParameters migrationParameters); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(); /** - * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. + * Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within an Azure + * subscription. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param migrationParameters Properties needed to migrate the profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 for migrate operation. + * @return the response of a Profile list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - MigrateResultInner migrate(String resourceGroupName, MigrationParameters migrationParameters); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); /** - * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. + * Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within an Azure + * subscription. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param migrationParameters Properties needed to migrate the profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 for migrate operation. + * @return the response of a Profile list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - MigrateResultInner migrate(String resourceGroupName, MigrationParameters migrationParameters, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); /** * Commit the migrated Azure Frontdoor(Standard/Premium) profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -744,8 +551,9 @@ SyncPoller, MigrateResultInner> beginMigrate(Stri /** * Commit the migrated Azure Frontdoor(Standard/Premium) profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -757,8 +565,9 @@ SyncPoller, MigrateResultInner> beginMigrate(Stri /** * Commit the migrated Azure Frontdoor(Standard/Premium) profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -770,8 +579,9 @@ SyncPoller, MigrateResultInner> beginMigrate(Stri /** * Commit the migrated Azure Frontdoor(Standard/Premium) profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -785,8 +595,9 @@ SyncPoller, Void> beginMigrationCommit(String resourceGroupName /** * Commit the migrated Azure Frontdoor(Standard/Premium) profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -798,8 +609,9 @@ SyncPoller, Void> beginMigrationCommit(String resourceGroupName /** * Commit the migrated Azure Frontdoor(Standard/Premium) profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -810,8 +622,9 @@ SyncPoller, Void> beginMigrationCommit(String resourceGroupName /** * Commit the migrated Azure Frontdoor(Standard/Premium) profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -826,8 +639,9 @@ SyncPoller, Void> beginMigrationCommit(String resourceGroupName * standard profile; rules engine, advanced HTTP reports, and real-time stats and alerts in a premium profile. The * SSO URI changes approximately every 10 minutes. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -843,8 +657,9 @@ SyncPoller, Void> beginMigrationCommit(String resourceGroupName * standard profile; rules engine, advanced HTTP reports, and real-time stats and alerts in a premium profile. The * SSO URI changes approximately every 10 minutes. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -860,8 +675,9 @@ SyncPoller, Void> beginMigrationCommit(String resourceGroupName * standard profile; rules engine, advanced HTTP reports, and real-time stats and alerts in a premium profile. The * SSO URI changes approximately every 10 minutes. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -877,8 +693,9 @@ SyncPoller, Void> beginMigrationCommit(String resourceGroupName * standard profile; rules engine, advanced HTTP reports, and real-time stats and alerts in a premium profile. The * SSO URI changes approximately every 10 minutes. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -891,7 +708,7 @@ SyncPoller, Void> beginMigrationCommit(String resourceGroupName * Gets the supported optimization types for the current profile. A user can create an endpoint with an optimization * type from the listed values. * - * @param 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 Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -908,7 +725,7 @@ SyncPoller, Void> beginMigrationCommit(String resourceGroupName * Gets the supported optimization types for the current profile. A user can create an endpoint with an optimization * type from the listed values. * - * @param 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 Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -924,7 +741,7 @@ Mono listSupportedOptimizationTypesAs * Gets the supported optimization types for the current profile. A user can create an endpoint with an optimization * type from the listed values. * - * @param 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 Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. * @param context The context to associate with this operation. @@ -941,7 +758,7 @@ Mono listSupportedOptimizationTypesAs * Gets the supported optimization types for the current profile. A user can create an endpoint with an optimization * type from the listed values. * - * @param 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 Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -957,7 +774,7 @@ SupportedOptimizationTypesListResultInner listSupportedOptimizationTypes(String * Checks the quota and actual usage of endpoints under the given Azure Front Door Standard or Azure Front Door * Premium or CDN profile. * - * @param 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 Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -972,7 +789,7 @@ SupportedOptimizationTypesListResultInner listSupportedOptimizationTypes(String * Checks the quota and actual usage of endpoints under the given Azure Front Door Standard or Azure Front Door * Premium or CDN profile. * - * @param 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 Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -987,7 +804,7 @@ SupportedOptimizationTypesListResultInner listSupportedOptimizationTypes(String * Checks the quota and actual usage of endpoints under the given Azure Front Door Standard or Azure Front Door * Premium or CDN profile. * - * @param 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 Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. * @param context The context to associate with this operation. @@ -998,4 +815,522 @@ SupportedOptimizationTypesListResultInner listSupportedOptimizationTypes(String */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listResourceUsage(String resourceGroupName, String profileName, Context context); + + /** + * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> cdnCanMigrateToAfdWithResponseAsync(String resourceGroupName, String profileName); + + /** + * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, CanMigrateResultInner> + beginCdnCanMigrateToAfdAsync(String resourceGroupName, String profileName); + + /** + * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CanMigrateResultInner> + beginCdnCanMigrateToAfd(String resourceGroupName, String profileName); + + /** + * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CanMigrateResultInner> + beginCdnCanMigrateToAfd(String resourceGroupName, String profileName, Context context); + + /** + * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono cdnCanMigrateToAfdAsync(String resourceGroupName, String profileName); + + /** + * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CanMigrateResultInner cdnCanMigrateToAfd(String resourceGroupName, String profileName); + + /** + * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CanMigrateResultInner cdnCanMigrateToAfd(String resourceGroupName, String profileName, Context context); + + /** + * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. This step prepares the profile for + * migration and will be followed by Commit to finalize the migration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param migrationParameters Properties needed to migrate the profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> cdnMigrateToAfdWithResponseAsync(String resourceGroupName, String profileName, + CdnMigrationToAfdParameters migrationParameters); + + /** + * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. This step prepares the profile for + * migration and will be followed by Commit to finalize the migration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param migrationParameters Properties needed to migrate the profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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) + PollerFlux, MigrateResultInner> beginCdnMigrateToAfdAsync(String resourceGroupName, + String profileName, CdnMigrationToAfdParameters migrationParameters); + + /** + * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. This step prepares the profile for + * migration and will be followed by Commit to finalize the migration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param migrationParameters Properties needed to migrate the profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, MigrateResultInner> beginCdnMigrateToAfd(String resourceGroupName, + String profileName, CdnMigrationToAfdParameters migrationParameters); + + /** + * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. This step prepares the profile for + * migration and will be followed by Commit to finalize the migration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param migrationParameters Properties needed to migrate the profile. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, MigrateResultInner> beginCdnMigrateToAfd(String resourceGroupName, + String profileName, CdnMigrationToAfdParameters migrationParameters, Context context); + + /** + * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. This step prepares the profile for + * migration and will be followed by Commit to finalize the migration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param migrationParameters Properties needed to migrate the profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono cdnMigrateToAfdAsync(String resourceGroupName, String profileName, + CdnMigrationToAfdParameters migrationParameters); + + /** + * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. This step prepares the profile for + * migration and will be followed by Commit to finalize the migration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param migrationParameters Properties needed to migrate the profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MigrateResultInner cdnMigrateToAfd(String resourceGroupName, String profileName, + CdnMigrationToAfdParameters migrationParameters); + + /** + * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. This step prepares the profile for + * migration and will be followed by Commit to finalize the migration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param migrationParameters Properties needed to migrate the profile. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MigrateResultInner cdnMigrateToAfd(String resourceGroupName, String profileName, + CdnMigrationToAfdParameters migrationParameters, Context context); + + /** + * Abort the migration to Azure Frontdoor Premium/Standard. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> migrationAbortWithResponseAsync(String resourceGroupName, String profileName); + + /** + * Abort the migration to Azure Frontdoor Premium/Standard. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginMigrationAbortAsync(String resourceGroupName, String profileName); + + /** + * Abort the migration to Azure Frontdoor Premium/Standard. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginMigrationAbort(String resourceGroupName, String profileName); + + /** + * Abort the migration to Azure Frontdoor Premium/Standard. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginMigrationAbort(String resourceGroupName, String profileName, + Context context); + + /** + * Abort the migration to Azure Frontdoor Premium/Standard. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono migrationAbortAsync(String resourceGroupName, String profileName); + + /** + * Abort the migration to Azure Frontdoor Premium/Standard. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void migrationAbort(String resourceGroupName, String profileName); + + /** + * Abort the migration to Azure Frontdoor Premium/Standard. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void migrationAbort(String resourceGroupName, String profileName, Context context); + + /** + * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param canMigrateParameters Properties needed to check if cdn profile or classic frontdoor can be migrated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 for canMigrate operation along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> canMigrateWithResponseAsync(String resourceGroupName, + CanMigrateParameters canMigrateParameters); + + /** + * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param canMigrateParameters Properties needed to check if cdn profile or classic frontdoor can be migrated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 result for canMigrate operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, CanMigrateResultInner> beginCanMigrateAsync(String resourceGroupName, + CanMigrateParameters canMigrateParameters); + + /** + * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param canMigrateParameters Properties needed to check if cdn profile or classic frontdoor can be migrated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of result for canMigrate operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CanMigrateResultInner> beginCanMigrate(String resourceGroupName, + CanMigrateParameters canMigrateParameters); + + /** + * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param canMigrateParameters Properties needed to check if cdn profile or classic frontdoor can be migrated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of result for canMigrate operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CanMigrateResultInner> beginCanMigrate(String resourceGroupName, + CanMigrateParameters canMigrateParameters, Context context); + + /** + * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param canMigrateParameters Properties needed to check if cdn profile or classic frontdoor can be migrated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 for canMigrate operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono canMigrateAsync(String resourceGroupName, CanMigrateParameters canMigrateParameters); + + /** + * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param canMigrateParameters Properties needed to check if cdn profile or classic frontdoor can be migrated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 for canMigrate operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CanMigrateResultInner canMigrate(String resourceGroupName, CanMigrateParameters canMigrateParameters); + + /** + * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param canMigrateParameters Properties needed to check if cdn profile or classic frontdoor can be migrated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 for canMigrate operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CanMigrateResultInner canMigrate(String resourceGroupName, CanMigrateParameters canMigrateParameters, + Context context); + + /** + * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param migrationParameters Properties needed to migrate the profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 for migrate operation along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> migrateWithResponseAsync(String resourceGroupName, + MigrationParameters migrationParameters); + + /** + * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param migrationParameters Properties needed to migrate the profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 result for migrate operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, MigrateResultInner> beginMigrateAsync(String resourceGroupName, + MigrationParameters migrationParameters); + + /** + * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param migrationParameters Properties needed to migrate the profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of result for migrate operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, MigrateResultInner> beginMigrate(String resourceGroupName, + MigrationParameters migrationParameters); + + /** + * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param migrationParameters Properties needed to migrate the profile. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of result for migrate operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, MigrateResultInner> beginMigrate(String resourceGroupName, + MigrationParameters migrationParameters, Context context); + + /** + * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param migrationParameters Properties needed to migrate the profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 for migrate operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono migrateAsync(String resourceGroupName, MigrationParameters migrationParameters); + + /** + * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param migrationParameters Properties needed to migrate the profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 for migrate operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MigrateResultInner migrate(String resourceGroupName, MigrationParameters migrationParameters); + + /** + * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param migrationParameters Properties needed to migrate the profile. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 for migrate operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MigrateResultInner migrate(String resourceGroupName, MigrationParameters migrationParameters, Context context); } diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/ResourceUsagesClient.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/ResourceUsagesClient.java index 7034365c11ad..fd5205d4da2b 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/ResourceUsagesClient.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/ResourceUsagesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/RoutesClient.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/RoutesClient.java index e9ec9eb5bb85..31c4421cd73c 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/RoutesClient.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/RoutesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent; @@ -23,60 +23,13 @@ * An instance of this class provides access to all the operations defined in RoutesClient. */ public interface RoutesClient { - /** - * Lists all of the existing origins within a profile. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param endpointName Name of the endpoint under the profile which is unique globally. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 routes as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByEndpointAsync(String resourceGroupName, String profileName, String endpointName); - - /** - * Lists all of the existing origins within a profile. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param endpointName Name of the endpoint under the profile which is unique globally. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 routes as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByEndpoint(String resourceGroupName, String profileName, String endpointName); - - /** - * Lists all of the existing origins within a profile. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param endpointName Name of the endpoint under the profile which is unique globally. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 routes as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByEndpoint(String resourceGroupName, String profileName, String endpointName, - Context context); - /** * Gets an existing route with the specified route name under the specified subscription, resource group, profile, * and AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -93,9 +46,9 @@ Mono> getWithResponseAsync(String resourceGroupName, String * Gets an existing route with the specified route name under the specified subscription, resource group, profile, * and AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -111,9 +64,9 @@ Mono> getWithResponseAsync(String resourceGroupName, String * Gets an existing route with the specified route name under the specified subscription, resource group, profile, * and AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param context The context to associate with this operation. @@ -131,9 +84,9 @@ Response getWithResponse(String resourceGroupName, String profileNam * Gets an existing route with the specified route name under the specified subscription, resource group, profile, * and AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -149,9 +102,9 @@ Response getWithResponse(String resourceGroupName, String profileNam * Creates a new route with the specified route name under the specified subscription, resource group, profile, and * AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param route Route properties. @@ -169,9 +122,9 @@ Mono>> createWithResponseAsync(String resourceGroupNam * Creates a new route with the specified route name under the specified subscription, resource group, profile, and * AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param route Route properties. @@ -189,9 +142,9 @@ PollerFlux, RouteInner> beginCreateAsync(String resourceG * Creates a new route with the specified route name under the specified subscription, resource group, profile, and * AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param route Route properties. @@ -209,9 +162,9 @@ SyncPoller, RouteInner> beginCreate(String resourceGroupN * Creates a new route with the specified route name under the specified subscription, resource group, profile, and * AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param route Route properties. @@ -230,9 +183,9 @@ SyncPoller, RouteInner> beginCreate(String resourceGroupN * Creates a new route with the specified route name under the specified subscription, resource group, profile, and * AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param route Route properties. @@ -250,9 +203,9 @@ Mono createAsync(String resourceGroupName, String profileName, Strin * Creates a new route with the specified route name under the specified subscription, resource group, profile, and * AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param route Route properties. @@ -269,9 +222,9 @@ RouteInner create(String resourceGroupName, String profileName, String endpointN * Creates a new route with the specified route name under the specified subscription, resource group, profile, and * AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param route Route properties. @@ -289,9 +242,9 @@ RouteInner create(String resourceGroupName, String profileName, String endpointN * Updates an existing route with the specified route name under the specified subscription, resource group, * profile, and AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param routeUpdateProperties Route update properties. @@ -309,9 +262,9 @@ Mono>> updateWithResponseAsync(String resourceGroupNam * Updates an existing route with the specified route name under the specified subscription, resource group, * profile, and AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param routeUpdateProperties Route update properties. @@ -329,9 +282,9 @@ PollerFlux, RouteInner> beginUpdateAsync(String resourceG * Updates an existing route with the specified route name under the specified subscription, resource group, * profile, and AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param routeUpdateProperties Route update properties. @@ -349,9 +302,9 @@ SyncPoller, RouteInner> beginUpdate(String resourceGroupN * Updates an existing route with the specified route name under the specified subscription, resource group, * profile, and AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param routeUpdateProperties Route update properties. @@ -370,9 +323,9 @@ SyncPoller, RouteInner> beginUpdate(String resourceGroupN * Updates an existing route with the specified route name under the specified subscription, resource group, * profile, and AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param routeUpdateProperties Route update properties. @@ -390,9 +343,9 @@ Mono updateAsync(String resourceGroupName, String profileName, Strin * Updates an existing route with the specified route name under the specified subscription, resource group, * profile, and AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param routeUpdateProperties Route update properties. @@ -409,9 +362,9 @@ RouteInner update(String resourceGroupName, String profileName, String endpointN * Updates an existing route with the specified route name under the specified subscription, resource group, * profile, and AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param routeUpdateProperties Route update properties. @@ -429,9 +382,9 @@ RouteInner update(String resourceGroupName, String profileName, String endpointN * Deletes an existing route with the specified route name under the specified subscription, resource group, * profile, and AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -447,9 +400,9 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam * Deletes an existing route with the specified route name under the specified subscription, resource group, * profile, and AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -465,9 +418,9 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St * Deletes an existing route with the specified route name under the specified subscription, resource group, * profile, and AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -483,9 +436,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * Deletes an existing route with the specified route name under the specified subscription, resource group, * profile, and AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param context The context to associate with this operation. @@ -502,9 +455,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * Deletes an existing route with the specified route name under the specified subscription, resource group, * profile, and AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -519,9 +472,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * Deletes an existing route with the specified route name under the specified subscription, resource group, * profile, and AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -535,9 +488,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * Deletes an existing route with the specified route name under the specified subscription, resource group, * profile, and AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param context The context to associate with this operation. @@ -547,4 +500,51 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String profileName, String endpointName, String routeName, Context context); + + /** + * Lists all of the existing origins within a profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Route list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByEndpointAsync(String resourceGroupName, String profileName, String endpointName); + + /** + * Lists all of the existing origins within a profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Route list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByEndpoint(String resourceGroupName, String profileName, String endpointName); + + /** + * Lists all of the existing origins within a profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Route list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByEndpoint(String resourceGroupName, String profileName, String endpointName, + Context context); } diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/RuleSetsClient.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/RuleSetsClient.java index 6f941583b67a..7e17f5ba6a06 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/RuleSetsClient.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/RuleSetsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent; @@ -15,6 +15,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.cdn.fluent.models.RuleSetInner; import com.azure.resourcemanager.cdn.fluent.models.UsageInner; +import com.azure.resourcemanager.cdn.models.RuleSetsCreateResponse; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -23,56 +24,13 @@ * An instance of this class provides access to all the operations defined in RuleSetsClient. */ public interface RuleSetsClient { - /** - * Lists existing AzureFrontDoor rule sets within a profile. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list rule sets as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByProfileAsync(String resourceGroupName, String profileName); - - /** - * Lists existing AzureFrontDoor rule sets within a profile. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list rule sets as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByProfile(String resourceGroupName, String profileName); - - /** - * Lists existing AzureFrontDoor rule sets within a profile. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list rule sets as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByProfile(String resourceGroupName, String profileName, Context context); - /** * Gets an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -87,9 +45,9 @@ public interface RuleSetsClient { * Gets an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -104,9 +62,9 @@ public interface RuleSetsClient { * Gets an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -123,9 +81,9 @@ Response getWithResponse(String resourceGroupName, String profileN * Gets an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -139,26 +97,26 @@ Response getWithResponse(String resourceGroupName, String profileN /** * Creates a new rule set within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return friendly RuleSet name mapping to the any RuleSet or secret related information along with - * {@link Response} on successful completion of {@link Mono}. + * @return friendly RuleSet name mapping to the any RuleSet or secret related information on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createWithResponseAsync(String resourceGroupName, String profileName, + Mono createWithResponseAsync(String resourceGroupName, String profileName, String ruleSetName); /** * Creates a new rule set within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -172,27 +130,26 @@ Mono> createWithResponseAsync(String resourceGroupName, S /** * Creates a new rule set within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return friendly RuleSet name mapping to the any RuleSet or secret related information along with - * {@link Response}. + * @return friendly RuleSet name mapping to the any RuleSet or secret related information. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse(String resourceGroupName, String profileName, String ruleSetName, + RuleSetsCreateResponse createWithResponse(String resourceGroupName, String profileName, String ruleSetName, Context context); /** * Creates a new rule set within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -206,9 +163,9 @@ Response createWithResponse(String resourceGroupName, String profi * Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -223,9 +180,9 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam * Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -240,9 +197,9 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St * Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -256,9 +213,9 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St * Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -274,9 +231,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -290,9 +247,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -305,9 +262,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -318,11 +275,54 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String profileName, String ruleSetName, Context context); /** - * Checks the quota and actual usage of endpoints under the given Azure Front Door profile.. + * Lists existing AzureFrontDoor rule sets within a profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a RuleSet list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByProfileAsync(String resourceGroupName, String profileName); + + /** + * Lists existing AzureFrontDoor rule sets within a profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a RuleSet list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByProfile(String resourceGroupName, String profileName); + + /** + * Lists existing AzureFrontDoor rule sets within a profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a RuleSet list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByProfile(String resourceGroupName, String profileName, Context context); + + /** + * Checks the quota and actual usage of endpoints under the given Azure Front Door profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -333,11 +333,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String PagedFlux listResourceUsageAsync(String resourceGroupName, String profileName, String ruleSetName); /** - * Checks the quota and actual usage of endpoints under the given Azure Front Door profile.. + * Checks the quota and actual usage of endpoints under the given Azure Front Door profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -348,11 +348,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String PagedIterable listResourceUsage(String resourceGroupName, String profileName, String ruleSetName); /** - * Checks the quota and actual usage of endpoints under the given Azure Front Door profile.. + * Checks the quota and actual usage of endpoints under the given Azure Front Door profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/RulesClient.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/RulesClient.java index f70063849c73..8f1287a17e66 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/RulesClient.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/RulesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent; @@ -23,60 +23,13 @@ * An instance of this class provides access to all the operations defined in RulesClient. */ public interface RulesClient { - /** - * Lists all of the existing delivery rules within a rule set. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByRuleSetAsync(String resourceGroupName, String profileName, String ruleSetName); - - /** - * Lists all of the existing delivery rules within a rule set. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByRuleSet(String resourceGroupName, String profileName, String ruleSetName); - - /** - * Lists all of the existing delivery rules within a rule set. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByRuleSet(String resourceGroupName, String profileName, String ruleSetName, - Context context); - /** * Gets an existing delivery rule within a rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -91,10 +44,10 @@ Mono> getWithResponseAsync(String resourceGroupName, String /** * Gets an existing delivery rule within a rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -107,10 +60,10 @@ Mono> getWithResponseAsync(String resourceGroupName, String /** * Gets an existing delivery rule within a rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -125,10 +78,10 @@ Response getWithResponse(String resourceGroupName, String profileName /** * Gets an existing delivery rule within a rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -141,10 +94,10 @@ Response getWithResponse(String resourceGroupName, String profileName /** * Creates a new delivery rule within the specified rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param rule The delivery rule properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -160,10 +113,10 @@ Mono>> createWithResponseAsync(String resourceGroupNam /** * Creates a new delivery rule within the specified rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param rule The delivery rule properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -179,10 +132,10 @@ PollerFlux, RuleInner> beginCreateAsync(String resourceGro /** * Creates a new delivery rule within the specified rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param rule The delivery rule properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -198,10 +151,10 @@ SyncPoller, RuleInner> beginCreate(String resourceGroupNam /** * Creates a new delivery rule within the specified rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param rule The delivery rule properties. * @param context The context to associate with this operation. @@ -218,10 +171,10 @@ SyncPoller, RuleInner> beginCreate(String resourceGroupNam /** * Creates a new delivery rule within the specified rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param rule The delivery rule properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -237,10 +190,10 @@ Mono createAsync(String resourceGroupName, String profileName, String /** * Creates a new delivery rule within the specified rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param rule The delivery rule properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -254,10 +207,10 @@ Mono createAsync(String resourceGroupName, String profileName, String /** * Creates a new delivery rule within the specified rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param rule The delivery rule properties. * @param context The context to associate with this operation. @@ -273,10 +226,10 @@ RuleInner create(String resourceGroupName, String profileName, String ruleSetNam /** * Updates an existing delivery rule within a rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param ruleUpdateProperties Delivery rule properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -292,10 +245,10 @@ Mono>> updateWithResponseAsync(String resourceGroupNam /** * Updates an existing delivery rule within a rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param ruleUpdateProperties Delivery rule properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -311,10 +264,10 @@ PollerFlux, RuleInner> beginUpdateAsync(String resourceGro /** * Updates an existing delivery rule within a rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param ruleUpdateProperties Delivery rule properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -330,10 +283,10 @@ SyncPoller, RuleInner> beginUpdate(String resourceGroupNam /** * Updates an existing delivery rule within a rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param ruleUpdateProperties Delivery rule properties. * @param context The context to associate with this operation. @@ -350,10 +303,10 @@ SyncPoller, RuleInner> beginUpdate(String resourceGroupNam /** * Updates an existing delivery rule within a rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param ruleUpdateProperties Delivery rule properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -369,10 +322,10 @@ Mono updateAsync(String resourceGroupName, String profileName, String /** * Updates an existing delivery rule within a rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param ruleUpdateProperties Delivery rule properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -387,10 +340,10 @@ RuleInner update(String resourceGroupName, String profileName, String ruleSetNam /** * Updates an existing delivery rule within a rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param ruleUpdateProperties Delivery rule properties. * @param context The context to associate with this operation. @@ -406,10 +359,10 @@ RuleInner update(String resourceGroupName, String profileName, String ruleSetNam /** * Deletes an existing delivery rule within a rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -423,10 +376,10 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam /** * Deletes an existing delivery rule within a rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -440,10 +393,10 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St /** * Deletes an existing delivery rule within a rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -457,10 +410,10 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an existing delivery rule within a rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -475,10 +428,10 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an existing delivery rule within a rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -491,10 +444,10 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an existing delivery rule within a rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -506,10 +459,10 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an existing delivery rule within a rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -518,4 +471,51 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String profileName, String ruleSetName, String ruleName, Context context); + + /** + * Lists all of the existing delivery rules within a rule set. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Rule list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByRuleSetAsync(String resourceGroupName, String profileName, String ruleSetName); + + /** + * Lists all of the existing delivery rules within a rule set. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Rule list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByRuleSet(String resourceGroupName, String profileName, String ruleSetName); + + /** + * Lists all of the existing delivery rules within a rule set. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Rule list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByRuleSet(String resourceGroupName, String profileName, String ruleSetName, + Context context); } diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/SecretsClient.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/SecretsClient.java index 0ed8a975a242..daa357de9839 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/SecretsClient.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/SecretsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent; @@ -22,55 +22,12 @@ * An instance of this class provides access to all the operations defined in SecretsClient. */ public interface SecretsClient { - /** - * Lists existing AzureFrontDoor secrets. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list secrets as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByProfileAsync(String resourceGroupName, String profileName); - - /** - * Lists existing AzureFrontDoor secrets. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list secrets as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByProfile(String resourceGroupName, String profileName); - - /** - * Lists existing AzureFrontDoor secrets. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list secrets as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByProfile(String resourceGroupName, String profileName, Context context); - /** * Gets an existing Secret within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param secretName Name of the Secret under the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -83,9 +40,9 @@ public interface SecretsClient { /** * Gets an existing Secret within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param secretName Name of the Secret under the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -98,9 +55,9 @@ public interface SecretsClient { /** * Gets an existing Secret within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param secretName Name of the Secret under the profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -115,9 +72,9 @@ Response getWithResponse(String resourceGroupName, String profileNa /** * Gets an existing Secret within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param secretName Name of the Secret under the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -130,9 +87,9 @@ Response getWithResponse(String resourceGroupName, String profileNa /** * Creates a new Secret within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param secretName Name of the Secret under the profile. * @param secret The Secret properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -148,9 +105,9 @@ Mono>> createWithResponseAsync(String resourceGroupNam /** * Creates a new Secret within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param secretName Name of the Secret under the profile. * @param secret The Secret properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -166,9 +123,9 @@ PollerFlux, SecretInner> beginCreateAsync(String resourc /** * Creates a new Secret within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param secretName Name of the Secret under the profile. * @param secret The Secret properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -184,9 +141,9 @@ SyncPoller, SecretInner> beginCreate(String resourceGrou /** * Creates a new Secret within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param secretName Name of the Secret under the profile. * @param secret The Secret properties. * @param context The context to associate with this operation. @@ -203,9 +160,9 @@ SyncPoller, SecretInner> beginCreate(String resourceGrou /** * Creates a new Secret within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param secretName Name of the Secret under the profile. * @param secret The Secret properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -220,9 +177,9 @@ SyncPoller, SecretInner> beginCreate(String resourceGrou /** * Creates a new Secret within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param secretName Name of the Secret under the profile. * @param secret The Secret properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -236,9 +193,9 @@ SyncPoller, SecretInner> beginCreate(String resourceGrou /** * Creates a new Secret within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param secretName Name of the Secret under the profile. * @param secret The Secret properties. * @param context The context to associate with this operation. @@ -254,9 +211,9 @@ SecretInner create(String resourceGroupName, String profileName, String secretNa /** * Deletes an existing Secret within profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param secretName Name of the Secret under the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -270,9 +227,9 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam /** * Deletes an existing Secret within profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param secretName Name of the Secret under the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -286,9 +243,9 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St /** * Deletes an existing Secret within profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param secretName Name of the Secret under the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -301,9 +258,9 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St /** * Deletes an existing Secret within profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param secretName Name of the Secret under the profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -318,9 +275,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an existing Secret within profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param secretName Name of the Secret under the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -333,9 +290,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an existing Secret within profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param secretName Name of the Secret under the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -347,9 +304,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an existing Secret within profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param secretName Name of the Secret under the profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -358,4 +315,47 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String profileName, String secretName, Context context); + + /** + * Lists existing AzureFrontDoor secrets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Secret list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByProfileAsync(String resourceGroupName, String profileName); + + /** + * Lists existing AzureFrontDoor secrets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Secret list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByProfile(String resourceGroupName, String profileName); + + /** + * Lists existing AzureFrontDoor secrets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Secret list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByProfile(String resourceGroupName, String profileName, Context context); } diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/SecurityPoliciesClient.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/SecurityPoliciesClient.java index 46fb97b4848a..18c44734c3d9 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/SecurityPoliciesClient.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/SecurityPoliciesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent; @@ -23,55 +23,12 @@ * An instance of this class provides access to all the operations defined in SecurityPoliciesClient. */ public interface SecurityPoliciesClient { - /** - * Lists security policies associated with the profile. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list security policies as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByProfileAsync(String resourceGroupName, String profileName); - - /** - * Lists security policies associated with the profile. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list security policies as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByProfile(String resourceGroupName, String profileName); - - /** - * Lists security policies associated with the profile. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list security policies as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByProfile(String resourceGroupName, String profileName, Context context); - /** * Gets an existing security policy within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -86,9 +43,9 @@ Mono> getWithResponseAsync(String resourceGroupNam /** * Gets an existing security policy within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -101,9 +58,9 @@ Mono> getWithResponseAsync(String resourceGroupNam /** * Gets an existing security policy within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -118,9 +75,9 @@ Response getWithResponse(String resourceGroupName, String p /** * Gets an existing security policy within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -133,9 +90,9 @@ Response getWithResponse(String resourceGroupName, String p /** * Creates a new security policy within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param securityPolicy The security policy properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -151,9 +108,9 @@ Mono>> createWithResponseAsync(String resourceGroupNam /** * Creates a new security policy within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param securityPolicy The security policy properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -168,9 +125,9 @@ PollerFlux, SecurityPolicyInner> beginCreateAsyn /** * Creates a new security policy within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param securityPolicy The security policy properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -185,9 +142,9 @@ SyncPoller, SecurityPolicyInner> beginCreate(Str /** * Creates a new security policy within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param securityPolicy The security policy properties. * @param context The context to associate with this operation. @@ -203,9 +160,9 @@ SyncPoller, SecurityPolicyInner> beginCreate(Str /** * Creates a new security policy within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param securityPolicy The security policy properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -220,9 +177,9 @@ Mono createAsync(String resourceGroupName, String profileNa /** * Creates a new security policy within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param securityPolicy The security policy properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -237,9 +194,9 @@ SecurityPolicyInner create(String resourceGroupName, String profileName, String /** * Creates a new security policy within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param securityPolicy The security policy properties. * @param context The context to associate with this operation. @@ -255,9 +212,9 @@ SecurityPolicyInner create(String resourceGroupName, String profileName, String /** * Updates an existing security policy within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param securityPolicyUpdateProperties Security policy update properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -273,9 +230,9 @@ Mono>> patchWithResponseAsync(String resourceGroupName /** * Updates an existing security policy within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param securityPolicyUpdateProperties Security policy update properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -290,9 +247,9 @@ PollerFlux, SecurityPolicyInner> beginPatchAsync /** * Updates an existing security policy within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param securityPolicyUpdateProperties Security policy update properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -307,9 +264,9 @@ SyncPoller, SecurityPolicyInner> beginPatch(Stri /** * Updates an existing security policy within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param securityPolicyUpdateProperties Security policy update properties. * @param context The context to associate with this operation. @@ -326,9 +283,9 @@ SyncPoller, SecurityPolicyInner> beginPatch(Stri /** * Updates an existing security policy within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param securityPolicyUpdateProperties Security policy update properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -343,9 +300,9 @@ Mono patchAsync(String resourceGroupName, String profileNam /** * Updates an existing security policy within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param securityPolicyUpdateProperties Security policy update properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -360,9 +317,9 @@ SecurityPolicyInner patch(String resourceGroupName, String profileName, String s /** * Updates an existing security policy within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param securityPolicyUpdateProperties Security policy update properties. * @param context The context to associate with this operation. @@ -378,9 +335,9 @@ SecurityPolicyInner patch(String resourceGroupName, String profileName, String s /** * Deletes an existing security policy within profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -394,9 +351,9 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam /** * Deletes an existing security policy within profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -410,9 +367,9 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St /** * Deletes an existing security policy within profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -426,9 +383,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an existing security policy within profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -443,9 +400,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an existing security policy within profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -458,9 +415,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an existing security policy within profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -472,9 +429,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an existing security policy within profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -483,4 +440,47 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String profileName, String securityPolicyName, Context context); + + /** + * Lists security policies associated with the profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a SecurityPolicy list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByProfileAsync(String resourceGroupName, String profileName); + + /** + * Lists security policies associated with the profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a SecurityPolicy list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByProfile(String resourceGroupName, String profileName); + + /** + * Lists security policies associated with the profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a SecurityPolicy list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByProfile(String resourceGroupName, String profileName, Context context); } diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/WebAgentsClient.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/WebAgentsClient.java new file mode 100644 index 000000000000..4be2fbec2c98 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/WebAgentsClient.java @@ -0,0 +1,455 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.cdn.fluent.models.WebAgentInner; +import com.azure.resourcemanager.cdn.models.WebAgentUpdateParameters; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in WebAgentsClient. + */ +public interface WebAgentsClient + extends InnerSupportsGet, InnerSupportsListing, InnerSupportsDelete { + /** + * Gets a web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 web agent with the specified name within a resource group along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String webAgentName); + + /** + * Gets a web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 web agent with the specified name within a resource group on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getByResourceGroupAsync(String resourceGroupName, String webAgentName); + + /** + * Gets a web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 web agent with the specified name within a resource group along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String webAgentName, + Context context); + + /** + * Gets a web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 web agent with the specified name within a resource group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WebAgentInner getByResourceGroup(String resourceGroupName, String webAgentName); + + /** + * Creates or updates a web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param webAgent Web agent to be created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 web agent resource for Azure CDN along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String webAgentName, + WebAgentInner webAgent); + + /** + * Creates or updates a web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param webAgent Web agent to be created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 a web agent resource for Azure CDN. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, WebAgentInner> beginCreateOrUpdateAsync(String resourceGroupName, + String webAgentName, WebAgentInner webAgent); + + /** + * Creates or updates a web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param webAgent Web agent to be created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of defines a web agent resource for Azure CDN. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WebAgentInner> beginCreateOrUpdate(String resourceGroupName, + String webAgentName, WebAgentInner webAgent); + + /** + * Creates or updates a web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param webAgent Web agent to be created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of defines a web agent resource for Azure CDN. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WebAgentInner> beginCreateOrUpdate(String resourceGroupName, + String webAgentName, WebAgentInner webAgent, Context context); + + /** + * Creates or updates a web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param webAgent Web agent to be created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 web agent resource for Azure CDN on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createOrUpdateAsync(String resourceGroupName, String webAgentName, WebAgentInner webAgent); + + /** + * Creates or updates a web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param webAgent Web agent to be created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 web agent resource for Azure CDN. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WebAgentInner createOrUpdate(String resourceGroupName, String webAgentName, WebAgentInner webAgent); + + /** + * Creates or updates a web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param webAgent Web agent to be created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 web agent resource for Azure CDN. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WebAgentInner createOrUpdate(String resourceGroupName, String webAgentName, WebAgentInner webAgent, + Context context); + + /** + * Updates an existing web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param webAgentUpdateParameters Web agent parameters to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 web agent resource for Azure CDN along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> updateWithResponseAsync(String resourceGroupName, String webAgentName, + WebAgentUpdateParameters webAgentUpdateParameters); + + /** + * Updates an existing web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param webAgentUpdateParameters Web agent parameters to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 a web agent resource for Azure CDN. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginUpdateAsync(String resourceGroupName, String webAgentName, + WebAgentUpdateParameters webAgentUpdateParameters); + + /** + * Updates an existing web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param webAgentUpdateParameters Web agent parameters to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of defines a web agent resource for Azure CDN. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginUpdate(String resourceGroupName, String webAgentName, + WebAgentUpdateParameters webAgentUpdateParameters); + + /** + * Updates an existing web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param webAgentUpdateParameters Web agent parameters to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of defines a web agent resource for Azure CDN. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginUpdate(String resourceGroupName, String webAgentName, + WebAgentUpdateParameters webAgentUpdateParameters, Context context); + + /** + * Updates an existing web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param webAgentUpdateParameters Web agent parameters to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 web agent resource for Azure CDN on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono updateAsync(String resourceGroupName, String webAgentName, + WebAgentUpdateParameters webAgentUpdateParameters); + + /** + * Updates an existing web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param webAgentUpdateParameters Web agent parameters to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void update(String resourceGroupName, String webAgentName, WebAgentUpdateParameters webAgentUpdateParameters); + + /** + * Updates an existing web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param webAgentUpdateParameters Web agent parameters to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void update(String resourceGroupName, String webAgentName, WebAgentUpdateParameters webAgentUpdateParameters, + Context context); + + /** + * Deletes a web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> deleteWithResponseAsync(String resourceGroupName, String webAgentName); + + /** + * Deletes a web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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) + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String webAgentName); + + /** + * Deletes a web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String webAgentName); + + /** + * Deletes a web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String webAgentName, Context context); + + /** + * Deletes a web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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) + Mono deleteAsync(String resourceGroupName, String webAgentName); + + /** + * Deletes a web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String webAgentName); + + /** + * Deletes a web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String webAgentName, Context context); + + /** + * Lists all web agents 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 web agents as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByResourceGroupAsync(String resourceGroupName); + + /** + * Lists all web agents 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 web agents as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists all web agents 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 web agents as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Lists all web agents 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 web agents as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(); + + /** + * Lists all web agents 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 web agents as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Lists all web agents 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 web agents as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdDomainInner.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdDomainInner.java index b55f4fcacbff..8fa193133e4d 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdDomainInner.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdDomainInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent.models; @@ -11,6 +11,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.cdn.models.AfdDomainHttpsParameters; +import com.azure.resourcemanager.cdn.models.AfdDomainMtlsParameters; import com.azure.resourcemanager.cdn.models.AfdProvisioningState; import com.azure.resourcemanager.cdn.models.DeploymentStatus; import com.azure.resourcemanager.cdn.models.DomainValidationProperties; @@ -31,7 +32,7 @@ public final class AfdDomainInner extends ProxyResource { private AfdDomainProperties innerProperties; /* - * Read only system data + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ private SystemData systemData; @@ -66,7 +67,7 @@ private AfdDomainProperties innerProperties() { } /** - * Get the systemData property: Read only system data. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -105,68 +106,112 @@ public String id() { } /** - * Get the domainValidationState property: Provisioning substate shows the progress of custom HTTPS - * enabling/disabling process step by step. DCV stands for DomainControlValidation. + * Get the profileName property: The name of the profile which holds the domain. * - * @return the domainValidationState value. + * @return the profileName value. */ - public DomainValidationState domainValidationState() { - return this.innerProperties() == null ? null : this.innerProperties().domainValidationState(); + public String profileName() { + return this.innerProperties() == null ? null : this.innerProperties().profileName(); } /** - * Get the hostname property: The host name of the domain. Must be a domain name. + * Get the tlsSettings property: The configuration specifying how to enable HTTPS for the domain - using + * AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl uses AzureFrontDoor + * managed certificate by default. * - * @return the hostname value. + * @return the tlsSettings value. */ - public String hostname() { - return this.innerProperties() == null ? null : this.innerProperties().hostname(); + public AfdDomainHttpsParameters tlsSettings() { + return this.innerProperties() == null ? null : this.innerProperties().tlsSettings(); } /** - * Set the hostname property: The host name of the domain. Must be a domain name. + * Set the tlsSettings property: The configuration specifying how to enable HTTPS for the domain - using + * AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl uses AzureFrontDoor + * managed certificate by default. * - * @param hostname the hostname value to set. + * @param tlsSettings the tlsSettings value to set. * @return the AfdDomainInner object itself. */ - public AfdDomainInner withHostname(String hostname) { + public AfdDomainInner withTlsSettings(AfdDomainHttpsParameters tlsSettings) { if (this.innerProperties() == null) { this.innerProperties = new AfdDomainProperties(); } - this.innerProperties().withHostname(hostname); + this.innerProperties().withTlsSettings(tlsSettings); return this; } /** - * Get the extendedProperties property: Key-Value pair representing migration properties for domains. + * Get the mtlsSettings property: The configuration specifying how to enable mutual TLS for the domain, including + * specifying allowed FQDNs and which server certificate(s) to use. * - * @return the extendedProperties value. + * @return the mtlsSettings value. */ - public Map extendedProperties() { - return this.innerProperties() == null ? null : this.innerProperties().extendedProperties(); + public AfdDomainMtlsParameters mtlsSettings() { + return this.innerProperties() == null ? null : this.innerProperties().mtlsSettings(); } /** - * Set the extendedProperties property: Key-Value pair representing migration properties for domains. + * Set the mtlsSettings property: The configuration specifying how to enable mutual TLS for the domain, including + * specifying allowed FQDNs and which server certificate(s) to use. * - * @param extendedProperties the extendedProperties value to set. + * @param mtlsSettings the mtlsSettings value to set. * @return the AfdDomainInner object itself. */ - public AfdDomainInner withExtendedProperties(Map extendedProperties) { + public AfdDomainInner withMtlsSettings(AfdDomainMtlsParameters mtlsSettings) { if (this.innerProperties() == null) { this.innerProperties = new AfdDomainProperties(); } - this.innerProperties().withExtendedProperties(extendedProperties); + this.innerProperties().withMtlsSettings(mtlsSettings); return this; } /** - * Get the validationProperties property: Values the customer needs to validate domain ownership. + * Get the azureDnsZone property: Resource reference to the Azure DNS zone. * - * @return the validationProperties value. + * @return the azureDnsZone value. */ - public DomainValidationProperties validationProperties() { - return this.innerProperties() == null ? null : this.innerProperties().validationProperties(); + public ResourceReference azureDnsZone() { + return this.innerProperties() == null ? null : this.innerProperties().azureDnsZone(); + } + + /** + * Set the azureDnsZone property: Resource reference to the Azure DNS zone. + * + * @param azureDnsZone the azureDnsZone value to set. + * @return the AfdDomainInner object itself. + */ + public AfdDomainInner withAzureDnsZone(ResourceReference azureDnsZone) { + if (this.innerProperties() == null) { + this.innerProperties = new AfdDomainProperties(); + } + this.innerProperties().withAzureDnsZone(azureDnsZone); + return this; + } + + /** + * Get the preValidatedCustomDomainResourceId property: Resource reference to the Azure resource where custom domain + * ownership was prevalidated. + * + * @return the preValidatedCustomDomainResourceId value. + */ + public ResourceReference preValidatedCustomDomainResourceId() { + return this.innerProperties() == null ? null : this.innerProperties().preValidatedCustomDomainResourceId(); + } + + /** + * Set the preValidatedCustomDomainResourceId property: Resource reference to the Azure resource where custom domain + * ownership was prevalidated. + * + * @param preValidatedCustomDomainResourceId the preValidatedCustomDomainResourceId value to set. + * @return the AfdDomainInner object itself. + */ + public AfdDomainInner withPreValidatedCustomDomainResourceId(ResourceReference preValidatedCustomDomainResourceId) { + if (this.innerProperties() == null) { + this.innerProperties = new AfdDomainProperties(); + } + this.innerProperties().withPreValidatedCustomDomainResourceId(preValidatedCustomDomainResourceId); + return this; } /** @@ -188,87 +233,68 @@ public DeploymentStatus deploymentStatus() { } /** - * Get the profileName property: The name of the profile which holds the domain. + * Get the domainValidationState property: Provisioning substate shows the progress of custom HTTPS + * enabling/disabling process step by step. DCV stands for DomainControlValidation. * - * @return the profileName value. + * @return the domainValidationState value. */ - public String profileName() { - return this.innerProperties() == null ? null : this.innerProperties().profileName(); + public DomainValidationState domainValidationState() { + return this.innerProperties() == null ? null : this.innerProperties().domainValidationState(); } /** - * Get the tlsSettings property: The configuration specifying how to enable HTTPS for the domain - using - * AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl uses AzureFrontDoor - * managed certificate by default. + * Get the hostname property: The host name of the domain. Must be a domain name. * - * @return the tlsSettings value. + * @return the hostname value. */ - public AfdDomainHttpsParameters tlsSettings() { - return this.innerProperties() == null ? null : this.innerProperties().tlsSettings(); + public String hostname() { + return this.innerProperties() == null ? null : this.innerProperties().hostname(); } /** - * Set the tlsSettings property: The configuration specifying how to enable HTTPS for the domain - using - * AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl uses AzureFrontDoor - * managed certificate by default. + * Set the hostname property: The host name of the domain. Must be a domain name. * - * @param tlsSettings the tlsSettings value to set. + * @param hostname the hostname value to set. * @return the AfdDomainInner object itself. */ - public AfdDomainInner withTlsSettings(AfdDomainHttpsParameters tlsSettings) { + public AfdDomainInner withHostname(String hostname) { if (this.innerProperties() == null) { this.innerProperties = new AfdDomainProperties(); } - this.innerProperties().withTlsSettings(tlsSettings); + this.innerProperties().withHostname(hostname); return this; } /** - * Get the azureDnsZone property: Resource reference to the Azure DNS zone. + * Get the extendedProperties property: Key-Value pair representing migration properties for domains. * - * @return the azureDnsZone value. + * @return the extendedProperties value. */ - public ResourceReference azureDnsZone() { - return this.innerProperties() == null ? null : this.innerProperties().azureDnsZone(); + public Map extendedProperties() { + return this.innerProperties() == null ? null : this.innerProperties().extendedProperties(); } /** - * Set the azureDnsZone property: Resource reference to the Azure DNS zone. + * Set the extendedProperties property: Key-Value pair representing migration properties for domains. * - * @param azureDnsZone the azureDnsZone value to set. + * @param extendedProperties the extendedProperties value to set. * @return the AfdDomainInner object itself. */ - public AfdDomainInner withAzureDnsZone(ResourceReference azureDnsZone) { + public AfdDomainInner withExtendedProperties(Map extendedProperties) { if (this.innerProperties() == null) { this.innerProperties = new AfdDomainProperties(); } - this.innerProperties().withAzureDnsZone(azureDnsZone); + this.innerProperties().withExtendedProperties(extendedProperties); return this; } /** - * Get the preValidatedCustomDomainResourceId property: Resource reference to the Azure resource where custom domain - * ownership was prevalidated. - * - * @return the preValidatedCustomDomainResourceId value. - */ - public ResourceReference preValidatedCustomDomainResourceId() { - return this.innerProperties() == null ? null : this.innerProperties().preValidatedCustomDomainResourceId(); - } - - /** - * Set the preValidatedCustomDomainResourceId property: Resource reference to the Azure resource where custom domain - * ownership was prevalidated. + * Get the validationProperties property: Values the customer needs to validate domain ownership. * - * @param preValidatedCustomDomainResourceId the preValidatedCustomDomainResourceId value to set. - * @return the AfdDomainInner object itself. + * @return the validationProperties value. */ - public AfdDomainInner withPreValidatedCustomDomainResourceId(ResourceReference preValidatedCustomDomainResourceId) { - if (this.innerProperties() == null) { - this.innerProperties = new AfdDomainProperties(); - } - this.innerProperties().withPreValidatedCustomDomainResourceId(preValidatedCustomDomainResourceId); - return this; + public DomainValidationProperties validationProperties() { + return this.innerProperties() == null ? null : this.innerProperties().validationProperties(); } /** diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdDomainProperties.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdDomainProperties.java index 72413799aa56..7fe9df4be274 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdDomainProperties.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdDomainProperties.java @@ -1,15 +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.cdn.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.cdn.models.AfdDomainHttpsParameters; +import com.azure.resourcemanager.cdn.models.AfdDomainMtlsParameters; import com.azure.resourcemanager.cdn.models.AfdProvisioningState; import com.azure.resourcemanager.cdn.models.DeploymentStatus; import com.azure.resourcemanager.cdn.models.DomainValidationProperties; @@ -22,27 +24,33 @@ * The JSON object that contains the properties of the domain to create. */ @Fluent -public final class AfdDomainProperties extends AfdDomainUpdatePropertiesParameters { +public final class AfdDomainProperties implements JsonSerializable { /* - * Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. DCV stands for - * DomainControlValidation. + * The name of the profile which holds the domain. */ - private DomainValidationState domainValidationState; + private String profileName; /* - * The host name of the domain. Must be a domain name. + * The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or + * user's own certificate. If not specified, enabling ssl uses AzureFrontDoor managed certificate by default. */ - private String hostname; + private AfdDomainHttpsParameters tlsSettings; /* - * Key-Value pair representing migration properties for domains. + * The configuration specifying how to enable mutual TLS for the domain, including specifying allowed FQDNs and + * which server certificate(s) to use. */ - private Map extendedProperties; + private AfdDomainMtlsParameters mtlsSettings; /* - * Values the customer needs to validate domain ownership + * Resource reference to the Azure DNS zone */ - private DomainValidationProperties validationProperties; + private ResourceReference azureDnsZone; + + /* + * Resource reference to the Azure resource where custom domain ownership was prevalidated + */ + private ResourceReference preValidatedCustomDomainResourceId; /* * Provisioning status @@ -55,9 +63,25 @@ public final class AfdDomainProperties extends AfdDomainUpdatePropertiesParamete private DeploymentStatus deploymentStatus; /* - * The name of the profile which holds the domain. + * Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. DCV stands for + * DomainControlValidation. */ - private String profileName; + private DomainValidationState domainValidationState; + + /* + * The host name of the domain. Must be a domain name. + */ + private String hostname; + + /* + * Key-Value pair representing migration properties for domains. + */ + private Map extendedProperties; + + /* + * Values the customer needs to validate domain ownership + */ + private DomainValidationProperties validationProperties; /** * Creates an instance of AfdDomainProperties class. @@ -66,62 +90,101 @@ public AfdDomainProperties() { } /** - * Get the domainValidationState property: Provisioning substate shows the progress of custom HTTPS - * enabling/disabling process step by step. DCV stands for DomainControlValidation. + * Get the profileName property: The name of the profile which holds the domain. * - * @return the domainValidationState value. + * @return the profileName value. */ - public DomainValidationState domainValidationState() { - return this.domainValidationState; + public String profileName() { + return this.profileName; } /** - * Get the hostname property: The host name of the domain. Must be a domain name. + * Get the tlsSettings property: The configuration specifying how to enable HTTPS for the domain - using + * AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl uses AzureFrontDoor + * managed certificate by default. * - * @return the hostname value. + * @return the tlsSettings value. */ - public String hostname() { - return this.hostname; + public AfdDomainHttpsParameters tlsSettings() { + return this.tlsSettings; } /** - * Set the hostname property: The host name of the domain. Must be a domain name. + * Set the tlsSettings property: The configuration specifying how to enable HTTPS for the domain - using + * AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl uses AzureFrontDoor + * managed certificate by default. * - * @param hostname the hostname value to set. + * @param tlsSettings the tlsSettings value to set. * @return the AfdDomainProperties object itself. */ - public AfdDomainProperties withHostname(String hostname) { - this.hostname = hostname; + public AfdDomainProperties withTlsSettings(AfdDomainHttpsParameters tlsSettings) { + this.tlsSettings = tlsSettings; return this; } /** - * Get the extendedProperties property: Key-Value pair representing migration properties for domains. + * Get the mtlsSettings property: The configuration specifying how to enable mutual TLS for the domain, including + * specifying allowed FQDNs and which server certificate(s) to use. * - * @return the extendedProperties value. + * @return the mtlsSettings value. */ - public Map extendedProperties() { - return this.extendedProperties; + public AfdDomainMtlsParameters mtlsSettings() { + return this.mtlsSettings; } /** - * Set the extendedProperties property: Key-Value pair representing migration properties for domains. + * Set the mtlsSettings property: The configuration specifying how to enable mutual TLS for the domain, including + * specifying allowed FQDNs and which server certificate(s) to use. * - * @param extendedProperties the extendedProperties value to set. + * @param mtlsSettings the mtlsSettings value to set. * @return the AfdDomainProperties object itself. */ - public AfdDomainProperties withExtendedProperties(Map extendedProperties) { - this.extendedProperties = extendedProperties; + public AfdDomainProperties withMtlsSettings(AfdDomainMtlsParameters mtlsSettings) { + this.mtlsSettings = mtlsSettings; return this; } /** - * Get the validationProperties property: Values the customer needs to validate domain ownership. + * Get the azureDnsZone property: Resource reference to the Azure DNS zone. * - * @return the validationProperties value. + * @return the azureDnsZone value. */ - public DomainValidationProperties validationProperties() { - return this.validationProperties; + public ResourceReference azureDnsZone() { + return this.azureDnsZone; + } + + /** + * Set the azureDnsZone property: Resource reference to the Azure DNS zone. + * + * @param azureDnsZone the azureDnsZone value to set. + * @return the AfdDomainProperties object itself. + */ + public AfdDomainProperties withAzureDnsZone(ResourceReference azureDnsZone) { + this.azureDnsZone = azureDnsZone; + return this; + } + + /** + * Get the preValidatedCustomDomainResourceId property: Resource reference to the Azure resource where custom domain + * ownership was prevalidated. + * + * @return the preValidatedCustomDomainResourceId value. + */ + public ResourceReference preValidatedCustomDomainResourceId() { + return this.preValidatedCustomDomainResourceId; + } + + /** + * Set the preValidatedCustomDomainResourceId property: Resource reference to the Azure resource where custom domain + * ownership was prevalidated. + * + * @param preValidatedCustomDomainResourceId the preValidatedCustomDomainResourceId value to set. + * @return the AfdDomainProperties object itself. + */ + public AfdDomainProperties + withPreValidatedCustomDomainResourceId(ResourceReference preValidatedCustomDomainResourceId) { + this.preValidatedCustomDomainResourceId = preValidatedCustomDomainResourceId; + return this; } /** @@ -143,51 +206,82 @@ public DeploymentStatus deploymentStatus() { } /** - * Get the profileName property: The name of the profile which holds the domain. + * Get the domainValidationState property: Provisioning substate shows the progress of custom HTTPS + * enabling/disabling process step by step. DCV stands for DomainControlValidation. * - * @return the profileName value. + * @return the domainValidationState value. */ - @Override - public String profileName() { - return this.profileName; + public DomainValidationState domainValidationState() { + return this.domainValidationState; } /** - * {@inheritDoc} + * Get the hostname property: The host name of the domain. Must be a domain name. + * + * @return the hostname value. */ - @Override - public AfdDomainProperties withTlsSettings(AfdDomainHttpsParameters tlsSettings) { - super.withTlsSettings(tlsSettings); - return this; + public String hostname() { + return this.hostname; } /** - * {@inheritDoc} + * Set the hostname property: The host name of the domain. Must be a domain name. + * + * @param hostname the hostname value to set. + * @return the AfdDomainProperties object itself. */ - @Override - public AfdDomainProperties withAzureDnsZone(ResourceReference azureDnsZone) { - super.withAzureDnsZone(azureDnsZone); + public AfdDomainProperties withHostname(String hostname) { + this.hostname = hostname; return this; } /** - * {@inheritDoc} + * Get the extendedProperties property: Key-Value pair representing migration properties for domains. + * + * @return the extendedProperties value. */ - @Override - public AfdDomainProperties - withPreValidatedCustomDomainResourceId(ResourceReference preValidatedCustomDomainResourceId) { - super.withPreValidatedCustomDomainResourceId(preValidatedCustomDomainResourceId); + public Map extendedProperties() { + return this.extendedProperties; + } + + /** + * Set the extendedProperties property: Key-Value pair representing migration properties for domains. + * + * @param extendedProperties the extendedProperties value to set. + * @return the AfdDomainProperties object itself. + */ + public AfdDomainProperties withExtendedProperties(Map extendedProperties) { + this.extendedProperties = extendedProperties; return this; } + /** + * Get the validationProperties property: Values the customer needs to validate domain ownership. + * + * @return the validationProperties value. + */ + public DomainValidationProperties validationProperties() { + return this.validationProperties; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ - @Override public void validate() { - super.validate(); + if (tlsSettings() != null) { + tlsSettings().validate(); + } + if (mtlsSettings() != null) { + mtlsSettings().validate(); + } + if (azureDnsZone() != null) { + azureDnsZone().validate(); + } + if (preValidatedCustomDomainResourceId() != null) { + preValidatedCustomDomainResourceId().validate(); + } if (hostname() == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Missing required property hostname in model AfdDomainProperties")); @@ -205,10 +299,11 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("tlsSettings", tlsSettings()); - jsonWriter.writeJsonField("azureDnsZone", azureDnsZone()); - jsonWriter.writeJsonField("preValidatedCustomDomainResourceId", preValidatedCustomDomainResourceId()); jsonWriter.writeStringField("hostName", this.hostname); + jsonWriter.writeJsonField("tlsSettings", this.tlsSettings); + jsonWriter.writeJsonField("mtlsSettings", this.mtlsSettings); + jsonWriter.writeJsonField("azureDnsZone", this.azureDnsZone); + jsonWriter.writeJsonField("preValidatedCustomDomainResourceId", this.preValidatedCustomDomainResourceId); jsonWriter.writeMapField("extendedProperties", this.extendedProperties, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); @@ -230,17 +325,24 @@ public static AfdDomainProperties fromJson(JsonReader jsonReader) throws IOExcep String fieldName = reader.getFieldName(); reader.nextToken(); - if ("profileName".equals(fieldName)) { + if ("hostName".equals(fieldName)) { + deserializedAfdDomainProperties.hostname = reader.getString(); + } else if ("profileName".equals(fieldName)) { deserializedAfdDomainProperties.profileName = reader.getString(); } else if ("tlsSettings".equals(fieldName)) { - deserializedAfdDomainProperties.withTlsSettings(AfdDomainHttpsParameters.fromJson(reader)); + deserializedAfdDomainProperties.tlsSettings = AfdDomainHttpsParameters.fromJson(reader); + } else if ("mtlsSettings".equals(fieldName)) { + deserializedAfdDomainProperties.mtlsSettings = AfdDomainMtlsParameters.fromJson(reader); } else if ("azureDnsZone".equals(fieldName)) { - deserializedAfdDomainProperties.withAzureDnsZone(ResourceReference.fromJson(reader)); + deserializedAfdDomainProperties.azureDnsZone = ResourceReference.fromJson(reader); } else if ("preValidatedCustomDomainResourceId".equals(fieldName)) { - deserializedAfdDomainProperties - .withPreValidatedCustomDomainResourceId(ResourceReference.fromJson(reader)); - } else if ("hostName".equals(fieldName)) { - deserializedAfdDomainProperties.hostname = reader.getString(); + deserializedAfdDomainProperties.preValidatedCustomDomainResourceId + = ResourceReference.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedAfdDomainProperties.provisioningState + = AfdProvisioningState.fromString(reader.getString()); + } else if ("deploymentStatus".equals(fieldName)) { + deserializedAfdDomainProperties.deploymentStatus = DeploymentStatus.fromString(reader.getString()); } else if ("domainValidationState".equals(fieldName)) { deserializedAfdDomainProperties.domainValidationState = DomainValidationState.fromString(reader.getString()); @@ -249,11 +351,6 @@ public static AfdDomainProperties fromJson(JsonReader jsonReader) throws IOExcep deserializedAfdDomainProperties.extendedProperties = extendedProperties; } else if ("validationProperties".equals(fieldName)) { deserializedAfdDomainProperties.validationProperties = DomainValidationProperties.fromJson(reader); - } else if ("provisioningState".equals(fieldName)) { - deserializedAfdDomainProperties.provisioningState - = AfdProvisioningState.fromString(reader.getString()); - } else if ("deploymentStatus".equals(fieldName)) { - deserializedAfdDomainProperties.deploymentStatus = DeploymentStatus.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdDomainUpdatePropertiesParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdDomainUpdatePropertiesParameters.java index 8a9b851e945f..48a32a448c05 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdDomainUpdatePropertiesParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdDomainUpdatePropertiesParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent.models; @@ -10,6 +10,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.cdn.models.AfdDomainHttpsParameters; +import com.azure.resourcemanager.cdn.models.AfdDomainMtlsParameters; import com.azure.resourcemanager.cdn.models.ResourceReference; import java.io.IOException; @@ -17,7 +18,8 @@ * The JSON object that contains the properties of the domain to create. */ @Fluent -public class AfdDomainUpdatePropertiesParameters implements JsonSerializable { +public final class AfdDomainUpdatePropertiesParameters + implements JsonSerializable { /* * The name of the profile which holds the domain. */ @@ -29,6 +31,12 @@ public class AfdDomainUpdatePropertiesParameters implements JsonSerializable tags) { } /** - * Get the hostname property: The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. - * contoso.azureedge.net. + * Get the profileName property: The name of the profile which holds the endpoint. * - * @return the hostname value. + * @return the profileName value. */ - public String hostname() { - return this.innerProperties() == null ? null : this.innerProperties().hostname(); + public String profileName() { + return this.innerProperties() == null ? null : this.innerProperties().profileName(); } /** - * Get the autoGeneratedDomainNameLabelScope property: Indicates the endpoint name reuse scope. The default value is - * TenantReuse. + * Get the enabledState property: Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'. * - * @return the autoGeneratedDomainNameLabelScope value. + * @return the enabledState value. */ - public AutoGeneratedDomainNameLabelScope autoGeneratedDomainNameLabelScope() { - return this.innerProperties() == null ? null : this.innerProperties().autoGeneratedDomainNameLabelScope(); + public EnabledState enabledState() { + return this.innerProperties() == null ? null : this.innerProperties().enabledState(); } /** - * Set the autoGeneratedDomainNameLabelScope property: Indicates the endpoint name reuse scope. The default value is - * TenantReuse. + * Set the enabledState property: Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'. * - * @param autoGeneratedDomainNameLabelScope the autoGeneratedDomainNameLabelScope value to set. + * @param enabledState the enabledState value to set. * @return the AfdEndpointInner object itself. */ - public AfdEndpointInner - withAutoGeneratedDomainNameLabelScope(AutoGeneratedDomainNameLabelScope autoGeneratedDomainNameLabelScope) { + public AfdEndpointInner withEnabledState(EnabledState enabledState) { if (this.innerProperties() == null) { this.innerProperties = new AfdEndpointProperties(); } - this.innerProperties().withAutoGeneratedDomainNameLabelScope(autoGeneratedDomainNameLabelScope); + this.innerProperties().withEnabledState(enabledState); + return this; + } + + /** + * Get the enforceMtls property: Set to Disabled by default. If set to Enabled, only custom domains with mTLS + * enabled can be added to child Route resources. + * + * @return the enforceMtls value. + */ + public EnforceMtlsEnabledState enforceMtls() { + return this.innerProperties() == null ? null : this.innerProperties().enforceMtls(); + } + + /** + * Set the enforceMtls property: Set to Disabled by default. If set to Enabled, only custom domains with mTLS + * enabled can be added to child Route resources. + * + * @param enforceMtls the enforceMtls value to set. + * @return the AfdEndpointInner object itself. + */ + public AfdEndpointInner withEnforceMtls(EnforceMtlsEnabledState enforceMtls) { + if (this.innerProperties() == null) { + this.innerProperties = new AfdEndpointProperties(); + } + this.innerProperties().withEnforceMtls(enforceMtls); return this; } @@ -176,34 +198,38 @@ public DeploymentStatus deploymentStatus() { } /** - * Get the profileName property: The name of the profile which holds the endpoint. + * Get the hostname property: The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. + * contoso.azureedge.net. * - * @return the profileName value. + * @return the hostname value. */ - public String profileName() { - return this.innerProperties() == null ? null : this.innerProperties().profileName(); + public String hostname() { + return this.innerProperties() == null ? null : this.innerProperties().hostname(); } /** - * Get the enabledState property: Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'. + * Get the autoGeneratedDomainNameLabelScope property: Indicates the endpoint name reuse scope. The default value is + * TenantReuse. * - * @return the enabledState value. + * @return the autoGeneratedDomainNameLabelScope value. */ - public EnabledState enabledState() { - return this.innerProperties() == null ? null : this.innerProperties().enabledState(); + public AutoGeneratedDomainNameLabelScope autoGeneratedDomainNameLabelScope() { + return this.innerProperties() == null ? null : this.innerProperties().autoGeneratedDomainNameLabelScope(); } /** - * Set the enabledState property: Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'. + * Set the autoGeneratedDomainNameLabelScope property: Indicates the endpoint name reuse scope. The default value is + * TenantReuse. * - * @param enabledState the enabledState value to set. + * @param autoGeneratedDomainNameLabelScope the autoGeneratedDomainNameLabelScope value to set. * @return the AfdEndpointInner object itself. */ - public AfdEndpointInner withEnabledState(EnabledState enabledState) { + public AfdEndpointInner + withAutoGeneratedDomainNameLabelScope(AutoGeneratedDomainNameLabelScope autoGeneratedDomainNameLabelScope) { if (this.innerProperties() == null) { this.innerProperties = new AfdEndpointProperties(); } - this.innerProperties().withEnabledState(enabledState); + this.innerProperties().withAutoGeneratedDomainNameLabelScope(autoGeneratedDomainNameLabelScope); return this; } diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdEndpointProperties.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdEndpointProperties.java index b37b68726bec..9425977fa24e 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdEndpointProperties.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdEndpointProperties.java @@ -1,33 +1,41 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent.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 com.azure.resourcemanager.cdn.models.AfdProvisioningState; import com.azure.resourcemanager.cdn.models.AutoGeneratedDomainNameLabelScope; import com.azure.resourcemanager.cdn.models.DeploymentStatus; import com.azure.resourcemanager.cdn.models.EnabledState; +import com.azure.resourcemanager.cdn.models.EnforceMtlsEnabledState; import java.io.IOException; /** * The JSON object that contains the properties required to create an endpoint. */ @Fluent -public final class AfdEndpointProperties extends AfdEndpointPropertiesUpdateParameters { +public final class AfdEndpointProperties implements JsonSerializable { /* - * The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net + * The name of the profile which holds the endpoint. */ - private String hostname; + private String profileName; /* - * Indicates the endpoint name reuse scope. The default value is TenantReuse. + * Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' */ - private AutoGeneratedDomainNameLabelScope autoGeneratedDomainNameLabelScope; + private EnabledState enabledState; + + /* + * Set to Disabled by default. If set to Enabled, only custom domains with mTLS enabled can be added to child Route + * resources. + */ + private EnforceMtlsEnabledState enforceMtls; /* * Provisioning status @@ -40,9 +48,14 @@ public final class AfdEndpointProperties extends AfdEndpointPropertiesUpdatePara private DeploymentStatus deploymentStatus; /* - * The name of the profile which holds the endpoint. + * The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net */ - private String profileName; + private String hostname; + + /* + * Indicates the endpoint name reuse scope. The default value is TenantReuse. + */ + private AutoGeneratedDomainNameLabelScope autoGeneratedDomainNameLabelScope; /** * Creates an instance of AfdEndpointProperties class. @@ -51,35 +64,53 @@ public AfdEndpointProperties() { } /** - * Get the hostname property: The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. - * contoso.azureedge.net. + * Get the profileName property: The name of the profile which holds the endpoint. * - * @return the hostname value. + * @return the profileName value. */ - public String hostname() { - return this.hostname; + public String profileName() { + return this.profileName; } /** - * Get the autoGeneratedDomainNameLabelScope property: Indicates the endpoint name reuse scope. The default value is - * TenantReuse. + * Get the enabledState property: Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'. * - * @return the autoGeneratedDomainNameLabelScope value. + * @return the enabledState value. */ - public AutoGeneratedDomainNameLabelScope autoGeneratedDomainNameLabelScope() { - return this.autoGeneratedDomainNameLabelScope; + public EnabledState enabledState() { + return this.enabledState; } /** - * Set the autoGeneratedDomainNameLabelScope property: Indicates the endpoint name reuse scope. The default value is - * TenantReuse. + * Set the enabledState property: Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'. * - * @param autoGeneratedDomainNameLabelScope the autoGeneratedDomainNameLabelScope value to set. + * @param enabledState the enabledState value to set. * @return the AfdEndpointProperties object itself. */ - public AfdEndpointProperties - withAutoGeneratedDomainNameLabelScope(AutoGeneratedDomainNameLabelScope autoGeneratedDomainNameLabelScope) { - this.autoGeneratedDomainNameLabelScope = autoGeneratedDomainNameLabelScope; + public AfdEndpointProperties withEnabledState(EnabledState enabledState) { + this.enabledState = enabledState; + return this; + } + + /** + * Get the enforceMtls property: Set to Disabled by default. If set to Enabled, only custom domains with mTLS + * enabled can be added to child Route resources. + * + * @return the enforceMtls value. + */ + public EnforceMtlsEnabledState enforceMtls() { + return this.enforceMtls; + } + + /** + * Set the enforceMtls property: Set to Disabled by default. If set to Enabled, only custom domains with mTLS + * enabled can be added to child Route resources. + * + * @param enforceMtls the enforceMtls value to set. + * @return the AfdEndpointProperties object itself. + */ + public AfdEndpointProperties withEnforceMtls(EnforceMtlsEnabledState enforceMtls) { + this.enforceMtls = enforceMtls; return this; } @@ -102,21 +133,35 @@ public DeploymentStatus deploymentStatus() { } /** - * Get the profileName property: The name of the profile which holds the endpoint. + * Get the hostname property: The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. + * contoso.azureedge.net. * - * @return the profileName value. + * @return the hostname value. */ - @Override - public String profileName() { - return this.profileName; + public String hostname() { + return this.hostname; } /** - * {@inheritDoc} + * Get the autoGeneratedDomainNameLabelScope property: Indicates the endpoint name reuse scope. The default value is + * TenantReuse. + * + * @return the autoGeneratedDomainNameLabelScope value. */ - @Override - public AfdEndpointProperties withEnabledState(EnabledState enabledState) { - super.withEnabledState(enabledState); + public AutoGeneratedDomainNameLabelScope autoGeneratedDomainNameLabelScope() { + return this.autoGeneratedDomainNameLabelScope; + } + + /** + * Set the autoGeneratedDomainNameLabelScope property: Indicates the endpoint name reuse scope. The default value is + * TenantReuse. + * + * @param autoGeneratedDomainNameLabelScope the autoGeneratedDomainNameLabelScope value to set. + * @return the AfdEndpointProperties object itself. + */ + public AfdEndpointProperties + withAutoGeneratedDomainNameLabelScope(AutoGeneratedDomainNameLabelScope autoGeneratedDomainNameLabelScope) { + this.autoGeneratedDomainNameLabelScope = autoGeneratedDomainNameLabelScope; return this; } @@ -125,9 +170,7 @@ public AfdEndpointProperties withEnabledState(EnabledState enabledState) { * * @throws IllegalArgumentException thrown if the instance is not valid. */ - @Override public void validate() { - super.validate(); } /** @@ -136,7 +179,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("enabledState", enabledState() == null ? null : enabledState().toString()); + jsonWriter.writeStringField("enabledState", this.enabledState == null ? null : this.enabledState.toString()); + jsonWriter.writeStringField("enforceMtls", this.enforceMtls == null ? null : this.enforceMtls.toString()); jsonWriter.writeStringField("autoGeneratedDomainNameLabelScope", this.autoGeneratedDomainNameLabelScope == null ? null : this.autoGeneratedDomainNameLabelScope.toString()); return jsonWriter.writeEndObject(); @@ -160,18 +204,21 @@ public static AfdEndpointProperties fromJson(JsonReader jsonReader) throws IOExc if ("profileName".equals(fieldName)) { deserializedAfdEndpointProperties.profileName = reader.getString(); } else if ("enabledState".equals(fieldName)) { - deserializedAfdEndpointProperties.withEnabledState(EnabledState.fromString(reader.getString())); - } else if ("hostName".equals(fieldName)) { - deserializedAfdEndpointProperties.hostname = reader.getString(); - } else if ("autoGeneratedDomainNameLabelScope".equals(fieldName)) { - deserializedAfdEndpointProperties.autoGeneratedDomainNameLabelScope - = AutoGeneratedDomainNameLabelScope.fromString(reader.getString()); + deserializedAfdEndpointProperties.enabledState = EnabledState.fromString(reader.getString()); + } else if ("enforceMtls".equals(fieldName)) { + deserializedAfdEndpointProperties.enforceMtls + = EnforceMtlsEnabledState.fromString(reader.getString()); } else if ("provisioningState".equals(fieldName)) { deserializedAfdEndpointProperties.provisioningState = AfdProvisioningState.fromString(reader.getString()); } else if ("deploymentStatus".equals(fieldName)) { deserializedAfdEndpointProperties.deploymentStatus = DeploymentStatus.fromString(reader.getString()); + } else if ("hostName".equals(fieldName)) { + deserializedAfdEndpointProperties.hostname = reader.getString(); + } else if ("autoGeneratedDomainNameLabelScope".equals(fieldName)) { + deserializedAfdEndpointProperties.autoGeneratedDomainNameLabelScope + = AutoGeneratedDomainNameLabelScope.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdEndpointPropertiesUpdateParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdEndpointPropertiesUpdateParameters.java index 6de400cf9486..e5a01eb03ef5 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdEndpointPropertiesUpdateParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdEndpointPropertiesUpdateParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent.models; @@ -10,13 +10,15 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.cdn.models.EnabledState; +import com.azure.resourcemanager.cdn.models.EnforceMtlsEnabledState; import java.io.IOException; /** * The JSON object containing endpoint update parameters. */ @Fluent -public class AfdEndpointPropertiesUpdateParameters implements JsonSerializable { +public final class AfdEndpointPropertiesUpdateParameters + implements JsonSerializable { /* * The name of the profile which holds the endpoint. */ @@ -27,6 +29,12 @@ public class AfdEndpointPropertiesUpdateParameters implements JsonSerializable { + /* + * The name of the profile which holds the origin group. + */ + private String profileName; + + /* + * Load balancing settings for a backend pool + */ + private LoadBalancingSettingsParameters loadBalancingSettings; + + /* + * Health probe settings to the origin that is used to determine the health of the origin. + */ + private HealthProbeParameters healthProbeSettings; + + /* + * Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new + * endpoint is added. Default is 10 mins. This property is currently not supported. + */ + private Integer trafficRestorationTimeToHealedOrNewEndpointsInMinutes; + + /* + * Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled' + */ + private EnabledState sessionAffinityState; + + /* + * Authentication settings for origin in origin group. + */ + private OriginAuthenticationProperties authentication; + /* * Provisioning status */ @@ -30,11 +63,6 @@ public final class AfdOriginGroupProperties extends AfdOriginGroupUpdateProperti */ private DeploymentStatus deploymentStatus; - /* - * The name of the profile which holds the origin group. - */ - private String profileName; - /** * Creates an instance of AfdOriginGroupProperties class. */ @@ -42,79 +70,158 @@ public AfdOriginGroupProperties() { } /** - * Get the provisioningState property: Provisioning status. + * Get the profileName property: The name of the profile which holds the origin group. * - * @return the provisioningState value. + * @return the profileName value. */ - public AfdProvisioningState provisioningState() { - return this.provisioningState; + public String profileName() { + return this.profileName; } /** - * Get the deploymentStatus property: The deploymentStatus property. + * Get the loadBalancingSettings property: Load balancing settings for a backend pool. * - * @return the deploymentStatus value. + * @return the loadBalancingSettings value. */ - public DeploymentStatus deploymentStatus() { - return this.deploymentStatus; + public LoadBalancingSettingsParameters loadBalancingSettings() { + return this.loadBalancingSettings; } /** - * Get the profileName property: The name of the profile which holds the origin group. + * Set the loadBalancingSettings property: Load balancing settings for a backend pool. * - * @return the profileName value. + * @param loadBalancingSettings the loadBalancingSettings value to set. + * @return the AfdOriginGroupProperties object itself. */ - @Override - public String profileName() { - return this.profileName; + public AfdOriginGroupProperties withLoadBalancingSettings(LoadBalancingSettingsParameters loadBalancingSettings) { + this.loadBalancingSettings = loadBalancingSettings; + return this; } /** - * {@inheritDoc} + * Get the healthProbeSettings property: Health probe settings to the origin that is used to determine the health of + * the origin. + * + * @return the healthProbeSettings value. */ - @Override - public AfdOriginGroupProperties withLoadBalancingSettings(LoadBalancingSettingsParameters loadBalancingSettings) { - super.withLoadBalancingSettings(loadBalancingSettings); - return this; + public HealthProbeParameters healthProbeSettings() { + return this.healthProbeSettings; } /** - * {@inheritDoc} + * Set the healthProbeSettings property: Health probe settings to the origin that is used to determine the health of + * the origin. + * + * @param healthProbeSettings the healthProbeSettings value to set. + * @return the AfdOriginGroupProperties object itself. */ - @Override public AfdOriginGroupProperties withHealthProbeSettings(HealthProbeParameters healthProbeSettings) { - super.withHealthProbeSettings(healthProbeSettings); + this.healthProbeSettings = healthProbeSettings; return this; } /** - * {@inheritDoc} + * Get the trafficRestorationTimeToHealedOrNewEndpointsInMinutes property: Time in minutes to shift the traffic to + * the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. + * This property is currently not supported. + * + * @return the trafficRestorationTimeToHealedOrNewEndpointsInMinutes value. + */ + public Integer trafficRestorationTimeToHealedOrNewEndpointsInMinutes() { + return this.trafficRestorationTimeToHealedOrNewEndpointsInMinutes; + } + + /** + * Set the trafficRestorationTimeToHealedOrNewEndpointsInMinutes property: Time in minutes to shift the traffic to + * the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. + * This property is currently not supported. + * + * @param trafficRestorationTimeToHealedOrNewEndpointsInMinutes the + * trafficRestorationTimeToHealedOrNewEndpointsInMinutes value to set. + * @return the AfdOriginGroupProperties object itself. */ - @Override public AfdOriginGroupProperties withTrafficRestorationTimeToHealedOrNewEndpointsInMinutes( Integer trafficRestorationTimeToHealedOrNewEndpointsInMinutes) { - super.withTrafficRestorationTimeToHealedOrNewEndpointsInMinutes( - trafficRestorationTimeToHealedOrNewEndpointsInMinutes); + this.trafficRestorationTimeToHealedOrNewEndpointsInMinutes + = trafficRestorationTimeToHealedOrNewEndpointsInMinutes; return this; } /** - * {@inheritDoc} + * Get the sessionAffinityState property: Whether to allow session affinity on this host. Valid options are + * 'Enabled' or 'Disabled'. + * + * @return the sessionAffinityState value. + */ + public EnabledState sessionAffinityState() { + return this.sessionAffinityState; + } + + /** + * Set the sessionAffinityState property: Whether to allow session affinity on this host. Valid options are + * 'Enabled' or 'Disabled'. + * + * @param sessionAffinityState the sessionAffinityState value to set. + * @return the AfdOriginGroupProperties object itself. */ - @Override public AfdOriginGroupProperties withSessionAffinityState(EnabledState sessionAffinityState) { - super.withSessionAffinityState(sessionAffinityState); + this.sessionAffinityState = sessionAffinityState; return this; } + /** + * Get the authentication property: Authentication settings for origin in origin group. + * + * @return the authentication value. + */ + public OriginAuthenticationProperties authentication() { + return this.authentication; + } + + /** + * Set the authentication property: Authentication settings for origin in origin group. + * + * @param authentication the authentication value to set. + * @return the AfdOriginGroupProperties object itself. + */ + public AfdOriginGroupProperties withAuthentication(OriginAuthenticationProperties authentication) { + this.authentication = authentication; + return this; + } + + /** + * Get the provisioningState property: Provisioning status. + * + * @return the provisioningState value. + */ + public AfdProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the deploymentStatus property: The deploymentStatus property. + * + * @return the deploymentStatus value. + */ + public DeploymentStatus deploymentStatus() { + return this.deploymentStatus; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ - @Override public void validate() { - super.validate(); + if (loadBalancingSettings() != null) { + loadBalancingSettings().validate(); + } + if (healthProbeSettings() != null) { + healthProbeSettings().validate(); + } + if (authentication() != null) { + authentication().validate(); + } } /** @@ -123,12 +230,13 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("loadBalancingSettings", loadBalancingSettings()); - jsonWriter.writeJsonField("healthProbeSettings", healthProbeSettings()); + jsonWriter.writeJsonField("loadBalancingSettings", this.loadBalancingSettings); + jsonWriter.writeJsonField("healthProbeSettings", this.healthProbeSettings); jsonWriter.writeNumberField("trafficRestorationTimeToHealedOrNewEndpointsInMinutes", - trafficRestorationTimeToHealedOrNewEndpointsInMinutes()); + this.trafficRestorationTimeToHealedOrNewEndpointsInMinutes); jsonWriter.writeStringField("sessionAffinityState", - sessionAffinityState() == null ? null : sessionAffinityState().toString()); + this.sessionAffinityState == null ? null : this.sessionAffinityState.toString()); + jsonWriter.writeJsonField("authentication", this.authentication); return jsonWriter.writeEndObject(); } @@ -150,17 +258,19 @@ public static AfdOriginGroupProperties fromJson(JsonReader jsonReader) throws IO if ("profileName".equals(fieldName)) { deserializedAfdOriginGroupProperties.profileName = reader.getString(); } else if ("loadBalancingSettings".equals(fieldName)) { - deserializedAfdOriginGroupProperties - .withLoadBalancingSettings(LoadBalancingSettingsParameters.fromJson(reader)); + deserializedAfdOriginGroupProperties.loadBalancingSettings + = LoadBalancingSettingsParameters.fromJson(reader); } else if ("healthProbeSettings".equals(fieldName)) { - deserializedAfdOriginGroupProperties - .withHealthProbeSettings(HealthProbeParameters.fromJson(reader)); + deserializedAfdOriginGroupProperties.healthProbeSettings = HealthProbeParameters.fromJson(reader); } else if ("trafficRestorationTimeToHealedOrNewEndpointsInMinutes".equals(fieldName)) { - deserializedAfdOriginGroupProperties.withTrafficRestorationTimeToHealedOrNewEndpointsInMinutes( - reader.getNullable(JsonReader::getInt)); + deserializedAfdOriginGroupProperties.trafficRestorationTimeToHealedOrNewEndpointsInMinutes + = reader.getNullable(JsonReader::getInt); } else if ("sessionAffinityState".equals(fieldName)) { - deserializedAfdOriginGroupProperties - .withSessionAffinityState(EnabledState.fromString(reader.getString())); + deserializedAfdOriginGroupProperties.sessionAffinityState + = EnabledState.fromString(reader.getString()); + } else if ("authentication".equals(fieldName)) { + deserializedAfdOriginGroupProperties.authentication + = OriginAuthenticationProperties.fromJson(reader); } else if ("provisioningState".equals(fieldName)) { deserializedAfdOriginGroupProperties.provisioningState = AfdProvisioningState.fromString(reader.getString()); diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdOriginGroupUpdatePropertiesParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdOriginGroupUpdatePropertiesParameters.java index e06f74fa0b17..67bf581f6a5e 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdOriginGroupUpdatePropertiesParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdOriginGroupUpdatePropertiesParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent.models; @@ -12,13 +12,14 @@ import com.azure.resourcemanager.cdn.models.EnabledState; import com.azure.resourcemanager.cdn.models.HealthProbeParameters; import com.azure.resourcemanager.cdn.models.LoadBalancingSettingsParameters; +import com.azure.resourcemanager.cdn.models.OriginAuthenticationProperties; import java.io.IOException; /** * The JSON object that contains the properties of the origin group. */ @Fluent -public class AfdOriginGroupUpdatePropertiesParameters +public final class AfdOriginGroupUpdatePropertiesParameters implements JsonSerializable { /* * The name of the profile which holds the origin group. @@ -46,6 +47,11 @@ public class AfdOriginGroupUpdatePropertiesParameters */ private EnabledState sessionAffinityState; + /* + * Authentication settings for origin in origin group. + */ + private OriginAuthenticationProperties authentication; + /** * Creates an instance of AfdOriginGroupUpdatePropertiesParameters class. */ @@ -61,17 +67,6 @@ public String profileName() { return this.profileName; } - /** - * Set the profileName property: The name of the profile which holds the origin group. - * - * @param profileName the profileName value to set. - * @return the AfdOriginGroupUpdatePropertiesParameters object itself. - */ - AfdOriginGroupUpdatePropertiesParameters withProfileName(String profileName) { - this.profileName = profileName; - return this; - } - /** * Get the loadBalancingSettings property: Load balancing settings for a backend pool. * @@ -164,6 +159,26 @@ public AfdOriginGroupUpdatePropertiesParameters withSessionAffinityState(Enabled return this; } + /** + * Get the authentication property: Authentication settings for origin in origin group. + * + * @return the authentication value. + */ + public OriginAuthenticationProperties authentication() { + return this.authentication; + } + + /** + * Set the authentication property: Authentication settings for origin in origin group. + * + * @param authentication the authentication value to set. + * @return the AfdOriginGroupUpdatePropertiesParameters object itself. + */ + public AfdOriginGroupUpdatePropertiesParameters withAuthentication(OriginAuthenticationProperties authentication) { + this.authentication = authentication; + return this; + } + /** * Validates the instance. * @@ -176,6 +191,9 @@ public void validate() { if (healthProbeSettings() != null) { healthProbeSettings().validate(); } + if (authentication() != null) { + authentication().validate(); + } } /** @@ -190,6 +208,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { this.trafficRestorationTimeToHealedOrNewEndpointsInMinutes); jsonWriter.writeStringField("sessionAffinityState", this.sessionAffinityState == null ? null : this.sessionAffinityState.toString()); + jsonWriter.writeJsonField("authentication", this.authentication); return jsonWriter.writeEndObject(); } @@ -223,6 +242,9 @@ public static AfdOriginGroupUpdatePropertiesParameters fromJson(JsonReader jsonR } else if ("sessionAffinityState".equals(fieldName)) { deserializedAfdOriginGroupUpdatePropertiesParameters.sessionAffinityState = EnabledState.fromString(reader.getString()); + } else if ("authentication".equals(fieldName)) { + deserializedAfdOriginGroupUpdatePropertiesParameters.authentication + = OriginAuthenticationProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdOriginInner.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdOriginInner.java index 577a59b12c60..5e78eac949eb 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdOriginInner.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdOriginInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent.models; @@ -13,6 +13,7 @@ import com.azure.resourcemanager.cdn.models.AfdProvisioningState; import com.azure.resourcemanager.cdn.models.DeploymentStatus; import com.azure.resourcemanager.cdn.models.EnabledState; +import com.azure.resourcemanager.cdn.models.OriginCapacityResourceProperties; import com.azure.resourcemanager.cdn.models.ResourceReference; import com.azure.resourcemanager.cdn.models.SharedPrivateLinkResourceProperties; import java.io.IOException; @@ -30,7 +31,7 @@ public final class AfdOriginInner extends ProxyResource { private AfdOriginProperties innerProperties; /* - * Read only system data + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ private SystemData systemData; @@ -65,7 +66,7 @@ private AfdOriginProperties innerProperties() { } /** - * Get the systemData property: Read only system data. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -103,24 +104,6 @@ public String id() { return this.id; } - /** - * Get the provisioningState property: Provisioning status. - * - * @return the provisioningState value. - */ - public AfdProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the deploymentStatus property: The deploymentStatus property. - * - * @return the deploymentStatus value. - */ - public DeploymentStatus deploymentStatus() { - return this.innerProperties() == null ? null : this.innerProperties().deploymentStatus(); - } - /** * Get the originGroupName property: The name of the origin group which contains this origin. * @@ -326,6 +309,29 @@ public AfdOriginInner withSharedPrivateLinkResource(SharedPrivateLinkResourcePro return this; } + /** + * Get the originCapacityResource property: Origin capacity settings for an origin. + * + * @return the originCapacityResource value. + */ + public OriginCapacityResourceProperties originCapacityResource() { + return this.innerProperties() == null ? null : this.innerProperties().originCapacityResource(); + } + + /** + * Set the originCapacityResource property: Origin capacity settings for an origin. + * + * @param originCapacityResource the originCapacityResource value to set. + * @return the AfdOriginInner object itself. + */ + public AfdOriginInner withOriginCapacityResource(OriginCapacityResourceProperties originCapacityResource) { + if (this.innerProperties() == null) { + this.innerProperties = new AfdOriginProperties(); + } + this.innerProperties().withOriginCapacityResource(originCapacityResource); + return this; + } + /** * Get the enabledState property: Whether to enable health probes to be made against backends defined under * backendPools. Health probes can only be disabled if there is a single enabled backend in single enabled backend @@ -376,6 +382,24 @@ public AfdOriginInner withEnforceCertificateNameCheck(Boolean enforceCertificate return this; } + /** + * Get the provisioningState property: Provisioning status. + * + * @return the provisioningState value. + */ + public AfdProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the deploymentStatus property: The deploymentStatus property. + * + * @return the deploymentStatus value. + */ + public DeploymentStatus deploymentStatus() { + return this.innerProperties() == null ? null : this.innerProperties().deploymentStatus(); + } + /** * Validates the instance. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdOriginProperties.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdOriginProperties.java index ac8a4aaf58cf..7361d3e7a308 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdOriginProperties.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdOriginProperties.java @@ -1,16 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent.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 com.azure.resourcemanager.cdn.models.AfdProvisioningState; import com.azure.resourcemanager.cdn.models.DeploymentStatus; import com.azure.resourcemanager.cdn.models.EnabledState; +import com.azure.resourcemanager.cdn.models.OriginCapacityResourceProperties; import com.azure.resourcemanager.cdn.models.ResourceReference; import com.azure.resourcemanager.cdn.models.SharedPrivateLinkResourceProperties; import java.io.IOException; @@ -19,7 +21,72 @@ * The JSON object that contains the properties of the origin. */ @Fluent -public final class AfdOriginProperties extends AfdOriginUpdatePropertiesParameters { +public final class AfdOriginProperties implements JsonSerializable { + /* + * The name of the origin group which contains this origin. + */ + private String originGroupName; + + /* + * Resource reference to the Azure origin resource. + */ + private ResourceReference azureOrigin; + + /* + * The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique + * across all origins in an endpoint. + */ + private String hostname; + + /* + * The value of the HTTP port. Must be between 1 and 65535. + */ + private Integer httpPort; + + /* + * The value of the HTTPS port. Must be between 1 and 65535. + */ + private Integer httpsPort; + + /* + * The host header value sent to the origin with each request. If you leave this blank, the request hostname + * determines this value. Azure Front Door origins, such as Web Apps, Blob Storage, and Cloud Services require this + * host header value to match the origin hostname by default. This overrides the host header defined at Endpoint + */ + private String originHostHeader; + + /* + * Priority of origin in given origin group for load balancing. Higher priorities will not be used for load + * balancing if any lower priority origin is healthy.Must be between 1 and 5 + */ + private Integer priority; + + /* + * Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + */ + private Integer weight; + + /* + * The properties of the private link resource for private origin. + */ + private SharedPrivateLinkResourceProperties sharedPrivateLinkResource; + + /* + * Origin capacity settings for an origin + */ + private OriginCapacityResourceProperties originCapacityResource; + + /* + * Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be + * disabled if there is a single enabled backend in single enabled backend pool. + */ + private EnabledState enabledState; + + /* + * Whether to enable certificate name check at origin level + */ + private Boolean enforceCertificateNameCheck; + /* * Provisioning status */ @@ -30,11 +97,6 @@ public final class AfdOriginProperties extends AfdOriginUpdatePropertiesParamete */ private DeploymentStatus deploymentStatus; - /* - * The name of the origin group which contains this origin. - */ - private String originGroupName; - /** * Creates an instance of AfdOriginProperties class. */ @@ -42,132 +104,284 @@ public AfdOriginProperties() { } /** - * Get the provisioningState property: Provisioning status. + * Get the originGroupName property: The name of the origin group which contains this origin. * - * @return the provisioningState value. + * @return the originGroupName value. */ - public AfdProvisioningState provisioningState() { - return this.provisioningState; + public String originGroupName() { + return this.originGroupName; } /** - * Get the deploymentStatus property: The deploymentStatus property. + * Get the azureOrigin property: Resource reference to the Azure origin resource. * - * @return the deploymentStatus value. + * @return the azureOrigin value. */ - public DeploymentStatus deploymentStatus() { - return this.deploymentStatus; + public ResourceReference azureOrigin() { + return this.azureOrigin; } /** - * Get the originGroupName property: The name of the origin group which contains this origin. + * Set the azureOrigin property: Resource reference to the Azure origin resource. * - * @return the originGroupName value. + * @param azureOrigin the azureOrigin value to set. + * @return the AfdOriginProperties object itself. */ - @Override - public String originGroupName() { - return this.originGroupName; + public AfdOriginProperties withAzureOrigin(ResourceReference azureOrigin) { + this.azureOrigin = azureOrigin; + return this; } /** - * {@inheritDoc} + * Get the hostname property: The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are + * supported.This should be unique across all origins in an endpoint. + * + * @return the hostname value. */ - @Override - public AfdOriginProperties withAzureOrigin(ResourceReference azureOrigin) { - super.withAzureOrigin(azureOrigin); - return this; + public String hostname() { + return this.hostname; } /** - * {@inheritDoc} + * Set the hostname property: The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are + * supported.This should be unique across all origins in an endpoint. + * + * @param hostname the hostname value to set. + * @return the AfdOriginProperties object itself. */ - @Override public AfdOriginProperties withHostname(String hostname) { - super.withHostname(hostname); + this.hostname = hostname; return this; } /** - * {@inheritDoc} + * Get the httpPort property: The value of the HTTP port. Must be between 1 and 65535. + * + * @return the httpPort value. + */ + public Integer httpPort() { + return this.httpPort; + } + + /** + * Set the httpPort property: The value of the HTTP port. Must be between 1 and 65535. + * + * @param httpPort the httpPort value to set. + * @return the AfdOriginProperties object itself. */ - @Override public AfdOriginProperties withHttpPort(Integer httpPort) { - super.withHttpPort(httpPort); + this.httpPort = httpPort; return this; } /** - * {@inheritDoc} + * Get the httpsPort property: The value of the HTTPS port. Must be between 1 and 65535. + * + * @return the httpsPort value. + */ + public Integer httpsPort() { + return this.httpsPort; + } + + /** + * Set the httpsPort property: The value of the HTTPS port. Must be between 1 and 65535. + * + * @param httpsPort the httpsPort value to set. + * @return the AfdOriginProperties object itself. */ - @Override public AfdOriginProperties withHttpsPort(Integer httpsPort) { - super.withHttpsPort(httpsPort); + this.httpsPort = httpsPort; return this; } /** - * {@inheritDoc} + * Get the originHostHeader property: The host header value sent to the origin with each request. If you leave this + * blank, the request hostname determines this value. Azure Front Door origins, such as Web Apps, Blob Storage, and + * Cloud Services require this host header value to match the origin hostname by default. This overrides the host + * header defined at Endpoint. + * + * @return the originHostHeader value. + */ + public String originHostHeader() { + return this.originHostHeader; + } + + /** + * Set the originHostHeader property: The host header value sent to the origin with each request. If you leave this + * blank, the request hostname determines this value. Azure Front Door origins, such as Web Apps, Blob Storage, and + * Cloud Services require this host header value to match the origin hostname by default. This overrides the host + * header defined at Endpoint. + * + * @param originHostHeader the originHostHeader value to set. + * @return the AfdOriginProperties object itself. */ - @Override public AfdOriginProperties withOriginHostHeader(String originHostHeader) { - super.withOriginHostHeader(originHostHeader); + this.originHostHeader = originHostHeader; return this; } /** - * {@inheritDoc} + * Get the priority property: Priority of origin in given origin group for load balancing. Higher priorities will + * not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5. + * + * @return the priority value. + */ + public Integer priority() { + return this.priority; + } + + /** + * Set the priority property: Priority of origin in given origin group for load balancing. Higher priorities will + * not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5. + * + * @param priority the priority value to set. + * @return the AfdOriginProperties object itself. */ - @Override public AfdOriginProperties withPriority(Integer priority) { - super.withPriority(priority); + this.priority = priority; return this; } /** - * {@inheritDoc} + * Get the weight property: Weight of the origin in given origin group for load balancing. Must be between 1 and + * 1000. + * + * @return the weight value. + */ + public Integer weight() { + return this.weight; + } + + /** + * Set the weight property: Weight of the origin in given origin group for load balancing. Must be between 1 and + * 1000. + * + * @param weight the weight value to set. + * @return the AfdOriginProperties object itself. */ - @Override public AfdOriginProperties withWeight(Integer weight) { - super.withWeight(weight); + this.weight = weight; return this; } /** - * {@inheritDoc} + * Get the sharedPrivateLinkResource property: The properties of the private link resource for private origin. + * + * @return the sharedPrivateLinkResource value. + */ + public SharedPrivateLinkResourceProperties sharedPrivateLinkResource() { + return this.sharedPrivateLinkResource; + } + + /** + * Set the sharedPrivateLinkResource property: The properties of the private link resource for private origin. + * + * @param sharedPrivateLinkResource the sharedPrivateLinkResource value to set. + * @return the AfdOriginProperties object itself. */ - @Override public AfdOriginProperties withSharedPrivateLinkResource(SharedPrivateLinkResourceProperties sharedPrivateLinkResource) { - super.withSharedPrivateLinkResource(sharedPrivateLinkResource); + this.sharedPrivateLinkResource = sharedPrivateLinkResource; return this; } /** - * {@inheritDoc} + * Get the originCapacityResource property: Origin capacity settings for an origin. + * + * @return the originCapacityResource value. + */ + public OriginCapacityResourceProperties originCapacityResource() { + return this.originCapacityResource; + } + + /** + * Set the originCapacityResource property: Origin capacity settings for an origin. + * + * @param originCapacityResource the originCapacityResource value to set. + * @return the AfdOriginProperties object itself. + */ + public AfdOriginProperties withOriginCapacityResource(OriginCapacityResourceProperties originCapacityResource) { + this.originCapacityResource = originCapacityResource; + return this; + } + + /** + * Get the enabledState property: Whether to enable health probes to be made against backends defined under + * backendPools. Health probes can only be disabled if there is a single enabled backend in single enabled backend + * pool. + * + * @return the enabledState value. + */ + public EnabledState enabledState() { + return this.enabledState; + } + + /** + * Set the enabledState property: Whether to enable health probes to be made against backends defined under + * backendPools. Health probes can only be disabled if there is a single enabled backend in single enabled backend + * pool. + * + * @param enabledState the enabledState value to set. + * @return the AfdOriginProperties object itself. */ - @Override public AfdOriginProperties withEnabledState(EnabledState enabledState) { - super.withEnabledState(enabledState); + this.enabledState = enabledState; return this; } /** - * {@inheritDoc} + * Get the enforceCertificateNameCheck property: Whether to enable certificate name check at origin level. + * + * @return the enforceCertificateNameCheck value. + */ + public Boolean enforceCertificateNameCheck() { + return this.enforceCertificateNameCheck; + } + + /** + * Set the enforceCertificateNameCheck property: Whether to enable certificate name check at origin level. + * + * @param enforceCertificateNameCheck the enforceCertificateNameCheck value to set. + * @return the AfdOriginProperties object itself. */ - @Override public AfdOriginProperties withEnforceCertificateNameCheck(Boolean enforceCertificateNameCheck) { - super.withEnforceCertificateNameCheck(enforceCertificateNameCheck); + this.enforceCertificateNameCheck = enforceCertificateNameCheck; return this; } + /** + * Get the provisioningState property: Provisioning status. + * + * @return the provisioningState value. + */ + public AfdProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the deploymentStatus property: The deploymentStatus property. + * + * @return the deploymentStatus value. + */ + public DeploymentStatus deploymentStatus() { + return this.deploymentStatus; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ - @Override public void validate() { - super.validate(); + if (azureOrigin() != null) { + azureOrigin().validate(); + } + if (sharedPrivateLinkResource() != null) { + sharedPrivateLinkResource().validate(); + } + if (originCapacityResource() != null) { + originCapacityResource().validate(); + } } /** @@ -176,16 +390,17 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("azureOrigin", azureOrigin()); - jsonWriter.writeStringField("hostName", hostname()); - jsonWriter.writeNumberField("httpPort", httpPort()); - jsonWriter.writeNumberField("httpsPort", httpsPort()); - jsonWriter.writeStringField("originHostHeader", originHostHeader()); - jsonWriter.writeNumberField("priority", priority()); - jsonWriter.writeNumberField("weight", weight()); - jsonWriter.writeJsonField("sharedPrivateLinkResource", sharedPrivateLinkResource()); - jsonWriter.writeStringField("enabledState", enabledState() == null ? null : enabledState().toString()); - jsonWriter.writeBooleanField("enforceCertificateNameCheck", enforceCertificateNameCheck()); + jsonWriter.writeJsonField("azureOrigin", this.azureOrigin); + jsonWriter.writeStringField("hostName", this.hostname); + jsonWriter.writeNumberField("httpPort", this.httpPort); + jsonWriter.writeNumberField("httpsPort", this.httpsPort); + jsonWriter.writeStringField("originHostHeader", this.originHostHeader); + jsonWriter.writeNumberField("priority", this.priority); + jsonWriter.writeNumberField("weight", this.weight); + jsonWriter.writeJsonField("sharedPrivateLinkResource", this.sharedPrivateLinkResource); + jsonWriter.writeJsonField("originCapacityResource", this.originCapacityResource); + jsonWriter.writeStringField("enabledState", this.enabledState == null ? null : this.enabledState.toString()); + jsonWriter.writeBooleanField("enforceCertificateNameCheck", this.enforceCertificateNameCheck); return jsonWriter.writeEndObject(); } @@ -207,27 +422,30 @@ public static AfdOriginProperties fromJson(JsonReader jsonReader) throws IOExcep if ("originGroupName".equals(fieldName)) { deserializedAfdOriginProperties.originGroupName = reader.getString(); } else if ("azureOrigin".equals(fieldName)) { - deserializedAfdOriginProperties.withAzureOrigin(ResourceReference.fromJson(reader)); + deserializedAfdOriginProperties.azureOrigin = ResourceReference.fromJson(reader); } else if ("hostName".equals(fieldName)) { - deserializedAfdOriginProperties.withHostname(reader.getString()); + deserializedAfdOriginProperties.hostname = reader.getString(); } else if ("httpPort".equals(fieldName)) { - deserializedAfdOriginProperties.withHttpPort(reader.getNullable(JsonReader::getInt)); + deserializedAfdOriginProperties.httpPort = reader.getNullable(JsonReader::getInt); } else if ("httpsPort".equals(fieldName)) { - deserializedAfdOriginProperties.withHttpsPort(reader.getNullable(JsonReader::getInt)); + deserializedAfdOriginProperties.httpsPort = reader.getNullable(JsonReader::getInt); } else if ("originHostHeader".equals(fieldName)) { - deserializedAfdOriginProperties.withOriginHostHeader(reader.getString()); + deserializedAfdOriginProperties.originHostHeader = reader.getString(); } else if ("priority".equals(fieldName)) { - deserializedAfdOriginProperties.withPriority(reader.getNullable(JsonReader::getInt)); + deserializedAfdOriginProperties.priority = reader.getNullable(JsonReader::getInt); } else if ("weight".equals(fieldName)) { - deserializedAfdOriginProperties.withWeight(reader.getNullable(JsonReader::getInt)); + deserializedAfdOriginProperties.weight = reader.getNullable(JsonReader::getInt); } else if ("sharedPrivateLinkResource".equals(fieldName)) { - deserializedAfdOriginProperties - .withSharedPrivateLinkResource(SharedPrivateLinkResourceProperties.fromJson(reader)); + deserializedAfdOriginProperties.sharedPrivateLinkResource + = SharedPrivateLinkResourceProperties.fromJson(reader); + } else if ("originCapacityResource".equals(fieldName)) { + deserializedAfdOriginProperties.originCapacityResource + = OriginCapacityResourceProperties.fromJson(reader); } else if ("enabledState".equals(fieldName)) { - deserializedAfdOriginProperties.withEnabledState(EnabledState.fromString(reader.getString())); + deserializedAfdOriginProperties.enabledState = EnabledState.fromString(reader.getString()); } else if ("enforceCertificateNameCheck".equals(fieldName)) { - deserializedAfdOriginProperties - .withEnforceCertificateNameCheck(reader.getNullable(JsonReader::getBoolean)); + deserializedAfdOriginProperties.enforceCertificateNameCheck + = reader.getNullable(JsonReader::getBoolean); } else if ("provisioningState".equals(fieldName)) { deserializedAfdOriginProperties.provisioningState = AfdProvisioningState.fromString(reader.getString()); diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdOriginUpdatePropertiesParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdOriginUpdatePropertiesParameters.java index 47012566914e..03ea62b4d04d 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdOriginUpdatePropertiesParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdOriginUpdatePropertiesParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent.models; @@ -10,6 +10,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.cdn.models.EnabledState; +import com.azure.resourcemanager.cdn.models.OriginCapacityResourceProperties; import com.azure.resourcemanager.cdn.models.ResourceReference; import com.azure.resourcemanager.cdn.models.SharedPrivateLinkResourceProperties; import java.io.IOException; @@ -18,7 +19,8 @@ * The JSON object that contains the properties of the origin. */ @Fluent -public class AfdOriginUpdatePropertiesParameters implements JsonSerializable { +public final class AfdOriginUpdatePropertiesParameters + implements JsonSerializable { /* * The name of the origin group which contains this origin. */ @@ -68,6 +70,11 @@ public class AfdOriginUpdatePropertiesParameters implements JsonSerializable { /* * Flag that says if the profile can be migrated @@ -37,7 +37,7 @@ public final class CanMigrateProperties implements JsonSerializable errors() { return this.errors; } - /** - * Set the errors property: The errors property. - * - * @param errors the errors value to set. - * @return the CanMigrateProperties object itself. - */ - public CanMigrateProperties withErrors(List errors) { - this.errors = errors; - return this; - } - /** * Validates the instance. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/CanMigrateResultInner.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/CanMigrateResultInner.java index 93b7193d3d52..b7966768b777 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/CanMigrateResultInner.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/CanMigrateResultInner.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.cdn.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; @@ -17,7 +17,7 @@ /** * Result for canMigrate operation. */ -@Fluent +@Immutable public final class CanMigrateResultInner implements JsonSerializable { /* * Resource ID. @@ -37,7 +37,7 @@ public final class CanMigrateResultInner implements JsonSerializable errors() { return this.innerProperties() == null ? null : this.innerProperties().errors(); } - /** - * Set the errors property: The errors property. - * - * @param errors the errors value to set. - * @return the CanMigrateResultInner object itself. - */ - public CanMigrateResultInner withErrors(List errors) { - if (this.innerProperties() == null) { - this.innerProperties = new CanMigrateProperties(); - } - this.innerProperties().withErrors(errors); - return this; - } - /** * Validates the instance. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/CdnWebApplicationFirewallPolicyInner.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/CdnWebApplicationFirewallPolicyInner.java index 347bb069521a..e10eb0e6751f 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/CdnWebApplicationFirewallPolicyInner.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/CdnWebApplicationFirewallPolicyInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent.models; @@ -44,7 +44,7 @@ public final class CdnWebApplicationFirewallPolicyInner extends Resource { private Sku sku; /* - * Read only system data + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ private SystemData systemData; @@ -121,7 +121,7 @@ public CdnWebApplicationFirewallPolicyInner withSku(Sku sku) { } /** - * Get the systemData property: Read only system data. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/CdnWebApplicationFirewallPolicyProperties.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/CdnWebApplicationFirewallPolicyProperties.java index 3bac945b738b..5327b9f387cc 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/CdnWebApplicationFirewallPolicyProperties.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/CdnWebApplicationFirewallPolicyProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/CheckEndpointNameAvailabilityOutputInner.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/CheckEndpointNameAvailabilityOutputInner.java index 2210b48821e4..66cc6ad124d9 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/CheckEndpointNameAvailabilityOutputInner.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/CheckEndpointNameAvailabilityOutputInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent.models; @@ -41,7 +41,7 @@ public final class CheckEndpointNameAvailabilityOutputInner /** * Creates an instance of CheckEndpointNameAvailabilityOutputInner class. */ - public CheckEndpointNameAvailabilityOutputInner() { + private CheckEndpointNameAvailabilityOutputInner() { } /** diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/CheckNameAvailabilityOutputInner.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/CheckNameAvailabilityOutputInner.java index 43cd49616dad..43ff9de63c87 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/CheckNameAvailabilityOutputInner.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/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.cdn.fluent.models; @@ -34,7 +34,7 @@ public final class CheckNameAvailabilityOutputInner implements JsonSerializable< /** * Creates an instance of CheckNameAvailabilityOutputInner class. */ - public CheckNameAvailabilityOutputInner() { + private CheckNameAvailabilityOutputInner() { } /** diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/CompareDeploymentVersionsResponseInner.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/CompareDeploymentVersionsResponseInner.java new file mode 100644 index 000000000000..73ac26f33084 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/CompareDeploymentVersionsResponseInner.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.cdn.models.DeploymentVersionChange; +import java.io.IOException; +import java.util.List; + +/** + * compare deployment versions response. + */ +@Immutable +public final class CompareDeploymentVersionsResponseInner + implements JsonSerializable { + /* + * The difference between two deployment versions + */ + private List value; + + /** + * Creates an instance of CompareDeploymentVersionsResponseInner class. + */ + private CompareDeploymentVersionsResponseInner() { + } + + /** + * Get the value property: The difference between two deployment versions. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model CompareDeploymentVersionsResponseInner")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CompareDeploymentVersionsResponseInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CompareDeploymentVersionsResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CompareDeploymentVersionsResponseInner 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 CompareDeploymentVersionsResponseInner. + */ + public static CompareDeploymentVersionsResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CompareDeploymentVersionsResponseInner deserializedCompareDeploymentVersionsResponseInner + = new CompareDeploymentVersionsResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> DeploymentVersionChange.fromJson(reader1)); + deserializedCompareDeploymentVersionsResponseInner.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedCompareDeploymentVersionsResponseInner; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/ContinentsResponseInner.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/ContinentsResponseInner.java index 4601dad2003e..e6e31bcbc85b 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/ContinentsResponseInner.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/ContinentsResponseInner.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.cdn.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; @@ -17,7 +17,7 @@ /** * Continents Response. */ -@Fluent +@Immutable public final class ContinentsResponseInner implements JsonSerializable { /* * The continents property. @@ -32,7 +32,7 @@ public final class ContinentsResponseInner implements JsonSerializable continents() { return this.continents; } - /** - * Set the continents property: The continents property. - * - * @param continents the continents value to set. - * @return the ContinentsResponseInner object itself. - */ - public ContinentsResponseInner withContinents(List continents) { - this.continents = continents; - return this; - } - /** * Get the countryOrRegions property: The countryOrRegions property. * @@ -64,17 +53,6 @@ public List countryOrRegions() { return this.countryOrRegions; } - /** - * Set the countryOrRegions property: The countryOrRegions property. - * - * @param countryOrRegions the countryOrRegions value to set. - * @return the ContinentsResponseInner object itself. - */ - public ContinentsResponseInner withCountryOrRegions(List countryOrRegions) { - this.countryOrRegions = countryOrRegions; - return this; - } - /** * Validates the instance. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/CustomDomainInner.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/CustomDomainInner.java index e8fd7d22b28a..92db6bbec4e6 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/CustomDomainInner.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/CustomDomainInner.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.cdn.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.json.JsonReader; @@ -20,7 +20,7 @@ * Friendly domain name mapping to the endpoint hostname that the customer provides for branding purposes, e.g. * www.contoso.com. */ -@Fluent +@Immutable public final class CustomDomainInner extends ProxyResource { /* * The JSON object that contains the properties of the custom domain to create. @@ -28,7 +28,7 @@ public final class CustomDomainInner extends ProxyResource { private CustomDomainProperties innerProperties; /* - * Read only system data + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ private SystemData systemData; @@ -50,7 +50,7 @@ public final class CustomDomainInner extends ProxyResource { /** * Creates an instance of CustomDomainInner class. */ - public CustomDomainInner() { + private CustomDomainInner() { } /** @@ -63,7 +63,7 @@ private CustomDomainProperties innerProperties() { } /** - * Get the systemData property: Read only system data. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -110,20 +110,6 @@ public String hostname() { return this.innerProperties() == null ? null : this.innerProperties().hostname(); } - /** - * Set the hostname property: The host name of the custom domain. Must be a domain name. - * - * @param hostname the hostname value to set. - * @return the CustomDomainInner object itself. - */ - public CustomDomainInner withHostname(String hostname) { - if (this.innerProperties() == null) { - this.innerProperties = new CustomDomainProperties(); - } - this.innerProperties().withHostname(hostname); - return this; - } - /** * Get the resourceState property: Resource status of the custom domain. * @@ -161,20 +147,6 @@ public CustomDomainHttpsParameters customHttpsParameters() { return this.innerProperties() == null ? null : this.innerProperties().customHttpsParameters(); } - /** - * Set the customHttpsParameters property: Certificate parameters for securing custom HTTPS. - * - * @param customHttpsParameters the customHttpsParameters value to set. - * @return the CustomDomainInner object itself. - */ - public CustomDomainInner withCustomHttpsParameters(CustomDomainHttpsParameters customHttpsParameters) { - if (this.innerProperties() == null) { - this.innerProperties = new CustomDomainProperties(); - } - this.innerProperties().withCustomHttpsParameters(customHttpsParameters); - return this; - } - /** * Get the validationData property: Special validation or data may be required when delivering CDN to some regions * due to local compliance reasons. E.g. ICP license number of a custom domain is required to deliver content in @@ -186,22 +158,6 @@ public String validationData() { return this.innerProperties() == null ? null : this.innerProperties().validationData(); } - /** - * Set the validationData property: Special validation or data may be required when delivering CDN to some regions - * due to local compliance reasons. E.g. ICP license number of a custom domain is required to deliver content in - * China. - * - * @param validationData the validationData value to set. - * @return the CustomDomainInner object itself. - */ - public CustomDomainInner withValidationData(String validationData) { - if (this.innerProperties() == null) { - this.innerProperties = new CustomDomainProperties(); - } - this.innerProperties().withValidationData(validationData); - return this; - } - /** * Get the provisioningState property: Provisioning status of Custom Https of the custom domain. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/CustomDomainProperties.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/CustomDomainProperties.java index 09da233c1059..3824aaa72735 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/CustomDomainProperties.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/CustomDomainProperties.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.cdn.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -19,7 +19,7 @@ /** * The JSON object that contains the properties of the custom domain to create. */ -@Fluent +@Immutable public final class CustomDomainProperties implements JsonSerializable { /* * The host name of the custom domain. Must be a domain name. @@ -60,7 +60,7 @@ public final class CustomDomainProperties implements JsonSerializable { /* * The host name of the custom domain. Must be a domain name. @@ -31,7 +31,7 @@ public final class DeepCreatedCustomDomainProperties implements JsonSerializable /** * Creates an instance of DeepCreatedCustomDomainProperties class. */ - public DeepCreatedCustomDomainProperties() { + private DeepCreatedCustomDomainProperties() { } /** @@ -43,17 +43,6 @@ public String hostname() { return this.hostname; } - /** - * Set the hostname property: The host name of the custom domain. Must be a domain name. - * - * @param hostname the hostname value to set. - * @return the DeepCreatedCustomDomainProperties object itself. - */ - public DeepCreatedCustomDomainProperties withHostname(String hostname) { - this.hostname = hostname; - return this; - } - /** * Get the validationData property: Special validation or data may be required when delivering CDN to some regions * due to local compliance reasons. E.g. ICP license number of a custom domain is required to deliver content in @@ -65,19 +54,6 @@ public String validationData() { return this.validationData; } - /** - * Set the validationData property: Special validation or data may be required when delivering CDN to some regions - * due to local compliance reasons. E.g. ICP license number of a custom domain is required to deliver content in - * China. - * - * @param validationData the validationData value to set. - * @return the DeepCreatedCustomDomainProperties object itself. - */ - public DeepCreatedCustomDomainProperties withValidationData(String validationData) { - this.validationData = validationData; - return this; - } - /** * Validates the instance. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/DeepCreatedOriginGroupProperties.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/DeepCreatedOriginGroupProperties.java index dd390fc02816..c58d6751374f 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/DeepCreatedOriginGroupProperties.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/DeepCreatedOriginGroupProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/DeepCreatedOriginProperties.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/DeepCreatedOriginProperties.java index 68e2bf0eeb92..41d8405f7b16 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/DeepCreatedOriginProperties.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/DeepCreatedOriginProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/DeploymentVersionInner.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/DeploymentVersionInner.java new file mode 100644 index 000000000000..d9fa1c822384 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/DeploymentVersionInner.java @@ -0,0 +1,223 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.cdn.models.AfdProvisioningState; +import com.azure.resourcemanager.cdn.models.ApprovalStatus; +import com.azure.resourcemanager.cdn.models.DeploymentStages; +import com.azure.resourcemanager.cdn.models.DeploymentStatus; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * Deployment version object. + */ +@Immutable +public final class DeploymentVersionInner extends ProxyResource { + /* + * The JSON object that contains the properties of the deployment version. + */ + private DeploymentVersionProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of DeploymentVersionInner class. + */ + private DeploymentVersionInner() { + } + + /** + * Get the innerProperties property: The JSON object that contains the properties of the deployment version. + * + * @return the innerProperties value. + */ + private DeploymentVersionProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the description property: The description property. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Get the provisioningState property: Provisioning status. + * + * @return the provisioningState value. + */ + public AfdProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the deploymentStatus property: The deploymentStatus property. + * + * @return the deploymentStatus value. + */ + public DeploymentStatus deploymentStatus() { + return this.innerProperties() == null ? null : this.innerProperties().deploymentStatus(); + } + + /** + * Get the createdAt property: The timestamp of deployment version creation (UTC). + * + * @return the createdAt value. + */ + public OffsetDateTime createdAt() { + return this.innerProperties() == null ? null : this.innerProperties().createdAt(); + } + + /** + * Get the approvedAt property: The timestamp of deployment version approval (UTC). + * + * @return the approvedAt value. + */ + public OffsetDateTime approvedAt() { + return this.innerProperties() == null ? null : this.innerProperties().approvedAt(); + } + + /** + * Get the approvalStatus property: The approvalStatus property. + * + * @return the approvalStatus value. + */ + public ApprovalStatus approvalStatus() { + return this.innerProperties() == null ? null : this.innerProperties().approvalStatus(); + } + + /** + * Get the stages property: The preview and production deployment status of the deployment version under the + * profile. + * + * @return the stages value. + */ + public DeploymentStages stages() { + return this.innerProperties() == null ? null : this.innerProperties().stages(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentVersionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentVersionInner 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 DeploymentVersionInner. + */ + public static DeploymentVersionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentVersionInner deserializedDeploymentVersionInner = new DeploymentVersionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedDeploymentVersionInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedDeploymentVersionInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedDeploymentVersionInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedDeploymentVersionInner.innerProperties = DeploymentVersionProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedDeploymentVersionInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentVersionInner; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/DeploymentVersionProperties.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/DeploymentVersionProperties.java new file mode 100644 index 000000000000..ee569b7daee4 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/DeploymentVersionProperties.java @@ -0,0 +1,193 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.cdn.models.AfdProvisioningState; +import com.azure.resourcemanager.cdn.models.ApprovalStatus; +import com.azure.resourcemanager.cdn.models.DeploymentStages; +import com.azure.resourcemanager.cdn.models.DeploymentStatus; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * The JSON object that contains the properties of the deployment version. + */ +@Immutable +public final class DeploymentVersionProperties implements JsonSerializable { + /* + * The description property. + */ + private String description; + + /* + * Provisioning status + */ + private AfdProvisioningState provisioningState; + + /* + * The deploymentStatus property. + */ + private DeploymentStatus deploymentStatus; + + /* + * The timestamp of deployment version creation (UTC) + */ + private OffsetDateTime createdAt; + + /* + * The timestamp of deployment version approval (UTC) + */ + private OffsetDateTime approvedAt; + + /* + * The approvalStatus property. + */ + private ApprovalStatus approvalStatus; + + /* + * The preview and production deployment status of the deployment version under the profile + */ + private DeploymentStages stages; + + /** + * Creates an instance of DeploymentVersionProperties class. + */ + private DeploymentVersionProperties() { + } + + /** + * Get the description property: The description property. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Get the provisioningState property: Provisioning status. + * + * @return the provisioningState value. + */ + public AfdProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the deploymentStatus property: The deploymentStatus property. + * + * @return the deploymentStatus value. + */ + public DeploymentStatus deploymentStatus() { + return this.deploymentStatus; + } + + /** + * Get the createdAt property: The timestamp of deployment version creation (UTC). + * + * @return the createdAt value. + */ + public OffsetDateTime createdAt() { + return this.createdAt; + } + + /** + * Get the approvedAt property: The timestamp of deployment version approval (UTC). + * + * @return the approvedAt value. + */ + public OffsetDateTime approvedAt() { + return this.approvedAt; + } + + /** + * Get the approvalStatus property: The approvalStatus property. + * + * @return the approvalStatus value. + */ + public ApprovalStatus approvalStatus() { + return this.approvalStatus; + } + + /** + * Get the stages property: The preview and production deployment status of the deployment version under the + * profile. + * + * @return the stages value. + */ + public DeploymentStages stages() { + return this.stages; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (stages() != null) { + stages().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("description", this.description); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentVersionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentVersionProperties 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 DeploymentVersionProperties. + */ + public static DeploymentVersionProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentVersionProperties deserializedDeploymentVersionProperties = new DeploymentVersionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("description".equals(fieldName)) { + deserializedDeploymentVersionProperties.description = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedDeploymentVersionProperties.provisioningState + = AfdProvisioningState.fromString(reader.getString()); + } else if ("deploymentStatus".equals(fieldName)) { + deserializedDeploymentVersionProperties.deploymentStatus + = DeploymentStatus.fromString(reader.getString()); + } else if ("createdAt".equals(fieldName)) { + deserializedDeploymentVersionProperties.createdAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("approvedAt".equals(fieldName)) { + deserializedDeploymentVersionProperties.approvedAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("approvalStatus".equals(fieldName)) { + deserializedDeploymentVersionProperties.approvalStatus + = ApprovalStatus.fromString(reader.getString()); + } else if ("stages".equals(fieldName)) { + deserializedDeploymentVersionProperties.stages = DeploymentStages.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentVersionProperties; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/DeploymentVersionUpdateProperties.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/DeploymentVersionUpdateProperties.java new file mode 100644 index 000000000000..6ddda99a5829 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/DeploymentVersionUpdateProperties.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.fluent.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; + +/** + * Contains the properties of the deployment version. + */ +@Fluent +public final class DeploymentVersionUpdateProperties implements JsonSerializable { + /* + * The description property. + */ + private String description; + + /** + * Creates an instance of DeploymentVersionUpdateProperties class. + */ + public DeploymentVersionUpdateProperties() { + } + + /** + * Get the description property: The description property. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The description property. + * + * @param description the description value to set. + * @return the DeploymentVersionUpdateProperties object itself. + */ + public DeploymentVersionUpdateProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("description", this.description); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentVersionUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentVersionUpdateProperties 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 DeploymentVersionUpdateProperties. + */ + public static DeploymentVersionUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentVersionUpdateProperties deserializedDeploymentVersionUpdateProperties + = new DeploymentVersionUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("description".equals(fieldName)) { + deserializedDeploymentVersionUpdateProperties.description = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentVersionUpdateProperties; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/EdgeNodeInner.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/EdgeNodeInner.java index e9c75afce268..5d6c4b8ef574 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/EdgeNodeInner.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/EdgeNodeInner.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.cdn.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.json.JsonReader; @@ -17,7 +17,7 @@ /** * Edgenode is a global Point of Presence (POP) location used to deliver CDN content to end users. */ -@Fluent +@Immutable public final class EdgeNodeInner extends ProxyResource { /* * The JSON object that contains the properties required to create an edgenode. @@ -25,7 +25,7 @@ public final class EdgeNodeInner extends ProxyResource { private EdgeNodeProperties innerProperties; /* - * Read only system data + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ private SystemData systemData; @@ -47,7 +47,7 @@ public final class EdgeNodeInner extends ProxyResource { /** * Creates an instance of EdgeNodeInner class. */ - public EdgeNodeInner() { + private EdgeNodeInner() { } /** @@ -60,7 +60,7 @@ private EdgeNodeProperties innerProperties() { } /** - * Get the systemData property: Read only system data. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -107,20 +107,6 @@ public List ipAddressGroups() { return this.innerProperties() == null ? null : this.innerProperties().ipAddressGroups(); } - /** - * Set the ipAddressGroups property: List of ip address groups. - * - * @param ipAddressGroups the ipAddressGroups value to set. - * @return the EdgeNodeInner object itself. - */ - public EdgeNodeInner withIpAddressGroups(List ipAddressGroups) { - if (this.innerProperties() == null) { - this.innerProperties = new EdgeNodeProperties(); - } - this.innerProperties().withIpAddressGroups(ipAddressGroups); - return this; - } - /** * Validates the instance. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/EdgeNodeProperties.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/EdgeNodeProperties.java index 342529bc2d28..f37b4724fe70 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/EdgeNodeProperties.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/EdgeNodeProperties.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.cdn.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -17,7 +17,7 @@ /** * The JSON object that contains the properties required to create an edgenode. */ -@Fluent +@Immutable public final class EdgeNodeProperties implements JsonSerializable { /* * List of ip address groups. @@ -27,7 +27,7 @@ public final class EdgeNodeProperties implements JsonSerializable ipAddressGroups() { return this.ipAddressGroups; } - /** - * Set the ipAddressGroups property: List of ip address groups. - * - * @param ipAddressGroups the ipAddressGroups value to set. - * @return the EdgeNodeProperties object itself. - */ - public EdgeNodeProperties withIpAddressGroups(List ipAddressGroups) { - this.ipAddressGroups = ipAddressGroups; - return this; - } - /** * Validates the instance. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/EndpointInner.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/EndpointInner.java index 6fa2fef1153d..16bd176fa287 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/EndpointInner.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/EndpointInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent.models; @@ -38,7 +38,7 @@ public final class EndpointInner extends Resource { private EndpointProperties innerProperties; /* - * Read only system data + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ private SystemData systemData; @@ -73,7 +73,7 @@ private EndpointProperties innerProperties() { } /** - * Get the systemData property: Read only system data. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/EndpointProperties.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/EndpointProperties.java index 79b209599316..ab5f1b9e0f77 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/EndpointProperties.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/EndpointProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent.models; @@ -278,7 +278,6 @@ public EndpointProperties withWebApplicationFirewallPolicyLink( */ @Override public void validate() { - super.validate(); if (origins() == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Missing required property origins in model EndpointProperties")); @@ -291,6 +290,21 @@ public void validate() { if (customDomains() != null) { customDomains().forEach(e -> e.validate()); } + if (geoFilters() != null) { + geoFilters().forEach(e -> e.validate()); + } + if (defaultOriginGroup() != null) { + defaultOriginGroup().validate(); + } + if (urlSigningKeys() != null) { + urlSigningKeys().forEach(e -> e.validate()); + } + if (deliveryPolicy() != null) { + deliveryPolicy().validate(); + } + if (webApplicationFirewallPolicyLink() != null) { + webApplicationFirewallPolicyLink().validate(); + } } private static final ClientLogger LOGGER = new ClientLogger(EndpointProperties.class); diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/EndpointPropertiesUpdateParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/EndpointPropertiesUpdateParameters.java index f6432bbea69c..de87d5f7154f 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/EndpointPropertiesUpdateParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/EndpointPropertiesUpdateParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/KeyGroupInner.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/KeyGroupInner.java new file mode 100644 index 000000000000..36cb93d5fdf6 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/KeyGroupInner.java @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.cdn.models.AfdProvisioningState; +import com.azure.resourcemanager.cdn.models.DeploymentStatus; +import com.azure.resourcemanager.cdn.models.ResourceReference; +import java.io.IOException; +import java.util.List; + +/** + * Contains a list of references of UrlSigningKey type secret objects. + */ +@Fluent +public final class KeyGroupInner extends ProxyResource { + /* + * The JSON object that contains the properties of the key group to create. + */ + private KeyGroupProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of KeyGroupInner class. + */ + public KeyGroupInner() { + } + + /** + * Get the innerProperties property: The JSON object that contains the properties of the key group to create. + * + * @return the innerProperties value. + */ + private KeyGroupProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the keyReferences property: Names of UrlSigningKey type secret objects. + * + * @return the keyReferences value. + */ + public List keyReferences() { + return this.innerProperties() == null ? null : this.innerProperties().keyReferences(); + } + + /** + * Set the keyReferences property: Names of UrlSigningKey type secret objects. + * + * @param keyReferences the keyReferences value to set. + * @return the KeyGroupInner object itself. + */ + public KeyGroupInner withKeyReferences(List keyReferences) { + if (this.innerProperties() == null) { + this.innerProperties = new KeyGroupProperties(); + } + this.innerProperties().withKeyReferences(keyReferences); + return this; + } + + /** + * Get the provisioningState property: Provisioning status. + * + * @return the provisioningState value. + */ + public AfdProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the deploymentStatus property: The deploymentStatus property. + * + * @return the deploymentStatus value. + */ + public DeploymentStatus deploymentStatus() { + return this.innerProperties() == null ? null : this.innerProperties().deploymentStatus(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of KeyGroupInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of KeyGroupInner 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 KeyGroupInner. + */ + public static KeyGroupInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + KeyGroupInner deserializedKeyGroupInner = new KeyGroupInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedKeyGroupInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedKeyGroupInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedKeyGroupInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedKeyGroupInner.innerProperties = KeyGroupProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedKeyGroupInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedKeyGroupInner; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/KeyGroupProperties.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/KeyGroupProperties.java new file mode 100644 index 000000000000..2e269537f70e --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/KeyGroupProperties.java @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.fluent.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 com.azure.resourcemanager.cdn.models.AfdProvisioningState; +import com.azure.resourcemanager.cdn.models.DeploymentStatus; +import com.azure.resourcemanager.cdn.models.ResourceReference; +import java.io.IOException; +import java.util.List; + +/** + * The JSON object that contains the properties of the key group to create. + */ +@Fluent +public final class KeyGroupProperties implements JsonSerializable { + /* + * Names of UrlSigningKey type secret objects + */ + private List keyReferences; + + /* + * Provisioning status + */ + private AfdProvisioningState provisioningState; + + /* + * The deploymentStatus property. + */ + private DeploymentStatus deploymentStatus; + + /** + * Creates an instance of KeyGroupProperties class. + */ + public KeyGroupProperties() { + } + + /** + * Get the keyReferences property: Names of UrlSigningKey type secret objects. + * + * @return the keyReferences value. + */ + public List keyReferences() { + return this.keyReferences; + } + + /** + * Set the keyReferences property: Names of UrlSigningKey type secret objects. + * + * @param keyReferences the keyReferences value to set. + * @return the KeyGroupProperties object itself. + */ + public KeyGroupProperties withKeyReferences(List keyReferences) { + this.keyReferences = keyReferences; + return this; + } + + /** + * Get the provisioningState property: Provisioning status. + * + * @return the provisioningState value. + */ + public AfdProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the deploymentStatus property: The deploymentStatus property. + * + * @return the deploymentStatus value. + */ + public DeploymentStatus deploymentStatus() { + return this.deploymentStatus; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (keyReferences() != null) { + keyReferences().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("keyReferences", this.keyReferences, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of KeyGroupProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of KeyGroupProperties 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 KeyGroupProperties. + */ + public static KeyGroupProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + KeyGroupProperties deserializedKeyGroupProperties = new KeyGroupProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keyReferences".equals(fieldName)) { + List keyReferences + = reader.readArray(reader1 -> ResourceReference.fromJson(reader1)); + deserializedKeyGroupProperties.keyReferences = keyReferences; + } else if ("provisioningState".equals(fieldName)) { + deserializedKeyGroupProperties.provisioningState + = AfdProvisioningState.fromString(reader.getString()); + } else if ("deploymentStatus".equals(fieldName)) { + deserializedKeyGroupProperties.deploymentStatus = DeploymentStatus.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedKeyGroupProperties; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/KnowledgeSourceInner.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/KnowledgeSourceInner.java new file mode 100644 index 000000000000..c4b43de59cf7 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/KnowledgeSourceInner.java @@ -0,0 +1,270 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.cdn.models.KnowledgeSourceProvisioningState; +import com.azure.resourcemanager.cdn.models.KnowledgeSourceType; +import com.azure.resourcemanager.cdn.models.KnowledgeSourceUpdateFrequency; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * Defines a knowledge source resource for a web agent. + */ +@Fluent +public final class KnowledgeSourceInner extends ProxyResource { + /* + * Properties of the knowledge source. + */ + private KnowledgeSourceProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of KnowledgeSourceInner class. + */ + public KnowledgeSourceInner() { + } + + /** + * Get the innerProperties property: Properties of the knowledge source. + * + * @return the innerProperties value. + */ + private KnowledgeSourceProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the description property: Description of the knowledge source. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: Description of the knowledge source. + * + * @param description the description value to set. + * @return the KnowledgeSourceInner object itself. + */ + public KnowledgeSourceInner withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new KnowledgeSourceProperties(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Get the sourceType property: Format or origin of the knowledge source. + * + * @return the sourceType value. + */ + public KnowledgeSourceType sourceType() { + return this.innerProperties() == null ? null : this.innerProperties().sourceType(); + } + + /** + * Set the sourceType property: Format or origin of the knowledge source. + * + * @param sourceType the sourceType value to set. + * @return the KnowledgeSourceInner object itself. + */ + public KnowledgeSourceInner withSourceType(KnowledgeSourceType sourceType) { + if (this.innerProperties() == null) { + this.innerProperties = new KnowledgeSourceProperties(); + } + this.innerProperties().withSourceType(sourceType); + return this; + } + + /** + * Get the url property: Endpoint or location of the knowledge source. + * + * @return the url value. + */ + public String url() { + return this.innerProperties() == null ? null : this.innerProperties().url(); + } + + /** + * Set the url property: Endpoint or location of the knowledge source. + * + * @param url the url value to set. + * @return the KnowledgeSourceInner object itself. + */ + public KnowledgeSourceInner withUrl(String url) { + if (this.innerProperties() == null) { + this.innerProperties = new KnowledgeSourceProperties(); + } + this.innerProperties().withUrl(url); + return this; + } + + /** + * Get the updateFrequency property: Specifies the units of time for scheduling update intervals for the knowledge + * source. + * + * @return the updateFrequency value. + */ + public KnowledgeSourceUpdateFrequency updateFrequency() { + return this.innerProperties() == null ? null : this.innerProperties().updateFrequency(); + } + + /** + * Set the updateFrequency property: Specifies the units of time for scheduling update intervals for the knowledge + * source. + * + * @param updateFrequency the updateFrequency value to set. + * @return the KnowledgeSourceInner object itself. + */ + public KnowledgeSourceInner withUpdateFrequency(KnowledgeSourceUpdateFrequency updateFrequency) { + if (this.innerProperties() == null) { + this.innerProperties = new KnowledgeSourceProperties(); + } + this.innerProperties().withUpdateFrequency(updateFrequency); + return this; + } + + /** + * Get the lastRefreshedTime property: The last time the knowledge source was updated. + * + * @return the lastRefreshedTime value. + */ + public OffsetDateTime lastRefreshedTime() { + return this.innerProperties() == null ? null : this.innerProperties().lastRefreshedTime(); + } + + /** + * Get the provisioningState property: Provisioning status of the knowledge source. + * + * @return the provisioningState value. + */ + public KnowledgeSourceProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of KnowledgeSourceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of KnowledgeSourceInner 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 KnowledgeSourceInner. + */ + public static KnowledgeSourceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + KnowledgeSourceInner deserializedKnowledgeSourceInner = new KnowledgeSourceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedKnowledgeSourceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedKnowledgeSourceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedKnowledgeSourceInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedKnowledgeSourceInner.innerProperties = KnowledgeSourceProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedKnowledgeSourceInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedKnowledgeSourceInner; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/KnowledgeSourceProperties.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/KnowledgeSourceProperties.java new file mode 100644 index 000000000000..4a38f6bc9072 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/KnowledgeSourceProperties.java @@ -0,0 +1,234 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.cdn.models.KnowledgeSourceProvisioningState; +import com.azure.resourcemanager.cdn.models.KnowledgeSourceType; +import com.azure.resourcemanager.cdn.models.KnowledgeSourceUpdateFrequency; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * Defines properties of a knowledge source. + */ +@Fluent +public final class KnowledgeSourceProperties implements JsonSerializable { + /* + * Description of the knowledge source. + */ + private String description; + + /* + * Format or origin of the knowledge source. + */ + private KnowledgeSourceType sourceType; + + /* + * Endpoint or location of the knowledge source. + */ + private String url; + + /* + * Specifies the units of time for scheduling update intervals for the knowledge source. + */ + private KnowledgeSourceUpdateFrequency updateFrequency; + + /* + * The last time the knowledge source was updated. + */ + private OffsetDateTime lastRefreshedTime; + + /* + * Provisioning status of the knowledge source. + */ + private KnowledgeSourceProvisioningState provisioningState; + + /** + * Creates an instance of KnowledgeSourceProperties class. + */ + public KnowledgeSourceProperties() { + } + + /** + * Get the description property: Description of the knowledge source. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description of the knowledge source. + * + * @param description the description value to set. + * @return the KnowledgeSourceProperties object itself. + */ + public KnowledgeSourceProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the sourceType property: Format or origin of the knowledge source. + * + * @return the sourceType value. + */ + public KnowledgeSourceType sourceType() { + return this.sourceType; + } + + /** + * Set the sourceType property: Format or origin of the knowledge source. + * + * @param sourceType the sourceType value to set. + * @return the KnowledgeSourceProperties object itself. + */ + public KnowledgeSourceProperties withSourceType(KnowledgeSourceType sourceType) { + this.sourceType = sourceType; + return this; + } + + /** + * Get the url property: Endpoint or location of the knowledge source. + * + * @return the url value. + */ + public String url() { + return this.url; + } + + /** + * Set the url property: Endpoint or location of the knowledge source. + * + * @param url the url value to set. + * @return the KnowledgeSourceProperties object itself. + */ + public KnowledgeSourceProperties withUrl(String url) { + this.url = url; + return this; + } + + /** + * Get the updateFrequency property: Specifies the units of time for scheduling update intervals for the knowledge + * source. + * + * @return the updateFrequency value. + */ + public KnowledgeSourceUpdateFrequency updateFrequency() { + return this.updateFrequency; + } + + /** + * Set the updateFrequency property: Specifies the units of time for scheduling update intervals for the knowledge + * source. + * + * @param updateFrequency the updateFrequency value to set. + * @return the KnowledgeSourceProperties object itself. + */ + public KnowledgeSourceProperties withUpdateFrequency(KnowledgeSourceUpdateFrequency updateFrequency) { + this.updateFrequency = updateFrequency; + return this; + } + + /** + * Get the lastRefreshedTime property: The last time the knowledge source was updated. + * + * @return the lastRefreshedTime value. + */ + public OffsetDateTime lastRefreshedTime() { + return this.lastRefreshedTime; + } + + /** + * Get the provisioningState property: Provisioning status of the knowledge source. + * + * @return the provisioningState value. + */ + public KnowledgeSourceProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sourceType() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property sourceType in model KnowledgeSourceProperties")); + } + if (url() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property url in model KnowledgeSourceProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(KnowledgeSourceProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("sourceType", this.sourceType == null ? null : this.sourceType.toString()); + jsonWriter.writeStringField("url", this.url); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeStringField("updateFrequency", + this.updateFrequency == null ? null : this.updateFrequency.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of KnowledgeSourceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of KnowledgeSourceProperties 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 KnowledgeSourceProperties. + */ + public static KnowledgeSourceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + KnowledgeSourceProperties deserializedKnowledgeSourceProperties = new KnowledgeSourceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("sourceType".equals(fieldName)) { + deserializedKnowledgeSourceProperties.sourceType + = KnowledgeSourceType.fromString(reader.getString()); + } else if ("url".equals(fieldName)) { + deserializedKnowledgeSourceProperties.url = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedKnowledgeSourceProperties.description = reader.getString(); + } else if ("updateFrequency".equals(fieldName)) { + deserializedKnowledgeSourceProperties.updateFrequency + = KnowledgeSourceUpdateFrequency.fromString(reader.getString()); + } else if ("lastRefreshedTime".equals(fieldName)) { + deserializedKnowledgeSourceProperties.lastRefreshedTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("provisioningState".equals(fieldName)) { + deserializedKnowledgeSourceProperties.provisioningState + = KnowledgeSourceProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedKnowledgeSourceProperties; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/KnowledgeSourcePropertiesUpdateParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/KnowledgeSourcePropertiesUpdateParameters.java new file mode 100644 index 000000000000..dc9b7efe53ee --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/KnowledgeSourcePropertiesUpdateParameters.java @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.fluent.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 com.azure.resourcemanager.cdn.models.KnowledgeSourceUpdateFrequency; +import java.io.IOException; + +/** + * Defines properties of a knowledge source that can be updated. + */ +@Fluent +public final class KnowledgeSourcePropertiesUpdateParameters + implements JsonSerializable { + /* + * Description of the knowledge source. + */ + private String description; + + /* + * Endpoint or location of the knowledge source. + */ + private String url; + + /* + * Specifies the units of time for scheduling update intervals for the knowledge source. + */ + private KnowledgeSourceUpdateFrequency updateFrequency; + + /** + * Creates an instance of KnowledgeSourcePropertiesUpdateParameters class. + */ + public KnowledgeSourcePropertiesUpdateParameters() { + } + + /** + * Get the description property: Description of the knowledge source. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description of the knowledge source. + * + * @param description the description value to set. + * @return the KnowledgeSourcePropertiesUpdateParameters object itself. + */ + public KnowledgeSourcePropertiesUpdateParameters withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the url property: Endpoint or location of the knowledge source. + * + * @return the url value. + */ + public String url() { + return this.url; + } + + /** + * Set the url property: Endpoint or location of the knowledge source. + * + * @param url the url value to set. + * @return the KnowledgeSourcePropertiesUpdateParameters object itself. + */ + public KnowledgeSourcePropertiesUpdateParameters withUrl(String url) { + this.url = url; + return this; + } + + /** + * Get the updateFrequency property: Specifies the units of time for scheduling update intervals for the knowledge + * source. + * + * @return the updateFrequency value. + */ + public KnowledgeSourceUpdateFrequency updateFrequency() { + return this.updateFrequency; + } + + /** + * Set the updateFrequency property: Specifies the units of time for scheduling update intervals for the knowledge + * source. + * + * @param updateFrequency the updateFrequency value to set. + * @return the KnowledgeSourcePropertiesUpdateParameters object itself. + */ + public KnowledgeSourcePropertiesUpdateParameters + withUpdateFrequency(KnowledgeSourceUpdateFrequency updateFrequency) { + this.updateFrequency = updateFrequency; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeStringField("url", this.url); + jsonWriter.writeStringField("updateFrequency", + this.updateFrequency == null ? null : this.updateFrequency.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of KnowledgeSourcePropertiesUpdateParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of KnowledgeSourcePropertiesUpdateParameters 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 KnowledgeSourcePropertiesUpdateParameters. + */ + public static KnowledgeSourcePropertiesUpdateParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + KnowledgeSourcePropertiesUpdateParameters deserializedKnowledgeSourcePropertiesUpdateParameters + = new KnowledgeSourcePropertiesUpdateParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("description".equals(fieldName)) { + deserializedKnowledgeSourcePropertiesUpdateParameters.description = reader.getString(); + } else if ("url".equals(fieldName)) { + deserializedKnowledgeSourcePropertiesUpdateParameters.url = reader.getString(); + } else if ("updateFrequency".equals(fieldName)) { + deserializedKnowledgeSourcePropertiesUpdateParameters.updateFrequency + = KnowledgeSourceUpdateFrequency.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedKnowledgeSourcePropertiesUpdateParameters; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/ManagedRuleSetDefinitionInner.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/ManagedRuleSetDefinitionInner.java index 2249bc4d8c1d..5f4e06a6cbe5 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/ManagedRuleSetDefinitionInner.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/ManagedRuleSetDefinitionInner.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.cdn.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.json.JsonReader; @@ -18,7 +18,7 @@ /** * Describes a managed rule set definition. */ -@Fluent +@Immutable public final class ManagedRuleSetDefinitionInner extends ProxyResource { /* * Describes managed rule set definition properties. @@ -31,7 +31,7 @@ public final class ManagedRuleSetDefinitionInner extends ProxyResource { private Sku sku; /* - * Read only system data + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ private SystemData systemData; @@ -53,7 +53,7 @@ public final class ManagedRuleSetDefinitionInner extends ProxyResource { /** * Creates an instance of ManagedRuleSetDefinitionInner class. */ - public ManagedRuleSetDefinitionInner() { + private ManagedRuleSetDefinitionInner() { } /** @@ -76,19 +76,7 @@ public Sku sku() { } /** - * Set the sku property: The pricing tier (defines a CDN provider, feature list and rate) of the - * CdnWebApplicationFirewallPolicy. - * - * @param sku the sku value to set. - * @return the ManagedRuleSetDefinitionInner object itself. - */ - public ManagedRuleSetDefinitionInner withSku(Sku sku) { - this.sku = sku; - return this; - } - - /** - * Get the systemData property: Read only system data. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/ManagedRuleSetDefinitionProperties.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/ManagedRuleSetDefinitionProperties.java index 5c30756e0a9d..eadfd69f7dbd 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/ManagedRuleSetDefinitionProperties.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/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.cdn.fluent.models; @@ -41,7 +41,7 @@ public final class ManagedRuleSetDefinitionProperties implements JsonSerializabl /** * Creates an instance of ManagedRuleSetDefinitionProperties class. */ - public ManagedRuleSetDefinitionProperties() { + private ManagedRuleSetDefinitionProperties() { } /** diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/MetricsResponseInner.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/MetricsResponseInner.java index 96cf4039f875..8488955da4f8 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/MetricsResponseInner.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/MetricsResponseInner.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.cdn.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; @@ -20,7 +20,7 @@ /** * Metrics Response. */ -@Fluent +@Immutable public final class MetricsResponseInner implements JsonSerializable { /* * The dateTimeBegin property. @@ -45,7 +45,7 @@ public final class MetricsResponseInner implements JsonSerializable series() { return this.series; } - /** - * Set the series property: The series property. - * - * @param series the series value to set. - * @return the MetricsResponseInner object itself. - */ - public MetricsResponseInner withSeries(List series) { - this.series = series; - return this; - } - /** * Validates the instance. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/MigrateResultInner.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/MigrateResultInner.java index bbadd595c3ff..238f0d5eb518 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/MigrateResultInner.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/MigrateResultInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent.models; @@ -35,7 +35,7 @@ public final class MigrateResultInner implements JsonSerializable { /* * Operation name: {provider}/{resource}/{operation} @@ -46,7 +46,7 @@ public final class OperationInner implements JsonSerializable { /** * Creates an instance of OperationInner class. */ - public OperationInner() { + private OperationInner() { } /** @@ -67,17 +67,6 @@ public Boolean isDataAction() { return this.isDataAction; } - /** - * Set the isDataAction property: Indicates whether the operation is a data action. - * - * @param isDataAction the isDataAction value to set. - * @return the OperationInner object itself. - */ - public OperationInner withIsDataAction(Boolean isDataAction) { - this.isDataAction = isDataAction; - return this; - } - /** * Get the display property: The object that represents the operation. * @@ -87,17 +76,6 @@ public OperationDisplay display() { return this.display; } - /** - * Set the display property: The object that represents the operation. - * - * @param display the display value to set. - * @return the OperationInner object itself. - */ - public OperationInner withDisplay(OperationDisplay display) { - this.display = display; - return this; - } - /** * Get the origin property: The origin of operations. * @@ -125,20 +103,6 @@ public ServiceSpecification serviceSpecification() { return this.innerOperationProperties() == null ? null : this.innerOperationProperties().serviceSpecification(); } - /** - * Set the serviceSpecification property: One property of operation, include metric specifications. - * - * @param serviceSpecification the serviceSpecification value to set. - * @return the OperationInner object itself. - */ - public OperationInner withServiceSpecification(ServiceSpecification serviceSpecification) { - if (this.innerOperationProperties() == null) { - this.innerOperationProperties = new OperationProperties(); - } - this.innerOperationProperties().withServiceSpecification(serviceSpecification); - return this; - } - /** * Validates the instance. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/OperationProperties.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/OperationProperties.java index 060a3e51913d..1dc06028afa8 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/OperationProperties.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/OperationProperties.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.cdn.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 @@ /** * Properties of operation, include metric specifications. */ -@Fluent +@Immutable public final class OperationProperties implements JsonSerializable { /* * One property of operation, include metric specifications. @@ -25,7 +25,7 @@ public final class OperationProperties implements JsonSerializable e.validate()); + } + if (responseBasedOriginErrorDetectionSettings() != null) { + responseBasedOriginErrorDetectionSettings().validate(); + } } /** diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/OriginGroupUpdatePropertiesParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/OriginGroupUpdatePropertiesParameters.java index 9696679ff962..aaf58a9739d2 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/OriginGroupUpdatePropertiesParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/OriginGroupUpdatePropertiesParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/OriginInner.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/OriginInner.java index 74af89c2da26..8ff7d8fc0cad 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/OriginInner.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/OriginInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent.models; @@ -27,7 +27,7 @@ public final class OriginInner extends ProxyResource { private OriginProperties innerProperties; /* - * Read only system data + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ private SystemData systemData; @@ -62,7 +62,7 @@ private OriginProperties innerProperties() { } /** - * Get the systemData property: Read only system data. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/OriginProperties.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/OriginProperties.java index 3f22d6e8d84f..65be27b0c6f5 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/OriginProperties.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/OriginProperties.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -33,6 +34,12 @@ public final class OriginProperties extends OriginUpdatePropertiesParameters { */ private PrivateEndpointStatus privateEndpointStatus; + /* + * The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique + * across all origins in an endpoint. + */ + private String hostname; + /** * Creates an instance of OriginProperties class. */ @@ -67,11 +74,24 @@ public PrivateEndpointStatus privateEndpointStatus() { } /** - * {@inheritDoc} + * Get the hostname property: The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are + * supported.This should be unique across all origins in an endpoint. + * + * @return the hostname value. + */ + public String hostname() { + return this.hostname; + } + + /** + * Set the hostname property: The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are + * supported.This should be unique across all origins in an endpoint. + * + * @param hostname the hostname value to set. + * @return the OriginProperties object itself. */ - @Override public OriginProperties withHostname(String hostname) { - super.withHostname(hostname); + this.hostname = hostname; return this; } @@ -172,16 +192,20 @@ public OriginProperties withPrivateLinkApprovalMessage(String privateLinkApprova */ @Override public void validate() { - super.validate(); + if (hostname() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property hostname in model OriginProperties")); + } } + private static final ClientLogger LOGGER = new ClientLogger(OriginProperties.class); + /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("hostName", hostname()); jsonWriter.writeNumberField("httpPort", httpPort()); jsonWriter.writeNumberField("httpsPort", httpsPort()); jsonWriter.writeStringField("originHostHeader", originHostHeader()); @@ -192,6 +216,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("privateLinkResourceId", privateLinkResourceId()); jsonWriter.writeStringField("privateLinkLocation", privateLinkLocation()); jsonWriter.writeStringField("privateLinkApprovalMessage", privateLinkApprovalMessage()); + jsonWriter.writeStringField("hostName", this.hostname); return jsonWriter.writeEndObject(); } @@ -201,6 +226,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of OriginProperties 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 OriginProperties. */ public static OriginProperties fromJson(JsonReader jsonReader) throws IOException { @@ -210,9 +236,7 @@ public static OriginProperties fromJson(JsonReader jsonReader) throws IOExceptio String fieldName = reader.getFieldName(); reader.nextToken(); - if ("hostName".equals(fieldName)) { - deserializedOriginProperties.withHostname(reader.getString()); - } else if ("httpPort".equals(fieldName)) { + if ("httpPort".equals(fieldName)) { deserializedOriginProperties.withHttpPort(reader.getNullable(JsonReader::getInt)); } else if ("httpsPort".equals(fieldName)) { deserializedOriginProperties.withHttpsPort(reader.getNullable(JsonReader::getInt)); @@ -232,6 +256,8 @@ public static OriginProperties fromJson(JsonReader jsonReader) throws IOExceptio deserializedOriginProperties.withPrivateLinkLocation(reader.getString()); } else if ("privateLinkApprovalMessage".equals(fieldName)) { deserializedOriginProperties.withPrivateLinkApprovalMessage(reader.getString()); + } else if ("hostName".equals(fieldName)) { + deserializedOriginProperties.hostname = reader.getString(); } else if ("resourceState".equals(fieldName)) { deserializedOriginProperties.resourceState = OriginResourceState.fromString(reader.getString()); } else if ("provisioningState".equals(fieldName)) { diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/OriginUpdatePropertiesParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/OriginUpdatePropertiesParameters.java index e482c270871f..2e05a0280e07 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/OriginUpdatePropertiesParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/OriginUpdatePropertiesParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/PolicySettingsLogScrubbing.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/PolicySettingsLogScrubbing.java new file mode 100644 index 000000000000..b560a083f04f --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/PolicySettingsLogScrubbing.java @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.fluent.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 com.azure.resourcemanager.cdn.models.WebApplicationFirewallScrubbingRules; +import com.azure.resourcemanager.cdn.models.WebApplicationFirewallScrubbingState; +import java.io.IOException; +import java.util.List; + +/** + * Defines rules that scrub sensitive fields in the Web Application Firewall logs. + */ +@Fluent +public final class PolicySettingsLogScrubbing implements JsonSerializable { + /* + * State of the log scrubbing config. Default value is Enabled. + */ + private WebApplicationFirewallScrubbingState state; + + /* + * List of log scrubbing rules applied to the Web Application Firewall logs. + */ + private List scrubbingRules; + + /** + * Creates an instance of PolicySettingsLogScrubbing class. + */ + public PolicySettingsLogScrubbing() { + } + + /** + * Get the state property: State of the log scrubbing config. Default value is Enabled. + * + * @return the state value. + */ + public WebApplicationFirewallScrubbingState state() { + return this.state; + } + + /** + * Set the state property: State of the log scrubbing config. Default value is Enabled. + * + * @param state the state value to set. + * @return the PolicySettingsLogScrubbing object itself. + */ + public PolicySettingsLogScrubbing withState(WebApplicationFirewallScrubbingState state) { + this.state = state; + return this; + } + + /** + * Get the scrubbingRules property: List of log scrubbing rules applied to the Web Application Firewall logs. + * + * @return the scrubbingRules value. + */ + public List scrubbingRules() { + return this.scrubbingRules; + } + + /** + * Set the scrubbingRules property: List of log scrubbing rules applied to the Web Application Firewall logs. + * + * @param scrubbingRules the scrubbingRules value to set. + * @return the PolicySettingsLogScrubbing object itself. + */ + public PolicySettingsLogScrubbing withScrubbingRules(List scrubbingRules) { + this.scrubbingRules = scrubbingRules; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (scrubbingRules() != null) { + scrubbingRules().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); + jsonWriter.writeArrayField("scrubbingRules", this.scrubbingRules, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PolicySettingsLogScrubbing from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PolicySettingsLogScrubbing 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 PolicySettingsLogScrubbing. + */ + public static PolicySettingsLogScrubbing fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PolicySettingsLogScrubbing deserializedPolicySettingsLogScrubbing = new PolicySettingsLogScrubbing(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("state".equals(fieldName)) { + deserializedPolicySettingsLogScrubbing.state + = WebApplicationFirewallScrubbingState.fromString(reader.getString()); + } else if ("scrubbingRules".equals(fieldName)) { + List scrubbingRules + = reader.readArray(reader1 -> WebApplicationFirewallScrubbingRules.fromJson(reader1)); + deserializedPolicySettingsLogScrubbing.scrubbingRules = scrubbingRules; + } else { + reader.skipChildren(); + } + } + + return deserializedPolicySettingsLogScrubbing; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/ProfileAgentInner.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/ProfileAgentInner.java new file mode 100644 index 000000000000..7ba4fd9c7669 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/ProfileAgentInner.java @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.cdn.models.ProfileAgentProvisioningState; +import com.azure.resourcemanager.cdn.models.ResourceReference; +import java.io.IOException; +import java.util.List; + +/** + * An agent link (web agent association) within a CDN profile. + */ +@Fluent +public final class ProfileAgentInner extends ProxyResource { + /* + * The properties of a profile agent association. + */ + private ProfileAgentProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ProfileAgentInner class. + */ + public ProfileAgentInner() { + } + + /** + * Get the innerProperties property: The properties of a profile agent association. + * + * @return the innerProperties value. + */ + private ProfileAgentProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the webAgent property: Reference to the web agent resource. + * + * @return the webAgent value. + */ + public ResourceReference webAgent() { + return this.innerProperties() == null ? null : this.innerProperties().webAgent(); + } + + /** + * Set the webAgent property: Reference to the web agent resource. + * + * @param webAgent the webAgent value to set. + * @return the ProfileAgentInner object itself. + */ + public ProfileAgentInner withWebAgent(ResourceReference webAgent) { + if (this.innerProperties() == null) { + this.innerProperties = new ProfileAgentProperties(); + } + this.innerProperties().withWebAgent(webAgent); + return this; + } + + /** + * Get the customDomains property: List of custom domains associated with this agent link. + * + * @return the customDomains value. + */ + public List customDomains() { + return this.innerProperties() == null ? null : this.innerProperties().customDomains(); + } + + /** + * Set the customDomains property: List of custom domains associated with this agent link. + * + * @param customDomains the customDomains value to set. + * @return the ProfileAgentInner object itself. + */ + public ProfileAgentInner withCustomDomains(List customDomains) { + if (this.innerProperties() == null) { + this.innerProperties = new ProfileAgentProperties(); + } + this.innerProperties().withCustomDomains(customDomains); + return this; + } + + /** + * Get the provisioningState property: Provisioning status of the profile agent association. + * + * @return the provisioningState value. + */ + public ProfileAgentProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ProfileAgentInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ProfileAgentInner 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 ProfileAgentInner. + */ + public static ProfileAgentInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ProfileAgentInner deserializedProfileAgentInner = new ProfileAgentInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedProfileAgentInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedProfileAgentInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedProfileAgentInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedProfileAgentInner.innerProperties = ProfileAgentProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedProfileAgentInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedProfileAgentInner; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/ProfileAgentProperties.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/ProfileAgentProperties.java new file mode 100644 index 000000000000..47fba1003d98 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/ProfileAgentProperties.java @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.cdn.models.ProfileAgentProvisioningState; +import com.azure.resourcemanager.cdn.models.ResourceReference; +import java.io.IOException; +import java.util.List; + +/** + * The properties of a profile agent association. + */ +@Fluent +public final class ProfileAgentProperties implements JsonSerializable { + /* + * Reference to the web agent resource. + */ + private ResourceReference webAgent; + + /* + * List of custom domains associated with this agent link. + */ + private List customDomains; + + /* + * Provisioning status of the profile agent association. + */ + private ProfileAgentProvisioningState provisioningState; + + /** + * Creates an instance of ProfileAgentProperties class. + */ + public ProfileAgentProperties() { + } + + /** + * Get the webAgent property: Reference to the web agent resource. + * + * @return the webAgent value. + */ + public ResourceReference webAgent() { + return this.webAgent; + } + + /** + * Set the webAgent property: Reference to the web agent resource. + * + * @param webAgent the webAgent value to set. + * @return the ProfileAgentProperties object itself. + */ + public ProfileAgentProperties withWebAgent(ResourceReference webAgent) { + this.webAgent = webAgent; + return this; + } + + /** + * Get the customDomains property: List of custom domains associated with this agent link. + * + * @return the customDomains value. + */ + public List customDomains() { + return this.customDomains; + } + + /** + * Set the customDomains property: List of custom domains associated with this agent link. + * + * @param customDomains the customDomains value to set. + * @return the ProfileAgentProperties object itself. + */ + public ProfileAgentProperties withCustomDomains(List customDomains) { + this.customDomains = customDomains; + return this; + } + + /** + * Get the provisioningState property: Provisioning status of the profile agent association. + * + * @return the provisioningState value. + */ + public ProfileAgentProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (webAgent() == null) { + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property webAgent in model ProfileAgentProperties")); + } else { + webAgent().validate(); + } + if (customDomains() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property customDomains in model ProfileAgentProperties")); + } else { + customDomains().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ProfileAgentProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("webAgent", this.webAgent); + jsonWriter.writeArrayField("customDomains", this.customDomains, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ProfileAgentProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ProfileAgentProperties 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 ProfileAgentProperties. + */ + public static ProfileAgentProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ProfileAgentProperties deserializedProfileAgentProperties = new ProfileAgentProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("webAgent".equals(fieldName)) { + deserializedProfileAgentProperties.webAgent = ResourceReference.fromJson(reader); + } else if ("customDomains".equals(fieldName)) { + List customDomains + = reader.readArray(reader1 -> ResourceReference.fromJson(reader1)); + deserializedProfileAgentProperties.customDomains = customDomains; + } else if ("provisioningState".equals(fieldName)) { + deserializedProfileAgentProperties.provisioningState + = ProfileAgentProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedProfileAgentProperties; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/ProfileAgentUpdateProperties.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/ProfileAgentUpdateProperties.java new file mode 100644 index 000000000000..a14be2f312f6 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/ProfileAgentUpdateProperties.java @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.fluent.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 com.azure.resourcemanager.cdn.models.ResourceReference; +import java.io.IOException; +import java.util.List; + +/** + * The properties for updating a profile agent association. + */ +@Fluent +public final class ProfileAgentUpdateProperties implements JsonSerializable { + /* + * List of custom domains associated with this agent link. + */ + private List customDomains; + + /** + * Creates an instance of ProfileAgentUpdateProperties class. + */ + public ProfileAgentUpdateProperties() { + } + + /** + * Get the customDomains property: List of custom domains associated with this agent link. + * + * @return the customDomains value. + */ + public List customDomains() { + return this.customDomains; + } + + /** + * Set the customDomains property: List of custom domains associated with this agent link. + * + * @param customDomains the customDomains value to set. + * @return the ProfileAgentUpdateProperties object itself. + */ + public ProfileAgentUpdateProperties withCustomDomains(List customDomains) { + this.customDomains = customDomains; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (customDomains() != null) { + customDomains().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("customDomains", this.customDomains, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ProfileAgentUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ProfileAgentUpdateProperties 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 ProfileAgentUpdateProperties. + */ + public static ProfileAgentUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ProfileAgentUpdateProperties deserializedProfileAgentUpdateProperties = new ProfileAgentUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("customDomains".equals(fieldName)) { + List customDomains + = reader.readArray(reader1 -> ResourceReference.fromJson(reader1)); + deserializedProfileAgentUpdateProperties.customDomains = customDomains; + } else { + reader.skipChildren(); + } + } + + return deserializedProfileAgentUpdateProperties; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/ProfileInner.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/ProfileInner.java index 17ec4b8520bf..b9950740cab8 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/ProfileInner.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/ProfileInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent.models; @@ -24,6 +24,11 @@ */ @Fluent public final class ProfileInner extends Resource { + /* + * The JSON object that contains the properties required to create a profile. + */ + private ProfileProperties innerProperties; + /* * The pricing tier (defines Azure Front Door Standard or Premium or a CDN provider, feature list and rate) of the * profile. @@ -36,17 +41,12 @@ public final class ProfileInner extends Resource { private String kind; /* - * Managed service identity (system assigned and/or user assigned identities). + * The managed service identities assigned to this resource. */ private ManagedServiceIdentity identity; /* - * The JSON object that contains the properties required to create a profile. - */ - private ProfileProperties innerProperties; - - /* - * Read only system data + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ private SystemData systemData; @@ -71,6 +71,15 @@ public final class ProfileInner extends Resource { public ProfileInner() { } + /** + * Get the innerProperties property: The JSON object that contains the properties required to create a profile. + * + * @return the innerProperties value. + */ + private ProfileProperties innerProperties() { + return this.innerProperties; + } + /** * Get the sku property: The pricing tier (defines Azure Front Door Standard or Premium or a CDN provider, feature * list and rate) of the profile. @@ -104,7 +113,7 @@ public String kind() { } /** - * Get the identity property: Managed service identity (system assigned and/or user assigned identities). + * Get the identity property: The managed service identities assigned to this resource. * * @return the identity value. */ @@ -113,7 +122,7 @@ public ManagedServiceIdentity identity() { } /** - * Set the identity property: Managed service identity (system assigned and/or user assigned identities). + * Set the identity property: The managed service identities assigned to this resource. * * @param identity the identity value to set. * @return the ProfileInner object itself. @@ -124,16 +133,7 @@ public ProfileInner withIdentity(ManagedServiceIdentity identity) { } /** - * Get the innerProperties property: The JSON object that contains the properties required to create a profile. - * - * @return the innerProperties value. - */ - private ProfileProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Read only system data. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -279,6 +279,9 @@ public ProfileInner withLogScrubbing(ProfileLogScrubbing logScrubbing) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } if (sku() == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Missing required property sku in model ProfileInner")); @@ -288,9 +291,6 @@ public void validate() { if (identity() != null) { identity().validate(); } - if (innerProperties() != null) { - innerProperties().validate(); - } } private static final ClientLogger LOGGER = new ClientLogger(ProfileInner.class); @@ -304,8 +304,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("sku", this.sku); - jsonWriter.writeJsonField("identity", this.identity); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("identity", this.identity); return jsonWriter.writeEndObject(); } @@ -338,12 +338,12 @@ public static ProfileInner fromJson(JsonReader jsonReader) throws IOException { deserializedProfileInner.withTags(tags); } else if ("sku".equals(fieldName)) { deserializedProfileInner.sku = Sku.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedProfileInner.innerProperties = ProfileProperties.fromJson(reader); } else if ("kind".equals(fieldName)) { deserializedProfileInner.kind = reader.getString(); } else if ("identity".equals(fieldName)) { deserializedProfileInner.identity = ManagedServiceIdentity.fromJson(reader); - } else if ("properties".equals(fieldName)) { - deserializedProfileInner.innerProperties = ProfileProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedProfileInner.systemData = SystemData.fromJson(reader); } else { diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/ProfileProperties.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/ProfileProperties.java index 99e08cc03a32..a5cb10c23d50 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/ProfileProperties.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/ProfileProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/ProfilePropertiesUpdateParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/ProfilePropertiesUpdateParameters.java index 504dd16f6f50..262c4c9c626d 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/ProfilePropertiesUpdateParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/ProfilePropertiesUpdateParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/RankingsResponseInner.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/RankingsResponseInner.java index b986235d20ff..4e7f95e01b7d 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/RankingsResponseInner.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/RankingsResponseInner.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.cdn.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; @@ -19,7 +19,7 @@ /** * Rankings Response. */ -@Fluent +@Immutable public final class RankingsResponseInner implements JsonSerializable { /* * The dateTimeBegin property. @@ -39,7 +39,7 @@ public final class RankingsResponseInner implements JsonSerializable tables() { return this.tables; } - /** - * Set the tables property: The tables property. - * - * @param tables the tables value to set. - * @return the RankingsResponseInner object itself. - */ - public RankingsResponseInner withTables(List tables) { - this.tables = tables; - return this; - } - /** * Validates the instance. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/ResourceUsageInner.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/ResourceUsageInner.java index ea08453b0763..1d473b623a1f 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/ResourceUsageInner.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/ResourceUsageInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent.models; @@ -40,7 +40,7 @@ public final class ResourceUsageInner implements JsonSerializable { /* * The endpoints property. @@ -32,7 +32,7 @@ public final class ResourcesResponseInner implements JsonSerializable endpoints() { return this.endpoints; } - /** - * Set the endpoints property: The endpoints property. - * - * @param endpoints the endpoints value to set. - * @return the ResourcesResponseInner object itself. - */ - public ResourcesResponseInner withEndpoints(List endpoints) { - this.endpoints = endpoints; - return this; - } - /** * Get the customDomains property: The customDomains property. * @@ -64,17 +53,6 @@ public List customDomains() { return this.customDomains; } - /** - * Set the customDomains property: The customDomains property. - * - * @param customDomains the customDomains value to set. - * @return the ResourcesResponseInner object itself. - */ - public ResourcesResponseInner withCustomDomains(List customDomains) { - this.customDomains = customDomains; - return this; - } - /** * Validates the instance. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/RouteInner.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/RouteInner.java index 1c6eb26b9953..c9b0d9ddb3fd 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/RouteInner.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/RouteInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent.models; @@ -14,6 +14,7 @@ import com.azure.resourcemanager.cdn.models.AfdEndpointProtocols; import com.azure.resourcemanager.cdn.models.AfdProvisioningState; import com.azure.resourcemanager.cdn.models.AfdRouteCacheConfiguration; +import com.azure.resourcemanager.cdn.models.AfdRouteGrpcState; import com.azure.resourcemanager.cdn.models.DeploymentStatus; import com.azure.resourcemanager.cdn.models.EnabledState; import com.azure.resourcemanager.cdn.models.ForwardingProtocol; @@ -34,7 +35,7 @@ public final class RouteInner extends ProxyResource { private RouteProperties innerProperties; /* - * Read only system data + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ private SystemData systemData; @@ -69,7 +70,7 @@ private RouteProperties innerProperties() { } /** - * Get the systemData property: Read only system data. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -107,24 +108,6 @@ public String id() { return this.id; } - /** - * Get the provisioningState property: Provisioning status. - * - * @return the provisioningState value. - */ - public AfdProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the deploymentStatus property: The deploymentStatus property. - * - * @return the deploymentStatus value. - */ - public DeploymentStatus deploymentStatus() { - return this.innerProperties() == null ? null : this.innerProperties().deploymentStatus(); - } - /** * Get the endpointName property: The name of the endpoint which holds the route. * @@ -393,6 +376,49 @@ public RouteInner withEnabledState(EnabledState enabledState) { return this; } + /** + * Get the grpcState property: Whether or not gRPC is enabled on this route. Permitted values are 'Enabled' or + * 'Disabled'. + * + * @return the grpcState value. + */ + public AfdRouteGrpcState grpcState() { + return this.innerProperties() == null ? null : this.innerProperties().grpcState(); + } + + /** + * Set the grpcState property: Whether or not gRPC is enabled on this route. Permitted values are 'Enabled' or + * 'Disabled'. + * + * @param grpcState the grpcState value to set. + * @return the RouteInner object itself. + */ + public RouteInner withGrpcState(AfdRouteGrpcState grpcState) { + if (this.innerProperties() == null) { + this.innerProperties = new RouteProperties(); + } + this.innerProperties().withGrpcState(grpcState); + return this; + } + + /** + * Get the provisioningState property: Provisioning status. + * + * @return the provisioningState value. + */ + public AfdProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the deploymentStatus property: The deploymentStatus property. + * + * @return the deploymentStatus value. + */ + public DeploymentStatus deploymentStatus() { + return this.innerProperties() == null ? null : this.innerProperties().deploymentStatus(); + } + /** * Validates the instance. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/RouteProperties.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/RouteProperties.java index 008fca64910b..035643faa617 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/RouteProperties.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/RouteProperties.java @@ -1,17 +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.cdn.fluent.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 com.azure.resourcemanager.cdn.models.ActivatedResourceReference; import com.azure.resourcemanager.cdn.models.AfdEndpointProtocols; import com.azure.resourcemanager.cdn.models.AfdProvisioningState; import com.azure.resourcemanager.cdn.models.AfdRouteCacheConfiguration; +import com.azure.resourcemanager.cdn.models.AfdRouteGrpcState; import com.azure.resourcemanager.cdn.models.DeploymentStatus; import com.azure.resourcemanager.cdn.models.EnabledState; import com.azure.resourcemanager.cdn.models.ForwardingProtocol; @@ -25,7 +27,74 @@ * The JSON object that contains the properties of the Routes to create. */ @Fluent -public final class RouteProperties extends RouteUpdatePropertiesParameters { +public final class RouteProperties implements JsonSerializable { + /* + * The name of the endpoint which holds the route. + */ + private String endpointName; + + /* + * Domains referenced by this endpoint. + */ + private List customDomains; + + /* + * A reference to the origin group. + */ + private ResourceReference originGroup; + + /* + * A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. + * contoso.cloudapp.net/originpath. + */ + private String originPath; + + /* + * rule sets referenced by this endpoint. + */ + private List ruleSets; + + /* + * List of supported protocols for this route. + */ + private List supportedProtocols; + + /* + * The route patterns of the rule. + */ + private List patternsToMatch; + + /* + * The caching configuration for this route. To disable caching, do not provide a cacheConfiguration object. + */ + private AfdRouteCacheConfiguration cacheConfiguration; + + /* + * Protocol this rule will use when forwarding traffic to backends. + */ + private ForwardingProtocol forwardingProtocol; + + /* + * whether this route will be linked to the default endpoint domain. + */ + private LinkToDefaultDomain linkToDefaultDomain; + + /* + * Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule + * and it will be the first rule that gets executed. + */ + private HttpsRedirect httpsRedirect; + + /* + * Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + */ + private EnabledState enabledState; + + /* + * Whether or not gRPC is enabled on this route. Permitted values are 'Enabled' or 'Disabled' + */ + private AfdRouteGrpcState grpcState; + /* * Provisioning status */ @@ -36,11 +105,6 @@ public final class RouteProperties extends RouteUpdatePropertiesParameters { */ private DeploymentStatus deploymentStatus; - /* - * The name of the endpoint which holds the route. - */ - private String endpointName; - /** * Creates an instance of RouteProperties class. */ @@ -48,140 +112,298 @@ public RouteProperties() { } /** - * Get the provisioningState property: Provisioning status. + * Get the endpointName property: The name of the endpoint which holds the route. * - * @return the provisioningState value. + * @return the endpointName value. */ - public AfdProvisioningState provisioningState() { - return this.provisioningState; + public String endpointName() { + return this.endpointName; } /** - * Get the deploymentStatus property: The deploymentStatus property. + * Get the customDomains property: Domains referenced by this endpoint. * - * @return the deploymentStatus value. + * @return the customDomains value. */ - public DeploymentStatus deploymentStatus() { - return this.deploymentStatus; + public List customDomains() { + return this.customDomains; } /** - * Get the endpointName property: The name of the endpoint which holds the route. + * Set the customDomains property: Domains referenced by this endpoint. * - * @return the endpointName value. + * @param customDomains the customDomains value to set. + * @return the RouteProperties object itself. */ - @Override - public String endpointName() { - return this.endpointName; + public RouteProperties withCustomDomains(List customDomains) { + this.customDomains = customDomains; + return this; } /** - * {@inheritDoc} + * Get the originGroup property: A reference to the origin group. + * + * @return the originGroup value. */ - @Override - public RouteProperties withCustomDomains(List customDomains) { - super.withCustomDomains(customDomains); - return this; + public ResourceReference originGroup() { + return this.originGroup; } /** - * {@inheritDoc} + * Set the originGroup property: A reference to the origin group. + * + * @param originGroup the originGroup value to set. + * @return the RouteProperties object itself. */ - @Override public RouteProperties withOriginGroup(ResourceReference originGroup) { - super.withOriginGroup(originGroup); + this.originGroup = originGroup; return this; } /** - * {@inheritDoc} + * Get the originPath property: A directory path on the origin that AzureFrontDoor can use to retrieve content from, + * e.g. contoso.cloudapp.net/originpath. + * + * @return the originPath value. + */ + public String originPath() { + return this.originPath; + } + + /** + * Set the originPath property: A directory path on the origin that AzureFrontDoor can use to retrieve content from, + * e.g. contoso.cloudapp.net/originpath. + * + * @param originPath the originPath value to set. + * @return the RouteProperties object itself. */ - @Override public RouteProperties withOriginPath(String originPath) { - super.withOriginPath(originPath); + this.originPath = originPath; return this; } /** - * {@inheritDoc} + * Get the ruleSets property: rule sets referenced by this endpoint. + * + * @return the ruleSets value. + */ + public List ruleSets() { + return this.ruleSets; + } + + /** + * Set the ruleSets property: rule sets referenced by this endpoint. + * + * @param ruleSets the ruleSets value to set. + * @return the RouteProperties object itself. */ - @Override public RouteProperties withRuleSets(List ruleSets) { - super.withRuleSets(ruleSets); + this.ruleSets = ruleSets; return this; } /** - * {@inheritDoc} + * Get the supportedProtocols property: List of supported protocols for this route. + * + * @return the supportedProtocols value. + */ + public List supportedProtocols() { + return this.supportedProtocols; + } + + /** + * Set the supportedProtocols property: List of supported protocols for this route. + * + * @param supportedProtocols the supportedProtocols value to set. + * @return the RouteProperties object itself. */ - @Override public RouteProperties withSupportedProtocols(List supportedProtocols) { - super.withSupportedProtocols(supportedProtocols); + this.supportedProtocols = supportedProtocols; return this; } /** - * {@inheritDoc} + * Get the patternsToMatch property: The route patterns of the rule. + * + * @return the patternsToMatch value. + */ + public List patternsToMatch() { + return this.patternsToMatch; + } + + /** + * Set the patternsToMatch property: The route patterns of the rule. + * + * @param patternsToMatch the patternsToMatch value to set. + * @return the RouteProperties object itself. */ - @Override public RouteProperties withPatternsToMatch(List patternsToMatch) { - super.withPatternsToMatch(patternsToMatch); + this.patternsToMatch = patternsToMatch; return this; } /** - * {@inheritDoc} + * Get the cacheConfiguration property: The caching configuration for this route. To disable caching, do not provide + * a cacheConfiguration object. + * + * @return the cacheConfiguration value. + */ + public AfdRouteCacheConfiguration cacheConfiguration() { + return this.cacheConfiguration; + } + + /** + * Set the cacheConfiguration property: The caching configuration for this route. To disable caching, do not provide + * a cacheConfiguration object. + * + * @param cacheConfiguration the cacheConfiguration value to set. + * @return the RouteProperties object itself. */ - @Override public RouteProperties withCacheConfiguration(AfdRouteCacheConfiguration cacheConfiguration) { - super.withCacheConfiguration(cacheConfiguration); + this.cacheConfiguration = cacheConfiguration; return this; } /** - * {@inheritDoc} + * Get the forwardingProtocol property: Protocol this rule will use when forwarding traffic to backends. + * + * @return the forwardingProtocol value. + */ + public ForwardingProtocol forwardingProtocol() { + return this.forwardingProtocol; + } + + /** + * Set the forwardingProtocol property: Protocol this rule will use when forwarding traffic to backends. + * + * @param forwardingProtocol the forwardingProtocol value to set. + * @return the RouteProperties object itself. */ - @Override public RouteProperties withForwardingProtocol(ForwardingProtocol forwardingProtocol) { - super.withForwardingProtocol(forwardingProtocol); + this.forwardingProtocol = forwardingProtocol; return this; } /** - * {@inheritDoc} + * Get the linkToDefaultDomain property: whether this route will be linked to the default endpoint domain. + * + * @return the linkToDefaultDomain value. + */ + public LinkToDefaultDomain linkToDefaultDomain() { + return this.linkToDefaultDomain; + } + + /** + * Set the linkToDefaultDomain property: whether this route will be linked to the default endpoint domain. + * + * @param linkToDefaultDomain the linkToDefaultDomain value to set. + * @return the RouteProperties object itself. */ - @Override public RouteProperties withLinkToDefaultDomain(LinkToDefaultDomain linkToDefaultDomain) { - super.withLinkToDefaultDomain(linkToDefaultDomain); + this.linkToDefaultDomain = linkToDefaultDomain; return this; } /** - * {@inheritDoc} + * Get the httpsRedirect property: Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this + * is a easy way to set up this rule and it will be the first rule that gets executed. + * + * @return the httpsRedirect value. + */ + public HttpsRedirect httpsRedirect() { + return this.httpsRedirect; + } + + /** + * Set the httpsRedirect property: Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this + * is a easy way to set up this rule and it will be the first rule that gets executed. + * + * @param httpsRedirect the httpsRedirect value to set. + * @return the RouteProperties object itself. */ - @Override public RouteProperties withHttpsRedirect(HttpsRedirect httpsRedirect) { - super.withHttpsRedirect(httpsRedirect); + this.httpsRedirect = httpsRedirect; return this; } /** - * {@inheritDoc} + * Get the enabledState property: Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'. + * + * @return the enabledState value. + */ + public EnabledState enabledState() { + return this.enabledState; + } + + /** + * Set the enabledState property: Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'. + * + * @param enabledState the enabledState value to set. + * @return the RouteProperties object itself. */ - @Override public RouteProperties withEnabledState(EnabledState enabledState) { - super.withEnabledState(enabledState); + this.enabledState = enabledState; return this; } + /** + * Get the grpcState property: Whether or not gRPC is enabled on this route. Permitted values are 'Enabled' or + * 'Disabled'. + * + * @return the grpcState value. + */ + public AfdRouteGrpcState grpcState() { + return this.grpcState; + } + + /** + * Set the grpcState property: Whether or not gRPC is enabled on this route. Permitted values are 'Enabled' or + * 'Disabled'. + * + * @param grpcState the grpcState value to set. + * @return the RouteProperties object itself. + */ + public RouteProperties withGrpcState(AfdRouteGrpcState grpcState) { + this.grpcState = grpcState; + return this; + } + + /** + * Get the provisioningState property: Provisioning status. + * + * @return the provisioningState value. + */ + public AfdProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the deploymentStatus property: The deploymentStatus property. + * + * @return the deploymentStatus value. + */ + public DeploymentStatus deploymentStatus() { + return this.deploymentStatus; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ - @Override public void validate() { - super.validate(); + if (customDomains() != null) { + customDomains().forEach(e -> e.validate()); + } + if (originGroup() != null) { + originGroup().validate(); + } + if (ruleSets() != null) { + ruleSets().forEach(e -> e.validate()); + } + if (cacheConfiguration() != null) { + cacheConfiguration().validate(); + } } /** @@ -190,21 +412,22 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("customDomains", customDomains(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("originGroup", originGroup()); - jsonWriter.writeStringField("originPath", originPath()); - jsonWriter.writeArrayField("ruleSets", ruleSets(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("supportedProtocols", supportedProtocols(), + jsonWriter.writeArrayField("customDomains", this.customDomains, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("originGroup", this.originGroup); + jsonWriter.writeStringField("originPath", this.originPath); + jsonWriter.writeArrayField("ruleSets", this.ruleSets, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("supportedProtocols", this.supportedProtocols, (writer, element) -> writer.writeString(element == null ? null : element.toString())); - jsonWriter.writeArrayField("patternsToMatch", patternsToMatch(), + jsonWriter.writeArrayField("patternsToMatch", this.patternsToMatch, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("cacheConfiguration", cacheConfiguration()); + jsonWriter.writeJsonField("cacheConfiguration", this.cacheConfiguration); jsonWriter.writeStringField("forwardingProtocol", - forwardingProtocol() == null ? null : forwardingProtocol().toString()); + this.forwardingProtocol == null ? null : this.forwardingProtocol.toString()); jsonWriter.writeStringField("linkToDefaultDomain", - linkToDefaultDomain() == null ? null : linkToDefaultDomain().toString()); - jsonWriter.writeStringField("httpsRedirect", httpsRedirect() == null ? null : httpsRedirect().toString()); - jsonWriter.writeStringField("enabledState", enabledState() == null ? null : enabledState().toString()); + this.linkToDefaultDomain == null ? null : this.linkToDefaultDomain.toString()); + jsonWriter.writeStringField("httpsRedirect", this.httpsRedirect == null ? null : this.httpsRedirect.toString()); + jsonWriter.writeStringField("enabledState", this.enabledState == null ? null : this.enabledState.toString()); + jsonWriter.writeStringField("grpcState", this.grpcState == null ? null : this.grpcState.toString()); return jsonWriter.writeEndObject(); } @@ -228,33 +451,34 @@ public static RouteProperties fromJson(JsonReader jsonReader) throws IOException } else if ("customDomains".equals(fieldName)) { List customDomains = reader.readArray(reader1 -> ActivatedResourceReference.fromJson(reader1)); - deserializedRouteProperties.withCustomDomains(customDomains); + deserializedRouteProperties.customDomains = customDomains; } else if ("originGroup".equals(fieldName)) { - deserializedRouteProperties.withOriginGroup(ResourceReference.fromJson(reader)); + deserializedRouteProperties.originGroup = ResourceReference.fromJson(reader); } else if ("originPath".equals(fieldName)) { - deserializedRouteProperties.withOriginPath(reader.getString()); + deserializedRouteProperties.originPath = reader.getString(); } else if ("ruleSets".equals(fieldName)) { List ruleSets = reader.readArray(reader1 -> ResourceReference.fromJson(reader1)); - deserializedRouteProperties.withRuleSets(ruleSets); + deserializedRouteProperties.ruleSets = ruleSets; } else if ("supportedProtocols".equals(fieldName)) { List supportedProtocols = reader.readArray(reader1 -> AfdEndpointProtocols.fromString(reader1.getString())); - deserializedRouteProperties.withSupportedProtocols(supportedProtocols); + deserializedRouteProperties.supportedProtocols = supportedProtocols; } else if ("patternsToMatch".equals(fieldName)) { List patternsToMatch = reader.readArray(reader1 -> reader1.getString()); - deserializedRouteProperties.withPatternsToMatch(patternsToMatch); + deserializedRouteProperties.patternsToMatch = patternsToMatch; } else if ("cacheConfiguration".equals(fieldName)) { - deserializedRouteProperties.withCacheConfiguration(AfdRouteCacheConfiguration.fromJson(reader)); + deserializedRouteProperties.cacheConfiguration = AfdRouteCacheConfiguration.fromJson(reader); } else if ("forwardingProtocol".equals(fieldName)) { - deserializedRouteProperties - .withForwardingProtocol(ForwardingProtocol.fromString(reader.getString())); + deserializedRouteProperties.forwardingProtocol = ForwardingProtocol.fromString(reader.getString()); } else if ("linkToDefaultDomain".equals(fieldName)) { - deserializedRouteProperties - .withLinkToDefaultDomain(LinkToDefaultDomain.fromString(reader.getString())); + deserializedRouteProperties.linkToDefaultDomain + = LinkToDefaultDomain.fromString(reader.getString()); } else if ("httpsRedirect".equals(fieldName)) { - deserializedRouteProperties.withHttpsRedirect(HttpsRedirect.fromString(reader.getString())); + deserializedRouteProperties.httpsRedirect = HttpsRedirect.fromString(reader.getString()); } else if ("enabledState".equals(fieldName)) { - deserializedRouteProperties.withEnabledState(EnabledState.fromString(reader.getString())); + deserializedRouteProperties.enabledState = EnabledState.fromString(reader.getString()); + } else if ("grpcState".equals(fieldName)) { + deserializedRouteProperties.grpcState = AfdRouteGrpcState.fromString(reader.getString()); } else if ("provisioningState".equals(fieldName)) { deserializedRouteProperties.provisioningState = AfdProvisioningState.fromString(reader.getString()); } else if ("deploymentStatus".equals(fieldName)) { diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/RouteUpdatePropertiesParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/RouteUpdatePropertiesParameters.java index 399c42245aff..b410500dbbcb 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/RouteUpdatePropertiesParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/RouteUpdatePropertiesParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent.models; @@ -12,6 +12,7 @@ import com.azure.resourcemanager.cdn.models.ActivatedResourceReference; import com.azure.resourcemanager.cdn.models.AfdEndpointProtocols; import com.azure.resourcemanager.cdn.models.AfdRouteCacheConfiguration; +import com.azure.resourcemanager.cdn.models.AfdRouteGrpcState; import com.azure.resourcemanager.cdn.models.EnabledState; import com.azure.resourcemanager.cdn.models.ForwardingProtocol; import com.azure.resourcemanager.cdn.models.HttpsRedirect; @@ -24,7 +25,7 @@ * The JSON object that contains the properties of the domain to create. */ @Fluent -public class RouteUpdatePropertiesParameters implements JsonSerializable { +public final class RouteUpdatePropertiesParameters implements JsonSerializable { /* * The name of the endpoint which holds the route. */ @@ -87,6 +88,11 @@ public class RouteUpdatePropertiesParameters implements JsonSerializable { + /* + * The name of the rule set containing the rule. + */ + private String ruleSetName; + + /* + * The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser + * order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not + * require any condition and actions listed in it will always be applied. + */ + private Integer order; + + /* + * A list of conditions that must be matched for the actions to be executed + */ + private List conditions; + + /* + * A list of actions that are executed when all the conditions of a rule are satisfied. + */ + private List actions; + + /* + * If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, + * defaults to Continue. + */ + private MatchProcessingBehavior matchProcessingBehavior; + /* * Provisioning status */ @@ -31,11 +60,6 @@ public final class RuleProperties extends RuleUpdatePropertiesParameters { */ private DeploymentStatus deploymentStatus; - /* - * The name of the rule set containing the rule. - */ - private String ruleSetName; - /** * Creates an instance of RuleProperties class. */ @@ -43,77 +67,130 @@ public RuleProperties() { } /** - * Get the provisioningState property: Provisioning status. + * Get the ruleSetName property: The name of the rule set containing the rule. * - * @return the provisioningState value. + * @return the ruleSetName value. */ - public AfdProvisioningState provisioningState() { - return this.provisioningState; + public String ruleSetName() { + return this.ruleSetName; } /** - * Get the deploymentStatus property: The deploymentStatus property. + * Get the order property: The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. + * A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special + * rule. It does not require any condition and actions listed in it will always be applied. * - * @return the deploymentStatus value. + * @return the order value. */ - public DeploymentStatus deploymentStatus() { - return this.deploymentStatus; + public Integer order() { + return this.order; } /** - * Get the ruleSetName property: The name of the rule set containing the rule. + * Set the order property: The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. + * A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special + * rule. It does not require any condition and actions listed in it will always be applied. * - * @return the ruleSetName value. + * @param order the order value to set. + * @return the RuleProperties object itself. */ - @Override - public String ruleSetName() { - return this.ruleSetName; + public RuleProperties withOrder(Integer order) { + this.order = order; + return this; } /** - * {@inheritDoc} + * Get the conditions property: A list of conditions that must be matched for the actions to be executed. + * + * @return the conditions value. */ - @Override - public RuleProperties withOrder(Integer order) { - super.withOrder(order); - return this; + public List conditions() { + return this.conditions; } /** - * {@inheritDoc} + * Set the conditions property: A list of conditions that must be matched for the actions to be executed. + * + * @param conditions the conditions value to set. + * @return the RuleProperties object itself. */ - @Override public RuleProperties withConditions(List conditions) { - super.withConditions(conditions); + this.conditions = conditions; return this; } /** - * {@inheritDoc} + * Get the actions property: A list of actions that are executed when all the conditions of a rule are satisfied. + * + * @return the actions value. + */ + public List actions() { + return this.actions; + } + + /** + * Set the actions property: A list of actions that are executed when all the conditions of a rule are satisfied. + * + * @param actions the actions value to set. + * @return the RuleProperties object itself. */ - @Override public RuleProperties withActions(List actions) { - super.withActions(actions); + this.actions = actions; return this; } /** - * {@inheritDoc} + * Get the matchProcessingBehavior property: If this rule is a match should the rules engine continue running the + * remaining rules or stop. If not present, defaults to Continue. + * + * @return the matchProcessingBehavior value. + */ + public MatchProcessingBehavior matchProcessingBehavior() { + return this.matchProcessingBehavior; + } + + /** + * Set the matchProcessingBehavior property: If this rule is a match should the rules engine continue running the + * remaining rules or stop. If not present, defaults to Continue. + * + * @param matchProcessingBehavior the matchProcessingBehavior value to set. + * @return the RuleProperties object itself. */ - @Override public RuleProperties withMatchProcessingBehavior(MatchProcessingBehavior matchProcessingBehavior) { - super.withMatchProcessingBehavior(matchProcessingBehavior); + this.matchProcessingBehavior = matchProcessingBehavior; return this; } + /** + * Get the provisioningState property: Provisioning status. + * + * @return the provisioningState value. + */ + public AfdProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the deploymentStatus property: The deploymentStatus property. + * + * @return the deploymentStatus value. + */ + public DeploymentStatus deploymentStatus() { + return this.deploymentStatus; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ - @Override public void validate() { - super.validate(); + if (conditions() != null) { + conditions().forEach(e -> e.validate()); + } + if (actions() != null) { + actions().forEach(e -> e.validate()); + } } /** @@ -122,11 +199,11 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("order", order()); - jsonWriter.writeArrayField("conditions", conditions(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("actions", actions(), (writer, element) -> writer.writeJson(element)); + jsonWriter.writeNumberField("order", this.order); + jsonWriter.writeArrayField("conditions", this.conditions, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("actions", this.actions, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("matchProcessingBehavior", - matchProcessingBehavior() == null ? null : matchProcessingBehavior().toString()); + this.matchProcessingBehavior == null ? null : this.matchProcessingBehavior.toString()); return jsonWriter.writeEndObject(); } @@ -148,18 +225,18 @@ public static RuleProperties fromJson(JsonReader jsonReader) throws IOException if ("ruleSetName".equals(fieldName)) { deserializedRuleProperties.ruleSetName = reader.getString(); } else if ("order".equals(fieldName)) { - deserializedRuleProperties.withOrder(reader.getNullable(JsonReader::getInt)); + deserializedRuleProperties.order = reader.getNullable(JsonReader::getInt); } else if ("conditions".equals(fieldName)) { List conditions = reader.readArray(reader1 -> DeliveryRuleCondition.fromJson(reader1)); - deserializedRuleProperties.withConditions(conditions); + deserializedRuleProperties.conditions = conditions; } else if ("actions".equals(fieldName)) { List actions = reader.readArray(reader1 -> DeliveryRuleAction.fromJson(reader1)); - deserializedRuleProperties.withActions(actions); + deserializedRuleProperties.actions = actions; } else if ("matchProcessingBehavior".equals(fieldName)) { - deserializedRuleProperties - .withMatchProcessingBehavior(MatchProcessingBehavior.fromString(reader.getString())); + deserializedRuleProperties.matchProcessingBehavior + = MatchProcessingBehavior.fromString(reader.getString()); } else if ("provisioningState".equals(fieldName)) { deserializedRuleProperties.provisioningState = AfdProvisioningState.fromString(reader.getString()); } else if ("deploymentStatus".equals(fieldName)) { diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/RuleSetInner.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/RuleSetInner.java index 4906d8f5febc..a4f2edae412b 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/RuleSetInner.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/RuleSetInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent.models; @@ -25,7 +25,7 @@ public final class RuleSetInner extends ProxyResource { private RuleSetProperties innerProperties; /* - * Read only system data + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ private SystemData systemData; @@ -47,7 +47,7 @@ public final class RuleSetInner extends ProxyResource { /** * Creates an instance of RuleSetInner class. */ - public RuleSetInner() { + private RuleSetInner() { } /** @@ -60,7 +60,7 @@ private RuleSetProperties innerProperties() { } /** - * Get the systemData property: Read only system data. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/RuleSetProperties.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/RuleSetProperties.java index 5a1bd7e33d35..a4dbdc9b1a18 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/RuleSetProperties.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/RuleSetProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent.models; @@ -36,7 +36,7 @@ public final class RuleSetProperties extends AfdStateProperties { /** * Creates an instance of RuleSetProperties class. */ - public RuleSetProperties() { + private RuleSetProperties() { } /** @@ -75,7 +75,6 @@ public AfdProvisioningState provisioningState() { */ @Override public void validate() { - super.validate(); } /** diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/RuleUpdatePropertiesParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/RuleUpdatePropertiesParameters.java index c114fff15afd..25eab210b7cf 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/RuleUpdatePropertiesParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/RuleUpdatePropertiesParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent.models; @@ -19,7 +19,7 @@ * The JSON object that contains the properties of the rule to update. */ @Fluent -public class RuleUpdatePropertiesParameters implements JsonSerializable { +public final class RuleUpdatePropertiesParameters implements JsonSerializable { /* * The name of the rule set containing the rule. */ @@ -63,17 +63,6 @@ public String ruleSetName() { return this.ruleSetName; } - /** - * Set the ruleSetName property: The name of the rule set containing the rule. - * - * @param ruleSetName the ruleSetName value to set. - * @return the RuleUpdatePropertiesParameters object itself. - */ - RuleUpdatePropertiesParameters withRuleSetName(String ruleSetName) { - this.ruleSetName = ruleSetName; - return this; - } - /** * Get the order property: The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. * A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/SecretInner.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/SecretInner.java index 00727babd7c5..57cab7ce2212 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/SecretInner.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/SecretInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent.models; @@ -26,7 +26,7 @@ public final class SecretInner extends ProxyResource { private SecretProperties innerProperties; /* - * Read only system data + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ private SystemData systemData; @@ -61,7 +61,7 @@ private SecretProperties innerProperties() { } /** - * Get the systemData property: Read only system data. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/SecretProperties.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/SecretProperties.java index c970365890de..74786f6f5a17 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/SecretProperties.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/SecretProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent.models; @@ -101,7 +101,6 @@ public AfdProvisioningState provisioningState() { */ @Override public void validate() { - super.validate(); if (parameters() != null) { parameters().validate(); } diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/SecurityPolicyInner.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/SecurityPolicyInner.java index fe415a2455fc..ce46726b4c52 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/SecurityPolicyInner.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/SecurityPolicyInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent.models; @@ -26,7 +26,7 @@ public final class SecurityPolicyInner extends ProxyResource { private SecurityPolicyProperties innerProperties; /* - * Read only system data + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ private SystemData systemData; @@ -61,7 +61,7 @@ private SecurityPolicyProperties innerProperties() { } /** - * Get the systemData property: Read only system data. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/SecurityPolicyProperties.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/SecurityPolicyProperties.java index 4f55a83d843d..ab3d7828253d 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/SecurityPolicyProperties.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/SecurityPolicyProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent.models; @@ -101,7 +101,6 @@ public AfdProvisioningState provisioningState() { */ @Override public void validate() { - super.validate(); if (parameters() != null) { parameters().validate(); } diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/SecurityPolicyUpdateProperties.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/SecurityPolicyUpdateProperties.java index f5d718149fe9..21fc0fd4f39f 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/SecurityPolicyUpdateProperties.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/SecurityPolicyUpdateProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/SsoUriInner.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/SsoUriInner.java index c59d77241c99..fdaa384e1929 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/SsoUriInner.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/SsoUriInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent.models; @@ -24,7 +24,7 @@ public final class SsoUriInner implements JsonSerializable { /** * Creates an instance of SsoUriInner class. */ - public SsoUriInner() { + private SsoUriInner() { } /** diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/SupportedOptimizationTypesListResultInner.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/SupportedOptimizationTypesListResultInner.java index feccf162f80f..15e984be0aa3 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/SupportedOptimizationTypesListResultInner.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/SupportedOptimizationTypesListResultInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.fluent.models; @@ -27,7 +27,7 @@ public final class SupportedOptimizationTypesListResultInner /** * Creates an instance of SupportedOptimizationTypesListResultInner class. */ - public SupportedOptimizationTypesListResultInner() { + private SupportedOptimizationTypesListResultInner() { } /** diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/UsageInner.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/UsageInner.java index a2e4400e634a..d585dfffcfea 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/UsageInner.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/UsageInner.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.cdn.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -17,7 +17,7 @@ /** * Describes resource usage. */ -@Fluent +@Immutable public final class UsageInner implements JsonSerializable { /* * Resource identifier. @@ -47,7 +47,7 @@ public final class UsageInner implements JsonSerializable { /** * Creates an instance of UsageInner class. */ - public UsageInner() { + private UsageInner() { } /** @@ -68,17 +68,6 @@ public UsageUnit unit() { return this.unit; } - /** - * Set the unit property: An enum describing the unit of measurement. - * - * @param unit the unit value to set. - * @return the UsageInner object itself. - */ - public UsageInner withUnit(UsageUnit unit) { - this.unit = unit; - return this; - } - /** * Get the currentValue property: The current value of the usage. * @@ -88,17 +77,6 @@ public long currentValue() { return this.currentValue; } - /** - * Set the currentValue property: The current value of the usage. - * - * @param currentValue the currentValue value to set. - * @return the UsageInner object itself. - */ - public UsageInner withCurrentValue(long currentValue) { - this.currentValue = currentValue; - return this; - } - /** * Get the limit property: The limit of usage. * @@ -108,17 +86,6 @@ public long limit() { return this.limit; } - /** - * Set the limit property: The limit of usage. - * - * @param limit the limit value to set. - * @return the UsageInner object itself. - */ - public UsageInner withLimit(long limit) { - this.limit = limit; - return this; - } - /** * Get the name property: The name of the type of usage. * @@ -128,17 +95,6 @@ public UsageName name() { return this.name; } - /** - * Set the name property: The name of the type of usage. - * - * @param name the name value to set. - * @return the UsageInner object itself. - */ - public UsageInner withName(UsageName name) { - this.name = name; - return this; - } - /** * Validates the instance. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/ValidateCustomDomainOutputInner.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/ValidateCustomDomainOutputInner.java index c64ac9735d80..2840f5882c90 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/ValidateCustomDomainOutputInner.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/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.cdn.fluent.models; @@ -34,7 +34,7 @@ public final class ValidateCustomDomainOutputInner implements JsonSerializable { /* * The validation status. @@ -30,7 +30,7 @@ public final class ValidateSecretOutputInner implements JsonSerializable { /* * The dateTimeBegin property. @@ -45,7 +45,7 @@ public final class WafMetricsResponseInner implements JsonSerializable series() { return this.series; } - /** - * Set the series property: The series property. - * - * @param series the series value to set. - * @return the WafMetricsResponseInner object itself. - */ - public WafMetricsResponseInner withSeries(List series) { - this.series = series; - return this; - } - /** * Validates the instance. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/WafRankingsResponseInner.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/WafRankingsResponseInner.java index 9619bf311775..4f57bbaf9832 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/WafRankingsResponseInner.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/WafRankingsResponseInner.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.cdn.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; @@ -19,7 +19,7 @@ /** * Waf Rankings Response. */ -@Fluent +@Immutable public final class WafRankingsResponseInner implements JsonSerializable { /* * The dateTimeBegin property. @@ -44,7 +44,7 @@ public final class WafRankingsResponseInner implements JsonSerializable groups() { return this.groups; } - /** - * Set the groups property: The groups property. - * - * @param groups the groups value to set. - * @return the WafRankingsResponseInner object itself. - */ - public WafRankingsResponseInner withGroups(List groups) { - this.groups = groups; - return this; - } - /** * Get the data property: The data property. * @@ -116,17 +83,6 @@ public List data() { return this.data; } - /** - * Set the data property: The data property. - * - * @param data the data value to set. - * @return the WafRankingsResponseInner object itself. - */ - public WafRankingsResponseInner withData(List data) { - this.data = data; - return this; - } - /** * Validates the instance. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/WebAgentInner.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/WebAgentInner.java new file mode 100644 index 000000000000..0bff1c376394 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/WebAgentInner.java @@ -0,0 +1,271 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.cdn.models.AgentPath; +import com.azure.resourcemanager.cdn.models.ResourceReference; +import com.azure.resourcemanager.cdn.models.WebAgentProvisioningState; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * Defines a web agent resource for Azure CDN. + */ +@Fluent +public final class WebAgentInner extends Resource { + /* + * Properties of the web agent. + */ + private WebAgentProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of WebAgentInner class. + */ + public WebAgentInner() { + } + + /** + * Get the innerProperties property: Properties of the web agent. + * + * @return the innerProperties value. + */ + private WebAgentProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public WebAgentInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public WebAgentInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the description property: Optional textual description of the agent. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: Optional textual description of the agent. + * + * @param description the description value to set. + * @return the WebAgentInner object itself. + */ + public WebAgentInner withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new WebAgentProperties(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Get the systemPrompt property: System prompt for the web agent. + * + * @return the systemPrompt value. + */ + public String systemPrompt() { + return this.innerProperties() == null ? null : this.innerProperties().systemPrompt(); + } + + /** + * Set the systemPrompt property: System prompt for the web agent. + * + * @param systemPrompt the systemPrompt value to set. + * @return the WebAgentInner object itself. + */ + public WebAgentInner withSystemPrompt(String systemPrompt) { + if (this.innerProperties() == null) { + this.innerProperties = new WebAgentProperties(); + } + this.innerProperties().withSystemPrompt(systemPrompt); + return this; + } + + /** + * Get the paths property: List of paths associated with the web agent. + * + * @return the paths value. + */ + public List paths() { + return this.innerProperties() == null ? null : this.innerProperties().paths(); + } + + /** + * Set the paths property: List of paths associated with the web agent. + * + * @param paths the paths value to set. + * @return the WebAgentInner object itself. + */ + public WebAgentInner withPaths(List paths) { + if (this.innerProperties() == null) { + this.innerProperties = new WebAgentProperties(); + } + this.innerProperties().withPaths(paths); + return this; + } + + /** + * Get the profileAgentLinks property: References to agent links in CDN profiles. + * + * @return the profileAgentLinks value. + */ + public List profileAgentLinks() { + return this.innerProperties() == null ? null : this.innerProperties().profileAgentLinks(); + } + + /** + * Get the provisioningState property: Provisioning status of the web agent. + * + * @return the provisioningState value. + */ + public WebAgentProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WebAgentInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WebAgentInner 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 WebAgentInner. + */ + public static WebAgentInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WebAgentInner deserializedWebAgentInner = new WebAgentInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedWebAgentInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedWebAgentInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedWebAgentInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedWebAgentInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedWebAgentInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedWebAgentInner.innerProperties = WebAgentProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedWebAgentInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedWebAgentInner; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/WebAgentProperties.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/WebAgentProperties.java new file mode 100644 index 000000000000..d5c948446ba8 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/WebAgentProperties.java @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.fluent.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 com.azure.resourcemanager.cdn.models.AgentPath; +import com.azure.resourcemanager.cdn.models.ResourceReference; +import com.azure.resourcemanager.cdn.models.WebAgentProvisioningState; +import java.io.IOException; +import java.util.List; + +/** + * Defines properties of a web agent. + */ +@Fluent +public final class WebAgentProperties implements JsonSerializable { + /* + * Optional textual description of the agent. + */ + private String description; + + /* + * System prompt for the web agent. + */ + private String systemPrompt; + + /* + * List of paths associated with the web agent. + */ + private List paths; + + /* + * References to agent links in CDN profiles. + */ + private List profileAgentLinks; + + /* + * Provisioning status of the web agent. + */ + private WebAgentProvisioningState provisioningState; + + /** + * Creates an instance of WebAgentProperties class. + */ + public WebAgentProperties() { + } + + /** + * Get the description property: Optional textual description of the agent. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Optional textual description of the agent. + * + * @param description the description value to set. + * @return the WebAgentProperties object itself. + */ + public WebAgentProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the systemPrompt property: System prompt for the web agent. + * + * @return the systemPrompt value. + */ + public String systemPrompt() { + return this.systemPrompt; + } + + /** + * Set the systemPrompt property: System prompt for the web agent. + * + * @param systemPrompt the systemPrompt value to set. + * @return the WebAgentProperties object itself. + */ + public WebAgentProperties withSystemPrompt(String systemPrompt) { + this.systemPrompt = systemPrompt; + return this; + } + + /** + * Get the paths property: List of paths associated with the web agent. + * + * @return the paths value. + */ + public List paths() { + return this.paths; + } + + /** + * Set the paths property: List of paths associated with the web agent. + * + * @param paths the paths value to set. + * @return the WebAgentProperties object itself. + */ + public WebAgentProperties withPaths(List paths) { + this.paths = paths; + return this; + } + + /** + * Get the profileAgentLinks property: References to agent links in CDN profiles. + * + * @return the profileAgentLinks value. + */ + public List profileAgentLinks() { + return this.profileAgentLinks; + } + + /** + * Get the provisioningState property: Provisioning status of the web agent. + * + * @return the provisioningState value. + */ + public WebAgentProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (paths() != null) { + paths().forEach(e -> e.validate()); + } + if (profileAgentLinks() != null) { + profileAgentLinks().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeStringField("systemPrompt", this.systemPrompt); + jsonWriter.writeArrayField("paths", this.paths, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WebAgentProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WebAgentProperties 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 WebAgentProperties. + */ + public static WebAgentProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WebAgentProperties deserializedWebAgentProperties = new WebAgentProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("description".equals(fieldName)) { + deserializedWebAgentProperties.description = reader.getString(); + } else if ("systemPrompt".equals(fieldName)) { + deserializedWebAgentProperties.systemPrompt = reader.getString(); + } else if ("paths".equals(fieldName)) { + List paths = reader.readArray(reader1 -> AgentPath.fromJson(reader1)); + deserializedWebAgentProperties.paths = paths; + } else if ("profileAgentLinks".equals(fieldName)) { + List profileAgentLinks + = reader.readArray(reader1 -> ResourceReference.fromJson(reader1)); + deserializedWebAgentProperties.profileAgentLinks = profileAgentLinks; + } else if ("provisioningState".equals(fieldName)) { + deserializedWebAgentProperties.provisioningState + = WebAgentProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedWebAgentProperties; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/WebAgentPropertiesUpdateParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/WebAgentPropertiesUpdateParameters.java new file mode 100644 index 000000000000..d8673bc3f91f --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/WebAgentPropertiesUpdateParameters.java @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.fluent.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 com.azure.resourcemanager.cdn.models.AgentPath; +import java.io.IOException; +import java.util.List; + +/** + * Defines properties of a web agent that can be updated. + */ +@Fluent +public final class WebAgentPropertiesUpdateParameters implements JsonSerializable { + /* + * Optional textual description of the agent. + */ + private String description; + + /* + * System prompt for the web agent. + */ + private String systemPrompt; + + /* + * List of paths associated with the web agent. + */ + private List paths; + + /** + * Creates an instance of WebAgentPropertiesUpdateParameters class. + */ + public WebAgentPropertiesUpdateParameters() { + } + + /** + * Get the description property: Optional textual description of the agent. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Optional textual description of the agent. + * + * @param description the description value to set. + * @return the WebAgentPropertiesUpdateParameters object itself. + */ + public WebAgentPropertiesUpdateParameters withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the systemPrompt property: System prompt for the web agent. + * + * @return the systemPrompt value. + */ + public String systemPrompt() { + return this.systemPrompt; + } + + /** + * Set the systemPrompt property: System prompt for the web agent. + * + * @param systemPrompt the systemPrompt value to set. + * @return the WebAgentPropertiesUpdateParameters object itself. + */ + public WebAgentPropertiesUpdateParameters withSystemPrompt(String systemPrompt) { + this.systemPrompt = systemPrompt; + return this; + } + + /** + * Get the paths property: List of paths associated with the web agent. + * + * @return the paths value. + */ + public List paths() { + return this.paths; + } + + /** + * Set the paths property: List of paths associated with the web agent. + * + * @param paths the paths value to set. + * @return the WebAgentPropertiesUpdateParameters object itself. + */ + public WebAgentPropertiesUpdateParameters withPaths(List paths) { + this.paths = paths; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (paths() != null) { + paths().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeStringField("systemPrompt", this.systemPrompt); + jsonWriter.writeArrayField("paths", this.paths, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WebAgentPropertiesUpdateParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WebAgentPropertiesUpdateParameters 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 WebAgentPropertiesUpdateParameters. + */ + public static WebAgentPropertiesUpdateParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WebAgentPropertiesUpdateParameters deserializedWebAgentPropertiesUpdateParameters + = new WebAgentPropertiesUpdateParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("description".equals(fieldName)) { + deserializedWebAgentPropertiesUpdateParameters.description = reader.getString(); + } else if ("systemPrompt".equals(fieldName)) { + deserializedWebAgentPropertiesUpdateParameters.systemPrompt = reader.getString(); + } else if ("paths".equals(fieldName)) { + List paths = reader.readArray(reader1 -> AgentPath.fromJson(reader1)); + deserializedWebAgentPropertiesUpdateParameters.paths = paths; + } else { + reader.skipChildren(); + } + } + + return deserializedWebAgentPropertiesUpdateParameters; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/WebApplicationFirewallPolicyProperties.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/WebApplicationFirewallPolicyProperties.java new file mode 100644 index 000000000000..267df642ffeb --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/WebApplicationFirewallPolicyProperties.java @@ -0,0 +1,268 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.fluent.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 com.azure.resourcemanager.cdn.models.CustomRuleListAfd; +import com.azure.resourcemanager.cdn.models.FrontendEndpointLink; +import com.azure.resourcemanager.cdn.models.ManagedRuleSetListAfd; +import com.azure.resourcemanager.cdn.models.PolicyResourceState; +import com.azure.resourcemanager.cdn.models.PolicySettingsAfd; +import com.azure.resourcemanager.cdn.models.RoutingRuleLink; +import com.azure.resourcemanager.cdn.models.SecurityPolicyLink; +import java.io.IOException; +import java.util.List; + +/** + * Defines web application firewall policy properties. + */ +@Fluent +public final class WebApplicationFirewallPolicyProperties + implements JsonSerializable { + /* + * Describes settings for the policy. + */ + private PolicySettingsAfd policySettings; + + /* + * Describes custom rules inside the policy. + */ + private CustomRuleListAfd customRules; + + /* + * Describes managed rules inside the policy. + */ + private ManagedRuleSetListAfd managedRules; + + /* + * Describes Frontend Endpoints associated with this Web Application Firewall policy. + */ + private List frontendEndpointLinks; + + /* + * Describes Routing Rules associated with this Web Application Firewall policy. + */ + private List routingRuleLinks; + + /* + * Describes Security Policy associated with this Web Application Firewall policy. + */ + private List securityPolicyLinks; + + /* + * Provisioning state of the policy. + */ + private String provisioningState; + + /* + * The resourceState property. + */ + private PolicyResourceState resourceState; + + /** + * Creates an instance of WebApplicationFirewallPolicyProperties class. + */ + public WebApplicationFirewallPolicyProperties() { + } + + /** + * Get the policySettings property: Describes settings for the policy. + * + * @return the policySettings value. + */ + public PolicySettingsAfd policySettings() { + return this.policySettings; + } + + /** + * Set the policySettings property: Describes settings for the policy. + * + * @param policySettings the policySettings value to set. + * @return the WebApplicationFirewallPolicyProperties object itself. + */ + public WebApplicationFirewallPolicyProperties withPolicySettings(PolicySettingsAfd policySettings) { + this.policySettings = policySettings; + return this; + } + + /** + * Get the customRules property: Describes custom rules inside the policy. + * + * @return the customRules value. + */ + public CustomRuleListAfd customRules() { + return this.customRules; + } + + /** + * Set the customRules property: Describes custom rules inside the policy. + * + * @param customRules the customRules value to set. + * @return the WebApplicationFirewallPolicyProperties object itself. + */ + public WebApplicationFirewallPolicyProperties withCustomRules(CustomRuleListAfd customRules) { + this.customRules = customRules; + return this; + } + + /** + * Get the managedRules property: Describes managed rules inside the policy. + * + * @return the managedRules value. + */ + public ManagedRuleSetListAfd managedRules() { + return this.managedRules; + } + + /** + * Set the managedRules property: Describes managed rules inside the policy. + * + * @param managedRules the managedRules value to set. + * @return the WebApplicationFirewallPolicyProperties object itself. + */ + public WebApplicationFirewallPolicyProperties withManagedRules(ManagedRuleSetListAfd managedRules) { + this.managedRules = managedRules; + return this; + } + + /** + * Get the frontendEndpointLinks property: Describes Frontend Endpoints associated with this Web Application + * Firewall policy. + * + * @return the frontendEndpointLinks value. + */ + public List frontendEndpointLinks() { + return this.frontendEndpointLinks; + } + + /** + * Get the routingRuleLinks property: Describes Routing Rules associated with this Web Application Firewall policy. + * + * @return the routingRuleLinks value. + */ + public List routingRuleLinks() { + return this.routingRuleLinks; + } + + /** + * Get the securityPolicyLinks property: Describes Security Policy associated with this Web Application Firewall + * policy. + * + * @return the securityPolicyLinks value. + */ + public List securityPolicyLinks() { + return this.securityPolicyLinks; + } + + /** + * Get the provisioningState property: Provisioning state of the policy. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the resourceState property: The resourceState property. + * + * @return the resourceState value. + */ + public PolicyResourceState resourceState() { + return this.resourceState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (policySettings() != null) { + policySettings().validate(); + } + if (customRules() != null) { + customRules().validate(); + } + if (managedRules() != null) { + managedRules().validate(); + } + if (frontendEndpointLinks() != null) { + frontendEndpointLinks().forEach(e -> e.validate()); + } + if (routingRuleLinks() != null) { + routingRuleLinks().forEach(e -> e.validate()); + } + if (securityPolicyLinks() != null) { + securityPolicyLinks().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("policySettings", this.policySettings); + jsonWriter.writeJsonField("customRules", this.customRules); + jsonWriter.writeJsonField("managedRules", this.managedRules); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WebApplicationFirewallPolicyProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WebApplicationFirewallPolicyProperties 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 WebApplicationFirewallPolicyProperties. + */ + public static WebApplicationFirewallPolicyProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WebApplicationFirewallPolicyProperties deserializedWebApplicationFirewallPolicyProperties + = new WebApplicationFirewallPolicyProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("policySettings".equals(fieldName)) { + deserializedWebApplicationFirewallPolicyProperties.policySettings + = PolicySettingsAfd.fromJson(reader); + } else if ("customRules".equals(fieldName)) { + deserializedWebApplicationFirewallPolicyProperties.customRules = CustomRuleListAfd.fromJson(reader); + } else if ("managedRules".equals(fieldName)) { + deserializedWebApplicationFirewallPolicyProperties.managedRules + = ManagedRuleSetListAfd.fromJson(reader); + } else if ("frontendEndpointLinks".equals(fieldName)) { + List frontendEndpointLinks + = reader.readArray(reader1 -> FrontendEndpointLink.fromJson(reader1)); + deserializedWebApplicationFirewallPolicyProperties.frontendEndpointLinks = frontendEndpointLinks; + } else if ("routingRuleLinks".equals(fieldName)) { + List routingRuleLinks + = reader.readArray(reader1 -> RoutingRuleLink.fromJson(reader1)); + deserializedWebApplicationFirewallPolicyProperties.routingRuleLinks = routingRuleLinks; + } else if ("securityPolicyLinks".equals(fieldName)) { + List securityPolicyLinks + = reader.readArray(reader1 -> SecurityPolicyLink.fromJson(reader1)); + deserializedWebApplicationFirewallPolicyProperties.securityPolicyLinks = securityPolicyLinks; + } else if ("provisioningState".equals(fieldName)) { + deserializedWebApplicationFirewallPolicyProperties.provisioningState = reader.getString(); + } else if ("resourceState".equals(fieldName)) { + deserializedWebApplicationFirewallPolicyProperties.resourceState + = PolicyResourceState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedWebApplicationFirewallPolicyProperties; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/package-info.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/package-info.java index 3e35f212eb72..9d3f000d0953 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/package-info.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/models/package-info.java @@ -1,9 +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 containing the inner data models for CdnManagementClient. - * Cdn Management Client. + * Package containing the inner data models for Cdn. + * Use these APIs to manage Azure Front Door and CDN resources through the Azure Resource Manager. You must make sure + * that requests made to these resources are secure. */ package com.azure.resourcemanager.cdn.fluent.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/package-info.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/package-info.java index 27b6b3b2230a..6431bb5c145c 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/package-info.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/package-info.java @@ -1,9 +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 containing the service clients for CdnManagementClient. - * Cdn Management Client. + * Package containing the service clients for Cdn. + * Use these APIs to manage Azure Front Door and CDN resources through the Azure Resource Manager. You must make sure + * that requests made to these resources are secure. */ package com.azure.resourcemanager.cdn.fluent; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/AfdCustomDomainsClientImpl.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/AfdCustomDomainsClientImpl.java index f51b24734589..cddeb484a6c2 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/AfdCustomDomainsClientImpl.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/AfdCustomDomainsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.implementation; @@ -35,7 +35,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.cdn.fluent.AfdCustomDomainsClient; import com.azure.resourcemanager.cdn.fluent.models.AfdDomainInner; -import com.azure.resourcemanager.cdn.models.AfdDomainListResult; +import com.azure.resourcemanager.cdn.implementation.models.AFDDomainListResult; import com.azure.resourcemanager.cdn.models.AfdDomainUpdateParameters; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -70,230 +70,82 @@ public final class AfdCustomDomainsClientImpl implements AfdCustomDomainsClient * The interface defining all the services for CdnManagementClientAfdCustomDomains to be used by the proxy service * to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "CdnManagementClientA") + @Host("{endpoint}") + @ServiceInterface(name = "CdnManagementClientAfdCustomDomains") public interface AfdCustomDomainsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByProfile(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains/{customDomainName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("customDomainName") String customDomainName, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("customDomainName") String customDomainName, @HeaderParam("Accept") String accept, + Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains/{customDomainName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("customDomainName") String customDomainName, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") AfdDomainInner customDomain, - @HeaderParam("Accept") String accept, Context context); + @PathParam("customDomainName") String customDomainName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") AfdDomainInner customDomain, + Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains/{customDomainName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("customDomainName") String customDomainName, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") AfdDomainUpdateParameters customDomainUpdateProperties, - @HeaderParam("Accept") String accept, Context context); + @PathParam("customDomainName") String customDomainName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") AfdDomainUpdateParameters customDomainUpdateProperties, 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.Cdn/profiles/{profileName}/customDomains/{customDomainName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("customDomainName") String customDomainName, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("customDomainName") String customDomainName, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + 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); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains/{customDomainName}/refreshValidationToken") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> refreshValidationToken(@HostParam("$host") String endpoint, + Mono>> refreshValidationToken(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("customDomainName") String customDomainName, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("customDomainName") String customDomainName, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByProfileNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listByProfileNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } - /** - * Lists existing AzureFrontDoor domains. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 domains 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 (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 (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByProfile(this.client.getEndpoint(), resourceGroupName, profileName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists existing AzureFrontDoor domains. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 domains 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 (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 (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByProfile(this.client.getEndpoint(), resourceGroupName, profileName, this.client.getSubscriptionId(), - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists existing AzureFrontDoor domains. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 domains as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByProfileAsync(String resourceGroupName, String profileName) { - return new PagedFlux<>(() -> listByProfileSinglePageAsync(resourceGroupName, profileName), - nextLink -> listByProfileNextSinglePageAsync(nextLink)); - } - - /** - * Lists existing AzureFrontDoor domains. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 domains 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)); - } - - /** - * Lists existing AzureFrontDoor domains. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 domains as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByProfile(String resourceGroupName, String profileName) { - return new PagedIterable<>(listByProfileAsync(resourceGroupName, profileName)); - } - - /** - * Lists existing AzureFrontDoor domains. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 domains 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)); - } - /** * Gets an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource * group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -308,6 +160,10 @@ public Mono> getWithResponseAsync(String resourceGroupN 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.")); @@ -319,14 +175,10 @@ public Mono> getWithResponseAsync(String resourceGroupN return Mono .error(new IllegalArgumentException("Parameter customDomainName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, profileName, - customDomainName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, customDomainName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -334,9 +186,9 @@ public Mono> getWithResponseAsync(String resourceGroupN * Gets an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource * group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -352,6 +204,10 @@ private Mono> getWithResponseAsync(String resourceGroup 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.")); @@ -363,23 +219,19 @@ private Mono> getWithResponseAsync(String resourceGroup return Mono .error(new IllegalArgumentException("Parameter customDomainName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), resourceGroupName, profileName, customDomainName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, customDomainName, accept, context); } /** * Gets an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource * group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -397,9 +249,9 @@ public Mono getAsync(String resourceGroupName, String profileNam * Gets an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource * group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -418,9 +270,9 @@ public Response getWithResponse(String resourceGroupName, String * Gets an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource * group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -436,9 +288,9 @@ public AfdDomainInner get(String resourceGroupName, String profileName, String c /** * Creates a new domain within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param customDomain Domain properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -454,6 +306,10 @@ public Mono>> createWithResponseAsync(String resourceG 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.")); @@ -465,29 +321,26 @@ public Mono>> createWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter customDomainName 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 (customDomain == null) { return Mono.error(new IllegalArgumentException("Parameter customDomain is required and cannot be null.")); } else { customDomain.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.create(this.client.getEndpoint(), resourceGroupName, profileName, customDomainName, - this.client.getSubscriptionId(), this.client.getApiVersion(), customDomain, accept, context)) + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, customDomainName, contentType, accept, + customDomain, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates a new domain within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param customDomain Domain properties. * @param context The context to associate with this operation. @@ -504,6 +357,10 @@ private Mono>> createWithResponseAsync(String resource 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.")); @@ -515,27 +372,24 @@ private Mono>> createWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter customDomainName 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 (customDomain == null) { return Mono.error(new IllegalArgumentException("Parameter customDomain is required and cannot be null.")); } else { customDomain.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), resourceGroupName, profileName, customDomainName, - this.client.getSubscriptionId(), this.client.getApiVersion(), customDomain, accept, context); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, customDomainName, contentType, accept, customDomain, context); } /** * Creates a new domain within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param customDomain Domain properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -556,9 +410,9 @@ public PollerFlux, AfdDomainInner> beginCreateAsync(S /** * Creates a new domain within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param customDomain Domain properties. * @param context The context to associate with this operation. @@ -581,9 +435,9 @@ private PollerFlux, AfdDomainInner> beginCreateAsync( /** * Creates a new domain within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param customDomain Domain properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -601,9 +455,9 @@ public SyncPoller, AfdDomainInner> beginCreate(String /** * Creates a new domain within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param customDomain Domain properties. * @param context The context to associate with this operation. @@ -623,9 +477,9 @@ public SyncPoller, AfdDomainInner> beginCreate(String /** * Creates a new domain within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param customDomain Domain properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -644,9 +498,9 @@ public Mono createAsync(String resourceGroupName, String profile /** * Creates a new domain within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param customDomain Domain properties. * @param context The context to associate with this operation. @@ -666,9 +520,9 @@ private Mono createAsync(String resourceGroupName, String profil /** * Creates a new domain within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param customDomain Domain properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -686,9 +540,9 @@ public AfdDomainInner create(String resourceGroupName, String profileName, Strin /** * Creates a new domain within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param customDomain Domain properties. * @param context The context to associate with this operation. @@ -707,9 +561,9 @@ public AfdDomainInner create(String resourceGroupName, String profileName, Strin /** * Updates an existing domain within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param customDomainUpdateProperties Domain properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -725,6 +579,10 @@ public Mono>> updateWithResponseAsync(String resourceG 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.")); @@ -736,30 +594,27 @@ public Mono>> updateWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter customDomainName 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 (customDomainUpdateProperties == null) { return Mono.error( new IllegalArgumentException("Parameter customDomainUpdateProperties is required and cannot be null.")); } else { customDomainUpdateProperties.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, profileName, - customDomainName, this.client.getSubscriptionId(), this.client.getApiVersion(), - customDomainUpdateProperties, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, customDomainName, contentType, accept, + customDomainUpdateProperties, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates an existing domain within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param customDomainUpdateProperties Domain properties. * @param context The context to associate with this operation. @@ -776,6 +631,10 @@ private Mono>> updateWithResponseAsync(String resource 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.")); @@ -787,29 +646,26 @@ private Mono>> updateWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter customDomainName 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 (customDomainUpdateProperties == null) { return Mono.error( new IllegalArgumentException("Parameter customDomainUpdateProperties is required and cannot be null.")); } else { customDomainUpdateProperties.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), resourceGroupName, profileName, customDomainName, - this.client.getSubscriptionId(), this.client.getApiVersion(), customDomainUpdateProperties, accept, + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, customDomainName, contentType, accept, customDomainUpdateProperties, context); } /** * Updates an existing domain within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param customDomainUpdateProperties Domain properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -830,9 +686,9 @@ public PollerFlux, AfdDomainInner> beginUpdateAsync(S /** * Updates an existing domain within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param customDomainUpdateProperties Domain properties. * @param context The context to associate with this operation. @@ -856,9 +712,9 @@ private PollerFlux, AfdDomainInner> beginUpdateAsync( /** * Updates an existing domain within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param customDomainUpdateProperties Domain properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -877,9 +733,9 @@ public SyncPoller, AfdDomainInner> beginUpdate(String /** * Updates an existing domain within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param customDomainUpdateProperties Domain properties. * @param context The context to associate with this operation. @@ -901,9 +757,9 @@ public SyncPoller, AfdDomainInner> beginUpdate(String /** * Updates an existing domain within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param customDomainUpdateProperties Domain properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -922,9 +778,9 @@ public Mono updateAsync(String resourceGroupName, String profile /** * Updates an existing domain within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param customDomainUpdateProperties Domain properties. * @param context The context to associate with this operation. @@ -945,9 +801,9 @@ private Mono updateAsync(String resourceGroupName, String profil /** * Updates an existing domain within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param customDomainUpdateProperties Domain properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -965,9 +821,9 @@ public AfdDomainInner update(String resourceGroupName, String profileName, Strin /** * Updates an existing domain within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param customDomainUpdateProperties Domain properties. * @param context The context to associate with this operation. @@ -988,9 +844,9 @@ public AfdDomainInner update(String resourceGroupName, String profileName, Strin * Deletes an existing AzureFrontDoor domain with the specified domain name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1004,6 +860,10 @@ public Mono>> deleteWithResponseAsync(String resourceG 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.")); @@ -1015,14 +875,9 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter customDomainName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, profileName, - customDomainName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, customDomainName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1030,9 +885,9 @@ public Mono>> deleteWithResponseAsync(String resourceG * Deletes an existing AzureFrontDoor domain with the specified domain name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1047,6 +902,10 @@ private Mono>> deleteWithResponseAsync(String resource 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.")); @@ -1058,23 +917,18 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter customDomainName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), resourceGroupName, profileName, customDomainName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, customDomainName, context); } /** * Deletes an existing AzureFrontDoor domain with the specified domain name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1094,9 +948,9 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN * Deletes an existing AzureFrontDoor domain with the specified domain name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1118,9 +972,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * Deletes an existing AzureFrontDoor domain with the specified domain name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1137,9 +991,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * Deletes an existing AzureFrontDoor domain with the specified domain name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1157,9 +1011,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * Deletes an existing AzureFrontDoor domain with the specified domain name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1176,9 +1030,9 @@ public Mono deleteAsync(String resourceGroupName, String profileName, Stri * Deletes an existing AzureFrontDoor domain with the specified domain name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1197,9 +1051,9 @@ private Mono deleteAsync(String resourceGroupName, String profileName, Str * Deletes an existing AzureFrontDoor domain with the specified domain name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1214,9 +1068,9 @@ public void delete(String resourceGroupName, String profileName, String customDo * Deletes an existing AzureFrontDoor domain with the specified domain name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1228,12 +1082,160 @@ public void delete(String resourceGroupName, String profileName, String customDo deleteAsync(resourceGroupName, profileName, customDomainName, context).block(); } + /** + * Lists existing AzureFrontDoor domains. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AFDDomain list operation 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 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())); + } + + /** + * Lists existing AzureFrontDoor domains. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AFDDomain list operation 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 accept = "application/json"; + context = this.client.mergeContext(context); + return 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)); + } + + /** + * Lists existing AzureFrontDoor domains. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AFDDomain list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByProfileAsync(String resourceGroupName, String profileName) { + return new PagedFlux<>(() -> listByProfileSinglePageAsync(resourceGroupName, profileName), + nextLink -> listByProfileNextSinglePageAsync(nextLink)); + } + + /** + * Lists existing AzureFrontDoor domains. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AFDDomain list operation 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)); + } + + /** + * Lists existing AzureFrontDoor domains. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AFDDomain list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByProfile(String resourceGroupName, String profileName) { + return new PagedIterable<>(listByProfileAsync(resourceGroupName, profileName)); + } + + /** + * Lists existing AzureFrontDoor domains. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AFDDomain list operation 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)); + } + /** * Updates the domain validation token. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1247,6 +1249,10 @@ public Mono>> refreshValidationTokenWithResponseAsync( 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.")); @@ -1258,24 +1264,19 @@ public Mono>> refreshValidationTokenWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter customDomainName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil .withContext( - context -> service.refreshValidationToken(this.client.getEndpoint(), resourceGroupName, profileName, - customDomainName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + context -> service.refreshValidationToken(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, customDomainName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates the domain validation token. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1290,6 +1291,10 @@ private Mono>> refreshValidationTokenWithResponseAsync 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.")); @@ -1301,22 +1306,17 @@ private Mono>> refreshValidationTokenWithResponseAsync return Mono .error(new IllegalArgumentException("Parameter customDomainName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; context = this.client.mergeContext(context); - return service.refreshValidationToken(this.client.getEndpoint(), resourceGroupName, profileName, - customDomainName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); + return service.refreshValidationToken(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, customDomainName, context); } /** * Updates the domain validation token. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1335,9 +1335,9 @@ public PollerFlux, Void> beginRefreshValidationTokenAsync(Strin /** * Updates the domain validation token. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1358,9 +1358,9 @@ private PollerFlux, Void> beginRefreshValidationTokenAsync(Stri /** * Updates the domain validation token. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1376,9 +1376,9 @@ public SyncPoller, Void> beginRefreshValidationToken(String res /** * Updates the domain validation token. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1396,9 +1396,9 @@ public SyncPoller, Void> beginRefreshValidationToken(String res /** * Updates the domain validation token. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1415,9 +1415,9 @@ public Mono refreshValidationTokenAsync(String resourceGroupName, String p /** * Updates the domain validation token. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1435,9 +1435,9 @@ private Mono refreshValidationTokenAsync(String resourceGroupName, String /** * Updates the domain validation token. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1451,9 +1451,9 @@ public void refreshValidationToken(String resourceGroupName, String profileName, /** * Updates the domain validation token. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param customDomainName Name of the domain under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1473,7 +1473,7 @@ public void refreshValidationToken(String resourceGroupName, String profileName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 domains along with {@link PagedResponse} on successful completion of + * @return the response of a AFDDomain list operation along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -1501,7 +1501,7 @@ private Mono> listByProfileNextSinglePageAsync(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list domains along with {@link PagedResponse} on successful completion of + * @return the response of a AFDDomain list operation along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/AfdEndpointImpl.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/AfdEndpointImpl.java new file mode 100644 index 000000000000..d9ee665d3971 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/AfdEndpointImpl.java @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.cdn.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.resourcemanager.cdn.fluent.models.AfdEndpointInner; +import com.azure.resourcemanager.cdn.models.AfdEndpoint; +import com.azure.resourcemanager.cdn.models.AfdEndpointUpdateParameters; +import com.azure.resourcemanager.cdn.models.AfdProvisioningState; +import com.azure.resourcemanager.cdn.models.AfdPurgeParameters; +import com.azure.resourcemanager.cdn.models.AutoGeneratedDomainNameLabelScope; +import com.azure.resourcemanager.cdn.models.CdnProfile; +import com.azure.resourcemanager.cdn.models.CustomDomainValidationResult; +import com.azure.resourcemanager.cdn.models.DeploymentStatus; +import com.azure.resourcemanager.cdn.models.EnabledState; +import com.azure.resourcemanager.cdn.models.EnforceMtlsEnabledState; +import com.azure.resourcemanager.cdn.models.Usage; +import com.azure.resourcemanager.cdn.models.ValidateCustomDomainInput; +import com.azure.resourcemanager.resources.fluentcore.arm.models.implementation.ExternalChildResourceImpl; +import com.azure.resourcemanager.resources.fluentcore.utils.PagedConverter; +import reactor.core.publisher.Mono; + +import java.util.List; +import java.util.Objects; + +/** + * Implementation for {@link AfdEndpoint}. + */ +class AfdEndpointImpl extends ExternalChildResourceImpl + implements AfdEndpoint, AfdEndpoint.DefinitionStages.Blank, + AfdEndpoint.DefinitionStages.WithAttach, + AfdEndpoint.UpdateDefinitionStages.Blank, + AfdEndpoint.UpdateDefinitionStages.WithAttach, AfdEndpoint.Update { + + AfdEndpointImpl(String name, CdnProfileImpl parent, AfdEndpointInner inner) { + super(name, parent, inner); + } + + @Override + public String id() { + return this.innerModel().id(); + } + + @Override + public EnabledState enabledState() { + return this.innerModel().enabledState(); + } + + @Override + public EnforceMtlsEnabledState enforceMtls() { + return this.innerModel().enforceMtls(); + } + + @Override + public AutoGeneratedDomainNameLabelScope autoGeneratedDomainNameLabelScope() { + return this.innerModel().autoGeneratedDomainNameLabelScope(); + } + + @Override + public AfdProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + @Override + public DeploymentStatus deploymentStatus() { + return this.innerModel().deploymentStatus(); + } + + @Override + public String hostname() { + return this.innerModel().hostname(); + } + + @Override + public void purgeContent(List contentPaths) { + this.purgeContent(contentPaths, null); + } + + @Override + public void purgeContent(List contentPaths, List domains) { + this.purgeContentAsync(contentPaths, domains).block(); + } + + @Override + public Mono purgeContentAsync(List contentPaths) { + return purgeContentAsync(contentPaths, null); + } + + @Override + public Mono purgeContentAsync(List contentPaths, List domains) { + AfdPurgeParameters parameters = buildPurgeParameters(contentPaths, domains); + return this.parent() + .manager() + .serviceClient() + .getAfdEndpoints() + .purgeContentAsync(this.parent().resourceGroupName(), this.parent().name(), this.name(), parameters); + } + + @Override + public CustomDomainValidationResult validateCustomDomain(String hostName) { + return this.validateCustomDomainAsync(hostName).block(); + } + + @Override + public Mono validateCustomDomainAsync(String hostName) { + Objects.requireNonNull(hostName, "'hostName' cannot be null."); + ValidateCustomDomainInput input = new ValidateCustomDomainInput().withHostname(hostName); + return this.parent() + .manager() + .serviceClient() + .getAfdEndpoints() + .validateCustomDomainAsync(this.parent().resourceGroupName(), this.parent().name(), this.name(), input) + .map(CustomDomainValidationResult::new); + } + + @Override + public PagedIterable listResourceUsage() { + return PagedConverter.mapPage( + this.parent() + .manager() + .serviceClient() + .getAfdEndpoints() + .listResourceUsage(this.parent().resourceGroupName(), this.parent().name(), this.name()), + UsageImpl::new); + } + + @Override + public Mono createResourceAsync() { + final AfdEndpointImpl self = this; + return this.parent() + .manager() + .serviceClient() + .getAfdEndpoints() + .createAsync(this.parent().resourceGroupName(), this.parent().name(), this.name(), this.innerModel()) + .map(inner -> { + self.setInner(inner); + return self; + }); + } + + @Override + public Mono updateResourceAsync() { + final AfdEndpointImpl self = this; + AfdEndpointUpdateParameters parameters = new AfdEndpointUpdateParameters().withTags(this.innerModel().tags()) + .withEnabledState(this.innerModel().enabledState()) + .withEnforceMtls(this.innerModel().enforceMtls()); + return this.parent() + .manager() + .serviceClient() + .getAfdEndpoints() + .updateAsync(this.parent().resourceGroupName(), this.parent().name(), this.name(), parameters) + .map(inner -> { + self.setInner(inner); + return self; + }); + } + + @Override + public Mono deleteResourceAsync() { + return this.parent() + .manager() + .serviceClient() + .getAfdEndpoints() + .deleteAsync(this.parent().resourceGroupName(), this.parent().name(), this.name()); + } + + @Override + protected Mono getInnerAsync() { + return this.parent() + .manager() + .serviceClient() + .getAfdEndpoints() + .getAsync(this.parent().resourceGroupName(), this.parent().name(), this.name()); + } + + @Override + public CdnProfileImpl attach() { + return this.parent().withAfdEndpoint(this); + } + + @Override + public AfdEndpointImpl withEnabledState(EnabledState enabledState) { + this.innerModel().withEnabledState(enabledState); + return this; + } + + @Override + public AfdEndpointImpl withEnforceMtls(EnforceMtlsEnabledState enforceMtls) { + this.innerModel().withEnforceMtls(enforceMtls); + return this; + } + + @Override + public AfdEndpointImpl withAutoGeneratedDomainNameLabelScope(AutoGeneratedDomainNameLabelScope scope) { + this.innerModel().withAutoGeneratedDomainNameLabelScope(scope); + return this; + } + + private static AfdPurgeParameters buildPurgeParameters(List contentPaths, List domains) { + if (contentPaths == null || contentPaths.isEmpty()) { + throw new IllegalArgumentException("contentPaths cannot be null or empty."); + } + AfdPurgeParameters parameters = new AfdPurgeParameters().withContentPaths(contentPaths); + if (domains != null && !domains.isEmpty()) { + parameters.withDomains(domains); + } + return parameters; + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/AfdEndpointsClientImpl.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/AfdEndpointsClientImpl.java index e7af1eb3ae8e..e5fae1e95bb5 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/AfdEndpointsClientImpl.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/AfdEndpointsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.implementation; @@ -37,10 +37,10 @@ import com.azure.resourcemanager.cdn.fluent.models.AfdEndpointInner; import com.azure.resourcemanager.cdn.fluent.models.UsageInner; import com.azure.resourcemanager.cdn.fluent.models.ValidateCustomDomainOutputInner; -import com.azure.resourcemanager.cdn.models.AfdEndpointListResult; +import com.azure.resourcemanager.cdn.implementation.models.AFDEndpointListResult; +import com.azure.resourcemanager.cdn.implementation.models.UsagesListResult; import com.azure.resourcemanager.cdn.models.AfdEndpointUpdateParameters; import com.azure.resourcemanager.cdn.models.AfdPurgeParameters; -import com.azure.resourcemanager.cdn.models.UsagesListResult; import com.azure.resourcemanager.cdn.models.ValidateCustomDomainInput; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -75,93 +75,91 @@ public final class AfdEndpointsClientImpl implements AfdEndpointsClient { * The interface defining all the services for CdnManagementClientAfdEndpoints to be used by the proxy service to * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "CdnManagementClientA") + @Host("{endpoint}") + @ServiceInterface(name = "CdnManagementClientAfdEndpoints") public interface AfdEndpointsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByProfile(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("endpointName") String endpointName, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("endpointName") String endpointName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("endpointName") String endpointName, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") AfdEndpointInner endpointParam, - @HeaderParam("Accept") String accept, Context context); + @PathParam("endpointName") String endpointName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") AfdEndpointInner endpointParam, + Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("endpointName") String endpointName, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") AfdEndpointUpdateParameters endpointUpdateProperties, - @HeaderParam("Accept") String accept, Context context); + @PathParam("endpointName") String endpointName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") AfdEndpointUpdateParameters endpointUpdateProperties, 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.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("endpointName") String endpointName, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("endpointName") String endpointName, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + 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); + + @Headers({ "Accept: application/json;q=0.9" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/purge") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> purgeContent(@HostParam("$host") String endpoint, + Mono>> purgeContent(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("endpointName") String endpointName, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") AfdPurgeParameters contents, - @HeaderParam("Accept") String accept, Context context); + @PathParam("endpointName") String endpointName, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") AfdPurgeParameters contents, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/usages") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listResourceUsage(@HostParam("$host") String endpoint, + Mono> listResourceUsage(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("endpointName") String endpointName, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("endpointName") String endpointName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/validateCustomDomain") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> validateCustomDomain(@HostParam("$host") String endpoint, + Mono> validateCustomDomain(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("endpointName") String endpointName, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ValidateCustomDomainInput customDomainProperties, - @HeaderParam("Accept") String accept, Context context); + @PathParam("endpointName") String endpointName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") ValidateCustomDomainInput customDomainProperties, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByProfileNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listByProfileNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -169,166 +167,17 @@ Mono> listByProfileNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listResourceUsageNext( - @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 existing AzureFrontDoor endpoints. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 endpoints 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 (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 (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByProfile(this.client.getEndpoint(), resourceGroupName, profileName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists existing AzureFrontDoor endpoints. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 endpoints 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 (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 (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByProfile(this.client.getEndpoint(), resourceGroupName, profileName, this.client.getSubscriptionId(), - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists existing AzureFrontDoor endpoints. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 endpoints as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByProfileAsync(String resourceGroupName, String profileName) { - return new PagedFlux<>(() -> listByProfileSinglePageAsync(resourceGroupName, profileName), - nextLink -> listByProfileNextSinglePageAsync(nextLink)); - } - - /** - * Lists existing AzureFrontDoor endpoints. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 endpoints 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)); - } - - /** - * Lists existing AzureFrontDoor endpoints. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 endpoints as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByProfile(String resourceGroupName, String profileName) { - return new PagedIterable<>(listByProfileAsync(resourceGroupName, profileName)); - } - - /** - * Lists existing AzureFrontDoor endpoints. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 endpoints 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)); - } - /** * Gets an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -343,6 +192,10 @@ public Mono> getWithResponseAsync(String resourceGrou 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.")); @@ -353,14 +206,10 @@ public Mono> getWithResponseAsync(String resourceGrou if (endpointName == null) { return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -368,9 +217,9 @@ public Mono> getWithResponseAsync(String resourceGrou * Gets an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -386,6 +235,10 @@ private Mono> getWithResponseAsync(String resourceGro 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.")); @@ -396,23 +249,19 @@ private Mono> getWithResponseAsync(String resourceGro if (endpointName == null) { return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, endpointName, accept, context); } /** * Gets an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -430,9 +279,9 @@ public Mono getAsync(String resourceGroupName, String profileN * Gets an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -451,9 +300,9 @@ public Response getWithResponse(String resourceGroupName, Stri * Gets an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -470,9 +319,9 @@ public AfdEndpointInner get(String resourceGroupName, String profileName, String * Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource * group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointParam Endpoint properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -489,6 +338,10 @@ public Mono>> createWithResponseAsync(String resourceG 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.")); @@ -499,20 +352,17 @@ public Mono>> createWithResponseAsync(String resourceG if (endpointName == null) { return Mono.error(new IllegalArgumentException("Parameter endpointName 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 (endpointParam == null) { return Mono.error(new IllegalArgumentException("Parameter endpointParam is required and cannot be null.")); } else { endpointParam.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.create(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, - this.client.getSubscriptionId(), this.client.getApiVersion(), endpointParam, accept, context)) + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, contentType, accept, + endpointParam, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -520,9 +370,9 @@ public Mono>> createWithResponseAsync(String resourceG * Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource * group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointParam Endpoint properties. * @param context The context to associate with this operation. @@ -540,6 +390,10 @@ private Mono>> createWithResponseAsync(String resource 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.")); @@ -550,28 +404,25 @@ private Mono>> createWithResponseAsync(String resource if (endpointName == null) { return Mono.error(new IllegalArgumentException("Parameter endpointName 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 (endpointParam == null) { return Mono.error(new IllegalArgumentException("Parameter endpointParam is required and cannot be null.")); } else { endpointParam.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, - this.client.getSubscriptionId(), this.client.getApiVersion(), endpointParam, accept, context); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, endpointName, contentType, accept, endpointParam, context); } /** * Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource * group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointParam Endpoint properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -593,9 +444,9 @@ public PollerFlux, AfdEndpointInner> beginCreateAsy * Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource * group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointParam Endpoint properties. * @param context The context to associate with this operation. @@ -619,9 +470,9 @@ private PollerFlux, AfdEndpointInner> beginCreateAs * Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource * group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointParam Endpoint properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -640,9 +491,9 @@ public SyncPoller, AfdEndpointInner> beginCreate(St * Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource * group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointParam Endpoint properties. * @param context The context to associate with this operation. @@ -663,9 +514,9 @@ public SyncPoller, AfdEndpointInner> beginCreate(St * Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource * group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointParam Endpoint properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -686,9 +537,9 @@ public Mono createAsync(String resourceGroupName, String profi * Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource * group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointParam Endpoint properties. * @param context The context to associate with this operation. @@ -710,9 +561,9 @@ private Mono createAsync(String resourceGroupName, String prof * Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource * group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointParam Endpoint properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -731,9 +582,9 @@ public AfdEndpointInner create(String resourceGroupName, String profileName, Str * Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource * group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointParam Endpoint properties. * @param context The context to associate with this operation. @@ -755,9 +606,9 @@ public AfdEndpointInner create(String resourceGroupName, String profileName, Str * Update Origin operation. To update origin groups, use the Update Origin group operation. To update domains, use * the Update Custom Domain operation. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointUpdateProperties Endpoint update properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -774,6 +625,10 @@ public Mono>> updateWithResponseAsync(String resourceG 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.")); @@ -784,21 +639,18 @@ public Mono>> updateWithResponseAsync(String resourceG if (endpointName == null) { return Mono.error(new IllegalArgumentException("Parameter endpointName 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 (endpointUpdateProperties == null) { return Mono.error( new IllegalArgumentException("Parameter endpointUpdateProperties is required and cannot be null.")); } else { endpointUpdateProperties.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, profileName, - endpointName, this.client.getSubscriptionId(), this.client.getApiVersion(), endpointUpdateProperties, - accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, contentType, accept, + endpointUpdateProperties, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -808,9 +660,9 @@ public Mono>> updateWithResponseAsync(String resourceG * Update Origin operation. To update origin groups, use the Update Origin group operation. To update domains, use * the Update Custom Domain operation. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointUpdateProperties Endpoint update properties. * @param context The context to associate with this operation. @@ -828,6 +680,10 @@ private Mono>> updateWithResponseAsync(String resource 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.")); @@ -838,20 +694,17 @@ private Mono>> updateWithResponseAsync(String resource if (endpointName == null) { return Mono.error(new IllegalArgumentException("Parameter endpointName 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 (endpointUpdateProperties == null) { return Mono.error( new IllegalArgumentException("Parameter endpointUpdateProperties is required and cannot be null.")); } else { endpointUpdateProperties.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, - this.client.getSubscriptionId(), this.client.getApiVersion(), endpointUpdateProperties, accept, context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, endpointName, contentType, accept, endpointUpdateProperties, context); } /** @@ -860,9 +713,9 @@ private Mono>> updateWithResponseAsync(String resource * Update Origin operation. To update origin groups, use the Update Origin group operation. To update domains, use * the Update Custom Domain operation. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointUpdateProperties Endpoint update properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -886,9 +739,9 @@ public PollerFlux, AfdEndpointInner> beginUpdateAsy * Update Origin operation. To update origin groups, use the Update Origin group operation. To update domains, use * the Update Custom Domain operation. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointUpdateProperties Endpoint update properties. * @param context The context to associate with this operation. @@ -915,9 +768,9 @@ private PollerFlux, AfdEndpointInner> beginUpdateAs * Update Origin operation. To update origin groups, use the Update Origin group operation. To update domains, use * the Update Custom Domain operation. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointUpdateProperties Endpoint update properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -939,9 +792,9 @@ public SyncPoller, AfdEndpointInner> beginUpdate(St * Update Origin operation. To update origin groups, use the Update Origin group operation. To update domains, use * the Update Custom Domain operation. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointUpdateProperties Endpoint update properties. * @param context The context to associate with this operation. @@ -965,9 +818,9 @@ public SyncPoller, AfdEndpointInner> beginUpdate(St * Update Origin operation. To update origin groups, use the Update Origin group operation. To update domains, use * the Update Custom Domain operation. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointUpdateProperties Endpoint update properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -990,9 +843,9 @@ public Mono updateAsync(String resourceGroupName, String profi * Update Origin operation. To update origin groups, use the Update Origin group operation. To update domains, use * the Update Custom Domain operation. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointUpdateProperties Endpoint update properties. * @param context The context to associate with this operation. @@ -1016,9 +869,9 @@ private Mono updateAsync(String resourceGroupName, String prof * Update Origin operation. To update origin groups, use the Update Origin group operation. To update domains, use * the Update Custom Domain operation. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointUpdateProperties Endpoint update properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1039,9 +892,9 @@ public AfdEndpointInner update(String resourceGroupName, String profileName, Str * Update Origin operation. To update origin groups, use the Update Origin group operation. To update domains, use * the Update Custom Domain operation. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointUpdateProperties Endpoint update properties. * @param context The context to associate with this operation. @@ -1061,9 +914,9 @@ public AfdEndpointInner update(String resourceGroupName, String profileName, Str * Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1077,6 +930,10 @@ public Mono>> deleteWithResponseAsync(String resourceG 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.")); @@ -1087,14 +944,9 @@ public Mono>> deleteWithResponseAsync(String resourceG if (endpointName == null) { return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, profileName, - endpointName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1102,9 +954,9 @@ public Mono>> deleteWithResponseAsync(String resourceG * Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1119,6 +971,10 @@ private Mono>> deleteWithResponseAsync(String resource 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.")); @@ -1129,23 +985,18 @@ private Mono>> deleteWithResponseAsync(String resource if (endpointName == null) { return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, endpointName, context); } /** * Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1164,9 +1015,9 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN * Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1188,9 +1039,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1207,9 +1058,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1227,9 +1078,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1246,9 +1097,9 @@ public Mono deleteAsync(String resourceGroupName, String profileName, Stri * Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1266,9 +1117,9 @@ private Mono deleteAsync(String resourceGroupName, String profileName, Str * Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1283,9 +1134,9 @@ public void delete(String resourceGroupName, String profileName, String endpoint * Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1297,12 +1148,161 @@ public void delete(String resourceGroupName, String profileName, String endpoint deleteAsync(resourceGroupName, profileName, endpointName, context).block(); } + /** + * Lists existing AzureFrontDoor endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AFDEndpoint list operation 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 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())); + } + + /** + * Lists existing AzureFrontDoor endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AFDEndpoint list operation 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 accept = "application/json"; + context = this.client.mergeContext(context); + return 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)); + } + + /** + * Lists existing AzureFrontDoor endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AFDEndpoint list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByProfileAsync(String resourceGroupName, String profileName) { + return new PagedFlux<>(() -> listByProfileSinglePageAsync(resourceGroupName, profileName), + nextLink -> listByProfileNextSinglePageAsync(nextLink)); + } + + /** + * Lists existing AzureFrontDoor endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AFDEndpoint list operation 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)); + } + + /** + * Lists existing AzureFrontDoor endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AFDEndpoint list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByProfile(String resourceGroupName, String profileName) { + return new PagedIterable<>(listByProfileAsync(resourceGroupName, profileName)); + } + + /** + * Lists existing AzureFrontDoor endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AFDEndpoint list operation 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)); + } + /** * Removes a content from AzureFrontDoor. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param contents The list of paths to the content and the list of linked domains 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/*' @@ -1319,6 +1319,10 @@ public Mono>> purgeContentWithResponseAsync(String res 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.")); @@ -1329,28 +1333,25 @@ public Mono>> purgeContentWithResponseAsync(String res if (endpointName == null) { return Mono.error(new IllegalArgumentException("Parameter endpointName 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 (contents == null) { return Mono.error(new IllegalArgumentException("Parameter contents is required and cannot be null.")); } else { contents.validate(); } - final String accept = "application/json"; + final String contentType = "application/json"; return FluxUtil - .withContext(context -> service.purgeContent(this.client.getEndpoint(), resourceGroupName, profileName, - endpointName, this.client.getSubscriptionId(), this.client.getApiVersion(), contents, accept, context)) + .withContext(context -> service.purgeContent(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, contentType, contents, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Removes a content from AzureFrontDoor. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param contents The list of paths to the content and the list of linked domains 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/*' @@ -1368,6 +1369,10 @@ private Mono>> purgeContentWithResponseAsync(String re 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.")); @@ -1378,27 +1383,24 @@ private Mono>> purgeContentWithResponseAsync(String re if (endpointName == null) { return Mono.error(new IllegalArgumentException("Parameter endpointName 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 (contents == null) { return Mono.error(new IllegalArgumentException("Parameter contents is required and cannot be null.")); } else { contents.validate(); } - final String accept = "application/json"; + final String contentType = "application/json"; context = this.client.mergeContext(context); - return service.purgeContent(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, - this.client.getSubscriptionId(), this.client.getApiVersion(), contents, accept, context); + return service.purgeContent(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, contentType, contents, + context); } /** * Removes a content from AzureFrontDoor. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param contents The list of paths to the content and the list of linked domains 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/*' @@ -1420,9 +1422,9 @@ public PollerFlux, Void> beginPurgeContentAsync(String resource /** * Removes a content from AzureFrontDoor. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param contents The list of paths to the content and the list of linked domains 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/*' @@ -1446,9 +1448,9 @@ private PollerFlux, Void> beginPurgeContentAsync(String resourc /** * Removes a content from AzureFrontDoor. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param contents The list of paths to the content and the list of linked domains 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/*' @@ -1467,9 +1469,9 @@ public SyncPoller, Void> beginPurgeContent(String resourceGroup /** * Removes a content from AzureFrontDoor. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param contents The list of paths to the content and the list of linked domains 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/*' @@ -1490,9 +1492,9 @@ public SyncPoller, Void> beginPurgeContent(String resourceGroup /** * Removes a content from AzureFrontDoor. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param contents The list of paths to the content and the list of linked domains 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/*' @@ -1512,9 +1514,9 @@ public Mono purgeContentAsync(String resourceGroupName, String profileName /** * Removes a content from AzureFrontDoor. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param contents The list of paths to the content and the list of linked domains 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/*' @@ -1535,9 +1537,9 @@ private Mono purgeContentAsync(String resourceGroupName, String profileNam /** * Removes a content from AzureFrontDoor. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param contents The list of paths to the content and the list of linked domains 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/*' @@ -1555,9 +1557,9 @@ public void purgeContent(String resourceGroupName, String profileName, String en /** * Removes a content from AzureFrontDoor. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param contents The list of paths to the content and the list of linked domains 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/*' @@ -1576,9 +1578,9 @@ public void purgeContent(String resourceGroupName, String profileName, String en /** * Checks the quota and actual usage of endpoints under the given Azure Front Door profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1593,6 +1595,10 @@ private Mono> listResourceUsageSinglePageAsync(String 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.")); @@ -1603,14 +1609,10 @@ private Mono> listResourceUsageSinglePageAsync(String if (endpointName == null) { return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listResourceUsage(this.client.getEndpoint(), resourceGroupName, profileName, - endpointName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .withContext(context -> service.listResourceUsage(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, 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())); @@ -1619,9 +1621,9 @@ private Mono> listResourceUsageSinglePageAsync(String /** * Checks the quota and actual usage of endpoints under the given Azure Front Door profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1637,6 +1639,10 @@ private Mono> listResourceUsageSinglePageAsync(String 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.")); @@ -1647,15 +1653,11 @@ private Mono> listResourceUsageSinglePageAsync(String if (endpointName == null) { return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listResourceUsage(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .listResourceUsage(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, endpointName, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -1663,9 +1665,9 @@ private Mono> listResourceUsageSinglePageAsync(String /** * Checks the quota and actual usage of endpoints under the given Azure Front Door profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1682,9 +1684,9 @@ public PagedFlux listResourceUsageAsync(String resourceGroupName, St /** * Checks the quota and actual usage of endpoints under the given Azure Front Door profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1703,9 +1705,9 @@ private PagedFlux listResourceUsageAsync(String resourceGroupName, S /** * Checks the quota and actual usage of endpoints under the given Azure Front Door profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1721,9 +1723,9 @@ public PagedIterable listResourceUsage(String resourceGroupName, Str /** * Checks the quota and actual usage of endpoints under the given Azure Front Door profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1740,9 +1742,9 @@ public PagedIterable listResourceUsage(String resourceGroupName, Str /** * Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in DNS. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainProperties Custom domain to be validated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1758,6 +1760,10 @@ public Mono> validateCustomDomainWithR 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.")); @@ -1768,30 +1774,27 @@ public Mono> validateCustomDomainWithR if (endpointName == null) { return Mono.error(new IllegalArgumentException("Parameter endpointName 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 (customDomainProperties == null) { return Mono.error( new IllegalArgumentException("Parameter customDomainProperties is required and cannot be null.")); } else { customDomainProperties.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.validateCustomDomain(this.client.getEndpoint(), resourceGroupName, - profileName, endpointName, this.client.getSubscriptionId(), this.client.getApiVersion(), - customDomainProperties, accept, context)) + .withContext(context -> service.validateCustomDomain(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, 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 Azure Front Door endpoint in DNS. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainProperties Custom domain to be validated. * @param context The context to associate with this operation. @@ -1808,6 +1811,10 @@ private Mono> validateCustomDomainWith 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.")); @@ -1818,28 +1825,26 @@ private Mono> validateCustomDomainWith if (endpointName == null) { return Mono.error(new IllegalArgumentException("Parameter endpointName 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 (customDomainProperties == null) { return Mono.error( new IllegalArgumentException("Parameter customDomainProperties is required and cannot be null.")); } else { customDomainProperties.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.validateCustomDomain(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, - this.client.getSubscriptionId(), this.client.getApiVersion(), customDomainProperties, accept, context); + return service.validateCustomDomain(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, contentType, accept, + customDomainProperties, context); } /** * Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in DNS. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainProperties Custom domain to be validated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1857,9 +1862,9 @@ public Mono validateCustomDomainAsync(String re /** * Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in DNS. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainProperties Custom domain to be validated. * @param context The context to associate with this operation. @@ -1878,9 +1883,9 @@ public Response validateCustomDomainWithRespons /** * Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in DNS. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainProperties Custom domain to be validated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1902,7 +1907,7 @@ 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 endpoints along with {@link PagedResponse} on successful completion of + * @return the response of a AFDEndpoint list operation along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -1930,7 +1935,7 @@ private Mono> listByProfileNextSinglePageAsync(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list endpoints along with {@link PagedResponse} on successful completion of + * @return the response of a AFDEndpoint list operation along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/AfdEndpointsImpl.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/AfdEndpointsImpl.java new file mode 100644 index 000000000000..935b560d70e6 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/AfdEndpointsImpl.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.cdn.implementation; + +import com.azure.resourcemanager.cdn.fluent.models.AfdEndpointInner; +import com.azure.resourcemanager.cdn.models.AfdEndpoint; +import com.azure.resourcemanager.cdn.models.CdnProfile; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.implementation.ExternalChildResourcesNonCachedImpl; + +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; + +/** + * Represents a collection of AFD endpoints associated with a CDN profile. + */ +class AfdEndpointsImpl extends + ExternalChildResourcesNonCachedImpl { + + AfdEndpointsImpl(CdnProfileImpl parent) { + super(parent, parent.taskGroup(), "AfdEndpoint"); + } + + Map endpointsAsMap() { + Map result = new HashMap<>(); + for (AfdEndpointInner endpointInner : this.getParent() + .manager() + .serviceClient() + .getAfdEndpoints() + .listByProfile(this.getParent().resourceGroupName(), this.getParent().name())) { + AfdEndpointImpl endpoint = new AfdEndpointImpl(endpointInner.name(), this.getParent(), endpointInner); + result.put(endpoint.name(), endpoint); + } + return Collections.unmodifiableMap(result); + } + + void remove(String name) { + this.prepareInlineRemove(new AfdEndpointImpl(name, getParent(), new AfdEndpointInner())); + } + + void addEndpoint(AfdEndpointImpl endpoint) { + this.childCollection.put(endpoint.name(), endpoint); + } + + AfdEndpointImpl defineNewEndpoint(String name) { + AfdEndpointImpl endpoint + = this.prepareInlineDefine(new AfdEndpointImpl(name, this.getParent(), new AfdEndpointInner())); + if (endpoint.parent().region() != null) { + endpoint.innerModel().withLocation(endpoint.parent().region().toString()); + } + return endpoint; + } + + AfdEndpointImpl updateEndpoint(String name) { + AfdEndpointInner endpointInner = this.getParent() + .manager() + .serviceClient() + .getAfdEndpoints() + .get(this.getParent().resourceGroupName(), this.getParent().name(), name); + return this.prepareInlineUpdate(new AfdEndpointImpl(name, this.getParent(), endpointInner)); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/AfdOriginGroupImpl.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/AfdOriginGroupImpl.java new file mode 100644 index 000000000000..e912effb6b82 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/AfdOriginGroupImpl.java @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.cdn.implementation; + +import com.azure.resourcemanager.cdn.fluent.models.AfdOriginGroupInner; +import com.azure.resourcemanager.cdn.models.AfdOrigin; +import com.azure.resourcemanager.cdn.models.AfdOriginGroup; +import com.azure.resourcemanager.cdn.models.AfdOriginGroupUpdateParameters; +import com.azure.resourcemanager.cdn.models.AfdProvisioningState; +import com.azure.resourcemanager.cdn.models.CdnProfile; +import com.azure.resourcemanager.cdn.models.DeploymentStatus; +import com.azure.resourcemanager.cdn.models.EnabledState; +import com.azure.resourcemanager.cdn.models.HealthProbeParameters; +import com.azure.resourcemanager.cdn.models.LoadBalancingSettingsParameters; +import com.azure.resourcemanager.cdn.models.OriginAuthenticationProperties; +import com.azure.resourcemanager.resources.fluentcore.arm.models.implementation.ExternalChildResourceImpl; +import reactor.core.publisher.Mono; + +import java.util.Map; + +/** + * Implementation for {@link AfdOriginGroup}. + */ +class AfdOriginGroupImpl + extends ExternalChildResourceImpl + implements AfdOriginGroup, AfdOriginGroup.DefinitionStages.Blank, + AfdOriginGroup.DefinitionStages.WithAttach, + AfdOriginGroup.UpdateDefinitionStages.Blank, + AfdOriginGroup.UpdateDefinitionStages.WithAttach, AfdOriginGroup.Update { + + private final AfdOriginsImpl afdOrigins; + + AfdOriginGroupImpl(String name, CdnProfileImpl parent, AfdOriginGroupInner inner) { + super(name, parent, inner); + this.afdOrigins = new AfdOriginsImpl(this); + } + + @Override + public String id() { + return this.innerModel().id(); + } + + @Override + public String profileName() { + return this.innerModel().profileName(); + } + + @Override + public LoadBalancingSettingsParameters loadBalancingSettings() { + return this.innerModel().loadBalancingSettings(); + } + + @Override + public HealthProbeParameters healthProbeSettings() { + return this.innerModel().healthProbeSettings(); + } + + @Override + public Integer trafficRestorationTimeToHealedOrNewEndpointsInMinutes() { + return this.innerModel().trafficRestorationTimeToHealedOrNewEndpointsInMinutes(); + } + + @Override + public EnabledState sessionAffinityState() { + return this.innerModel().sessionAffinityState(); + } + + @Override + public OriginAuthenticationProperties authentication() { + return this.innerModel().authentication(); + } + + @Override + public AfdProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + @Override + public DeploymentStatus deploymentStatus() { + return this.innerModel().deploymentStatus(); + } + + @Override + public Map origins() { + return this.afdOrigins.originsAsMap(); + } + + @Override + public Mono createResourceAsync() { + final AfdOriginGroupImpl self = this; + return this.parent() + .manager() + .serviceClient() + .getAfdOriginGroups() + .createAsync(this.parent().resourceGroupName(), this.parent().name(), this.name(), this.innerModel()) + .map(inner -> { + self.setInner(inner); + return self; + }); + } + + @Override + public Mono updateResourceAsync() { + final AfdOriginGroupImpl self = this; + AfdOriginGroupUpdateParameters parameters + = new AfdOriginGroupUpdateParameters().withLoadBalancingSettings(this.innerModel().loadBalancingSettings()) + .withHealthProbeSettings(this.innerModel().healthProbeSettings()) + .withTrafficRestorationTimeToHealedOrNewEndpointsInMinutes( + this.innerModel().trafficRestorationTimeToHealedOrNewEndpointsInMinutes()) + .withSessionAffinityState(this.innerModel().sessionAffinityState()); + return this.parent() + .manager() + .serviceClient() + .getAfdOriginGroups() + .updateAsync(this.parent().resourceGroupName(), this.parent().name(), this.name(), parameters) + .map(inner -> { + self.setInner(inner); + return self; + }); + } + + @Override + public Mono deleteResourceAsync() { + return this.parent() + .manager() + .serviceClient() + .getAfdOriginGroups() + .deleteAsync(this.parent().resourceGroupName(), this.parent().name(), this.name()); + } + + @Override + protected Mono getInnerAsync() { + return this.parent() + .manager() + .serviceClient() + .getAfdOriginGroups() + .getAsync(this.parent().resourceGroupName(), this.parent().name(), this.name()); + } + + @Override + protected Mono afterPostRunAsync(boolean isGroupFaulted) { + this.afdOrigins.clear(); + return Mono.empty(); + } + + @Override + public CdnProfileImpl attach() { + return this.parent().withAfdOriginGroup(this); + } + + // ---- Fluent setters (shared by DefinitionStages, UpdateDefinitionStages, and Update) ---- + + @Override + public AfdOriginGroupImpl withLoadBalancingSettings(LoadBalancingSettingsParameters loadBalancingSettings) { + this.innerModel().withLoadBalancingSettings(loadBalancingSettings); + return this; + } + + @Override + public AfdOriginGroupImpl withHealthProbeSettings(HealthProbeParameters healthProbeSettings) { + this.innerModel().withHealthProbeSettings(healthProbeSettings); + return this; + } + + @Override + public AfdOriginGroupImpl withTrafficRestorationTimeToHealedOrNewEndpointsInMinutes(Integer minutes) { + this.innerModel().withTrafficRestorationTimeToHealedOrNewEndpointsInMinutes(minutes); + return this; + } + + @Override + public AfdOriginGroupImpl withSessionAffinityState(EnabledState sessionAffinityState) { + this.innerModel().withSessionAffinityState(sessionAffinityState); + return this; + } + + // ---- Nested origin CRUD ---- + + @Override + public AfdOriginImpl defineAfdOrigin(String name) { + return this.afdOrigins.defineNewOrigin(name); + } + + @Override + public AfdOriginImpl updateAfdOrigin(String name) { + return this.afdOrigins.updateOrigin(name); + } + + @Override + public AfdOriginGroupImpl withoutAfdOrigin(String name) { + this.afdOrigins.remove(name); + return this; + } + + AfdOriginGroupImpl withAfdOrigin(AfdOriginImpl origin) { + this.afdOrigins.addOrigin(origin); + return this; + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/AfdOriginGroupsClientImpl.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/AfdOriginGroupsClientImpl.java index 4faa899ee06b..462bf86082de 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/AfdOriginGroupsClientImpl.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/AfdOriginGroupsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.implementation; @@ -36,9 +36,9 @@ import com.azure.resourcemanager.cdn.fluent.AfdOriginGroupsClient; import com.azure.resourcemanager.cdn.fluent.models.AfdOriginGroupInner; import com.azure.resourcemanager.cdn.fluent.models.UsageInner; -import com.azure.resourcemanager.cdn.models.AfdOriginGroupListResult; +import com.azure.resourcemanager.cdn.implementation.models.AFDOriginGroupListResult; +import com.azure.resourcemanager.cdn.implementation.models.UsagesListResult; import com.azure.resourcemanager.cdn.models.AfdOriginGroupUpdateParameters; -import com.azure.resourcemanager.cdn.models.UsagesListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -72,73 +72,73 @@ public final class AfdOriginGroupsClientImpl implements AfdOriginGroupsClient { * The interface defining all the services for CdnManagementClientAfdOriginGroups to be used by the proxy service to * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "CdnManagementClientA") + @Host("{endpoint}") + @ServiceInterface(name = "CdnManagementClientAfdOriginGroups") public interface AfdOriginGroupsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByProfile(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("originGroupName") String originGroupName, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("originGroupName") String originGroupName, @HeaderParam("Accept") String accept, + Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("originGroupName") String originGroupName, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") AfdOriginGroupInner originGroup, @HeaderParam("Accept") String accept, + @PathParam("originGroupName") String originGroupName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") AfdOriginGroupInner originGroup, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("originGroupName") String originGroupName, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") AfdOriginGroupUpdateParameters originGroupUpdateProperties, - @HeaderParam("Accept") String accept, Context context); + @PathParam("originGroupName") String originGroupName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") AfdOriginGroupUpdateParameters originGroupUpdateProperties, 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.Cdn/profiles/{profileName}/originGroups/{originGroupName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("originGroupName") String originGroupName, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("originGroupName") String originGroupName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + 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); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/usages") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listResourceUsage(@HostParam("$host") String endpoint, + Mono> listResourceUsage(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("originGroupName") String originGroupName, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("originGroupName") String originGroupName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByProfileNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listByProfileNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -146,165 +146,16 @@ Mono> listByProfileNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listResourceUsageNext( - @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 existing origin groups within a profile. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 origin groups 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 (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 (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByProfile(this.client.getEndpoint(), resourceGroupName, profileName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists all of the existing origin groups within a profile. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 origin groups 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 (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 (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByProfile(this.client.getEndpoint(), resourceGroupName, profileName, this.client.getSubscriptionId(), - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all of the existing origin groups within a profile. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 origin groups as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByProfileAsync(String resourceGroupName, String profileName) { - return new PagedFlux<>(() -> listByProfileSinglePageAsync(resourceGroupName, profileName), - nextLink -> listByProfileNextSinglePageAsync(nextLink)); - } - - /** - * Lists all of the existing origin groups within a profile. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 origin groups 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)); - } - - /** - * Lists all of the existing origin groups within a profile. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 origin groups as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByProfile(String resourceGroupName, String profileName) { - return new PagedIterable<>(listByProfileAsync(resourceGroupName, profileName)); - } - - /** - * Lists all of the existing origin groups within a profile. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 origin groups 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)); - } - /** * Gets an existing origin group within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param originGroupName Name of the origin group which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -319,6 +170,10 @@ public Mono> getWithResponseAsync(String resourceG 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.")); @@ -330,23 +185,19 @@ public Mono> getWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter originGroupName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, profileName, - originGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, originGroupName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets an existing origin group within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -362,6 +213,10 @@ private Mono> getWithResponseAsync(String resource 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.")); @@ -373,22 +228,18 @@ private Mono> getWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter originGroupName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), resourceGroupName, profileName, originGroupName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, originGroupName, accept, context); } /** * Gets an existing origin group within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param originGroupName Name of the origin group which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -404,9 +255,9 @@ public Mono getAsync(String resourceGroupName, String profi /** * Gets an existing origin group within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -423,9 +274,9 @@ public Response getWithResponse(String resourceGroupName, S /** * Gets an existing origin group within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param originGroupName Name of the origin group which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -440,9 +291,9 @@ public AfdOriginGroupInner get(String resourceGroupName, String profileName, Str /** * Creates a new origin group within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroup Origin group properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -458,6 +309,10 @@ public Mono>> createWithResponseAsync(String resourceG 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.")); @@ -469,29 +324,26 @@ public Mono>> createWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter originGroupName 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 (originGroup == null) { return Mono.error(new IllegalArgumentException("Parameter originGroup is required and cannot be null.")); } else { originGroup.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.create(this.client.getEndpoint(), resourceGroupName, profileName, originGroupName, - this.client.getSubscriptionId(), this.client.getApiVersion(), originGroup, accept, context)) + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, originGroupName, contentType, accept, + originGroup, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates a new origin group within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroup Origin group properties. * @param context The context to associate with this operation. @@ -508,6 +360,10 @@ private Mono>> createWithResponseAsync(String resource 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.")); @@ -519,27 +375,24 @@ private Mono>> createWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter originGroupName 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 (originGroup == null) { return Mono.error(new IllegalArgumentException("Parameter originGroup is required and cannot be null.")); } else { originGroup.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), resourceGroupName, profileName, originGroupName, - this.client.getSubscriptionId(), this.client.getApiVersion(), originGroup, accept, context); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, originGroupName, contentType, accept, originGroup, context); } /** * Creates a new origin group within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroup Origin group properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -560,9 +413,9 @@ public PollerFlux, AfdOriginGroupInner> beginCre /** * Creates a new origin group within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroup Origin group properties. * @param context The context to associate with this operation. @@ -585,9 +438,9 @@ private PollerFlux, AfdOriginGroupInner> beginCr /** * Creates a new origin group within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroup Origin group properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -605,9 +458,9 @@ public SyncPoller, AfdOriginGroupInner> beginCre /** * Creates a new origin group within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroup Origin group properties. * @param context The context to associate with this operation. @@ -627,9 +480,9 @@ public SyncPoller, AfdOriginGroupInner> beginCre /** * Creates a new origin group within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroup Origin group properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -648,9 +501,9 @@ public Mono createAsync(String resourceGroupName, String pr /** * Creates a new origin group within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroup Origin group properties. * @param context The context to associate with this operation. @@ -670,9 +523,9 @@ private Mono createAsync(String resourceGroupName, String p /** * Creates a new origin group within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroup Origin group properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -690,9 +543,9 @@ public AfdOriginGroupInner create(String resourceGroupName, String profileName, /** * Creates a new origin group within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroup Origin group properties. * @param context The context to associate with this operation. @@ -711,10 +564,10 @@ public AfdOriginGroupInner create(String resourceGroupName, String profileName, /** * Updates an existing origin group within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroupUpdateProperties Origin group properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -729,6 +582,10 @@ public Mono>> updateWithResponseAsync(String resourceG 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.")); @@ -740,31 +597,28 @@ public Mono>> updateWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter originGroupName 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 (originGroupUpdateProperties == null) { return Mono.error( new IllegalArgumentException("Parameter originGroupUpdateProperties is required and cannot be null.")); } else { originGroupUpdateProperties.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, profileName, - originGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), - originGroupUpdateProperties, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, originGroupName, contentType, accept, + originGroupUpdateProperties, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates an existing origin group within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroupUpdateProperties Origin group properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -780,6 +634,10 @@ private Mono>> updateWithResponseAsync(String resource 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.")); @@ -791,29 +649,26 @@ private Mono>> updateWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter originGroupName 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 (originGroupUpdateProperties == null) { return Mono.error( new IllegalArgumentException("Parameter originGroupUpdateProperties is required and cannot be null.")); } else { originGroupUpdateProperties.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), resourceGroupName, profileName, originGroupName, - this.client.getSubscriptionId(), this.client.getApiVersion(), originGroupUpdateProperties, accept, context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, originGroupName, contentType, accept, originGroupUpdateProperties, context); } /** * Updates an existing origin group within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroupUpdateProperties Origin group properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -833,10 +688,10 @@ public PollerFlux, AfdOriginGroupInner> beginUpd /** * Updates an existing origin group within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroupUpdateProperties Origin group properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -859,10 +714,10 @@ private PollerFlux, AfdOriginGroupInner> beginUp /** * Updates an existing origin group within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroupUpdateProperties Origin group properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -880,10 +735,10 @@ public SyncPoller, AfdOriginGroupInner> beginUpd /** * Updates an existing origin group within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroupUpdateProperties Origin group properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -904,10 +759,10 @@ public SyncPoller, AfdOriginGroupInner> beginUpd /** * Updates an existing origin group within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroupUpdateProperties Origin group properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -925,10 +780,10 @@ public Mono updateAsync(String resourceGroupName, String pr /** * Updates an existing origin group within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroupUpdateProperties Origin group properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -948,10 +803,10 @@ private Mono updateAsync(String resourceGroupName, String p /** * Updates an existing origin group within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroupUpdateProperties Origin group properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -968,10 +823,10 @@ public AfdOriginGroupInner update(String resourceGroupName, String profileName, /** * Updates an existing origin group within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroupUpdateProperties Origin group properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -990,10 +845,10 @@ public AfdOriginGroupInner update(String resourceGroupName, String profileName, /** * Deletes an existing origin group within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1006,6 +861,10 @@ public Mono>> deleteWithResponseAsync(String resourceG 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.")); @@ -1017,24 +876,19 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter originGroupName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, profileName, - originGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, originGroupName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes an existing origin group within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1048,6 +902,10 @@ private Mono>> deleteWithResponseAsync(String resource 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.")); @@ -1059,23 +917,18 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter originGroupName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), resourceGroupName, profileName, originGroupName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, originGroupName, context); } /** * Deletes an existing origin group within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1093,10 +946,10 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN /** * Deletes an existing origin group within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1116,10 +969,10 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup /** * Deletes an existing origin group within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1134,10 +987,10 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes an existing origin group within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1153,10 +1006,10 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes an existing origin group within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1171,10 +1024,10 @@ public Mono deleteAsync(String resourceGroupName, String profileName, Stri /** * Deletes an existing origin group within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1191,10 +1044,10 @@ private Mono deleteAsync(String resourceGroupName, String profileName, Str /** * Deletes an existing origin group within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1207,10 +1060,10 @@ public void delete(String resourceGroupName, String profileName, String originGr /** * Deletes an existing origin group within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1222,11 +1075,160 @@ public void delete(String resourceGroupName, String profileName, String originGr } /** - * Checks the quota and actual usage of endpoints under the given Azure Front Door profile.. + * Lists all of the existing origin groups within a profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AFDOriginGroup list operation 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 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())); + } + + /** + * Lists all of the existing origin groups within a profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AFDOriginGroup list operation 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 accept = "application/json"; + context = this.client.mergeContext(context); + return 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)); + } + + /** + * Lists all of the existing origin groups within a profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AFDOriginGroup list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByProfileAsync(String resourceGroupName, String profileName) { + return new PagedFlux<>(() -> listByProfileSinglePageAsync(resourceGroupName, profileName), + nextLink -> listByProfileNextSinglePageAsync(nextLink)); + } + + /** + * Lists all of the existing origin groups within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AFDOriginGroup list operation 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)); + } + + /** + * Lists all of the existing origin groups within a profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AFDOriginGroup list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByProfile(String resourceGroupName, String profileName) { + return new PagedIterable<>(listByProfileAsync(resourceGroupName, profileName)); + } + + /** + * Lists all of the existing origin groups within a profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AFDOriginGroup list operation 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)); + } + + /** + * Checks the quota and actual usage of endpoints under the given Azure Front Door profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param originGroupName Name of the origin group which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1241,6 +1243,10 @@ private Mono> listResourceUsageSinglePageAsync(String 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.")); @@ -1252,25 +1258,21 @@ private Mono> listResourceUsageSinglePageAsync(String return Mono .error(new IllegalArgumentException("Parameter originGroupName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listResourceUsage(this.client.getEndpoint(), resourceGroupName, profileName, - originGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .withContext(context -> service.listResourceUsage(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, originGroupName, 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())); } /** - * Checks the quota and actual usage of endpoints under the given Azure Front Door profile.. + * Checks the quota and actual usage of endpoints under the given Azure Front Door profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1286,6 +1288,10 @@ private Mono> listResourceUsageSinglePageAsync(String 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.")); @@ -1297,25 +1303,21 @@ private Mono> listResourceUsageSinglePageAsync(String return Mono .error(new IllegalArgumentException("Parameter originGroupName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listResourceUsage(this.client.getEndpoint(), resourceGroupName, profileName, originGroupName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .listResourceUsage(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, originGroupName, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Checks the quota and actual usage of endpoints under the given Azure Front Door profile.. + * Checks the quota and actual usage of endpoints under the given Azure Front Door profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param originGroupName Name of the origin group which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1330,11 +1332,11 @@ public PagedFlux listResourceUsageAsync(String resourceGroupName, St } /** - * Checks the quota and actual usage of endpoints under the given Azure Front Door profile.. + * Checks the quota and actual usage of endpoints under the given Azure Front Door profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1351,11 +1353,11 @@ private PagedFlux listResourceUsageAsync(String resourceGroupName, S } /** - * Checks the quota and actual usage of endpoints under the given Azure Front Door profile.. + * Checks the quota and actual usage of endpoints under the given Azure Front Door profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param originGroupName Name of the origin group which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1369,11 +1371,11 @@ public PagedIterable listResourceUsage(String resourceGroupName, Str } /** - * Checks the quota and actual usage of endpoints under the given Azure Front Door profile.. + * Checks the quota and actual usage of endpoints under the given Azure Front Door profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1394,8 +1396,8 @@ public PagedIterable listResourceUsage(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list origin groups along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a AFDOriginGroup list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByProfileNextSinglePageAsync(String nextLink) { @@ -1422,8 +1424,8 @@ private Mono> listByProfileNextSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 origin groups along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a AFDOriginGroup list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByProfileNextSinglePageAsync(String nextLink, diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/AfdOriginGroupsImpl.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/AfdOriginGroupsImpl.java new file mode 100644 index 000000000000..6f75117db204 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/AfdOriginGroupsImpl.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.cdn.implementation; + +import com.azure.resourcemanager.cdn.fluent.models.AfdOriginGroupInner; +import com.azure.resourcemanager.cdn.models.AfdOriginGroup; +import com.azure.resourcemanager.cdn.models.CdnProfile; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.implementation.ExternalChildResourcesNonCachedImpl; + +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; + +/** + * Represents a collection of AFD origin groups associated with a CDN profile. + */ +class AfdOriginGroupsImpl extends + ExternalChildResourcesNonCachedImpl { + + AfdOriginGroupsImpl(CdnProfileImpl parent) { + super(parent, parent.taskGroup(), "AfdOriginGroup"); + } + + Map originGroupsAsMap() { + Map result = new HashMap<>(); + for (AfdOriginGroupInner inner : this.getParent() + .manager() + .serviceClient() + .getAfdOriginGroups() + .listByProfile(this.getParent().resourceGroupName(), this.getParent().name())) { + AfdOriginGroupImpl originGroup = new AfdOriginGroupImpl(inner.name(), this.getParent(), inner); + result.put(originGroup.name(), originGroup); + } + return Collections.unmodifiableMap(result); + } + + void remove(String name) { + this.prepareInlineRemove(new AfdOriginGroupImpl(name, getParent(), new AfdOriginGroupInner())); + } + + void addOriginGroup(AfdOriginGroupImpl originGroup) { + this.childCollection.put(originGroup.name(), originGroup); + } + + AfdOriginGroupImpl defineNewOriginGroup(String name) { + return this.prepareInlineDefine(new AfdOriginGroupImpl(name, this.getParent(), new AfdOriginGroupInner())); + } + + AfdOriginGroupImpl updateOriginGroup(String name) { + AfdOriginGroupInner inner = this.getParent() + .manager() + .serviceClient() + .getAfdOriginGroups() + .get(this.getParent().resourceGroupName(), this.getParent().name(), name); + return this.prepareInlineUpdate(new AfdOriginGroupImpl(name, this.getParent(), inner)); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/AfdOriginImpl.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/AfdOriginImpl.java new file mode 100644 index 000000000000..e32bb311879b --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/AfdOriginImpl.java @@ -0,0 +1,250 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.cdn.implementation; + +import com.azure.resourcemanager.cdn.fluent.models.AfdOriginInner; +import com.azure.resourcemanager.cdn.models.AfdOrigin; +import com.azure.resourcemanager.cdn.models.AfdOriginGroup; +import com.azure.resourcemanager.cdn.models.AfdOriginUpdateParameters; +import com.azure.resourcemanager.cdn.models.AfdProvisioningState; +import com.azure.resourcemanager.cdn.models.CdnProfile; +import com.azure.resourcemanager.cdn.models.DeploymentStatus; +import com.azure.resourcemanager.cdn.models.EnabledState; +import com.azure.resourcemanager.cdn.models.OriginCapacityResourceProperties; +import com.azure.resourcemanager.cdn.models.ResourceReference; +import com.azure.resourcemanager.cdn.models.SharedPrivateLinkResourceProperties; +import com.azure.resourcemanager.resources.fluentcore.arm.models.implementation.ExternalChildResourceImpl; +import reactor.core.publisher.Mono; + +/** + * Implementation for {@link AfdOrigin}. + */ +class AfdOriginImpl extends ExternalChildResourceImpl + implements AfdOrigin, + AfdOrigin.DefinitionStages.Blank>, + AfdOrigin.DefinitionStages.WithHostname>, + AfdOrigin.DefinitionStages.WithAttach>, + AfdOrigin.UpdateDefinitionStages.Blank>, + AfdOrigin.UpdateDefinitionStages.WithHostname>, + AfdOrigin.UpdateDefinitionStages.WithAttach>, + AfdOrigin.Update { + + AfdOriginImpl(String name, AfdOriginGroupImpl parent, AfdOriginInner inner) { + super(name, parent, inner); + } + + @Override + public String id() { + return this.innerModel().id(); + } + + @Override + public String originGroupName() { + return this.innerModel().originGroupName(); + } + + @Override + public ResourceReference azureOrigin() { + return this.innerModel().azureOrigin(); + } + + @Override + public String hostname() { + return this.innerModel().hostname(); + } + + @Override + public Integer httpPort() { + return this.innerModel().httpPort(); + } + + @Override + public Integer httpsPort() { + return this.innerModel().httpsPort(); + } + + @Override + public String originHostHeader() { + return this.innerModel().originHostHeader(); + } + + @Override + public Integer priority() { + return this.innerModel().priority(); + } + + @Override + public Integer weight() { + return this.innerModel().weight(); + } + + @Override + public SharedPrivateLinkResourceProperties sharedPrivateLinkResource() { + return this.innerModel().sharedPrivateLinkResource(); + } + + @Override + public OriginCapacityResourceProperties originCapacityResource() { + return this.innerModel().originCapacityResource(); + } + + @Override + public EnabledState enabledState() { + return this.innerModel().enabledState(); + } + + @Override + public Boolean enforceCertificateNameCheck() { + return this.innerModel().enforceCertificateNameCheck(); + } + + @Override + public AfdProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + @Override + public DeploymentStatus deploymentStatus() { + return this.innerModel().deploymentStatus(); + } + + @Override + public Mono createResourceAsync() { + final AfdOriginImpl self = this; + return this.parent() + .parent() + .manager() + .serviceClient() + .getAfdOrigins() + .createAsync(this.parent().parent().resourceGroupName(), this.parent().parent().name(), + this.parent().name(), this.name(), this.innerModel()) + .map(inner -> { + self.setInner(inner); + return self; + }); + } + + @Override + public Mono updateResourceAsync() { + final AfdOriginImpl self = this; + AfdOriginUpdateParameters parameters + = new AfdOriginUpdateParameters().withHostname(this.innerModel().hostname()) + .withAzureOrigin(this.innerModel().azureOrigin()) + .withHttpPort(this.innerModel().httpPort()) + .withHttpsPort(this.innerModel().httpsPort()) + .withOriginHostHeader(this.innerModel().originHostHeader()) + .withPriority(this.innerModel().priority()) + .withWeight(this.innerModel().weight()) + .withSharedPrivateLinkResource(this.innerModel().sharedPrivateLinkResource()) + .withOriginCapacityResource(this.innerModel().originCapacityResource()) + .withEnabledState(this.innerModel().enabledState()) + .withEnforceCertificateNameCheck(this.innerModel().enforceCertificateNameCheck()); + return this.parent() + .parent() + .manager() + .serviceClient() + .getAfdOrigins() + .updateAsync(this.parent().parent().resourceGroupName(), this.parent().parent().name(), + this.parent().name(), this.name(), parameters) + .map(inner -> { + self.setInner(inner); + return self; + }); + } + + @Override + public Mono deleteResourceAsync() { + return this.parent() + .parent() + .manager() + .serviceClient() + .getAfdOrigins() + .deleteAsync(this.parent().parent().resourceGroupName(), this.parent().parent().name(), + this.parent().name(), this.name()); + } + + @Override + protected Mono getInnerAsync() { + return this.parent() + .parent() + .manager() + .serviceClient() + .getAfdOrigins() + .getAsync(this.parent().parent().resourceGroupName(), this.parent().parent().name(), this.parent().name(), + this.name()); + } + + @Override + public AfdOriginGroupImpl attach() { + return this.parent().withAfdOrigin(this); + } + + // ---- Fluent setters (shared by DefinitionStages, UpdateDefinitionStages, and Update) ---- + + @Override + public AfdOriginImpl withHostname(String hostname) { + this.innerModel().withHostname(hostname); + return this; + } + + @Override + public AfdOriginImpl withAzureOrigin(ResourceReference azureOrigin) { + this.innerModel().withAzureOrigin(azureOrigin); + return this; + } + + @Override + public AfdOriginImpl withHttpPort(Integer httpPort) { + this.innerModel().withHttpPort(httpPort); + return this; + } + + @Override + public AfdOriginImpl withHttpsPort(Integer httpsPort) { + this.innerModel().withHttpsPort(httpsPort); + return this; + } + + @Override + public AfdOriginImpl withOriginHostHeader(String originHostHeader) { + this.innerModel().withOriginHostHeader(originHostHeader); + return this; + } + + @Override + public AfdOriginImpl withPriority(Integer priority) { + this.innerModel().withPriority(priority); + return this; + } + + @Override + public AfdOriginImpl withWeight(Integer weight) { + this.innerModel().withWeight(weight); + return this; + } + + @Override + public AfdOriginImpl withSharedPrivateLinkResource(SharedPrivateLinkResourceProperties sharedPrivateLinkResource) { + this.innerModel().withSharedPrivateLinkResource(sharedPrivateLinkResource); + return this; + } + + @Override + public AfdOriginImpl withOriginCapacityResource(OriginCapacityResourceProperties originCapacityResource) { + this.innerModel().withOriginCapacityResource(originCapacityResource); + return this; + } + + @Override + public AfdOriginImpl withEnabledState(EnabledState enabledState) { + this.innerModel().withEnabledState(enabledState); + return this; + } + + @Override + public AfdOriginImpl withEnforceCertificateNameCheck(Boolean enforce) { + this.innerModel().withEnforceCertificateNameCheck(enforce); + return this; + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/AfdOriginsClientImpl.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/AfdOriginsClientImpl.java index 5d3ceeb2658b..de6e3448b34d 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/AfdOriginsClientImpl.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/AfdOriginsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.implementation; @@ -34,7 +34,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.cdn.fluent.AfdOriginsClient; import com.azure.resourcemanager.cdn.fluent.models.AfdOriginInner; -import com.azure.resourcemanager.cdn.models.AfdOriginListResult; +import com.azure.resourcemanager.cdn.implementation.models.AFDOriginListResult; import com.azure.resourcemanager.cdn.models.AfdOriginUpdateParameters; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -69,242 +69,75 @@ public final class AfdOriginsClientImpl implements AfdOriginsClient { * The interface defining all the services for CdnManagementClientAfdOrigins to be used by the proxy service to * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "CdnManagementClientA") + @Host("{endpoint}") + @ServiceInterface(name = "CdnManagementClientAfdOrigins") public interface AfdOriginsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByOriginGroup(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("originGroupName") String originGroupName, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins/{originName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, @PathParam("originGroupName") String originGroupName, @PathParam("originName") String originName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins/{originName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, @PathParam("originGroupName") String originGroupName, @PathParam("originName") String originName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") AfdOriginInner origin, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") AfdOriginInner origin, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins/{originName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, @PathParam("originGroupName") String originGroupName, @PathParam("originName") String originName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") AfdOriginUpdateParameters originUpdateProperties, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") AfdOriginUpdateParameters originUpdateProperties, 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.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins/{originName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, @PathParam("originGroupName") String originGroupName, @PathParam("originName") String originName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByOriginGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, + @PathParam("originGroupName") String originGroupName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByOriginGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listByOriginGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } - /** - * Lists all of the existing origins within an origin group. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 origins along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByOriginGroupSinglePageAsync(String resourceGroupName, - String profileName, String originGroupName) { - 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 (profileName == null) { - return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); - } - if (originGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter originGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByOriginGroup(this.client.getEndpoint(), resourceGroupName, profileName, - originGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists all of the existing origins within an origin group. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the 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 result of the request to list origins along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByOriginGroupSinglePageAsync(String resourceGroupName, - String profileName, String originGroupName, 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 (profileName == null) { - return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); - } - if (originGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter originGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByOriginGroup(this.client.getEndpoint(), resourceGroupName, profileName, originGroupName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all of the existing origins within an origin group. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 origins as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByOriginGroupAsync(String resourceGroupName, String profileName, - String originGroupName) { - return new PagedFlux<>(() -> listByOriginGroupSinglePageAsync(resourceGroupName, profileName, originGroupName), - nextLink -> listByOriginGroupNextSinglePageAsync(nextLink)); - } - - /** - * Lists all of the existing origins within an origin group. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the 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 result of the request to list origins as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByOriginGroupAsync(String resourceGroupName, String profileName, - String originGroupName, Context context) { - return new PagedFlux<>( - () -> listByOriginGroupSinglePageAsync(resourceGroupName, profileName, originGroupName, context), - nextLink -> listByOriginGroupNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all of the existing origins within an origin group. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 origins as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByOriginGroup(String resourceGroupName, String profileName, - String originGroupName) { - return new PagedIterable<>(listByOriginGroupAsync(resourceGroupName, profileName, originGroupName)); - } - - /** - * Lists all of the existing origins within an origin group. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the 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 result of the request to list origins as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByOriginGroup(String resourceGroupName, String profileName, - String originGroupName, Context context) { - return new PagedIterable<>(listByOriginGroupAsync(resourceGroupName, profileName, originGroupName, context)); - } - /** * Gets an existing origin within an origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originName Name of the origin which is unique within the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -319,6 +152,10 @@ public Mono> getWithResponseAsync(String resourceGroupN 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.")); @@ -333,25 +170,21 @@ public Mono> getWithResponseAsync(String resourceGroupN if (originName == null) { return Mono.error(new IllegalArgumentException("Parameter originName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.get(this.client.getEndpoint(), resourceGroupName, profileName, originGroupName, - originName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, originGroupName, originName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets an existing origin within an origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originName Name of the origin which is unique within the profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -367,6 +200,10 @@ private Mono> getWithResponseAsync(String resourceGroup 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.")); @@ -381,23 +218,19 @@ private Mono> getWithResponseAsync(String resourceGroup if (originName == null) { return Mono.error(new IllegalArgumentException("Parameter originName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), resourceGroupName, profileName, originGroupName, originName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, originGroupName, originName, accept, context); } /** * Gets an existing origin within an origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originName Name of the origin which is unique within the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -414,10 +247,10 @@ public Mono getAsync(String resourceGroupName, String profileNam /** * Gets an existing origin within an origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originName Name of the origin which is unique within the profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -434,10 +267,10 @@ public Response getWithResponse(String resourceGroupName, String /** * Gets an existing origin within an origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originName Name of the origin which is unique within the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -452,11 +285,11 @@ public AfdOriginInner get(String resourceGroupName, String profileName, String o /** * Creates a new origin within the specified origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. - * @param originName Name of the origin that is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. + * @param originName Name of the origin which is unique within the profile. * @param origin Origin properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -471,6 +304,10 @@ public Mono>> createWithResponseAsync(String resourceG 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.")); @@ -485,31 +322,28 @@ public Mono>> createWithResponseAsync(String resourceG if (originName == null) { return Mono.error(new IllegalArgumentException("Parameter originName 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 (origin == null) { return Mono.error(new IllegalArgumentException("Parameter origin is required and cannot be null.")); } else { origin.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.create(this.client.getEndpoint(), resourceGroupName, profileName, originGroupName, - originName, this.client.getSubscriptionId(), this.client.getApiVersion(), origin, accept, context)) + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, originGroupName, originName, + contentType, accept, origin, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates a new origin within the specified origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. - * @param originName Name of the origin that is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. + * @param originName Name of the origin which is unique within the profile. * @param origin Origin properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -525,6 +359,10 @@ private Mono>> createWithResponseAsync(String resource 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.")); @@ -539,29 +377,26 @@ private Mono>> createWithResponseAsync(String resource if (originName == null) { return Mono.error(new IllegalArgumentException("Parameter originName 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 (origin == null) { return Mono.error(new IllegalArgumentException("Parameter origin is required and cannot be null.")); } else { origin.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), resourceGroupName, profileName, originGroupName, originName, - this.client.getSubscriptionId(), this.client.getApiVersion(), origin, accept, context); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, originGroupName, originName, contentType, accept, origin, context); } /** * Creates a new origin within the specified origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. - * @param originName Name of the origin that is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. + * @param originName Name of the origin which is unique within the profile. * @param origin Origin properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -581,11 +416,11 @@ public PollerFlux, AfdOriginInner> beginCreateAsync(S /** * Creates a new origin within the specified origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. - * @param originName Name of the origin that is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. + * @param originName Name of the origin which is unique within the profile. * @param origin Origin properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -607,11 +442,11 @@ private PollerFlux, AfdOriginInner> beginCreateAsync( /** * Creates a new origin within the specified origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. - * @param originName Name of the origin that is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. + * @param originName Name of the origin which is unique within the profile. * @param origin Origin properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -629,11 +464,11 @@ public SyncPoller, AfdOriginInner> beginCreate(String /** * Creates a new origin within the specified origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. - * @param originName Name of the origin that is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. + * @param originName Name of the origin which is unique within the profile. * @param origin Origin properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -652,11 +487,11 @@ public SyncPoller, AfdOriginInner> beginCreate(String /** * Creates a new origin within the specified origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. - * @param originName Name of the origin that is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. + * @param originName Name of the origin which is unique within the profile. * @param origin Origin properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -674,11 +509,11 @@ public Mono createAsync(String resourceGroupName, String profile /** * Creates a new origin within the specified origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. - * @param originName Name of the origin that is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. + * @param originName Name of the origin which is unique within the profile. * @param origin Origin properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -697,11 +532,11 @@ private Mono createAsync(String resourceGroupName, String profil /** * Creates a new origin within the specified origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. - * @param originName Name of the origin that is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. + * @param originName Name of the origin which is unique within the profile. * @param origin Origin properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -717,11 +552,11 @@ public AfdOriginInner create(String resourceGroupName, String profileName, Strin /** * Creates a new origin within the specified origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. - * @param originName Name of the origin that is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. + * @param originName Name of the origin which is unique within the profile. * @param origin Origin properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -738,10 +573,10 @@ public AfdOriginInner create(String resourceGroupName, String profileName, Strin /** * Updates an existing origin within an origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originName Name of the origin which is unique within the profile. * @param originUpdateProperties Origin properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -757,6 +592,10 @@ public Mono>> updateWithResponseAsync(String resourceG 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.")); @@ -771,31 +610,28 @@ public Mono>> updateWithResponseAsync(String resourceG if (originName == null) { return Mono.error(new IllegalArgumentException("Parameter originName 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 (originUpdateProperties == null) { return Mono.error( new IllegalArgumentException("Parameter originUpdateProperties is required and cannot be null.")); } else { originUpdateProperties.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, profileName, - originGroupName, originName, this.client.getSubscriptionId(), this.client.getApiVersion(), - originUpdateProperties, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, originGroupName, originName, + contentType, accept, originUpdateProperties, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates an existing origin within an origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originName Name of the origin which is unique within the profile. * @param originUpdateProperties Origin properties. * @param context The context to associate with this operation. @@ -812,6 +648,10 @@ private Mono>> updateWithResponseAsync(String resource 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.")); @@ -826,29 +666,27 @@ private Mono>> updateWithResponseAsync(String resource if (originName == null) { return Mono.error(new IllegalArgumentException("Parameter originName 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 (originUpdateProperties == null) { return Mono.error( new IllegalArgumentException("Parameter originUpdateProperties is required and cannot be null.")); } else { originUpdateProperties.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), resourceGroupName, profileName, originGroupName, originName, - this.client.getSubscriptionId(), this.client.getApiVersion(), originUpdateProperties, accept, context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, originGroupName, originName, contentType, accept, originUpdateProperties, + context); } /** * Updates an existing origin within an origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originName Name of the origin which is unique within the profile. * @param originUpdateProperties Origin properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -870,10 +708,10 @@ public PollerFlux, AfdOriginInner> beginUpdateAsync(S /** * Updates an existing origin within an origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originName Name of the origin which is unique within the profile. * @param originUpdateProperties Origin properties. * @param context The context to associate with this operation. @@ -897,10 +735,10 @@ private PollerFlux, AfdOriginInner> beginUpdateAsync( /** * Updates an existing origin within an origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originName Name of the origin which is unique within the profile. * @param originUpdateProperties Origin properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -921,10 +759,10 @@ public SyncPoller, AfdOriginInner> beginUpdate(String /** * Updates an existing origin within an origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originName Name of the origin which is unique within the profile. * @param originUpdateProperties Origin properties. * @param context The context to associate with this operation. @@ -947,10 +785,10 @@ public SyncPoller, AfdOriginInner> beginUpdate(String /** * Updates an existing origin within an origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originName Name of the origin which is unique within the profile. * @param originUpdateProperties Origin properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -970,10 +808,10 @@ public Mono updateAsync(String resourceGroupName, String profile /** * Updates an existing origin within an origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originName Name of the origin which is unique within the profile. * @param originUpdateProperties Origin properties. * @param context The context to associate with this operation. @@ -993,10 +831,10 @@ private Mono updateAsync(String resourceGroupName, String profil /** * Updates an existing origin within an origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originName Name of the origin which is unique within the profile. * @param originUpdateProperties Origin properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1013,10 +851,10 @@ public AfdOriginInner update(String resourceGroupName, String profileName, Strin /** * Updates an existing origin within an origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originName Name of the origin which is unique within the profile. * @param originUpdateProperties Origin properties. * @param context The context to associate with this operation. @@ -1035,10 +873,10 @@ public AfdOriginInner update(String resourceGroupName, String profileName, Strin /** * Deletes an existing origin within an origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originName Name of the origin which is unique within the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1052,6 +890,10 @@ public Mono>> deleteWithResponseAsync(String resourceG 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.")); @@ -1066,25 +908,19 @@ public Mono>> deleteWithResponseAsync(String resourceG if (originName == null) { return Mono.error(new IllegalArgumentException("Parameter originName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), resourceGroupName, profileName, originGroupName, - originName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, originGroupName, originName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes an existing origin within an origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originName Name of the origin which is unique within the profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1099,6 +935,10 @@ private Mono>> deleteWithResponseAsync(String resource 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.")); @@ -1113,23 +953,18 @@ private Mono>> deleteWithResponseAsync(String resource if (originName == null) { return Mono.error(new IllegalArgumentException("Parameter originName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), resourceGroupName, profileName, originGroupName, originName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, originGroupName, originName, context); } /** * Deletes an existing origin within an origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originName Name of the origin which is unique within the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1148,10 +983,10 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN /** * Deletes an existing origin within an origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originName Name of the origin which is unique within the profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1172,10 +1007,10 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup /** * Deletes an existing origin within an origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originName Name of the origin which is unique within the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1191,10 +1026,10 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes an existing origin within an origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originName Name of the origin which is unique within the profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1212,10 +1047,10 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes an existing origin within an origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originName Name of the origin which is unique within the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1232,10 +1067,10 @@ public Mono deleteAsync(String resourceGroupName, String profileName, Stri /** * Deletes an existing origin within an origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originName Name of the origin which is unique within the profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1253,10 +1088,10 @@ private Mono deleteAsync(String resourceGroupName, String profileName, Str /** * Deletes an existing origin within an origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originName Name of the origin which is unique within the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1270,10 +1105,10 @@ public void delete(String resourceGroupName, String profileName, String originGr /** * Deletes an existing origin within an origin group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param originGroupName Name of the origin group which is unique within the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originName Name of the origin which is unique within the profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1286,6 +1121,172 @@ public void delete(String resourceGroupName, String profileName, String originGr deleteAsync(resourceGroupName, profileName, originGroupName, originName, context).block(); } + /** + * Lists all of the existing origins within an origin group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AFDOrigin list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByOriginGroupSinglePageAsync(String resourceGroupName, + String profileName, String originGroupName) { + 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 (originGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter originGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByOriginGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, originGroupName, 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 existing origins within an origin group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AFDOrigin list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByOriginGroupSinglePageAsync(String resourceGroupName, + String profileName, String originGroupName, 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 (originGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter originGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByOriginGroup(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, originGroupName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists all of the existing origins within an origin group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AFDOrigin list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByOriginGroupAsync(String resourceGroupName, String profileName, + String originGroupName) { + return new PagedFlux<>(() -> listByOriginGroupSinglePageAsync(resourceGroupName, profileName, originGroupName), + nextLink -> listByOriginGroupNextSinglePageAsync(nextLink)); + } + + /** + * Lists all of the existing origins within an origin group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AFDOrigin list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByOriginGroupAsync(String resourceGroupName, String profileName, + String originGroupName, Context context) { + return new PagedFlux<>( + () -> listByOriginGroupSinglePageAsync(resourceGroupName, profileName, originGroupName, context), + nextLink -> listByOriginGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all of the existing origins within an origin group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AFDOrigin list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByOriginGroup(String resourceGroupName, String profileName, + String originGroupName) { + return new PagedIterable<>(listByOriginGroupAsync(resourceGroupName, profileName, originGroupName)); + } + + /** + * Lists all of the existing origins within an origin group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param originGroupName Name of the origin group which is unique within the endpoint. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AFDOrigin list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByOriginGroup(String resourceGroupName, String profileName, + String originGroupName, Context context) { + return new PagedIterable<>(listByOriginGroupAsync(resourceGroupName, profileName, originGroupName, context)); + } + /** * Get the next page of items. * @@ -1293,7 +1294,7 @@ public void delete(String resourceGroupName, String profileName, String originGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 origins along with {@link PagedResponse} on successful completion of + * @return the response of a AFDOrigin list operation along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -1321,7 +1322,7 @@ private Mono> listByOriginGroupNextSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 origins along with {@link PagedResponse} on successful completion of + * @return the response of a AFDOrigin list operation along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/AfdOriginsImpl.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/AfdOriginsImpl.java new file mode 100644 index 000000000000..80e3bf7b739f --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/AfdOriginsImpl.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.cdn.implementation; + +import com.azure.resourcemanager.cdn.fluent.models.AfdOriginInner; +import com.azure.resourcemanager.cdn.models.AfdOrigin; +import com.azure.resourcemanager.cdn.models.AfdOriginGroup; +import com.azure.resourcemanager.resources.fluentcore.arm.collection.implementation.ExternalChildResourcesNonCachedImpl; + +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; + +/** + * Represents a collection of AFD origins associated with an AFD origin group. + */ +class AfdOriginsImpl extends + ExternalChildResourcesNonCachedImpl { + + AfdOriginsImpl(AfdOriginGroupImpl parent) { + super(parent, parent.taskGroup(), "AfdOrigin"); + } + + Map originsAsMap() { + Map result = new HashMap<>(); + for (AfdOriginInner originInner : this.getParent() + .parent() + .manager() + .serviceClient() + .getAfdOrigins() + .listByOriginGroup(this.getParent().parent().resourceGroupName(), this.getParent().parent().name(), + this.getParent().name())) { + AfdOriginImpl origin = new AfdOriginImpl(originInner.name(), this.getParent(), originInner); + result.put(origin.name(), origin); + } + return Collections.unmodifiableMap(result); + } + + void remove(String name) { + this.prepareInlineRemove(new AfdOriginImpl(name, getParent(), new AfdOriginInner())); + } + + void addOrigin(AfdOriginImpl origin) { + this.childCollection.put(origin.name(), origin); + } + + AfdOriginImpl defineNewOrigin(String name) { + return this.prepareInlineDefine(new AfdOriginImpl(name, this.getParent(), new AfdOriginInner())); + } + + AfdOriginImpl updateOrigin(String name) { + AfdOriginInner originInner = this.getParent() + .parent() + .manager() + .serviceClient() + .getAfdOrigins() + .get(this.getParent().parent().resourceGroupName(), this.getParent().parent().name(), + this.getParent().name(), name); + return this.prepareInlineUpdate(new AfdOriginImpl(name, this.getParent(), originInner)); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/AfdProfilesClientImpl.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/AfdProfilesClientImpl.java index 0a5df9eb5c3c..a331dfb005b4 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/AfdProfilesClientImpl.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/AfdProfilesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.implementation; @@ -36,10 +36,10 @@ import com.azure.resourcemanager.cdn.fluent.models.ProfileInner; import com.azure.resourcemanager.cdn.fluent.models.UsageInner; import com.azure.resourcemanager.cdn.fluent.models.ValidateSecretOutputInner; +import com.azure.resourcemanager.cdn.implementation.models.UsagesListResult; import com.azure.resourcemanager.cdn.models.CheckEndpointNameAvailabilityInput; import com.azure.resourcemanager.cdn.models.CheckHostnameAvailabilityInput; import com.azure.resourcemanager.cdn.models.ProfileUpgradeParameters; -import com.azure.resourcemanager.cdn.models.UsagesListResult; import com.azure.resourcemanager.cdn.models.ValidateSecretInput; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -74,74 +74,73 @@ public final class AfdProfilesClientImpl implements AfdProfilesClient { * The interface defining all the services for CdnManagementClientAfdProfiles to be used by the proxy service to * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "CdnManagementClientA") + @Host("{endpoint}") + @ServiceInterface(name = "CdnManagementClientAfdProfiles") public interface AfdProfilesService { - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/checkEndpointNameAvailability") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> checkEndpointNameAvailability( - @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @QueryParam("api-version") String apiVersion, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("application/json") CheckEndpointNameAvailabilityInput checkEndpointNameAvailabilityInput, - @HeaderParam("Accept") String accept, Context context); + Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/usages") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listResourceUsage(@HostParam("$host") String endpoint, + Mono> listResourceUsage(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/checkHostNameAvailability") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> checkHostnameAvailability(@HostParam("$host") String endpoint, + Mono> checkHostnameAvailability( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CheckHostnameAvailabilityInput checkHostnameAvailabilityInput, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") CheckHostnameAvailabilityInput checkHostNameAvailabilityInput, + Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/validateSecret") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> validateSecret(@HostParam("$host") String endpoint, + Mono> validateSecret(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ValidateSecretInput validateSecretInput, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ValidateSecretInput validateSecretInput, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/upgrade") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> upgrade(@HostParam("$host") String endpoint, + Mono>> upgrade(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ProfileUpgradeParameters profileUpgradeParameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ProfileUpgradeParameters profileUpgradeParameters, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listResourceUsageNext( - @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); } /** * Check the availability of an afdx endpoint name, and return the globally unique endpoint host name. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the - * resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param checkEndpointNameAvailabilityInput Input to check. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -174,20 +173,21 @@ public Mono> checkEndpointNam } else { checkEndpointNameAvailabilityInput.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.checkEndpointNameAvailability(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, profileName, this.client.getApiVersion(), - checkEndpointNameAvailabilityInput, accept, context)) + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, profileName, + contentType, accept, checkEndpointNameAvailabilityInput, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Check the availability of an afdx endpoint name, and return the globally unique endpoint host name. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the - * resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param checkEndpointNameAvailabilityInput Input to check. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -221,19 +221,20 @@ private Mono> checkEndpointNa } else { checkEndpointNameAvailabilityInput.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.checkEndpointNameAvailability(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, profileName, this.client.getApiVersion(), checkEndpointNameAvailabilityInput, accept, - context); + return service.checkEndpointNameAvailability(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, contentType, accept, + checkEndpointNameAvailabilityInput, context); } /** * Check the availability of an afdx endpoint name, and return the globally unique endpoint host name. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the - * resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param checkEndpointNameAvailabilityInput Input to check. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -250,9 +251,9 @@ public Mono checkEndpointNameAvailabil /** * Check the availability of an afdx endpoint name, and return the globally unique endpoint host name. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the - * resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param checkEndpointNameAvailabilityInput Input to check. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -271,9 +272,9 @@ public Response checkEndpointNameAvail /** * Check the availability of an afdx endpoint name, and return the globally unique endpoint host name. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the - * resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param checkEndpointNameAvailabilityInput Input to check. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -290,9 +291,9 @@ public CheckEndpointNameAvailabilityOutputInner checkEndpointNameAvailability(St /** * Checks the quota and actual usage of endpoints under the given Azure Front Door profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -306,6 +307,10 @@ private Mono> listResourceUsageSinglePageAsync(String 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.")); @@ -313,14 +318,10 @@ private Mono> listResourceUsageSinglePageAsync(String 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.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listResourceUsage(this.client.getEndpoint(), resourceGroupName, profileName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .withContext(context -> service.listResourceUsage(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())); @@ -329,9 +330,9 @@ private Mono> listResourceUsageSinglePageAsync(String /** * Checks the quota and actual usage of endpoints under the given Azure Front Door profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -346,6 +347,10 @@ private Mono> listResourceUsageSinglePageAsync(String 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.")); @@ -353,15 +358,11 @@ private Mono> listResourceUsageSinglePageAsync(String 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.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listResourceUsage(this.client.getEndpoint(), resourceGroupName, profileName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .listResourceUsage(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)); } @@ -369,9 +370,9 @@ private Mono> listResourceUsageSinglePageAsync(String /** * Checks the quota and actual usage of endpoints under the given Azure Front Door profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -386,9 +387,9 @@ public PagedFlux listResourceUsageAsync(String resourceGroupName, St /** * Checks the quota and actual usage of endpoints under the given Azure Front Door profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -405,9 +406,9 @@ private PagedFlux listResourceUsageAsync(String resourceGroupName, S /** * Checks the quota and actual usage of endpoints under the given Azure Front Door profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -421,9 +422,9 @@ public PagedIterable listResourceUsage(String resourceGroupName, Str /** * Checks the quota and actual usage of endpoints under the given Azure Front Door profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -438,10 +439,10 @@ public PagedIterable listResourceUsage(String resourceGroupName, Str /** * Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in DNS. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param checkHostnameAvailabilityInput Custom domain to be validated. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param checkHostNameAvailabilityInput Custom domain to be validated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -450,11 +451,15 @@ public PagedIterable listResourceUsage(String resourceGroupName, Str */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> checkHostnameAvailabilityWithResponseAsync( - String resourceGroupName, String profileName, CheckHostnameAvailabilityInput checkHostnameAvailabilityInput) { + String resourceGroupName, String profileName, CheckHostnameAvailabilityInput checkHostNameAvailabilityInput) { 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.")); @@ -462,31 +467,28 @@ public Mono> checkHostnameAvailabilit if (profileName == null) { return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { + if (checkHostNameAvailabilityInput == null) { return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (checkHostnameAvailabilityInput == null) { - return Mono.error(new IllegalArgumentException( - "Parameter checkHostnameAvailabilityInput is required and cannot be null.")); + "Parameter checkHostNameAvailabilityInput is required and cannot be null.")); } else { - checkHostnameAvailabilityInput.validate(); + checkHostNameAvailabilityInput.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.checkHostnameAvailability(this.client.getEndpoint(), resourceGroupName, - profileName, this.client.getSubscriptionId(), this.client.getApiVersion(), - checkHostnameAvailabilityInput, accept, context)) + .withContext(context -> service.checkHostnameAvailability(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, profileName, + contentType, accept, checkHostNameAvailabilityInput, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in DNS. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param checkHostnameAvailabilityInput Custom domain to be validated. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param checkHostNameAvailabilityInput 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. @@ -496,12 +498,16 @@ public Mono> checkHostnameAvailabilit */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> checkHostnameAvailabilityWithResponseAsync( - String resourceGroupName, String profileName, CheckHostnameAvailabilityInput checkHostnameAvailabilityInput, + String resourceGroupName, String profileName, CheckHostnameAvailabilityInput checkHostNameAvailabilityInput, 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.")); @@ -509,30 +515,27 @@ private Mono> checkHostnameAvailabili if (profileName == null) { return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { + if (checkHostNameAvailabilityInput == null) { return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (checkHostnameAvailabilityInput == null) { - return Mono.error(new IllegalArgumentException( - "Parameter checkHostnameAvailabilityInput is required and cannot be null.")); + "Parameter checkHostNameAvailabilityInput is required and cannot be null.")); } else { - checkHostnameAvailabilityInput.validate(); + checkHostNameAvailabilityInput.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.checkHostnameAvailability(this.client.getEndpoint(), resourceGroupName, profileName, - this.client.getSubscriptionId(), this.client.getApiVersion(), checkHostnameAvailabilityInput, accept, - context); + return service.checkHostnameAvailability(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, contentType, accept, + checkHostNameAvailabilityInput, context); } /** * Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in DNS. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param checkHostnameAvailabilityInput Custom domain to be validated. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param checkHostNameAvailabilityInput Custom domain to be validated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -540,18 +543,18 @@ private Mono> checkHostnameAvailabili */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono checkHostnameAvailabilityAsync(String resourceGroupName, - String profileName, CheckHostnameAvailabilityInput checkHostnameAvailabilityInput) { + String profileName, CheckHostnameAvailabilityInput checkHostNameAvailabilityInput) { return checkHostnameAvailabilityWithResponseAsync(resourceGroupName, profileName, - checkHostnameAvailabilityInput).flatMap(res -> Mono.justOrEmpty(res.getValue())); + checkHostNameAvailabilityInput).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in DNS. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param checkHostnameAvailabilityInput Custom domain to be validated. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param checkHostNameAvailabilityInput 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. @@ -560,18 +563,18 @@ public Mono checkHostnameAvailabilityAsync(Str */ @ServiceMethod(returns = ReturnType.SINGLE) public Response checkHostnameAvailabilityWithResponse(String resourceGroupName, - String profileName, CheckHostnameAvailabilityInput checkHostnameAvailabilityInput, Context context) { + String profileName, CheckHostnameAvailabilityInput checkHostNameAvailabilityInput, Context context) { return checkHostnameAvailabilityWithResponseAsync(resourceGroupName, profileName, - checkHostnameAvailabilityInput, context).block(); + checkHostNameAvailabilityInput, context).block(); } /** * Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in DNS. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param checkHostnameAvailabilityInput Custom domain to be validated. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param checkHostNameAvailabilityInput Custom domain to be validated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -579,17 +582,17 @@ public Response checkHostnameAvailabilityWithR */ @ServiceMethod(returns = ReturnType.SINGLE) public CheckNameAvailabilityOutputInner checkHostnameAvailability(String resourceGroupName, String profileName, - CheckHostnameAvailabilityInput checkHostnameAvailabilityInput) { - return checkHostnameAvailabilityWithResponse(resourceGroupName, profileName, checkHostnameAvailabilityInput, + CheckHostnameAvailabilityInput checkHostNameAvailabilityInput) { + return checkHostnameAvailabilityWithResponse(resourceGroupName, profileName, checkHostNameAvailabilityInput, Context.NONE).getValue(); } /** * Validate a Secret in the profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the - * resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param validateSecretInput The Secret source. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -603,6 +606,10 @@ public Mono> validateSecretWithResponseAsync 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.")); @@ -610,29 +617,27 @@ public Mono> validateSecretWithResponseAsync 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 (validateSecretInput == null) { return Mono .error(new IllegalArgumentException("Parameter validateSecretInput is required and cannot be null.")); } else { validateSecretInput.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.validateSecret(this.client.getEndpoint(), resourceGroupName, profileName, - this.client.getSubscriptionId(), this.client.getApiVersion(), validateSecretInput, accept, context)) + .withContext(context -> service.validateSecret(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, contentType, accept, + validateSecretInput, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Validate a Secret in the profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the - * resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param validateSecretInput The Secret source. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -647,6 +652,10 @@ private Mono> validateSecretWithResponseAsyn 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.")); @@ -654,28 +663,26 @@ private Mono> validateSecretWithResponseAsyn 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 (validateSecretInput == null) { return Mono .error(new IllegalArgumentException("Parameter validateSecretInput is required and cannot be null.")); } else { validateSecretInput.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.validateSecret(this.client.getEndpoint(), resourceGroupName, profileName, - this.client.getSubscriptionId(), this.client.getApiVersion(), validateSecretInput, accept, context); + return service.validateSecret(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, contentType, accept, validateSecretInput, + context); } /** * Validate a Secret in the profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the - * resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param validateSecretInput The Secret source. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -692,9 +699,9 @@ public Mono validateSecretAsync(String resourceGroupN /** * Validate a Secret in the profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the - * resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param validateSecretInput The Secret source. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -711,9 +718,9 @@ public Response validateSecretWithResponse(String res /** * Validate a Secret in the profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the - * resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param validateSecretInput The Secret source. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -729,9 +736,9 @@ public ValidateSecretOutputInner validateSecret(String resourceGroupName, String /** * Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the - * resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param profileUpgradeParameters Profile upgrade input parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -746,6 +753,10 @@ public Mono>> upgradeWithResponseAsync(String resource 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.")); @@ -753,30 +764,27 @@ public Mono>> upgradeWithResponseAsync(String resource 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 (profileUpgradeParameters == null) { return Mono.error( new IllegalArgumentException("Parameter profileUpgradeParameters is required and cannot be null.")); } else { profileUpgradeParameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.upgrade(this.client.getEndpoint(), resourceGroupName, profileName, - this.client.getSubscriptionId(), this.client.getApiVersion(), profileUpgradeParameters, accept, - context)) + .withContext(context -> service.upgrade(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, contentType, accept, + profileUpgradeParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the - * resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param profileUpgradeParameters Profile upgrade input parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -792,6 +800,10 @@ private Mono>> upgradeWithResponseAsync(String resourc 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.")); @@ -799,28 +811,25 @@ private Mono>> upgradeWithResponseAsync(String resourc 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 (profileUpgradeParameters == null) { return Mono.error( new IllegalArgumentException("Parameter profileUpgradeParameters is required and cannot be null.")); } else { profileUpgradeParameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.upgrade(this.client.getEndpoint(), resourceGroupName, profileName, - this.client.getSubscriptionId(), this.client.getApiVersion(), profileUpgradeParameters, accept, context); + return service.upgrade(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, contentType, accept, profileUpgradeParameters, context); } /** * Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the - * resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param profileUpgradeParameters Profile upgrade input parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -840,9 +849,9 @@ public PollerFlux, ProfileInner> beginUpgradeAsync(Stri /** * Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the - * resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param profileUpgradeParameters Profile upgrade input parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -864,9 +873,9 @@ private PollerFlux, ProfileInner> beginUpgradeAsync(Str /** * Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the - * resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param profileUpgradeParameters Profile upgrade input parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -883,9 +892,9 @@ public SyncPoller, ProfileInner> beginUpgrade(String re /** * Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the - * resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param profileUpgradeParameters Profile upgrade input parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -904,9 +913,9 @@ public SyncPoller, ProfileInner> beginUpgrade(String re /** * Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the - * resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param profileUpgradeParameters Profile upgrade input parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -924,9 +933,9 @@ public Mono upgradeAsync(String resourceGroupName, String profileN /** * Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the - * resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param profileUpgradeParameters Profile upgrade input parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -945,9 +954,9 @@ private Mono upgradeAsync(String resourceGroupName, String profile /** * Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the - * resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param profileUpgradeParameters Profile upgrade input parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -963,9 +972,9 @@ public ProfileInner upgrade(String resourceGroupName, String profileName, /** * Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the - * resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param profileUpgradeParameters Profile upgrade input parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/CdnEndpointsImpl.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/CdnEndpointsImpl.java index c0e8f582e3ee..f2a0241e26e3 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/CdnEndpointsImpl.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/CdnEndpointsImpl.java @@ -82,7 +82,9 @@ public CdnEndpointImpl defineNewEndpoint(String endpointName, String endpointOri public CdnEndpointImpl defineNewEndpoint(String name) { CdnEndpointImpl endpoint = this.prepareInlineDefine(new CdnEndpointImpl(name, this.getParent(), new EndpointInner())); - endpoint.innerModel().withLocation(endpoint.parent().region().toString()); + if (endpoint.parent().region() != null) { + endpoint.innerModel().withLocation(endpoint.parent().region().toString()); + } endpoint.innerModel().withOrigins(new ArrayList<>()); return endpoint; } diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/CdnManagementClientBuilder.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/CdnManagementClientBuilder.java index 72b7f8c433a7..628c502a9825 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/CdnManagementClientBuilder.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/CdnManagementClientBuilder.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.implementation; @@ -20,34 +20,34 @@ @ServiceClientBuilder(serviceClients = { CdnManagementClientImpl.class }) public final class CdnManagementClientBuilder { /* - * Azure Subscription ID. + * Service host */ - private String subscriptionId; + private String endpoint; /** - * Sets Azure Subscription ID. + * Sets Service host. * - * @param subscriptionId the subscriptionId value. + * @param endpoint the endpoint value. * @return the CdnManagementClientBuilder. */ - public CdnManagementClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; + public CdnManagementClientBuilder 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 CdnManagementClientBuilder. */ - public CdnManagementClientBuilder endpoint(String endpoint) { - this.endpoint = endpoint; + public CdnManagementClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; return this; } @@ -132,7 +132,7 @@ public CdnManagementClientImpl buildClient() { ? serializerAdapter : SerializerFactory.createDefaultManagementSerializerAdapter(); CdnManagementClientImpl client = new CdnManagementClientImpl(localPipeline, localSerializerAdapter, - localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); + localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId); return client; } } diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/CdnManagementClientImpl.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/CdnManagementClientImpl.java index 112c133b1175..015681c529a4 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/CdnManagementClientImpl.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/CdnManagementClientImpl.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.cdn.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; @@ -33,21 +32,26 @@ import com.azure.resourcemanager.cdn.fluent.AfdProfilesClient; import com.azure.resourcemanager.cdn.fluent.CdnManagementClient; import com.azure.resourcemanager.cdn.fluent.CustomDomainsClient; +import com.azure.resourcemanager.cdn.fluent.DeploymentVersionsClient; import com.azure.resourcemanager.cdn.fluent.EdgeNodesClient; import com.azure.resourcemanager.cdn.fluent.EndpointsClient; +import com.azure.resourcemanager.cdn.fluent.KeyGroupsClient; +import com.azure.resourcemanager.cdn.fluent.KnowledgeSourcesClient; import com.azure.resourcemanager.cdn.fluent.LogAnalyticsClient; import com.azure.resourcemanager.cdn.fluent.ManagedRuleSetsClient; import com.azure.resourcemanager.cdn.fluent.OperationsClient; import com.azure.resourcemanager.cdn.fluent.OriginGroupsClient; import com.azure.resourcemanager.cdn.fluent.OriginsClient; import com.azure.resourcemanager.cdn.fluent.PoliciesClient; +import com.azure.resourcemanager.cdn.fluent.ProfileAgentsClient; import com.azure.resourcemanager.cdn.fluent.ProfilesClient; import com.azure.resourcemanager.cdn.fluent.ResourceUsagesClient; import com.azure.resourcemanager.cdn.fluent.RoutesClient; -import com.azure.resourcemanager.cdn.fluent.RulesClient; import com.azure.resourcemanager.cdn.fluent.RuleSetsClient; +import com.azure.resourcemanager.cdn.fluent.RulesClient; import com.azure.resourcemanager.cdn.fluent.SecretsClient; import com.azure.resourcemanager.cdn.fluent.SecurityPoliciesClient; +import com.azure.resourcemanager.cdn.fluent.WebAgentsClient; import com.azure.resourcemanager.cdn.fluent.models.CheckEndpointNameAvailabilityOutputInner; import com.azure.resourcemanager.cdn.fluent.models.CheckNameAvailabilityOutputInner; import com.azure.resourcemanager.cdn.fluent.models.ValidateProbeOutputInner; @@ -69,26 +73,12 @@ public final class CdnManagementClientImpl extends AzureServiceClient implements private final CdnManagementClientService service; /** - * Azure Subscription ID. - */ - private final String subscriptionId; - - /** - * Gets Azure Subscription ID. - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - - /** - * server parameter. + * Service host. */ private final String endpoint; /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ @@ -97,12 +87,12 @@ public String getEndpoint() { } /** - * Api Version. + * Version parameter. */ private final String apiVersion; /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ @@ -110,6 +100,20 @@ public String getApiVersion() { return this.apiVersion; } + /** + * The ID of the target subscription. The value must be an UUID. + */ + private final String subscriptionId; + + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + /** * The HTTP pipeline to send requests through. */ @@ -153,31 +157,31 @@ public Duration getDefaultPollInterval() { } /** - * The AfdProfilesClient object to access its operations. + * The OperationsClient object to access its operations. */ - private final AfdProfilesClient afdProfiles; + private final OperationsClient operations; /** - * Gets the AfdProfilesClient object to access its operations. + * Gets the OperationsClient object to access its operations. * - * @return the AfdProfilesClient object. + * @return the OperationsClient object. */ - public AfdProfilesClient getAfdProfiles() { - return this.afdProfiles; + public OperationsClient getOperations() { + return this.operations; } /** - * The AfdCustomDomainsClient object to access its operations. + * The ProfilesClient object to access its operations. */ - private final AfdCustomDomainsClient afdCustomDomains; + private final ProfilesClient profiles; /** - * Gets the AfdCustomDomainsClient object to access its operations. + * Gets the ProfilesClient object to access its operations. * - * @return the AfdCustomDomainsClient object. + * @return the ProfilesClient object. */ - public AfdCustomDomainsClient getAfdCustomDomains() { - return this.afdCustomDomains; + public ProfilesClient getProfiles() { + return this.profiles; } /** @@ -293,31 +297,31 @@ public SecretsClient getSecrets() { } /** - * The LogAnalyticsClient object to access its operations. + * The KeyGroupsClient object to access its operations. */ - private final LogAnalyticsClient logAnalytics; + private final KeyGroupsClient keyGroups; /** - * Gets the LogAnalyticsClient object to access its operations. + * Gets the KeyGroupsClient object to access its operations. * - * @return the LogAnalyticsClient object. + * @return the KeyGroupsClient object. */ - public LogAnalyticsClient getLogAnalytics() { - return this.logAnalytics; + public KeyGroupsClient getKeyGroups() { + return this.keyGroups; } /** - * The ProfilesClient object to access its operations. + * The DeploymentVersionsClient object to access its operations. */ - private final ProfilesClient profiles; + private final DeploymentVersionsClient deploymentVersions; /** - * Gets the ProfilesClient object to access its operations. + * Gets the DeploymentVersionsClient object to access its operations. * - * @return the ProfilesClient object. + * @return the DeploymentVersionsClient object. */ - public ProfilesClient getProfiles() { - return this.profiles; + public DeploymentVersionsClient getDeploymentVersions() { + return this.deploymentVersions; } /** @@ -377,45 +381,87 @@ public CustomDomainsClient getCustomDomains() { } /** - * The ResourceUsagesClient object to access its operations. + * The ProfileAgentsClient object to access its operations. */ - private final ResourceUsagesClient resourceUsages; + private final ProfileAgentsClient profileAgents; /** - * Gets the ResourceUsagesClient object to access its operations. + * Gets the ProfileAgentsClient object to access its operations. * - * @return the ResourceUsagesClient object. + * @return the ProfileAgentsClient object. */ - public ResourceUsagesClient getResourceUsages() { - return this.resourceUsages; + public ProfileAgentsClient getProfileAgents() { + return this.profileAgents; } /** - * The OperationsClient object to access its operations. + * The WebAgentsClient object to access its operations. */ - private final OperationsClient operations; + private final WebAgentsClient webAgents; /** - * Gets the OperationsClient object to access its operations. + * Gets the WebAgentsClient object to access its operations. * - * @return the OperationsClient object. + * @return the WebAgentsClient object. */ - public OperationsClient getOperations() { - return this.operations; + public WebAgentsClient getWebAgents() { + return this.webAgents; } /** - * The EdgeNodesClient object to access its operations. + * The KnowledgeSourcesClient object to access its operations. */ - private final EdgeNodesClient edgeNodes; + private final KnowledgeSourcesClient knowledgeSources; /** - * Gets the EdgeNodesClient object to access its operations. + * Gets the KnowledgeSourcesClient object to access its operations. * - * @return the EdgeNodesClient object. + * @return the KnowledgeSourcesClient object. */ - public EdgeNodesClient getEdgeNodes() { - return this.edgeNodes; + public KnowledgeSourcesClient getKnowledgeSources() { + return this.knowledgeSources; + } + + /** + * The AfdCustomDomainsClient object to access its operations. + */ + private final AfdCustomDomainsClient afdCustomDomains; + + /** + * Gets the AfdCustomDomainsClient object to access its operations. + * + * @return the AfdCustomDomainsClient object. + */ + public AfdCustomDomainsClient getAfdCustomDomains() { + return this.afdCustomDomains; + } + + /** + * The AfdProfilesClient object to access its operations. + */ + private final AfdProfilesClient afdProfiles; + + /** + * Gets the AfdProfilesClient object to access its operations. + * + * @return the AfdProfilesClient object. + */ + public AfdProfilesClient getAfdProfiles() { + return this.afdProfiles; + } + + /** + * The LogAnalyticsClient object to access its operations. + */ + private final LogAnalyticsClient logAnalytics; + + /** + * Gets the LogAnalyticsClient object to access its operations. + * + * @return the LogAnalyticsClient object. + */ + public LogAnalyticsClient getLogAnalytics() { + return this.logAnalytics; } /** @@ -432,6 +478,34 @@ public PoliciesClient getPolicies() { return this.policies; } + /** + * The ResourceUsagesClient object to access its operations. + */ + private final ResourceUsagesClient resourceUsages; + + /** + * Gets the ResourceUsagesClient object to access its operations. + * + * @return the ResourceUsagesClient object. + */ + public ResourceUsagesClient getResourceUsages() { + return this.resourceUsages; + } + + /** + * The EdgeNodesClient object to access its operations. + */ + private final EdgeNodesClient edgeNodes; + + /** + * Gets the EdgeNodesClient object to access its operations. + * + * @return the EdgeNodesClient object. + */ + public EdgeNodesClient getEdgeNodes() { + return this.edgeNodes; + } + /** * The ManagedRuleSetsClient object to access its operations. */ @@ -453,20 +527,20 @@ public ManagedRuleSetsClient getManagedRuleSets() { * @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 Azure Subscription ID. - * @param endpoint server parameter. + * @param endpoint Service host. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. */ CdnManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, - Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { + Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) { super(httpPipeline, serializerAdapter, environment); this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; - this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2024-02-01"; - this.afdProfiles = new AfdProfilesClientImpl(this); - this.afdCustomDomains = new AfdCustomDomainsClientImpl(this); + this.subscriptionId = subscriptionId; + this.apiVersion = "2025-09-01-preview"; + this.operations = new OperationsClientImpl(this); + this.profiles = new ProfilesClientImpl(this); this.afdEndpoints = new AfdEndpointsClientImpl(this); this.afdOriginGroups = new AfdOriginGroupsClientImpl(this); this.afdOrigins = new AfdOriginsClientImpl(this); @@ -475,16 +549,21 @@ public ManagedRuleSetsClient getManagedRuleSets() { this.rules = new RulesClientImpl(this); this.securityPolicies = new SecurityPoliciesClientImpl(this); this.secrets = new SecretsClientImpl(this); - this.logAnalytics = new LogAnalyticsClientImpl(this); - this.profiles = new ProfilesClientImpl(this); + this.keyGroups = new KeyGroupsClientImpl(this); + this.deploymentVersions = new DeploymentVersionsClientImpl(this); this.endpoints = new EndpointsClientImpl(this); this.origins = new OriginsClientImpl(this); this.originGroups = new OriginGroupsClientImpl(this); this.customDomains = new CustomDomainsClientImpl(this); + this.profileAgents = new ProfileAgentsClientImpl(this); + this.webAgents = new WebAgentsClientImpl(this); + this.knowledgeSources = new KnowledgeSourcesClientImpl(this); + this.afdCustomDomains = new AfdCustomDomainsClientImpl(this); + this.afdProfiles = new AfdProfilesClientImpl(this); + this.logAnalytics = new LogAnalyticsClientImpl(this); + this.policies = new PoliciesClientImpl(this); this.resourceUsages = new ResourceUsagesClientImpl(this); - this.operations = new OperationsClientImpl(this); this.edgeNodes = new EdgeNodesClientImpl(this); - this.policies = new PoliciesClientImpl(this); this.managedRuleSets = new ManagedRuleSetsClientImpl(this); this.service = RestProxy.create(CdnManagementClientService.class, this.httpPipeline, this.getSerializerAdapter()); @@ -494,53 +573,51 @@ public ManagedRuleSetsClient getManagedRuleSets() { * The interface defining all the services for CdnManagementClient to be used by the proxy service to perform REST * calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "CdnManagementClient") public interface CdnManagementClientService { - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/checkEndpointNameAvailability") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> checkEndpointNameAvailability( - @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") CheckEndpointNameAvailabilityInput checkEndpointNameAvailabilityInput, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) @Post("/providers/Microsoft.Cdn/checkNameAvailability") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> checkNameAvailability(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CheckNameAvailabilityInput checkNameAvailabilityInput, - @HeaderParam("Accept") String accept, Context context); + Mono> checkNameAvailability(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") CheckNameAvailabilityInput checkNameAvailabilityInput, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/checkNameAvailability") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> checkNameAvailabilityWithSubscription( - @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CheckNameAvailabilityInput checkNameAvailabilityInput, - @HeaderParam("Accept") String accept, Context context); + @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 checkNameAvailabilityInput, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/validateProbe") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> validateProbe(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ValidateProbeInput validateProbeInput, @HeaderParam("Accept") String accept, - Context context); + Mono> validateProbe(@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") ValidateProbeInput validateProbeInput, Context context); } /** * Check the availability of a resource name. This is needed for resources where name is globally unique, such as a * afdx endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param checkEndpointNameAvailabilityInput Input to check. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -569,10 +646,12 @@ public Mono> checkEndpointNam } else { checkEndpointNameAvailabilityInput.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.checkEndpointNameAvailability(this.getEndpoint(), this.getSubscriptionId(), - resourceGroupName, this.getApiVersion(), checkEndpointNameAvailabilityInput, accept, context)) + .withContext(context -> service.checkEndpointNameAvailability(this.getEndpoint(), this.getApiVersion(), + this.getSubscriptionId(), resourceGroupName, contentType, accept, checkEndpointNameAvailabilityInput, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.getContext()).readOnly())); } @@ -580,7 +659,7 @@ public Mono> checkEndpointNam * Check the availability of a resource name. This is needed for resources where name is globally unique, such as a * afdx endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param checkEndpointNameAvailabilityInput Input to check. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -611,17 +690,18 @@ private Mono> checkEndpointNa } else { checkEndpointNameAvailabilityInput.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.mergeContext(context); - return service.checkEndpointNameAvailability(this.getEndpoint(), this.getSubscriptionId(), resourceGroupName, - this.getApiVersion(), checkEndpointNameAvailabilityInput, accept, context); + return service.checkEndpointNameAvailability(this.getEndpoint(), this.getApiVersion(), this.getSubscriptionId(), + resourceGroupName, contentType, accept, checkEndpointNameAvailabilityInput, context); } /** * Check the availability of a resource name. This is needed for resources where name is globally unique, such as a * afdx endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param checkEndpointNameAvailabilityInput Input to check. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -639,7 +719,7 @@ public Mono checkEndpointNameAvailabil * Check the availability of a resource name. This is needed for resources where name is globally unique, such as a * afdx endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param checkEndpointNameAvailabilityInput Input to check. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -659,7 +739,7 @@ public Response checkEndpointNameAvail * Check the availability of a resource name. This is needed for resources where name is globally unique, such as a * afdx endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param checkEndpointNameAvailabilityInput Input to check. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -677,7 +757,7 @@ public CheckEndpointNameAvailabilityOutputInner checkEndpointNameAvailability(St * Check the availability of a resource name. This is needed for resources where name is globally unique, such as a * CDN endpoint. * - * @param checkNameAvailabilityInput Input to check. + * @param checkNameAvailabilityInput 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. @@ -697,10 +777,11 @@ public CheckEndpointNameAvailabilityOutputInner checkEndpointNameAvailability(St } else { checkNameAvailabilityInput.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.checkNameAvailability(this.getEndpoint(), this.getApiVersion(), - checkNameAvailabilityInput, accept, context)) + .withContext(context -> service.checkNameAvailability(this.getEndpoint(), this.getApiVersion(), contentType, + accept, checkNameAvailabilityInput, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.getContext()).readOnly())); } @@ -708,7 +789,7 @@ public CheckEndpointNameAvailabilityOutputInner checkEndpointNameAvailability(St * Check the availability of a resource name. This is needed for resources where name is globally unique, such as a * CDN endpoint. * - * @param checkNameAvailabilityInput Input to check. + * @param checkNameAvailabilityInput 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. @@ -729,17 +810,18 @@ public CheckEndpointNameAvailabilityOutputInner checkEndpointNameAvailability(St } else { checkNameAvailabilityInput.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.mergeContext(context); - return service.checkNameAvailability(this.getEndpoint(), this.getApiVersion(), checkNameAvailabilityInput, - accept, context); + return service.checkNameAvailability(this.getEndpoint(), this.getApiVersion(), contentType, accept, + checkNameAvailabilityInput, context); } /** * Check the availability of a resource name. This is needed for resources where name is globally unique, such as a * CDN endpoint. * - * @param checkNameAvailabilityInput Input to check. + * @param checkNameAvailabilityInput 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. @@ -756,7 +838,7 @@ public CheckEndpointNameAvailabilityOutputInner checkEndpointNameAvailability(St * Check the availability of a resource name. This is needed for resources where name is globally unique, such as a * CDN endpoint. * - * @param checkNameAvailabilityInput Input to check. + * @param checkNameAvailabilityInput 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. @@ -773,7 +855,7 @@ public CheckEndpointNameAvailabilityOutputInner checkEndpointNameAvailability(St * Check the availability of a resource name. This is needed for resources where name is globally unique, such as a * CDN endpoint. * - * @param checkNameAvailabilityInput Input to check. + * @param checkNameAvailabilityInput 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. @@ -789,7 +871,7 @@ public CheckEndpointNameAvailabilityOutputInner checkEndpointNameAvailability(St * Check the availability of a resource name. This is needed for resources where name is globally unique, such as a * CDN endpoint. * - * @param checkNameAvailabilityInput Input to check. + * @param checkNameAvailabilityInput 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. @@ -813,10 +895,12 @@ public CheckEndpointNameAvailabilityOutputInner checkEndpointNameAvailability(St } else { checkNameAvailabilityInput.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.checkNameAvailabilityWithSubscription(this.getEndpoint(), - this.getSubscriptionId(), this.getApiVersion(), checkNameAvailabilityInput, accept, context)) + .withContext( + context -> service.checkNameAvailabilityWithSubscription(this.getEndpoint(), this.getApiVersion(), + this.getSubscriptionId(), contentType, accept, checkNameAvailabilityInput, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.getContext()).readOnly())); } @@ -824,7 +908,7 @@ public CheckEndpointNameAvailabilityOutputInner checkEndpointNameAvailability(St * Check the availability of a resource name. This is needed for resources where name is globally unique, such as a * CDN endpoint. * - * @param checkNameAvailabilityInput Input to check. + * @param checkNameAvailabilityInput 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. @@ -849,17 +933,18 @@ private Mono> checkNameAvailabilityWi } else { checkNameAvailabilityInput.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.mergeContext(context); - return service.checkNameAvailabilityWithSubscription(this.getEndpoint(), this.getSubscriptionId(), - this.getApiVersion(), checkNameAvailabilityInput, accept, context); + return service.checkNameAvailabilityWithSubscription(this.getEndpoint(), this.getApiVersion(), + this.getSubscriptionId(), contentType, accept, checkNameAvailabilityInput, context); } /** * Check the availability of a resource name. This is needed for resources where name is globally unique, such as a * CDN endpoint. * - * @param checkNameAvailabilityInput Input to check. + * @param checkNameAvailabilityInput 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. @@ -876,7 +961,7 @@ private Mono> checkNameAvailabilityWi * Check the availability of a resource name. This is needed for resources where name is globally unique, such as a * CDN endpoint. * - * @param checkNameAvailabilityInput Input to check. + * @param checkNameAvailabilityInput 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. @@ -893,7 +978,7 @@ public Response checkNameAvailabilityWithSubsc * Check the availability of a resource name. This is needed for resources where name is globally unique, such as a * CDN endpoint. * - * @param checkNameAvailabilityInput Input to check. + * @param checkNameAvailabilityInput 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. @@ -910,7 +995,7 @@ public Response checkNameAvailabilityWithSubsc * the origin server to help accelerate the delivery of dynamic content via the CDN endpoint. This path is relative * to the origin path specified in the endpoint configuration. * - * @param validateProbeInput Input to check. + * @param validateProbeInput 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. @@ -933,10 +1018,11 @@ public Response checkNameAvailabilityWithSubsc } else { validateProbeInput.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.validateProbe(this.getEndpoint(), this.getSubscriptionId(), - this.getApiVersion(), validateProbeInput, accept, context)) + .withContext(context -> service.validateProbe(this.getEndpoint(), this.getApiVersion(), + this.getSubscriptionId(), contentType, accept, validateProbeInput, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.getContext()).readOnly())); } @@ -945,7 +1031,7 @@ public Response checkNameAvailabilityWithSubsc * the origin server to help accelerate the delivery of dynamic content via the CDN endpoint. This path is relative * to the origin path specified in the endpoint configuration. * - * @param validateProbeInput Input to check. + * @param validateProbeInput 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. @@ -969,10 +1055,11 @@ public Response checkNameAvailabilityWithSubsc } else { validateProbeInput.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.mergeContext(context); - return service.validateProbe(this.getEndpoint(), this.getSubscriptionId(), this.getApiVersion(), - validateProbeInput, accept, context); + return service.validateProbe(this.getEndpoint(), this.getApiVersion(), this.getSubscriptionId(), contentType, + accept, validateProbeInput, context); } /** @@ -980,7 +1067,7 @@ public Response checkNameAvailabilityWithSubsc * the origin server to help accelerate the delivery of dynamic content via the CDN endpoint. This path is relative * to the origin path specified in the endpoint configuration. * - * @param validateProbeInput Input to check. + * @param validateProbeInput 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. @@ -996,7 +1083,7 @@ public Mono validateProbeAsync(ValidateProbeInput vali * the origin server to help accelerate the delivery of dynamic content via the CDN endpoint. This path is relative * to the origin path specified in the endpoint configuration. * - * @param validateProbeInput Input to check. + * @param validateProbeInput 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. @@ -1014,7 +1101,7 @@ public Response validateProbeWithResponse(ValidateProb * the origin server to help accelerate the delivery of dynamic content via the CDN endpoint. This path is relative * to the origin path specified in the endpoint configuration. * - * @param validateProbeInput Input to check. + * @param validateProbeInput 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/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/CdnProfileImpl.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/CdnProfileImpl.java index cc3b94634fb3..70a2a1e3d030 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/CdnProfileImpl.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/CdnProfileImpl.java @@ -7,6 +7,8 @@ import com.azure.resourcemanager.cdn.CdnManager; import com.azure.resourcemanager.cdn.fluent.models.ProfileInner; import com.azure.resourcemanager.cdn.fluent.models.SsoUriInner; +import com.azure.resourcemanager.cdn.models.AfdEndpoint; +import com.azure.resourcemanager.cdn.models.AfdOriginGroup; import com.azure.resourcemanager.cdn.models.LoadParameters; import com.azure.resourcemanager.cdn.models.ProfileUpdateParameters; import com.azure.resourcemanager.cdn.models.PurgeParameters; @@ -32,11 +34,15 @@ class CdnProfileImpl extends GroupableResourceImpl implements CdnProfile, CdnProfile.Definition, CdnProfile.Update { - private CdnEndpointsImpl endpoints; + private final CdnEndpointsImpl endpoints; + private final AfdEndpointsImpl afdEndpoints; + private final AfdOriginGroupsImpl afdOriginGroups; CdnProfileImpl(String name, final ProfileInner innerModel, final CdnManager cdnManager) { super(name, innerModel, cdnManager); this.endpoints = new CdnEndpointsImpl(this); + this.afdEndpoints = new AfdEndpointsImpl(this); + this.afdOriginGroups = new AfdOriginGroupsImpl(this); } @Override @@ -44,6 +50,16 @@ public Map endpoints() { return this.endpoints.endpointsAsMap(); } + @Override + public Map afdEndpoints() { + return this.afdEndpoints.endpointsAsMap(); + } + + @Override + public Map afdOriginGroups() { + return this.afdOriginGroups.originGroupsAsMap(); + } + @Override public String generateSsoUri() { return this.generateSsoUriAsync().block(); @@ -207,6 +223,8 @@ public Mono updateResourceAsync() { public Mono afterPostRunAsync(final boolean isGroupFaulted) { if (isGroupFaulted) { endpoints.clear(); + afdEndpoints.clear(); + afdOriginGroups.clear(); return Mono.empty(); } else { return this.refreshAsync().then(); @@ -217,6 +235,8 @@ public Mono afterPostRunAsync(final boolean isGroupFaulted) { public Mono refreshAsync() { return super.refreshAsync().map(cdnProfile -> { endpoints.clear(); + afdEndpoints.clear(); + afdOriginGroups.clear(); return cdnProfile; }); } @@ -273,6 +293,16 @@ public CdnEndpointImpl defineNewEndpoint(String name, String endpointOriginHostn return this.endpoints.defineNewEndpoint(name, endpointOriginHostname); } + @Override + public AfdEndpointImpl defineNewAfdEndpoint(String name) { + return this.afdEndpoints.defineNewEndpoint(name); + } + + @Override + public AfdOriginGroupImpl defineAfdOriginGroup(String name) { + return this.afdOriginGroups.defineNewOriginGroup(name); + } + @Override public CdnProfileImpl withNewPremiumEndpoint(String endpointOriginHostname) { return this.withNewEndpoint(endpointOriginHostname); @@ -303,14 +333,52 @@ public CdnEndpointImpl updatePremiumEndpoint(String name) { return this.endpoints.updateEndpoint(name); } + @Override + public AfdEndpointImpl updateAfdEndpoint(String name) { + return this.afdEndpoints.updateEndpoint(name); + } + + @Override + public AfdOriginGroupImpl updateAfdOriginGroup(String name) { + return this.afdOriginGroups.updateOriginGroup(name); + } + @Override public Update withoutEndpoint(String name) { this.endpoints.remove(name); return this; } + @Override + public Update withoutAfdEndpoint(String name) { + this.afdEndpoints.remove(name); + return this; + } + + @Override + public Update withoutAfdOriginGroup(String name) { + this.afdOriginGroups.remove(name); + return this; + } + CdnProfileImpl withEndpoint(CdnEndpointImpl endpoint) { this.endpoints.addEndpoint(endpoint); return this; } + + CdnProfileImpl withAfdEndpoint(AfdEndpointImpl endpoint) { + this.afdEndpoints.addEndpoint(endpoint); + return this; + } + + CdnProfileImpl withAfdOriginGroup(AfdOriginGroupImpl originGroup) { + this.afdOriginGroups.addOriginGroup(originGroup); + return this; + } + + @Override + public CdnProfileImpl withGlobal() { + this.innerModel().withLocation("global"); + return this; + } } diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/CustomDomainsClientImpl.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/CustomDomainsClientImpl.java index f7d9bdc1e80c..29275662170a 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/CustomDomainsClientImpl.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/CustomDomainsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.implementation; @@ -34,8 +34,8 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.cdn.fluent.CustomDomainsClient; import com.azure.resourcemanager.cdn.fluent.models.CustomDomainInner; +import com.azure.resourcemanager.cdn.implementation.models.CustomDomainListResult; import com.azure.resourcemanager.cdn.models.CustomDomainHttpsParameters; -import com.azure.resourcemanager.cdn.models.CustomDomainListResult; import com.azure.resourcemanager.cdn.models.CustomDomainParameters; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -70,242 +70,84 @@ public final class CustomDomainsClientImpl implements CustomDomainsClient { * The interface defining all the services for CdnManagementClientCustomDomains to be used by the proxy service to * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "CdnManagementClientC") + @Host("{endpoint}") + @ServiceInterface(name = "CdnManagementClientCustomDomains") public interface CustomDomainsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByEndpoint(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("endpointName") String endpointName, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, @PathParam("endpointName") String endpointName, @PathParam("customDomainName") String customDomainName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, @PathParam("endpointName") String endpointName, @PathParam("customDomainName") String customDomainName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CustomDomainParameters customDomainProperties, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") CustomDomainParameters customDomainProperties, Context context); @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, @PathParam("endpointName") String endpointName, @PathParam("customDomainName") String customDomainName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByEndpoint(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, + @PathParam("endpointName") String endpointName, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/disableCustomHttps") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> disableCustomHttps(@HostParam("$host") String endpoint, + Mono>> disableCustomHttps(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, @PathParam("endpointName") String endpointName, @PathParam("customDomainName") String customDomainName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/enableCustomHttps") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> enableCustomHttps(@HostParam("$host") String endpoint, + Mono>> enableCustomHttps(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, @PathParam("endpointName") String endpointName, @PathParam("customDomainName") String customDomainName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CustomDomainHttpsParameters customDomainHttpsParameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, + @BodyParam("application/json") CustomDomainHttpsParameters customDomainHttpsParameters, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByEndpointNext( - @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 existing custom domains within an endpoint. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. - * @param endpointName Name of the endpoint under the profile which is unique globally. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 custom domains along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByEndpointSinglePageAsync(String resourceGroupName, - String profileName, String endpointName) { - 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 (profileName == null) { - return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByEndpoint(this.client.getEndpoint(), resourceGroupName, profileName, - endpointName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists all of the existing custom domains within an endpoint. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. - * @param endpointName Name of the endpoint under the profile which is unique globally. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 custom domains along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByEndpointSinglePageAsync(String resourceGroupName, - String profileName, String endpointName, 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 (profileName == null) { - return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByEndpoint(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all of the existing custom domains within an endpoint. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. - * @param endpointName Name of the endpoint under the profile which is unique globally. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 custom domains as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByEndpointAsync(String resourceGroupName, String profileName, - String endpointName) { - return new PagedFlux<>(() -> listByEndpointSinglePageAsync(resourceGroupName, profileName, endpointName), - nextLink -> listByEndpointNextSinglePageAsync(nextLink)); - } - - /** - * Lists all of the existing custom domains within an endpoint. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. - * @param endpointName Name of the endpoint under the profile which is unique globally. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 custom domains as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByEndpointAsync(String resourceGroupName, String profileName, - String endpointName, Context context) { - return new PagedFlux<>( - () -> listByEndpointSinglePageAsync(resourceGroupName, profileName, endpointName, context), - nextLink -> listByEndpointNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all of the existing custom domains within an endpoint. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. - * @param endpointName Name of the endpoint under the profile which is unique globally. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 custom domains as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByEndpoint(String resourceGroupName, String profileName, - String endpointName) { - return new PagedIterable<>(listByEndpointAsync(resourceGroupName, profileName, endpointName)); - } - - /** - * Lists all of the existing custom domains within an endpoint. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. - * @param endpointName Name of the endpoint under the profile which is unique globally. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 custom domains as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByEndpoint(String resourceGroupName, String profileName, - String endpointName, Context context) { - return new PagedIterable<>(listByEndpointAsync(resourceGroupName, profileName, endpointName, context)); - } - /** * Gets an existing custom domain within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -321,6 +163,10 @@ public Mono> getWithResponseAsync(String resourceGro 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.")); @@ -335,22 +181,20 @@ public Mono> getWithResponseAsync(String resourceGro return Mono .error(new IllegalArgumentException("Parameter customDomainName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, - customDomainName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, customDomainName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets an existing custom domain within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param context The context to associate with this operation. @@ -367,6 +211,10 @@ private Mono> getWithResponseAsync(String resourceGr 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.")); @@ -381,21 +229,18 @@ private Mono> getWithResponseAsync(String resourceGr return Mono .error(new IllegalArgumentException("Parameter customDomainName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, customDomainName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, endpointName, customDomainName, accept, context); } /** * Gets an existing custom domain within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -413,8 +258,9 @@ public Mono getAsync(String resourceGroupName, String profile /** * Gets an existing custom domain within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param context The context to associate with this operation. @@ -432,8 +278,9 @@ public Response getWithResponse(String resourceGroupName, Str /** * Gets an existing custom domain within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -450,8 +297,9 @@ public CustomDomainInner get(String resourceGroupName, String profileName, Strin /** * Creates a new custom domain within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param customDomainProperties Properties required to create a new custom domain. @@ -468,6 +316,10 @@ public Mono>> createWithResponseAsync(String resourceG 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.")); @@ -482,29 +334,27 @@ public Mono>> createWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter customDomainName 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 (customDomainProperties == null) { return Mono.error( new IllegalArgumentException("Parameter customDomainProperties is required and cannot be null.")); } else { customDomainProperties.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), resourceGroupName, profileName, - endpointName, customDomainName, this.client.getSubscriptionId(), this.client.getApiVersion(), - customDomainProperties, accept, context)) + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, customDomainName, + contentType, accept, customDomainProperties, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates a new custom domain within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param customDomainProperties Properties required to create a new custom domain. @@ -522,6 +372,10 @@ private Mono>> createWithResponseAsync(String resource 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.")); @@ -536,27 +390,26 @@ private Mono>> createWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter customDomainName 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 (customDomainProperties == null) { return Mono.error( new IllegalArgumentException("Parameter customDomainProperties is required and cannot be null.")); } else { customDomainProperties.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, customDomainName, - this.client.getSubscriptionId(), this.client.getApiVersion(), customDomainProperties, accept, context); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, endpointName, customDomainName, contentType, accept, customDomainProperties, + context); } /** * Creates a new custom domain within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param customDomainProperties Properties required to create a new custom domain. @@ -579,8 +432,9 @@ public PollerFlux, CustomDomainInner> beginCreateA /** * Creates a new custom domain within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param customDomainProperties Properties required to create a new custom domain. @@ -605,8 +459,9 @@ private PollerFlux, CustomDomainInner> beginCreate /** * Creates a new custom domain within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param customDomainProperties Properties required to create a new custom domain. @@ -628,8 +483,9 @@ public SyncPoller, CustomDomainInner> beginCreate( /** * Creates a new custom domain within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param customDomainProperties Properties required to create a new custom domain. @@ -653,8 +509,9 @@ public SyncPoller, CustomDomainInner> beginCreate( /** * Creates a new custom domain within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param customDomainProperties Properties required to create a new custom domain. @@ -675,8 +532,9 @@ public Mono createAsync(String resourceGroupName, String prof /** * Creates a new custom domain within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param customDomainProperties Properties required to create a new custom domain. @@ -697,8 +555,9 @@ private Mono createAsync(String resourceGroupName, String pro /** * Creates a new custom domain within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param customDomainProperties Properties required to create a new custom domain. @@ -718,8 +577,9 @@ public CustomDomainInner create(String resourceGroupName, String profileName, St /** * Creates a new custom domain within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param customDomainProperties Properties required to create a new custom domain. @@ -740,8 +600,9 @@ public CustomDomainInner create(String resourceGroupName, String profileName, St /** * Deletes an existing custom domain within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -756,6 +617,10 @@ public Mono>> deleteWithResponseAsync(String resourceG 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.")); @@ -770,23 +635,20 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter customDomainName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, - customDomainName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, customDomainName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes an existing custom domain within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param context The context to associate with this operation. @@ -802,6 +664,10 @@ private Mono>> deleteWithResponseAsync(String resource 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.")); @@ -816,21 +682,18 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter customDomainName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, customDomainName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, endpointName, customDomainName, accept, context); } /** * Deletes an existing custom domain within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -839,19 +702,20 @@ private Mono>> deleteWithResponseAsync(String resource * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, CustomDomainInner> beginDeleteAsync(String resourceGroupName, - String profileName, String endpointName, String customDomainName) { + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String profileName, + String endpointName, String customDomainName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, profileName, endpointName, customDomainName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - CustomDomainInner.class, CustomDomainInner.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes an existing custom domain within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param context The context to associate with this operation. @@ -861,20 +725,21 @@ public PollerFlux, CustomDomainInner> beginDeleteA * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CustomDomainInner> beginDeleteAsync(String resourceGroupName, - String profileName, String endpointName, String customDomainName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String profileName, + String endpointName, String customDomainName, Context context) { context = this.client.mergeContext(context); Mono>> mono = deleteWithResponseAsync(resourceGroupName, profileName, endpointName, customDomainName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - CustomDomainInner.class, CustomDomainInner.class, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes an existing custom domain within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -883,16 +748,17 @@ private PollerFlux, CustomDomainInner> beginDelete * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CustomDomainInner> beginDelete(String resourceGroupName, - String profileName, String endpointName, String customDomainName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String profileName, + String endpointName, String customDomainName) { return this.beginDeleteAsync(resourceGroupName, profileName, endpointName, customDomainName).getSyncPoller(); } /** * Deletes an existing custom domain within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param context The context to associate with this operation. @@ -902,8 +768,8 @@ public SyncPoller, CustomDomainInner> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CustomDomainInner> beginDelete(String resourceGroupName, - String profileName, String endpointName, String customDomainName, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String profileName, + String endpointName, String customDomainName, Context context) { return this.beginDeleteAsync(resourceGroupName, profileName, endpointName, customDomainName, context) .getSyncPoller(); } @@ -911,17 +777,18 @@ public SyncPoller, CustomDomainInner> beginDelete( /** * Deletes an existing custom domain within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String profileName, String endpointName, + public Mono deleteAsync(String resourceGroupName, String profileName, String endpointName, String customDomainName) { return beginDeleteAsync(resourceGroupName, profileName, endpointName, customDomainName).last() .flatMap(this.client::getLroFinalResultOrError); @@ -930,18 +797,19 @@ public Mono deleteAsync(String resourceGroupName, String prof /** * Deletes an existing custom domain within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String profileName, String endpointName, + private Mono deleteAsync(String resourceGroupName, String profileName, String endpointName, String customDomainName, Context context) { return beginDeleteAsync(resourceGroupName, profileName, endpointName, customDomainName, context).last() .flatMap(this.client::getLroFinalResultOrError); @@ -950,45 +818,209 @@ private Mono deleteAsync(String resourceGroupName, String pro /** * Deletes an existing custom domain within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CustomDomainInner delete(String resourceGroupName, String profileName, String endpointName, - String customDomainName) { - return deleteAsync(resourceGroupName, profileName, endpointName, customDomainName).block(); + public void delete(String resourceGroupName, String profileName, String endpointName, String customDomainName) { + deleteAsync(resourceGroupName, profileName, endpointName, customDomainName).block(); } /** * Deletes an existing custom domain within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CustomDomainInner delete(String resourceGroupName, String profileName, String endpointName, - String customDomainName, Context context) { - return deleteAsync(resourceGroupName, profileName, endpointName, customDomainName, context).block(); + public void delete(String resourceGroupName, String profileName, String endpointName, String customDomainName, + Context context) { + deleteAsync(resourceGroupName, profileName, endpointName, customDomainName, context).block(); + } + + /** + * Lists all of the existing custom domains within an endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CustomDomain list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByEndpointSinglePageAsync(String resourceGroupName, + String profileName, String endpointName) { + 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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByEndpoint(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, 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 existing custom domains within an endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CustomDomain list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByEndpointSinglePageAsync(String resourceGroupName, + String profileName, String endpointName, 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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByEndpoint(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, endpointName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists all of the existing custom domains within an endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CustomDomain list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByEndpointAsync(String resourceGroupName, String profileName, + String endpointName) { + return new PagedFlux<>(() -> listByEndpointSinglePageAsync(resourceGroupName, profileName, endpointName), + nextLink -> listByEndpointNextSinglePageAsync(nextLink)); + } + + /** + * Lists all of the existing custom domains within an endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CustomDomain list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByEndpointAsync(String resourceGroupName, String profileName, + String endpointName, Context context) { + return new PagedFlux<>( + () -> listByEndpointSinglePageAsync(resourceGroupName, profileName, endpointName, context), + nextLink -> listByEndpointNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all of the existing custom domains within an endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CustomDomain list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByEndpoint(String resourceGroupName, String profileName, + String endpointName) { + return new PagedIterable<>(listByEndpointAsync(resourceGroupName, profileName, endpointName)); + } + + /** + * Lists all of the existing custom domains within an endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CustomDomain list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByEndpoint(String resourceGroupName, String profileName, + String endpointName, Context context) { + return new PagedIterable<>(listByEndpointAsync(resourceGroupName, profileName, endpointName, context)); } /** * Disable https delivery of the custom domain. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1004,6 +1036,10 @@ public Mono>> disableCustomHttpsWithResponseAsync(Stri return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); @@ -1018,23 +1054,20 @@ public Mono>> disableCustomHttpsWithResponseAsync(Stri return Mono .error(new IllegalArgumentException("Parameter customDomainName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.disableCustomHttps(this.client.getEndpoint(), resourceGroupName, - profileName, endpointName, customDomainName, this.client.getSubscriptionId(), - this.client.getApiVersion(), accept, context)) + .withContext(context -> service.disableCustomHttps(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, customDomainName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Disable https delivery of the custom domain. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param context The context to associate with this operation. @@ -1051,6 +1084,10 @@ private Mono>> disableCustomHttpsWithResponseAsync(Str return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); @@ -1065,21 +1102,19 @@ private Mono>> disableCustomHttpsWithResponseAsync(Str return Mono .error(new IllegalArgumentException("Parameter customDomainName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.disableCustomHttps(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, - customDomainName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); + return service.disableCustomHttps(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, customDomainName, accept, + context); } /** * Disable https delivery of the custom domain. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1100,8 +1135,9 @@ public PollerFlux, CustomDomainInner> beginDisable /** * Disable https delivery of the custom domain. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param context The context to associate with this operation. @@ -1124,8 +1160,9 @@ private PollerFlux, CustomDomainInner> beginDisabl /** * Disable https delivery of the custom domain. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1144,8 +1181,9 @@ public SyncPoller, CustomDomainInner> beginDisable /** * Disable https delivery of the custom domain. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param context The context to associate with this operation. @@ -1166,8 +1204,9 @@ public SyncPoller, CustomDomainInner> beginDisable /** * Disable https delivery of the custom domain. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1186,8 +1225,9 @@ public Mono disableCustomHttpsAsync(String resourceGroupName, /** * Disable https delivery of the custom domain. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param context The context to associate with this operation. @@ -1208,8 +1248,9 @@ private Mono disableCustomHttpsAsync(String resourceGroupName /** * Disable https delivery of the custom domain. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1227,8 +1268,9 @@ public CustomDomainInner disableCustomHttps(String resourceGroupName, String pro /** * Disable https delivery of the custom domain. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param context The context to associate with this operation. @@ -1247,8 +1289,9 @@ public CustomDomainInner disableCustomHttps(String resourceGroupName, String pro /** * Enable https delivery of the custom domain. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param customDomainHttpsParameters The configuration specifying how to enable HTTPS for the custom domain - using @@ -1268,6 +1311,10 @@ public Mono>> enableCustomHttpsWithResponseAsync(Strin 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.")); @@ -1282,26 +1329,23 @@ public Mono>> enableCustomHttpsWithResponseAsync(Strin return Mono .error(new IllegalArgumentException("Parameter customDomainName 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 (customDomainHttpsParameters != null) { customDomainHttpsParameters.validate(); } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.enableCustomHttps(this.client.getEndpoint(), resourceGroupName, profileName, - endpointName, customDomainName, this.client.getSubscriptionId(), this.client.getApiVersion(), - customDomainHttpsParameters, accept, context)) + .withContext(context -> service.enableCustomHttps(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, customDomainName, accept, + customDomainHttpsParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Enable https delivery of the custom domain. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param customDomainHttpsParameters The configuration specifying how to enable HTTPS for the custom domain - using @@ -1322,6 +1366,10 @@ private Mono>> enableCustomHttpsWithResponseAsync(Stri return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); @@ -1336,25 +1384,22 @@ private Mono>> enableCustomHttpsWithResponseAsync(Stri return Mono .error(new IllegalArgumentException("Parameter customDomainName 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 (customDomainHttpsParameters != null) { customDomainHttpsParameters.validate(); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.enableCustomHttps(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, - customDomainName, this.client.getSubscriptionId(), this.client.getApiVersion(), customDomainHttpsParameters, - accept, context); + return service.enableCustomHttps(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, customDomainName, accept, + customDomainHttpsParameters, context); } /** * Enable https delivery of the custom domain. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param customDomainHttpsParameters The configuration specifying how to enable HTTPS for the custom domain - using @@ -1379,8 +1424,9 @@ public PollerFlux, CustomDomainInner> beginEnableC /** * Enable https delivery of the custom domain. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1402,8 +1448,9 @@ public PollerFlux, CustomDomainInner> beginEnableC /** * Enable https delivery of the custom domain. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param customDomainHttpsParameters The configuration specifying how to enable HTTPS for the custom domain - using @@ -1430,8 +1477,9 @@ private PollerFlux, CustomDomainInner> beginEnable /** * Enable https delivery of the custom domain. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1453,8 +1501,9 @@ public SyncPoller, CustomDomainInner> beginEnableC /** * Enable https delivery of the custom domain. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param customDomainHttpsParameters The configuration specifying how to enable HTTPS for the custom domain - using @@ -1480,8 +1529,9 @@ public SyncPoller, CustomDomainInner> beginEnableC /** * Enable https delivery of the custom domain. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param customDomainHttpsParameters The configuration specifying how to enable HTTPS for the custom domain - using @@ -1503,8 +1553,9 @@ public Mono enableCustomHttpsAsync(String resourceGroupName, /** * Enable https delivery of the custom domain. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1524,8 +1575,9 @@ public Mono enableCustomHttpsAsync(String resourceGroupName, /** * Enable https delivery of the custom domain. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param customDomainHttpsParameters The configuration specifying how to enable HTTPS for the custom domain - using @@ -1549,8 +1601,9 @@ private Mono enableCustomHttpsAsync(String resourceGroupName, /** * Enable https delivery of the custom domain. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1570,8 +1623,9 @@ public CustomDomainInner enableCustomHttps(String resourceGroupName, String prof /** * Enable https delivery of the custom domain. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainName Name of the custom domain within an endpoint. * @param customDomainHttpsParameters The configuration specifying how to enable HTTPS for the custom domain - using @@ -1598,8 +1652,8 @@ public CustomDomainInner enableCustomHttps(String resourceGroupName, String prof * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 custom domains along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a CustomDomain list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByEndpointNextSinglePageAsync(String nextLink) { @@ -1626,8 +1680,8 @@ private Mono> listByEndpointNextSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 custom domains along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a CustomDomain list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByEndpointNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/DeploymentVersionsClientImpl.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/DeploymentVersionsClientImpl.java new file mode 100644 index 000000000000..5afd3bc9d424 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/DeploymentVersionsClientImpl.java @@ -0,0 +1,1032 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.cdn.fluent.DeploymentVersionsClient; +import com.azure.resourcemanager.cdn.fluent.models.CompareDeploymentVersionsResponseInner; +import com.azure.resourcemanager.cdn.fluent.models.DeploymentVersionInner; +import com.azure.resourcemanager.cdn.implementation.models.DeploymentVersionListResult; +import com.azure.resourcemanager.cdn.models.CompareDeploymentVersionsParameter; +import com.azure.resourcemanager.cdn.models.DeploymentVersionUpdate; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in DeploymentVersionsClient. + */ +public final class DeploymentVersionsClientImpl implements DeploymentVersionsClient { + /** + * The proxy service used to perform REST calls. + */ + private final DeploymentVersionsService service; + + /** + * The service client containing this operation class. + */ + private final CdnManagementClientImpl client; + + /** + * Initializes an instance of DeploymentVersionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DeploymentVersionsClientImpl(CdnManagementClientImpl client) { + this.service = RestProxy.create(DeploymentVersionsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for CdnManagementClientDeploymentVersions to be used by the proxy service + * to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "CdnManagementClientDeploymentVersions") + public interface DeploymentVersionsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/deploymentVersions/{versionName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, + @PathParam("versionName") String versionName, @HeaderParam("Accept") String accept, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/deploymentVersions/{versionName}") + @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("profileName") String profileName, + @PathParam("versionName") String versionName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") DeploymentVersionUpdate deploymentVersionUpdateProperties, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/deploymentVersions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + 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); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/deploymentVersions/{versionName}/approve") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> approve(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, + @PathParam("versionName") String versionName, @HeaderParam("Accept") String accept, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/deploymentVersions/{versionName}/compare") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> compare(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, + @PathParam("versionName") String versionName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") CompareDeploymentVersionsParameter compareDeploymentVersionsParameter, + Context context); + + @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); + } + + /** + * Get an existing DeploymentVersion with the specified version name under the specified subscription, resource + * group and profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 existing DeploymentVersion with the specified version name under the specified subscription, resource + * group and profile along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, String profileName, + String versionName) { + 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 (versionName == null) { + return Mono.error(new IllegalArgumentException("Parameter versionName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, versionName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get an existing DeploymentVersion with the specified version name under the specified subscription, resource + * group and profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the 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 an existing DeploymentVersion with the specified version name under the specified subscription, resource + * group and profile along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String profileName, + String versionName, 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 (versionName == null) { + return Mono.error(new IllegalArgumentException("Parameter versionName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, versionName, accept, context); + } + + /** + * Get an existing DeploymentVersion with the specified version name under the specified subscription, resource + * group and profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 existing DeploymentVersion with the specified version name under the specified subscription, resource + * group and profile on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String profileName, String versionName) { + return getWithResponseAsync(resourceGroupName, profileName, versionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get an existing DeploymentVersion with the specified version name under the specified subscription, resource + * group and profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the 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 an existing DeploymentVersion with the specified version name under the specified subscription, resource + * group and profile along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String profileName, + String versionName, Context context) { + return getWithResponseAsync(resourceGroupName, profileName, versionName, context).block(); + } + + /** + * Get an existing DeploymentVersion with the specified version name under the specified subscription, resource + * group and profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 existing DeploymentVersion with the specified version name under the specified subscription, resource + * group and profile. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeploymentVersionInner get(String resourceGroupName, String profileName, String versionName) { + return getWithResponse(resourceGroupName, profileName, versionName, Context.NONE).getValue(); + } + + /** + * Update an existing DeploymentVersion within a profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the profile. + * @param deploymentVersionUpdateProperties Deployment version properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployment version object along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateWithResponseAsync(String resourceGroupName, String profileName, + String versionName, DeploymentVersionUpdate deploymentVersionUpdateProperties) { + 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 (versionName == null) { + return Mono.error(new IllegalArgumentException("Parameter versionName is required and cannot be null.")); + } + if (deploymentVersionUpdateProperties == null) { + return Mono.error(new IllegalArgumentException( + "Parameter deploymentVersionUpdateProperties is required and cannot be null.")); + } else { + deploymentVersionUpdateProperties.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, versionName, contentType, accept, + deploymentVersionUpdateProperties, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update an existing DeploymentVersion within a profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the profile. + * @param deploymentVersionUpdateProperties Deployment version properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployment version object along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync(String resourceGroupName, String profileName, + String versionName, DeploymentVersionUpdate deploymentVersionUpdateProperties, 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 (versionName == null) { + return Mono.error(new IllegalArgumentException("Parameter versionName is required and cannot be null.")); + } + if (deploymentVersionUpdateProperties == null) { + return Mono.error(new IllegalArgumentException( + "Parameter deploymentVersionUpdateProperties is required and cannot be null.")); + } else { + deploymentVersionUpdateProperties.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, versionName, contentType, accept, deploymentVersionUpdateProperties, + context); + } + + /** + * Update an existing DeploymentVersion within a profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the profile. + * @param deploymentVersionUpdateProperties Deployment version properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployment version object on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateAsync(String resourceGroupName, String profileName, String versionName, + DeploymentVersionUpdate deploymentVersionUpdateProperties) { + return updateWithResponseAsync(resourceGroupName, profileName, versionName, deploymentVersionUpdateProperties) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Update an existing DeploymentVersion within a profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the profile. + * @param deploymentVersionUpdateProperties Deployment version properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployment version object along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse(String resourceGroupName, String profileName, + String versionName, DeploymentVersionUpdate deploymentVersionUpdateProperties, Context context) { + return updateWithResponseAsync(resourceGroupName, profileName, versionName, deploymentVersionUpdateProperties, + context).block(); + } + + /** + * Update an existing DeploymentVersion within a profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the profile. + * @param deploymentVersionUpdateProperties Deployment version properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployment version object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeploymentVersionInner update(String resourceGroupName, String profileName, String versionName, + DeploymentVersionUpdate deploymentVersionUpdateProperties) { + return updateWithResponse(resourceGroupName, profileName, versionName, deploymentVersionUpdateProperties, + Context.NONE).getValue(); + } + + /** + * Lists existing deployment versions by profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentVersion list operation 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 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())); + } + + /** + * Lists existing deployment versions by profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentVersion list operation 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 accept = "application/json"; + context = this.client.mergeContext(context); + return 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)); + } + + /** + * Lists existing deployment versions by profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentVersion list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByProfileAsync(String resourceGroupName, String profileName) { + return new PagedFlux<>(() -> listByProfileSinglePageAsync(resourceGroupName, profileName), + nextLink -> listByProfileNextSinglePageAsync(nextLink)); + } + + /** + * Lists existing deployment versions by profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentVersion list operation 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)); + } + + /** + * Lists existing deployment versions by profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentVersion list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByProfile(String resourceGroupName, String profileName) { + return new PagedIterable<>(listByProfileAsync(resourceGroupName, profileName)); + } + + /** + * Lists existing deployment versions by profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentVersion list operation 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)); + } + + /** + * Approve the deployment of the version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> approveWithResponseAsync(String resourceGroupName, String profileName, + String versionName) { + 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 (versionName == null) { + return Mono.error(new IllegalArgumentException("Parameter versionName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.approve(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, versionName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Approve the deployment of the version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the 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 response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> approveWithResponseAsync(String resourceGroupName, String profileName, + String versionName, 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 (versionName == null) { + return Mono.error(new IllegalArgumentException("Parameter versionName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.approve(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, versionName, accept, context); + } + + /** + * Approve the deployment of the version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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) + public PollerFlux, Void> beginApproveAsync(String resourceGroupName, String profileName, + String versionName) { + Mono>> mono = approveWithResponseAsync(resourceGroupName, profileName, versionName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Approve the deployment of the version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the 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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginApproveAsync(String resourceGroupName, String profileName, + String versionName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = approveWithResponseAsync(resourceGroupName, profileName, versionName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Approve the deployment of the version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginApprove(String resourceGroupName, String profileName, + String versionName) { + return this.beginApproveAsync(resourceGroupName, profileName, versionName).getSyncPoller(); + } + + /** + * Approve the deployment of the version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the 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 SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginApprove(String resourceGroupName, String profileName, + String versionName, Context context) { + return this.beginApproveAsync(resourceGroupName, profileName, versionName, context).getSyncPoller(); + } + + /** + * Approve the deployment of the version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono approveAsync(String resourceGroupName, String profileName, String versionName) { + return beginApproveAsync(resourceGroupName, profileName, versionName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Approve the deployment of the version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the 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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono approveAsync(String resourceGroupName, String profileName, String versionName, Context context) { + return beginApproveAsync(resourceGroupName, profileName, versionName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Approve the deployment of the version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 approve(String resourceGroupName, String profileName, String versionName) { + approveAsync(resourceGroupName, profileName, versionName).block(); + } + + /** + * Approve the deployment of the version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void approve(String resourceGroupName, String profileName, String versionName, Context context) { + approveAsync(resourceGroupName, profileName, versionName, context).block(); + } + + /** + * Compare the deployment version to another deployment version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the profile. + * @param compareDeploymentVersionsParameter The deployment version to be compared to. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return compare deployment versions response along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> compareWithResponseAsync(String resourceGroupName, + String profileName, String versionName, CompareDeploymentVersionsParameter compareDeploymentVersionsParameter) { + 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 (versionName == null) { + return Mono.error(new IllegalArgumentException("Parameter versionName is required and cannot be null.")); + } + if (compareDeploymentVersionsParameter == null) { + return Mono.error(new IllegalArgumentException( + "Parameter compareDeploymentVersionsParameter is required and cannot be null.")); + } else { + compareDeploymentVersionsParameter.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.compare(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, versionName, contentType, accept, + compareDeploymentVersionsParameter, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Compare the deployment version to another deployment version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the profile. + * @param compareDeploymentVersionsParameter The deployment version to be compared to. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return compare deployment versions response along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> compareWithResponseAsync(String resourceGroupName, + String profileName, String versionName, CompareDeploymentVersionsParameter compareDeploymentVersionsParameter, + 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 (versionName == null) { + return Mono.error(new IllegalArgumentException("Parameter versionName is required and cannot be null.")); + } + if (compareDeploymentVersionsParameter == null) { + return Mono.error(new IllegalArgumentException( + "Parameter compareDeploymentVersionsParameter is required and cannot be null.")); + } else { + compareDeploymentVersionsParameter.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.compare(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, versionName, contentType, accept, compareDeploymentVersionsParameter, + context); + } + + /** + * Compare the deployment version to another deployment version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the profile. + * @param compareDeploymentVersionsParameter The deployment version to be compared to. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return compare deployment versions response on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono compareAsync(String resourceGroupName, String profileName, + String versionName, CompareDeploymentVersionsParameter compareDeploymentVersionsParameter) { + return compareWithResponseAsync(resourceGroupName, profileName, versionName, compareDeploymentVersionsParameter) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Compare the deployment version to another deployment version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the profile. + * @param compareDeploymentVersionsParameter The deployment version to be compared to. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return compare deployment versions response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response compareWithResponse(String resourceGroupName, + String profileName, String versionName, CompareDeploymentVersionsParameter compareDeploymentVersionsParameter, + Context context) { + return compareWithResponseAsync(resourceGroupName, profileName, versionName, compareDeploymentVersionsParameter, + context).block(); + } + + /** + * Compare the deployment version to another deployment version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param versionName Name of the DeploymentVersion under the profile. + * @param compareDeploymentVersionsParameter The deployment version to be compared to. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return compare deployment versions response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CompareDeploymentVersionsResponseInner compare(String resourceGroupName, String profileName, + String versionName, CompareDeploymentVersionsParameter compareDeploymentVersionsParameter) { + return compareWithResponse(resourceGroupName, profileName, versionName, compareDeploymentVersionsParameter, + Context.NONE).getValue(); + } + + /** + * 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 the response of a DeploymentVersion list operation 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)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DeploymentVersion list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @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.")); + } + 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)); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/EdgeNodesClientImpl.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/EdgeNodesClientImpl.java index 28a8836c68f1..d15663c33523 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/EdgeNodesClientImpl.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/EdgeNodesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.cdn.fluent.EdgeNodesClient; import com.azure.resourcemanager.cdn.fluent.models.EdgeNodeInner; -import com.azure.resourcemanager.cdn.models.EdgenodeResult; +import com.azure.resourcemanager.cdn.implementation.models.EdgenodeResult; import reactor.core.publisher.Mono; /** @@ -59,14 +59,14 @@ public final class EdgeNodesClientImpl implements EdgeNodesClient { * The interface defining all the services for CdnManagementClientEdgeNodes to be used by the proxy service to * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "CdnManagementClientE") + @Host("{endpoint}") + @ServiceInterface(name = "CdnManagementClientEdgeNodes") public interface EdgeNodesService { @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.Cdn/edgenodes") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -74,7 +74,7 @@ Mono> list(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/EndpointsClientImpl.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/EndpointsClientImpl.java index 5d58d07851b1..b3dcabf0e4d8 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/EndpointsClientImpl.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/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.cdn.implementation; @@ -37,11 +37,11 @@ import com.azure.resourcemanager.cdn.fluent.models.EndpointInner; import com.azure.resourcemanager.cdn.fluent.models.ResourceUsageInner; import com.azure.resourcemanager.cdn.fluent.models.ValidateCustomDomainOutputInner; -import com.azure.resourcemanager.cdn.models.EndpointListResult; +import com.azure.resourcemanager.cdn.implementation.models.EndpointListResult; +import com.azure.resourcemanager.cdn.implementation.models.ResourceUsageListResult; import com.azure.resourcemanager.cdn.models.EndpointUpdateParameters; import com.azure.resourcemanager.cdn.models.LoadParameters; import com.azure.resourcemanager.cdn.models.PurgeParameters; -import com.azure.resourcemanager.cdn.models.ResourceUsageListResult; import com.azure.resourcemanager.cdn.models.ValidateCustomDomainInput; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -76,123 +76,119 @@ public final class EndpointsClientImpl implements EndpointsClient { * The interface defining all the services for CdnManagementClientEndpoints to be used by the proxy service to * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "CdnManagementClientE") + @Host("{endpoint}") + @ServiceInterface(name = "CdnManagementClientEndpoints") public interface EndpointsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByProfile(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("endpointName") String endpointName, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("endpointName") String endpointName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("endpointName") String endpointName, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") EndpointInner endpointParam, - @HeaderParam("Accept") String accept, Context context); + @PathParam("endpointName") String endpointName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") EndpointInner endpointParam, + Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("endpointName") String endpointName, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") EndpointUpdateParameters endpointUpdateProperties, - @HeaderParam("Accept") String accept, Context context); + @PathParam("endpointName") String endpointName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") EndpointUpdateParameters endpointUpdateProperties, 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.Cdn/profiles/{profileName}/endpoints/{endpointName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("endpointName") String endpointName, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("endpointName") String endpointName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + 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); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/start") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> start(@HostParam("$host") String endpoint, + Mono>> start(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("endpointName") String endpointName, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("endpointName") String endpointName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/stop") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> stop(@HostParam("$host") String endpoint, + Mono>> stop(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("endpointName") String endpointName, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("endpointName") String endpointName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/purge") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> purgeContent(@HostParam("$host") String endpoint, + Mono>> purgeContent(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("endpointName") String endpointName, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PurgeParameters contentFilePaths, @HeaderParam("Accept") String accept, - Context context); + @PathParam("endpointName") String endpointName, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") PurgeParameters contentFilePaths, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/load") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> loadContent(@HostParam("$host") String endpoint, + Mono>> loadContent(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("endpointName") String endpointName, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") LoadParameters contentFilePaths, @HeaderParam("Accept") String accept, - Context context); + @PathParam("endpointName") String endpointName, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") LoadParameters contentFilePaths, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/validateCustomDomain") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> validateCustomDomain(@HostParam("$host") String endpoint, + Mono> validateCustomDomain(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("endpointName") String endpointName, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ValidateCustomDomainInput customDomainProperties, - @HeaderParam("Accept") String accept, Context context); + @PathParam("endpointName") String endpointName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") ValidateCustomDomainInput customDomainProperties, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/checkResourceUsage") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listResourceUsage(@HostParam("$host") String endpoint, + Mono> listResourceUsage(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("endpointName") String endpointName, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("endpointName") String endpointName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByProfileNext( - @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" }) @@ -200,157 +196,17 @@ Mono> listByProfileNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listResourceUsageNext( - @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 existing CDN endpoints. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 endpoints 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 (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 (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByProfile(this.client.getEndpoint(), resourceGroupName, profileName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists existing CDN endpoints. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 endpoints 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 (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 (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByProfile(this.client.getEndpoint(), resourceGroupName, profileName, this.client.getSubscriptionId(), - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists existing CDN endpoints. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 endpoints as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByProfileAsync(String resourceGroupName, String profileName) { - return new PagedFlux<>(() -> listByProfileSinglePageAsync(resourceGroupName, profileName), - nextLink -> listByProfileNextSinglePageAsync(nextLink)); - } - - /** - * Lists existing CDN endpoints. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 endpoints 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)); - } - - /** - * Lists existing CDN endpoints. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 endpoints as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByProfile(String resourceGroupName, String profileName) { - return new PagedIterable<>(listByProfileAsync(resourceGroupName, profileName)); - } - - /** - * Lists existing CDN endpoints. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 endpoints 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)); - } - /** * Gets an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group * and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -365,6 +221,10 @@ public Mono> getWithResponseAsync(String resourceGroupNa 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.")); @@ -375,14 +235,10 @@ public Mono> getWithResponseAsync(String resourceGroupNa if (endpointName == null) { return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -390,8 +246,9 @@ public Mono> getWithResponseAsync(String resourceGroupNa * Gets an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group * and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -407,6 +264,10 @@ private Mono> getWithResponseAsync(String resourceGroupN 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.")); @@ -417,22 +278,19 @@ private Mono> getWithResponseAsync(String resourceGroupN if (endpointName == null) { return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, endpointName, accept, context); } /** * Gets an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group * and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -450,8 +308,9 @@ public Mono getAsync(String resourceGroupName, String profileName * Gets an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group * and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -470,8 +329,9 @@ public Response getWithResponse(String resourceGroupName, String * Gets an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group * and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -488,8 +348,9 @@ public EndpointInner get(String resourceGroupName, String profileName, String en * Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and * profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointParam Endpoint properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -506,6 +367,10 @@ public Mono>> createWithResponseAsync(String resourceG 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.")); @@ -516,20 +381,17 @@ public Mono>> createWithResponseAsync(String resourceG if (endpointName == null) { return Mono.error(new IllegalArgumentException("Parameter endpointName 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 (endpointParam == null) { return Mono.error(new IllegalArgumentException("Parameter endpointParam is required and cannot be null.")); } else { endpointParam.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.create(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, - this.client.getSubscriptionId(), this.client.getApiVersion(), endpointParam, accept, context)) + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, contentType, accept, + endpointParam, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -537,8 +399,9 @@ public Mono>> createWithResponseAsync(String resourceG * Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and * profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointParam Endpoint properties. * @param context The context to associate with this operation. @@ -556,6 +419,10 @@ private Mono>> createWithResponseAsync(String resource 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.")); @@ -566,27 +433,25 @@ private Mono>> createWithResponseAsync(String resource if (endpointName == null) { return Mono.error(new IllegalArgumentException("Parameter endpointName 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 (endpointParam == null) { return Mono.error(new IllegalArgumentException("Parameter endpointParam is required and cannot be null.")); } else { endpointParam.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, - this.client.getSubscriptionId(), this.client.getApiVersion(), endpointParam, accept, context); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, endpointName, contentType, accept, endpointParam, context); } /** * Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and * profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointParam Endpoint properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -608,8 +473,9 @@ public PollerFlux, EndpointInner> beginCreateAsync(Str * Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and * profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointParam Endpoint properties. * @param context The context to associate with this operation. @@ -633,8 +499,9 @@ private PollerFlux, EndpointInner> beginCreateAsync(St * Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and * profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointParam Endpoint properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -653,8 +520,9 @@ public SyncPoller, EndpointInner> beginCreate(String r * Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and * profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointParam Endpoint properties. * @param context The context to associate with this operation. @@ -675,8 +543,9 @@ public SyncPoller, EndpointInner> beginCreate(String r * Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and * profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointParam Endpoint properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -696,8 +565,9 @@ public Mono createAsync(String resourceGroupName, String profileN * Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and * profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointParam Endpoint properties. * @param context The context to associate with this operation. @@ -718,8 +588,9 @@ private Mono createAsync(String resourceGroupName, String profile * Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and * profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointParam Endpoint properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -738,8 +609,9 @@ public EndpointInner create(String resourceGroupName, String profileName, String * Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and * profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointParam Endpoint properties. * @param context The context to associate with this operation. @@ -761,8 +633,9 @@ public EndpointInner create(String resourceGroupName, String profileName, String * operation. To update origin groups, use the Update Origin group operation. To update custom domains, use the * Update Custom Domain operation. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointUpdateProperties Endpoint update properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -779,6 +652,10 @@ public Mono>> updateWithResponseAsync(String resourceG 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.")); @@ -789,21 +666,18 @@ public Mono>> updateWithResponseAsync(String resourceG if (endpointName == null) { return Mono.error(new IllegalArgumentException("Parameter endpointName 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 (endpointUpdateProperties == null) { return Mono.error( new IllegalArgumentException("Parameter endpointUpdateProperties is required and cannot be null.")); } else { endpointUpdateProperties.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, profileName, - endpointName, this.client.getSubscriptionId(), this.client.getApiVersion(), endpointUpdateProperties, - accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, contentType, accept, + endpointUpdateProperties, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -813,8 +687,9 @@ public Mono>> updateWithResponseAsync(String resourceG * operation. To update origin groups, use the Update Origin group operation. To update custom domains, use the * Update Custom Domain operation. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointUpdateProperties Endpoint update properties. * @param context The context to associate with this operation. @@ -832,6 +707,10 @@ private Mono>> updateWithResponseAsync(String resource 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.")); @@ -842,20 +721,17 @@ private Mono>> updateWithResponseAsync(String resource if (endpointName == null) { return Mono.error(new IllegalArgumentException("Parameter endpointName 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 (endpointUpdateProperties == null) { return Mono.error( new IllegalArgumentException("Parameter endpointUpdateProperties is required and cannot be null.")); } else { endpointUpdateProperties.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, - this.client.getSubscriptionId(), this.client.getApiVersion(), endpointUpdateProperties, accept, context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, endpointName, contentType, accept, endpointUpdateProperties, context); } /** @@ -864,8 +740,9 @@ private Mono>> updateWithResponseAsync(String resource * operation. To update origin groups, use the Update Origin group operation. To update custom domains, use the * Update Custom Domain operation. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointUpdateProperties Endpoint update properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -889,8 +766,9 @@ public PollerFlux, EndpointInner> beginUpdateAsync(Str * operation. To update origin groups, use the Update Origin group operation. To update custom domains, use the * Update Custom Domain operation. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointUpdateProperties Endpoint update properties. * @param context The context to associate with this operation. @@ -916,8 +794,9 @@ private PollerFlux, EndpointInner> beginUpdateAsync(St * operation. To update origin groups, use the Update Origin group operation. To update custom domains, use the * Update Custom Domain operation. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointUpdateProperties Endpoint update properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -939,8 +818,9 @@ public SyncPoller, EndpointInner> beginUpdate(String r * operation. To update origin groups, use the Update Origin group operation. To update custom domains, use the * Update Custom Domain operation. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointUpdateProperties Endpoint update properties. * @param context The context to associate with this operation. @@ -963,8 +843,9 @@ public SyncPoller, EndpointInner> beginUpdate(String r * operation. To update origin groups, use the Update Origin group operation. To update custom domains, use the * Update Custom Domain operation. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointUpdateProperties Endpoint update properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -986,8 +867,9 @@ public Mono updateAsync(String resourceGroupName, String profileN * operation. To update origin groups, use the Update Origin group operation. To update custom domains, use the * Update Custom Domain operation. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointUpdateProperties Endpoint update properties. * @param context The context to associate with this operation. @@ -1010,8 +892,9 @@ private Mono updateAsync(String resourceGroupName, String profile * operation. To update origin groups, use the Update Origin group operation. To update custom domains, use the * Update Custom Domain operation. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointUpdateProperties Endpoint update properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1032,8 +915,9 @@ public EndpointInner update(String resourceGroupName, String profileName, String * operation. To update origin groups, use the Update Origin group operation. To update custom domains, use the * Update Custom Domain operation. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param endpointUpdateProperties Endpoint update properties. * @param context The context to associate with this operation. @@ -1053,8 +937,9 @@ public EndpointInner update(String resourceGroupName, String profileName, String * Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource * group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1068,6 +953,10 @@ public Mono>> deleteWithResponseAsync(String resourceG 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.")); @@ -1078,14 +967,9 @@ public Mono>> deleteWithResponseAsync(String resourceG if (endpointName == null) { return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, profileName, - endpointName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1093,8 +977,9 @@ public Mono>> deleteWithResponseAsync(String resourceG * Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource * group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1109,6 +994,10 @@ private Mono>> deleteWithResponseAsync(String resource 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.")); @@ -1119,22 +1008,18 @@ private Mono>> deleteWithResponseAsync(String resource if (endpointName == null) { return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, endpointName, context); } /** * Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource * group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1153,8 +1038,9 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN * Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource * group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1176,8 +1062,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource * group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1194,8 +1081,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource * group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1213,8 +1101,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource * group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1231,8 +1120,9 @@ public Mono deleteAsync(String resourceGroupName, String profileName, Stri * Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource * group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1250,8 +1140,9 @@ private Mono deleteAsync(String resourceGroupName, String profileName, Str * Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource * group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1266,8 +1157,9 @@ public void delete(String resourceGroupName, String profileName, String endpoint * Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource * group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1279,11 +1171,159 @@ public void delete(String resourceGroupName, String profileName, String endpoint deleteAsync(resourceGroupName, profileName, endpointName, context).block(); } + /** + * Lists existing CDN endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Endpoint list operation 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 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())); + } + + /** + * Lists existing CDN endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Endpoint list operation 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 accept = "application/json"; + context = this.client.mergeContext(context); + return 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)); + } + + /** + * Lists existing CDN endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Endpoint list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByProfileAsync(String resourceGroupName, String profileName) { + return new PagedFlux<>(() -> listByProfileSinglePageAsync(resourceGroupName, profileName), + nextLink -> listByProfileNextSinglePageAsync(nextLink)); + } + + /** + * Lists existing CDN endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Endpoint list operation 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)); + } + + /** + * Lists existing CDN endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Endpoint list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByProfile(String resourceGroupName, String profileName) { + return new PagedIterable<>(listByProfileAsync(resourceGroupName, profileName)); + } + + /** + * Lists existing CDN endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Endpoint list operation 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)); + } + /** * Starts an existing CDN endpoint that is on a stopped state. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1299,6 +1339,10 @@ public Mono>> startWithResponseAsync(String resourceGr 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.")); @@ -1309,22 +1353,19 @@ public Mono>> startWithResponseAsync(String resourceGr if (endpointName == null) { return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.start(this.client.getEndpoint(), resourceGroupName, profileName, - endpointName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .withContext(context -> service.start(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Starts an existing CDN endpoint that is on a stopped state. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1341,6 +1382,10 @@ private Mono>> startWithResponseAsync(String resourceG 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.")); @@ -1351,21 +1396,18 @@ private Mono>> startWithResponseAsync(String resourceG if (endpointName == null) { return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.start(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); + return service.start(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, endpointName, accept, context); } /** * Starts an existing CDN endpoint that is on a stopped state. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1384,8 +1426,9 @@ public PollerFlux, EndpointInner> beginStartAsync(Stri /** * Starts an existing CDN endpoint that is on a stopped state. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1407,8 +1450,9 @@ private PollerFlux, EndpointInner> beginStartAsync(Str /** * Starts an existing CDN endpoint that is on a stopped state. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1425,8 +1469,9 @@ public SyncPoller, EndpointInner> beginStart(String re /** * Starts an existing CDN endpoint that is on a stopped state. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1444,8 +1489,9 @@ public SyncPoller, EndpointInner> beginStart(String re /** * Starts an existing CDN endpoint that is on a stopped state. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1462,8 +1508,9 @@ public Mono startAsync(String resourceGroupName, String profileNa /** * Starts an existing CDN endpoint that is on a stopped state. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1482,8 +1529,9 @@ private Mono startAsync(String resourceGroupName, String profileN /** * Starts an existing CDN endpoint that is on a stopped state. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1499,8 +1547,9 @@ public EndpointInner start(String resourceGroupName, String profileName, String /** * Starts an existing CDN endpoint that is on a stopped state. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1517,8 +1566,9 @@ public EndpointInner start(String resourceGroupName, String profileName, String /** * Stops an existing running CDN endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1534,6 +1584,10 @@ public Mono>> stopWithResponseAsync(String resourceGro 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.")); @@ -1544,22 +1598,19 @@ public Mono>> stopWithResponseAsync(String resourceGro if (endpointName == null) { return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.stop(this.client.getEndpoint(), resourceGroupName, profileName, - endpointName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .withContext(context -> service.stop(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Stops an existing running CDN endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1576,6 +1627,10 @@ private Mono>> stopWithResponseAsync(String resourceGr 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.")); @@ -1586,21 +1641,18 @@ private Mono>> stopWithResponseAsync(String resourceGr if (endpointName == null) { return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.stop(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); + return service.stop(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, endpointName, accept, context); } /** * Stops an existing running CDN endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1619,8 +1671,9 @@ public PollerFlux, EndpointInner> beginStopAsync(Strin /** * Stops an existing running CDN endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1642,8 +1695,9 @@ private PollerFlux, EndpointInner> beginStopAsync(Stri /** * Stops an existing running CDN endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1660,8 +1714,9 @@ public SyncPoller, EndpointInner> beginStop(String res /** * Stops an existing running CDN endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1679,8 +1734,9 @@ public SyncPoller, EndpointInner> beginStop(String res /** * Stops an existing running CDN endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1697,8 +1753,9 @@ public Mono stopAsync(String resourceGroupName, String profileNam /** * Stops an existing running CDN endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1717,8 +1774,9 @@ private Mono stopAsync(String resourceGroupName, String profileNa /** * Stops an existing running CDN endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1734,8 +1792,9 @@ public EndpointInner stop(String resourceGroupName, String profileName, String e /** * Stops an existing running CDN endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1752,8 +1811,9 @@ public EndpointInner stop(String resourceGroupName, String profileName, String e /** * Removes a content from CDN. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @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 @@ -1770,6 +1830,10 @@ public Mono>> purgeContentWithResponseAsync(String res 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.")); @@ -1780,29 +1844,26 @@ public Mono>> purgeContentWithResponseAsync(String res if (endpointName == null) { return Mono.error(new IllegalArgumentException("Parameter endpointName 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 (contentFilePaths == null) { return Mono .error(new IllegalArgumentException("Parameter contentFilePaths is required and cannot be null.")); } else { contentFilePaths.validate(); } - final String accept = "application/json"; + final String contentType = "application/json"; return FluxUtil - .withContext( - context -> service.purgeContent(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, - this.client.getSubscriptionId(), this.client.getApiVersion(), contentFilePaths, accept, context)) + .withContext(context -> service.purgeContent(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, contentType, + contentFilePaths, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Removes a content from CDN. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @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 @@ -1820,6 +1881,10 @@ private Mono>> purgeContentWithResponseAsync(String re 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.")); @@ -1830,27 +1895,25 @@ private Mono>> purgeContentWithResponseAsync(String re if (endpointName == null) { return Mono.error(new IllegalArgumentException("Parameter endpointName 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 (contentFilePaths == null) { return Mono .error(new IllegalArgumentException("Parameter contentFilePaths is required and cannot be null.")); } else { contentFilePaths.validate(); } - final String accept = "application/json"; + final String contentType = "application/json"; context = this.client.mergeContext(context); - return service.purgeContent(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, - this.client.getSubscriptionId(), this.client.getApiVersion(), contentFilePaths, accept, context); + return service.purgeContent(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, contentType, + contentFilePaths, context); } /** * Removes a content from CDN. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @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 @@ -1872,8 +1935,9 @@ public PollerFlux, Void> beginPurgeContentAsync(String resource /** * Removes a content from CDN. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @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 @@ -1897,8 +1961,9 @@ private PollerFlux, Void> beginPurgeContentAsync(String resourc /** * Removes a content from CDN. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @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 @@ -1918,8 +1983,9 @@ public SyncPoller, Void> beginPurgeContent(String resourceGroup /** * Removes a content from CDN. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @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 @@ -1940,8 +2006,9 @@ public SyncPoller, Void> beginPurgeContent(String resourceGroup /** * Removes a content from CDN. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @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 @@ -1961,8 +2028,9 @@ public Mono purgeContentAsync(String resourceGroupName, String profileName /** * Removes a content from CDN. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @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 @@ -1983,8 +2051,9 @@ private Mono purgeContentAsync(String resourceGroupName, String profileNam /** * Removes a content from CDN. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @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 @@ -2002,8 +2071,9 @@ public void purgeContent(String resourceGroupName, String profileName, String en /** * Removes a content from CDN. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @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 @@ -2022,8 +2092,9 @@ public void purgeContent(String resourceGroupName, String profileName, String en /** * Pre-loads a content to CDN. Available for Verizon Profiles. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param contentFilePaths The path to the content to be loaded. Path should be a full URL, e.g. * ‘/pictures/city.png' which loads a single file. @@ -2039,6 +2110,10 @@ public Mono>> loadContentWithResponseAsync(String reso 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.")); @@ -2049,29 +2124,26 @@ public Mono>> loadContentWithResponseAsync(String reso if (endpointName == null) { return Mono.error(new IllegalArgumentException("Parameter endpointName 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 (contentFilePaths == null) { return Mono .error(new IllegalArgumentException("Parameter contentFilePaths is required and cannot be null.")); } else { contentFilePaths.validate(); } - final String accept = "application/json"; + final String contentType = "application/json"; return FluxUtil - .withContext( - context -> service.loadContent(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, - this.client.getSubscriptionId(), this.client.getApiVersion(), contentFilePaths, accept, context)) + .withContext(context -> service.loadContent(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, contentType, + contentFilePaths, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Pre-loads a content to CDN. Available for Verizon Profiles. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param contentFilePaths The path to the content to be loaded. Path should be a full URL, e.g. * ‘/pictures/city.png' which loads a single file. @@ -2088,6 +2160,10 @@ private Mono>> loadContentWithResponseAsync(String res 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.")); @@ -2098,27 +2174,25 @@ private Mono>> loadContentWithResponseAsync(String res if (endpointName == null) { return Mono.error(new IllegalArgumentException("Parameter endpointName 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 (contentFilePaths == null) { return Mono .error(new IllegalArgumentException("Parameter contentFilePaths is required and cannot be null.")); } else { contentFilePaths.validate(); } - final String accept = "application/json"; + final String contentType = "application/json"; context = this.client.mergeContext(context); - return service.loadContent(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, - this.client.getSubscriptionId(), this.client.getApiVersion(), contentFilePaths, accept, context); + return service.loadContent(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, contentType, + contentFilePaths, context); } /** * Pre-loads a content to CDN. Available for Verizon Profiles. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param contentFilePaths The path to the content to be loaded. Path should be a full URL, e.g. * ‘/pictures/city.png' which loads a single file. @@ -2139,8 +2213,9 @@ public PollerFlux, Void> beginLoadContentAsync(String resourceG /** * Pre-loads a content to CDN. Available for Verizon Profiles. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param contentFilePaths The path to the content to be loaded. Path should be a full URL, e.g. * ‘/pictures/city.png' which loads a single file. @@ -2163,8 +2238,9 @@ private PollerFlux, Void> beginLoadContentAsync(String resource /** * Pre-loads a content to CDN. Available for Verizon Profiles. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param contentFilePaths The path to the content to be loaded. Path should be a full URL, e.g. * ‘/pictures/city.png' which loads a single file. @@ -2183,8 +2259,9 @@ public SyncPoller, Void> beginLoadContent(String resourceGroupN /** * Pre-loads a content to CDN. Available for Verizon Profiles. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param contentFilePaths The path to the content to be loaded. Path should be a full URL, e.g. * ‘/pictures/city.png' which loads a single file. @@ -2204,8 +2281,9 @@ public SyncPoller, Void> beginLoadContent(String resourceGroupN /** * Pre-loads a content to CDN. Available for Verizon Profiles. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param contentFilePaths The path to the content to be loaded. Path should be a full URL, e.g. * ‘/pictures/city.png' which loads a single file. @@ -2224,8 +2302,9 @@ public Mono loadContentAsync(String resourceGroupName, String profileName, /** * Pre-loads a content to CDN. Available for Verizon Profiles. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param contentFilePaths The path to the content to be loaded. Path should be a full URL, e.g. * ‘/pictures/city.png' which loads a single file. @@ -2245,8 +2324,9 @@ private Mono loadContentAsync(String resourceGroupName, String profileName /** * Pre-loads a content to CDN. Available for Verizon Profiles. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param contentFilePaths The path to the content to be loaded. Path should be a full URL, e.g. * ‘/pictures/city.png' which loads a single file. @@ -2263,8 +2343,9 @@ public void loadContent(String resourceGroupName, String profileName, String end /** * Pre-loads a content to CDN. Available for Verizon Profiles. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param contentFilePaths The path to the content to be loaded. Path should be a full URL, e.g. * ‘/pictures/city.png' which loads a single file. @@ -2282,8 +2363,9 @@ public void loadContent(String resourceGroupName, String profileName, String end /** * Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainProperties Custom domain to be validated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2299,6 +2381,10 @@ public Mono> validateCustomDomainWithR 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.")); @@ -2309,29 +2395,27 @@ public Mono> validateCustomDomainWithR if (endpointName == null) { return Mono.error(new IllegalArgumentException("Parameter endpointName 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 (customDomainProperties == null) { return Mono.error( new IllegalArgumentException("Parameter customDomainProperties is required and cannot be null.")); } else { customDomainProperties.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.validateCustomDomain(this.client.getEndpoint(), resourceGroupName, - profileName, endpointName, this.client.getSubscriptionId(), this.client.getApiVersion(), - customDomainProperties, accept, context)) + .withContext(context -> service.validateCustomDomain(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, 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 CDN endpoint in DNS. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainProperties Custom domain to be validated. * @param context The context to associate with this operation. @@ -2348,6 +2432,10 @@ private Mono> validateCustomDomainWith 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.")); @@ -2358,27 +2446,26 @@ private Mono> validateCustomDomainWith if (endpointName == null) { return Mono.error(new IllegalArgumentException("Parameter endpointName 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 (customDomainProperties == null) { return Mono.error( new IllegalArgumentException("Parameter customDomainProperties is required and cannot be null.")); } else { customDomainProperties.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.validateCustomDomain(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, - this.client.getSubscriptionId(), this.client.getApiVersion(), customDomainProperties, accept, context); + return service.validateCustomDomain(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, contentType, accept, + customDomainProperties, context); } /** * Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainProperties Custom domain to be validated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2396,8 +2483,9 @@ public Mono validateCustomDomainAsync(String re /** * Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainProperties Custom domain to be validated. * @param context The context to associate with this operation. @@ -2416,8 +2504,9 @@ public Response validateCustomDomainWithRespons /** * Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param customDomainProperties Custom domain to be validated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2435,8 +2524,9 @@ public ValidateCustomDomainOutputInner validateCustomDomain(String resourceGroup /** * Checks the quota and usage of geo filters and custom domains under the given endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2451,6 +2541,10 @@ private Mono> listResourceUsageSinglePageAsync 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.")); @@ -2461,14 +2555,10 @@ private Mono> listResourceUsageSinglePageAsync if (endpointName == null) { return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listResourceUsage(this.client.getEndpoint(), resourceGroupName, profileName, - endpointName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .withContext(context -> service.listResourceUsage(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, 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())); @@ -2477,8 +2567,9 @@ private Mono> listResourceUsageSinglePageAsync /** * Checks the quota and usage of geo filters and custom domains under the given endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2494,6 +2585,10 @@ private Mono> listResourceUsageSinglePageAsync 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.")); @@ -2504,15 +2599,11 @@ private Mono> listResourceUsageSinglePageAsync if (endpointName == null) { return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listResourceUsage(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .listResourceUsage(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, endpointName, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -2520,8 +2611,9 @@ private Mono> listResourceUsageSinglePageAsync /** * Checks the quota and usage of geo filters and custom domains under the given endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2538,8 +2630,9 @@ public PagedFlux listResourceUsageAsync(String resourceGroup /** * Checks the quota and usage of geo filters and custom domains under the given endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2558,8 +2651,9 @@ private PagedFlux listResourceUsageAsync(String resourceGrou /** * Checks the quota and usage of geo filters and custom domains under the given endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2575,8 +2669,9 @@ public PagedIterable listResourceUsage(String resourceGroupN /** * Checks the quota and usage of geo filters and custom domains under the given endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2597,7 +2692,7 @@ public PagedIterable listResourceUsage(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 endpoints along with {@link PagedResponse} on successful completion of + * @return the response of a Endpoint list operation along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -2625,7 +2720,7 @@ private Mono> listByProfileNextSinglePageAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 endpoints along with {@link PagedResponse} on successful completion of + * @return the response of a Endpoint list operation along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/KeyGroupsClientImpl.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/KeyGroupsClientImpl.java new file mode 100644 index 000000000000..c2528259b10b --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/KeyGroupsClientImpl.java @@ -0,0 +1,1226 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.cdn.fluent.KeyGroupsClient; +import com.azure.resourcemanager.cdn.fluent.models.KeyGroupInner; +import com.azure.resourcemanager.cdn.implementation.models.KeyGroupListResult; +import com.azure.resourcemanager.cdn.models.KeyGroupUpdatePropertiesParameters; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in KeyGroupsClient. + */ +public final class KeyGroupsClientImpl implements KeyGroupsClient { + /** + * The proxy service used to perform REST calls. + */ + private final KeyGroupsService service; + + /** + * The service client containing this operation class. + */ + private final CdnManagementClientImpl client; + + /** + * Initializes an instance of KeyGroupsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + KeyGroupsClientImpl(CdnManagementClientImpl client) { + this.service + = RestProxy.create(KeyGroupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for CdnManagementClientKeyGroups to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "CdnManagementClientKeyGroups") + public interface KeyGroupsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/keyGroups/{keyGroupName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, + @PathParam("keyGroupName") String keyGroupName, @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/keyGroups/{keyGroupName}") + @ExpectedResponses({ 200, 201, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, + @PathParam("keyGroupName") String keyGroupName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") KeyGroupInner keyGroup, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/keyGroups/{keyGroupName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, + @PathParam("keyGroupName") String keyGroupName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") KeyGroupUpdatePropertiesParameters keyGroupUpdateProperties, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/keyGroups/{keyGroupName}") + @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("profileName") String profileName, + @PathParam("keyGroupName") String keyGroupName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/keyGroups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + 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); + + @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 an existing KeyGroup within a profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 existing KeyGroup within a profile along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, String profileName, + String keyGroupName) { + 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 (keyGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter keyGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, keyGroupName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets an existing KeyGroup within a profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the 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 an existing KeyGroup within a profile along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String profileName, + String keyGroupName, 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 (keyGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter keyGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, keyGroupName, accept, context); + } + + /** + * Gets an existing KeyGroup within a profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 existing KeyGroup within a profile on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String profileName, String keyGroupName) { + return getWithResponseAsync(resourceGroupName, profileName, keyGroupName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets an existing KeyGroup within a profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the 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 an existing KeyGroup within a profile along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String profileName, String keyGroupName, + Context context) { + return getWithResponseAsync(resourceGroupName, profileName, keyGroupName, context).block(); + } + + /** + * Gets an existing KeyGroup within a profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 existing KeyGroup within a profile. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public KeyGroupInner get(String resourceGroupName, String profileName, String keyGroupName) { + return getWithResponse(resourceGroupName, profileName, keyGroupName, Context.NONE).getValue(); + } + + /** + * Creates or updates a new KeyGroup within the specified profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @param keyGroup The KeyGroup properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return contains a list of references of UrlSigningKey type secret objects along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> createUpdateWithResponseAsync(String resourceGroupName, String profileName, + String keyGroupName, KeyGroupInner keyGroup) { + 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 (keyGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter keyGroupName is required and cannot be null.")); + } + if (keyGroup == null) { + return Mono.error(new IllegalArgumentException("Parameter keyGroup is required and cannot be null.")); + } else { + keyGroup.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, keyGroupName, contentType, accept, + keyGroup, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a new KeyGroup within the specified profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @param keyGroup The KeyGroup properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return contains a list of references of UrlSigningKey type secret objects along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createUpdateWithResponseAsync(String resourceGroupName, String profileName, + String keyGroupName, KeyGroupInner keyGroup, 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 (keyGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter keyGroupName is required and cannot be null.")); + } + if (keyGroup == null) { + return Mono.error(new IllegalArgumentException("Parameter keyGroup is required and cannot be null.")); + } else { + keyGroup.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, keyGroupName, contentType, accept, + keyGroup, context); + } + + /** + * Creates or updates a new KeyGroup within the specified profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @param keyGroup The KeyGroup properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 contains a list of references of UrlSigningKey type secret objects. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginCreateUpdateAsync(String resourceGroupName, String profileName, + String keyGroupName, KeyGroupInner keyGroup) { + Mono>> mono + = createUpdateWithResponseAsync(resourceGroupName, profileName, keyGroupName, keyGroup); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Creates or updates a new KeyGroup within the specified profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @param keyGroup The KeyGroup properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 contains a list of references of UrlSigningKey type secret objects. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginCreateUpdateAsync(String resourceGroupName, String profileName, + String keyGroupName, KeyGroupInner keyGroup, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createUpdateWithResponseAsync(resourceGroupName, profileName, keyGroupName, keyGroup, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Creates or updates a new KeyGroup within the specified profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @param keyGroup The KeyGroup properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of contains a list of references of UrlSigningKey type secret objects. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginCreateUpdate(String resourceGroupName, String profileName, + String keyGroupName, KeyGroupInner keyGroup) { + return this.beginCreateUpdateAsync(resourceGroupName, profileName, keyGroupName, keyGroup).getSyncPoller(); + } + + /** + * Creates or updates a new KeyGroup within the specified profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @param keyGroup The KeyGroup properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of contains a list of references of UrlSigningKey type secret objects. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginCreateUpdate(String resourceGroupName, String profileName, + String keyGroupName, KeyGroupInner keyGroup, Context context) { + return this.beginCreateUpdateAsync(resourceGroupName, profileName, keyGroupName, keyGroup, context) + .getSyncPoller(); + } + + /** + * Creates or updates a new KeyGroup within the specified profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @param keyGroup The KeyGroup properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return contains a list of references of UrlSigningKey type secret objects on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createUpdateAsync(String resourceGroupName, String profileName, String keyGroupName, + KeyGroupInner keyGroup) { + return beginCreateUpdateAsync(resourceGroupName, profileName, keyGroupName, keyGroup).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a new KeyGroup within the specified profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @param keyGroup The KeyGroup properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return contains a list of references of UrlSigningKey type secret objects on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createUpdateAsync(String resourceGroupName, String profileName, String keyGroupName, + KeyGroupInner keyGroup, Context context) { + return beginCreateUpdateAsync(resourceGroupName, profileName, keyGroupName, keyGroup, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a new KeyGroup within the specified profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @param keyGroup The KeyGroup properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 createUpdate(String resourceGroupName, String profileName, String keyGroupName, + KeyGroupInner keyGroup) { + createUpdateAsync(resourceGroupName, profileName, keyGroupName, keyGroup).block(); + } + + /** + * Creates or updates a new KeyGroup within the specified profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @param keyGroup The KeyGroup properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 createUpdate(String resourceGroupName, String profileName, String keyGroupName, KeyGroupInner keyGroup, + Context context) { + createUpdateAsync(resourceGroupName, profileName, keyGroupName, keyGroup, context).block(); + } + + /** + * Updates an existing KeyGroup within the specified profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @param keyGroupUpdateProperties The KeyGroup properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return contains a list of references of UrlSigningKey type secret objects along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> updateWithResponseAsync(String resourceGroupName, String profileName, + String keyGroupName, KeyGroupUpdatePropertiesParameters keyGroupUpdateProperties) { + 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 (keyGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter keyGroupName is required and cannot be null.")); + } + if (keyGroupUpdateProperties == null) { + return Mono.error( + new IllegalArgumentException("Parameter keyGroupUpdateProperties is required and cannot be null.")); + } else { + keyGroupUpdateProperties.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, keyGroupName, contentType, accept, + keyGroupUpdateProperties, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates an existing KeyGroup within the specified profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @param keyGroupUpdateProperties The KeyGroup properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return contains a list of references of UrlSigningKey type secret objects along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String profileName, + String keyGroupName, KeyGroupUpdatePropertiesParameters keyGroupUpdateProperties, 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 (keyGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter keyGroupName is required and cannot be null.")); + } + if (keyGroupUpdateProperties == null) { + return Mono.error( + new IllegalArgumentException("Parameter keyGroupUpdateProperties is required and cannot be null.")); + } else { + keyGroupUpdateProperties.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, keyGroupName, contentType, accept, keyGroupUpdateProperties, context); + } + + /** + * Updates an existing KeyGroup within the specified profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @param keyGroupUpdateProperties The KeyGroup properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 contains a list of references of UrlSigningKey type secret objects. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginUpdateAsync(String resourceGroupName, String profileName, + String keyGroupName, KeyGroupUpdatePropertiesParameters keyGroupUpdateProperties) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, profileName, keyGroupName, keyGroupUpdateProperties); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Updates an existing KeyGroup within the specified profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @param keyGroupUpdateProperties The KeyGroup properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 contains a list of references of UrlSigningKey type secret objects. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginUpdateAsync(String resourceGroupName, String profileName, + String keyGroupName, KeyGroupUpdatePropertiesParameters keyGroupUpdateProperties, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, profileName, keyGroupName, keyGroupUpdateProperties, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Updates an existing KeyGroup within the specified profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @param keyGroupUpdateProperties The KeyGroup properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of contains a list of references of UrlSigningKey type secret objects. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginUpdate(String resourceGroupName, String profileName, + String keyGroupName, KeyGroupUpdatePropertiesParameters keyGroupUpdateProperties) { + return this.beginUpdateAsync(resourceGroupName, profileName, keyGroupName, keyGroupUpdateProperties) + .getSyncPoller(); + } + + /** + * Updates an existing KeyGroup within the specified profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @param keyGroupUpdateProperties The KeyGroup properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of contains a list of references of UrlSigningKey type secret objects. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginUpdate(String resourceGroupName, String profileName, + String keyGroupName, KeyGroupUpdatePropertiesParameters keyGroupUpdateProperties, Context context) { + return this.beginUpdateAsync(resourceGroupName, profileName, keyGroupName, keyGroupUpdateProperties, context) + .getSyncPoller(); + } + + /** + * Updates an existing KeyGroup within the specified profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @param keyGroupUpdateProperties The KeyGroup properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return contains a list of references of UrlSigningKey type secret objects on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateAsync(String resourceGroupName, String profileName, String keyGroupName, + KeyGroupUpdatePropertiesParameters keyGroupUpdateProperties) { + return beginUpdateAsync(resourceGroupName, profileName, keyGroupName, keyGroupUpdateProperties).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates an existing KeyGroup within the specified profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @param keyGroupUpdateProperties The KeyGroup properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return contains a list of references of UrlSigningKey type secret objects on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String profileName, String keyGroupName, + KeyGroupUpdatePropertiesParameters keyGroupUpdateProperties, Context context) { + return beginUpdateAsync(resourceGroupName, profileName, keyGroupName, keyGroupUpdateProperties, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates an existing KeyGroup within the specified profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @param keyGroupUpdateProperties The KeyGroup properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 update(String resourceGroupName, String profileName, String keyGroupName, + KeyGroupUpdatePropertiesParameters keyGroupUpdateProperties) { + updateAsync(resourceGroupName, profileName, keyGroupName, keyGroupUpdateProperties).block(); + } + + /** + * Updates an existing KeyGroup within the specified profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @param keyGroupUpdateProperties The KeyGroup properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 update(String resourceGroupName, String profileName, String keyGroupName, + KeyGroupUpdatePropertiesParameters keyGroupUpdateProperties, Context context) { + updateAsync(resourceGroupName, profileName, keyGroupName, keyGroupUpdateProperties, context).block(); + } + + /** + * Deletes an existing KeyGroup within profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> deleteWithResponseAsync(String resourceGroupName, String profileName, + String keyGroupName) { + 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 (keyGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter keyGroupName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, keyGroupName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes an existing KeyGroup within profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the 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 Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String profileName, + String keyGroupName, 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 (keyGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter keyGroupName is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, keyGroupName, context); + } + + /** + * Deletes an existing KeyGroup within profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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) + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String profileName, + String keyGroupName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, profileName, keyGroupName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes an existing KeyGroup within profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the 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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String profileName, + String keyGroupName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, profileName, keyGroupName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes an existing KeyGroup within profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String profileName, + String keyGroupName) { + return this.beginDeleteAsync(resourceGroupName, profileName, keyGroupName).getSyncPoller(); + } + + /** + * Deletes an existing KeyGroup within profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the 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 SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String profileName, + String keyGroupName, Context context) { + return this.beginDeleteAsync(resourceGroupName, profileName, keyGroupName, context).getSyncPoller(); + } + + /** + * Deletes an existing KeyGroup within profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String profileName, String keyGroupName) { + return beginDeleteAsync(resourceGroupName, profileName, keyGroupName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes an existing KeyGroup within profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the 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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String profileName, String keyGroupName, Context context) { + return beginDeleteAsync(resourceGroupName, profileName, keyGroupName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes an existing KeyGroup within profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 keyGroupName) { + deleteAsync(resourceGroupName, profileName, keyGroupName).block(); + } + + /** + * Deletes an existing KeyGroup within profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param keyGroupName Name of the KeyGroup under the 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String profileName, String keyGroupName, Context context) { + deleteAsync(resourceGroupName, profileName, keyGroupName, context).block(); + } + + /** + * Lists existing AzureFrontDoor KeyGroups. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a KeyGroup list operation 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 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())); + } + + /** + * Lists existing AzureFrontDoor KeyGroups. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a KeyGroup list operation 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 accept = "application/json"; + context = this.client.mergeContext(context); + return 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)); + } + + /** + * Lists existing AzureFrontDoor KeyGroups. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a KeyGroup list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByProfileAsync(String resourceGroupName, String profileName) { + return new PagedFlux<>(() -> listByProfileSinglePageAsync(resourceGroupName, profileName), + nextLink -> listByProfileNextSinglePageAsync(nextLink)); + } + + /** + * Lists existing AzureFrontDoor KeyGroups. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a KeyGroup list operation 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)); + } + + /** + * Lists existing AzureFrontDoor KeyGroups. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a KeyGroup list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByProfile(String resourceGroupName, String profileName) { + return new PagedIterable<>(listByProfileAsync(resourceGroupName, profileName)); + } + + /** + * Lists existing AzureFrontDoor KeyGroups. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a KeyGroup list operation 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)); + } + + /** + * 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 the response of a KeyGroup list operation 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)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a KeyGroup list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @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.")); + } + 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)); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/KnowledgeSourcesClientImpl.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/KnowledgeSourcesClientImpl.java new file mode 100644 index 000000000000..3c249753258a --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/KnowledgeSourcesClientImpl.java @@ -0,0 +1,1446 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.cdn.fluent.KnowledgeSourcesClient; +import com.azure.resourcemanager.cdn.fluent.models.KnowledgeSourceInner; +import com.azure.resourcemanager.cdn.implementation.models.KnowledgeSourceList; +import com.azure.resourcemanager.cdn.models.KnowledgeSourceUpdateParameters; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in KnowledgeSourcesClient. + */ +public final class KnowledgeSourcesClientImpl implements KnowledgeSourcesClient { + /** + * The proxy service used to perform REST calls. + */ + private final KnowledgeSourcesService service; + + /** + * The service client containing this operation class. + */ + private final CdnManagementClientImpl client; + + /** + * Initializes an instance of KnowledgeSourcesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + KnowledgeSourcesClientImpl(CdnManagementClientImpl client) { + this.service + = RestProxy.create(KnowledgeSourcesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for CdnManagementClientKnowledgeSources to be used by the proxy service + * to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "CdnManagementClientKnowledgeSources") + public interface KnowledgeSourcesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/webAgents/{webAgentName}/knowledgeSources/{knowledgeSourceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("webAgentName") String webAgentName, + @PathParam("knowledgeSourceName") String knowledgeSourceName, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/webAgents/{webAgentName}/knowledgeSources/{knowledgeSourceName}") + @ExpectedResponses({ 200, 201, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("webAgentName") String webAgentName, + @PathParam("knowledgeSourceName") String knowledgeSourceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") KnowledgeSourceInner knowledgeSource, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/webAgents/{webAgentName}/knowledgeSources/{knowledgeSourceName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("webAgentName") String webAgentName, + @PathParam("knowledgeSourceName") String knowledgeSourceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") KnowledgeSourceUpdateParameters knowledgeSourceUpdateParameters, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/webAgents/{webAgentName}/knowledgeSources/{knowledgeSourceName}") + @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("webAgentName") String webAgentName, + @PathParam("knowledgeSourceName") String knowledgeSourceName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/webAgents/{webAgentName}/knowledgeSources") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByWebAgent(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("webAgentName") String webAgentName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/webAgents/{webAgentName}/knowledgeSources/{knowledgeSourceName}/purge") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> purge(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("webAgentName") String webAgentName, + @PathParam("knowledgeSourceName") String knowledgeSourceName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByWebAgentNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets a knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 knowledge source with the specified name within a web agent along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, String webAgentName, + String knowledgeSourceName) { + 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 (webAgentName == null) { + return Mono.error(new IllegalArgumentException("Parameter webAgentName is required and cannot be null.")); + } + if (knowledgeSourceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter knowledgeSourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, webAgentName, knowledgeSourceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 knowledge source with the specified name within a web agent along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String webAgentName, + String knowledgeSourceName, 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 (webAgentName == null) { + return Mono.error(new IllegalArgumentException("Parameter webAgentName is required and cannot be null.")); + } + if (knowledgeSourceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter knowledgeSourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, webAgentName, knowledgeSourceName, accept, context); + } + + /** + * Gets a knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 knowledge source with the specified name within a web agent on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String webAgentName, + String knowledgeSourceName) { + return getWithResponseAsync(resourceGroupName, webAgentName, knowledgeSourceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 knowledge source with the specified name within a web agent along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String webAgentName, + String knowledgeSourceName, Context context) { + return getWithResponseAsync(resourceGroupName, webAgentName, knowledgeSourceName, context).block(); + } + + /** + * Gets a knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 knowledge source with the specified name within a web agent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public KnowledgeSourceInner get(String resourceGroupName, String webAgentName, String knowledgeSourceName) { + return getWithResponse(resourceGroupName, webAgentName, knowledgeSourceName, Context.NONE).getValue(); + } + + /** + * Creates or updates a knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param knowledgeSource Knowledge source to be created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 knowledge source resource for a web agent along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String webAgentName, String knowledgeSourceName, KnowledgeSourceInner knowledgeSource) { + 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 (webAgentName == null) { + return Mono.error(new IllegalArgumentException("Parameter webAgentName is required and cannot be null.")); + } + if (knowledgeSourceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter knowledgeSourceName is required and cannot be null.")); + } + if (knowledgeSource == null) { + return Mono + .error(new IllegalArgumentException("Parameter knowledgeSource is required and cannot be null.")); + } else { + knowledgeSource.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, webAgentName, knowledgeSourceName, contentType, + accept, knowledgeSource, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param knowledgeSource Knowledge source to be created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 knowledge source resource for a web agent along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String webAgentName, String knowledgeSourceName, KnowledgeSourceInner knowledgeSource, 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 (webAgentName == null) { + return Mono.error(new IllegalArgumentException("Parameter webAgentName is required and cannot be null.")); + } + if (knowledgeSourceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter knowledgeSourceName is required and cannot be null.")); + } + if (knowledgeSource == null) { + return Mono + .error(new IllegalArgumentException("Parameter knowledgeSource is required and cannot be null.")); + } else { + knowledgeSource.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, webAgentName, knowledgeSourceName, contentType, accept, + knowledgeSource, context); + } + + /** + * Creates or updates a knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param knowledgeSource Knowledge source to be created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 a knowledge source resource for a web agent. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, KnowledgeSourceInner> beginCreateOrUpdateAsync( + String resourceGroupName, String webAgentName, String knowledgeSourceName, + KnowledgeSourceInner knowledgeSource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, webAgentName, knowledgeSourceName, knowledgeSource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + KnowledgeSourceInner.class, KnowledgeSourceInner.class, this.client.getContext()); + } + + /** + * Creates or updates a knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param knowledgeSource Knowledge source to be created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 a knowledge source resource for a web agent. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, KnowledgeSourceInner> beginCreateOrUpdateAsync( + String resourceGroupName, String webAgentName, String knowledgeSourceName, KnowledgeSourceInner knowledgeSource, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, webAgentName, + knowledgeSourceName, knowledgeSource, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + KnowledgeSourceInner.class, KnowledgeSourceInner.class, context); + } + + /** + * Creates or updates a knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param knowledgeSource Knowledge source to be created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of defines a knowledge source resource for a web agent. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, KnowledgeSourceInner> beginCreateOrUpdate( + String resourceGroupName, String webAgentName, String knowledgeSourceName, + KnowledgeSourceInner knowledgeSource) { + return this.beginCreateOrUpdateAsync(resourceGroupName, webAgentName, knowledgeSourceName, knowledgeSource) + .getSyncPoller(); + } + + /** + * Creates or updates a knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param knowledgeSource Knowledge source to be created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of defines a knowledge source resource for a web agent. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, KnowledgeSourceInner> beginCreateOrUpdate( + String resourceGroupName, String webAgentName, String knowledgeSourceName, KnowledgeSourceInner knowledgeSource, + Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, webAgentName, knowledgeSourceName, knowledgeSource, context) + .getSyncPoller(); + } + + /** + * Creates or updates a knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param knowledgeSource Knowledge source to be created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 knowledge source resource for a web agent on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync(String resourceGroupName, String webAgentName, + String knowledgeSourceName, KnowledgeSourceInner knowledgeSource) { + return beginCreateOrUpdateAsync(resourceGroupName, webAgentName, knowledgeSourceName, knowledgeSource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param knowledgeSource Knowledge source to be created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 knowledge source resource for a web agent on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String webAgentName, + String knowledgeSourceName, KnowledgeSourceInner knowledgeSource, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, webAgentName, knowledgeSourceName, knowledgeSource, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param knowledgeSource Knowledge source to be created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 knowledge source resource for a web agent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public KnowledgeSourceInner createOrUpdate(String resourceGroupName, String webAgentName, + String knowledgeSourceName, KnowledgeSourceInner knowledgeSource) { + return createOrUpdateAsync(resourceGroupName, webAgentName, knowledgeSourceName, knowledgeSource).block(); + } + + /** + * Creates or updates a knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param knowledgeSource Knowledge source to be created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 knowledge source resource for a web agent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public KnowledgeSourceInner createOrUpdate(String resourceGroupName, String webAgentName, + String knowledgeSourceName, KnowledgeSourceInner knowledgeSource, Context context) { + return createOrUpdateAsync(resourceGroupName, webAgentName, knowledgeSourceName, knowledgeSource, context) + .block(); + } + + /** + * Updates an existing knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param knowledgeSourceUpdateParameters Knowledge source parameters to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 knowledge source resource for a web agent along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> updateWithResponseAsync(String resourceGroupName, String webAgentName, + String knowledgeSourceName, KnowledgeSourceUpdateParameters knowledgeSourceUpdateParameters) { + 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 (webAgentName == null) { + return Mono.error(new IllegalArgumentException("Parameter webAgentName is required and cannot be null.")); + } + if (knowledgeSourceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter knowledgeSourceName is required and cannot be null.")); + } + if (knowledgeSourceUpdateParameters == null) { + return Mono.error(new IllegalArgumentException( + "Parameter knowledgeSourceUpdateParameters is required and cannot be null.")); + } else { + knowledgeSourceUpdateParameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, webAgentName, knowledgeSourceName, contentType, + accept, knowledgeSourceUpdateParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates an existing knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param knowledgeSourceUpdateParameters Knowledge source parameters to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 knowledge source resource for a web agent along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String webAgentName, + String knowledgeSourceName, KnowledgeSourceUpdateParameters knowledgeSourceUpdateParameters, 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 (webAgentName == null) { + return Mono.error(new IllegalArgumentException("Parameter webAgentName is required and cannot be null.")); + } + if (knowledgeSourceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter knowledgeSourceName is required and cannot be null.")); + } + if (knowledgeSourceUpdateParameters == null) { + return Mono.error(new IllegalArgumentException( + "Parameter knowledgeSourceUpdateParameters is required and cannot be null.")); + } else { + knowledgeSourceUpdateParameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, webAgentName, knowledgeSourceName, contentType, accept, knowledgeSourceUpdateParameters, + context); + } + + /** + * Updates an existing knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param knowledgeSourceUpdateParameters Knowledge source parameters to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 a knowledge source resource for a web agent. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginUpdateAsync(String resourceGroupName, String webAgentName, + String knowledgeSourceName, KnowledgeSourceUpdateParameters knowledgeSourceUpdateParameters) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, webAgentName, + knowledgeSourceName, knowledgeSourceUpdateParameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Updates an existing knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param knowledgeSourceUpdateParameters Knowledge source parameters to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 a knowledge source resource for a web agent. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginUpdateAsync(String resourceGroupName, String webAgentName, + String knowledgeSourceName, KnowledgeSourceUpdateParameters knowledgeSourceUpdateParameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = updateWithResponseAsync(resourceGroupName, webAgentName, + knowledgeSourceName, knowledgeSourceUpdateParameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Updates an existing knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param knowledgeSourceUpdateParameters Knowledge source parameters to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of defines a knowledge source resource for a web agent. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginUpdate(String resourceGroupName, String webAgentName, + String knowledgeSourceName, KnowledgeSourceUpdateParameters knowledgeSourceUpdateParameters) { + return this + .beginUpdateAsync(resourceGroupName, webAgentName, knowledgeSourceName, knowledgeSourceUpdateParameters) + .getSyncPoller(); + } + + /** + * Updates an existing knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param knowledgeSourceUpdateParameters Knowledge source parameters to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of defines a knowledge source resource for a web agent. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginUpdate(String resourceGroupName, String webAgentName, + String knowledgeSourceName, KnowledgeSourceUpdateParameters knowledgeSourceUpdateParameters, Context context) { + return this + .beginUpdateAsync(resourceGroupName, webAgentName, knowledgeSourceName, knowledgeSourceUpdateParameters, + context) + .getSyncPoller(); + } + + /** + * Updates an existing knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param knowledgeSourceUpdateParameters Knowledge source parameters to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 knowledge source resource for a web agent on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateAsync(String resourceGroupName, String webAgentName, String knowledgeSourceName, + KnowledgeSourceUpdateParameters knowledgeSourceUpdateParameters) { + return beginUpdateAsync(resourceGroupName, webAgentName, knowledgeSourceName, knowledgeSourceUpdateParameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates an existing knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param knowledgeSourceUpdateParameters Knowledge source parameters to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 knowledge source resource for a web agent on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String webAgentName, String knowledgeSourceName, + KnowledgeSourceUpdateParameters knowledgeSourceUpdateParameters, Context context) { + return beginUpdateAsync(resourceGroupName, webAgentName, knowledgeSourceName, knowledgeSourceUpdateParameters, + context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates an existing knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param knowledgeSourceUpdateParameters Knowledge source parameters to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 update(String resourceGroupName, String webAgentName, String knowledgeSourceName, + KnowledgeSourceUpdateParameters knowledgeSourceUpdateParameters) { + updateAsync(resourceGroupName, webAgentName, knowledgeSourceName, knowledgeSourceUpdateParameters).block(); + } + + /** + * Updates an existing knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param knowledgeSourceUpdateParameters Knowledge source parameters to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 update(String resourceGroupName, String webAgentName, String knowledgeSourceName, + KnowledgeSourceUpdateParameters knowledgeSourceUpdateParameters, Context context) { + updateAsync(resourceGroupName, webAgentName, knowledgeSourceName, knowledgeSourceUpdateParameters, context) + .block(); + } + + /** + * Deletes a knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> deleteWithResponseAsync(String resourceGroupName, String webAgentName, + String knowledgeSourceName) { + 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 (webAgentName == null) { + return Mono.error(new IllegalArgumentException("Parameter webAgentName is required and cannot be null.")); + } + if (knowledgeSourceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter knowledgeSourceName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, webAgentName, knowledgeSourceName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String webAgentName, + String knowledgeSourceName, 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 (webAgentName == null) { + return Mono.error(new IllegalArgumentException("Parameter webAgentName is required and cannot be null.")); + } + if (knowledgeSourceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter knowledgeSourceName is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, webAgentName, knowledgeSourceName, context); + } + + /** + * Deletes a knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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) + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String webAgentName, + String knowledgeSourceName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, webAgentName, knowledgeSourceName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes a knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 webAgentName, + String knowledgeSourceName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, webAgentName, knowledgeSourceName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes a knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String webAgentName, + String knowledgeSourceName) { + return this.beginDeleteAsync(resourceGroupName, webAgentName, knowledgeSourceName).getSyncPoller(); + } + + /** + * Deletes a knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String webAgentName, + String knowledgeSourceName, Context context) { + return this.beginDeleteAsync(resourceGroupName, webAgentName, knowledgeSourceName, context).getSyncPoller(); + } + + /** + * Deletes a knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String webAgentName, String knowledgeSourceName) { + return beginDeleteAsync(resourceGroupName, webAgentName, knowledgeSourceName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 webAgentName, String knowledgeSourceName, + Context context) { + return beginDeleteAsync(resourceGroupName, webAgentName, knowledgeSourceName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 webAgentName, String knowledgeSourceName) { + deleteAsync(resourceGroupName, webAgentName, knowledgeSourceName).block(); + } + + /** + * Deletes a knowledge source with the specified name within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 webAgentName, String knowledgeSourceName, Context context) { + deleteAsync(resourceGroupName, webAgentName, knowledgeSourceName, context).block(); + } + + /** + * Lists all knowledge sources within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 knowledge sources along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByWebAgentSinglePageAsync(String resourceGroupName, + String webAgentName) { + 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 (webAgentName == null) { + return Mono.error(new IllegalArgumentException("Parameter webAgentName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByWebAgent(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, webAgentName, 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 knowledge sources within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 knowledge sources along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByWebAgentSinglePageAsync(String resourceGroupName, + String webAgentName, 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 (webAgentName == null) { + return Mono.error(new IllegalArgumentException("Parameter webAgentName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByWebAgent(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, webAgentName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists all knowledge sources within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 knowledge sources as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByWebAgentAsync(String resourceGroupName, String webAgentName) { + return new PagedFlux<>(() -> listByWebAgentSinglePageAsync(resourceGroupName, webAgentName), + nextLink -> listByWebAgentNextSinglePageAsync(nextLink)); + } + + /** + * Lists all knowledge sources within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 knowledge sources as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByWebAgentAsync(String resourceGroupName, String webAgentName, + Context context) { + return new PagedFlux<>(() -> listByWebAgentSinglePageAsync(resourceGroupName, webAgentName, context), + nextLink -> listByWebAgentNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all knowledge sources within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 knowledge sources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByWebAgent(String resourceGroupName, String webAgentName) { + return new PagedIterable<>(listByWebAgentAsync(resourceGroupName, webAgentName)); + } + + /** + * Lists all knowledge sources within a web agent. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 knowledge sources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByWebAgent(String resourceGroupName, String webAgentName, + Context context) { + return new PagedIterable<>(listByWebAgentAsync(resourceGroupName, webAgentName, context)); + } + + /** + * Remove the cache of a knowledge source. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> purgeWithResponseAsync(String resourceGroupName, String webAgentName, + String knowledgeSourceName) { + 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 (webAgentName == null) { + return Mono.error(new IllegalArgumentException("Parameter webAgentName is required and cannot be null.")); + } + if (knowledgeSourceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter knowledgeSourceName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.purge(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, webAgentName, knowledgeSourceName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Remove the cache of a knowledge source. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> purgeWithResponseAsync(String resourceGroupName, String webAgentName, + String knowledgeSourceName, 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 (webAgentName == null) { + return Mono.error(new IllegalArgumentException("Parameter webAgentName is required and cannot be null.")); + } + if (knowledgeSourceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter knowledgeSourceName is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service.purge(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, webAgentName, knowledgeSourceName, context); + } + + /** + * Remove the cache of a knowledge source. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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) + public PollerFlux, Void> beginPurgeAsync(String resourceGroupName, String webAgentName, + String knowledgeSourceName) { + Mono>> mono + = purgeWithResponseAsync(resourceGroupName, webAgentName, knowledgeSourceName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Remove the cache of a knowledge source. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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> beginPurgeAsync(String resourceGroupName, String webAgentName, + String knowledgeSourceName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = purgeWithResponseAsync(resourceGroupName, webAgentName, knowledgeSourceName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Remove the cache of a knowledge source. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginPurge(String resourceGroupName, String webAgentName, + String knowledgeSourceName) { + return this.beginPurgeAsync(resourceGroupName, webAgentName, knowledgeSourceName).getSyncPoller(); + } + + /** + * Remove the cache of a knowledge source. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginPurge(String resourceGroupName, String webAgentName, + String knowledgeSourceName, Context context) { + return this.beginPurgeAsync(resourceGroupName, webAgentName, knowledgeSourceName, context).getSyncPoller(); + } + + /** + * Remove the cache of a knowledge source. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono purgeAsync(String resourceGroupName, String webAgentName, String knowledgeSourceName) { + return beginPurgeAsync(resourceGroupName, webAgentName, knowledgeSourceName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Remove the cache of a knowledge source. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 purgeAsync(String resourceGroupName, String webAgentName, String knowledgeSourceName, + Context context) { + return beginPurgeAsync(resourceGroupName, webAgentName, knowledgeSourceName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Remove the cache of a knowledge source. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 purge(String resourceGroupName, String webAgentName, String knowledgeSourceName) { + purgeAsync(resourceGroupName, webAgentName, knowledgeSourceName).block(); + } + + /** + * Remove the cache of a knowledge source. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param knowledgeSourceName The name of the knowledge source. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 purge(String resourceGroupName, String webAgentName, String knowledgeSourceName, Context context) { + purgeAsync(resourceGroupName, webAgentName, knowledgeSourceName, context).block(); + } + + /** + * 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 knowledge sources along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByWebAgentNextSinglePageAsync(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.listByWebAgentNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines a list of knowledge sources along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByWebAgentNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByWebAgentNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/LogAnalyticsClientImpl.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/LogAnalyticsClientImpl.java index c5358d591c9b..99f61e4f2145 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/LogAnalyticsClientImpl.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/LogAnalyticsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.implementation; @@ -75,17 +75,16 @@ public final class LogAnalyticsClientImpl implements LogAnalyticsClient { * The interface defining all the services for CdnManagementClientLogAnalytics to be used by the proxy service to * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "CdnManagementClientL") + @Host("{endpoint}") + @ServiceInterface(name = "CdnManagementClientLogAnalytics") public interface LogAnalyticsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getLogAnalyticsMetrics") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getLogAnalyticsMetrics(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("profileName") String profileName, + Mono> getLogAnalyticsMetrics(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, @QueryParam(value = "metrics", multipleQueryParams = true) List metrics, @QueryParam("dateTimeBegin") OffsetDateTime dateTimeBegin, @QueryParam("dateTimeEnd") OffsetDateTime dateTimeEnd, @@ -101,10 +100,9 @@ Mono> getLogAnalyticsMetrics(@HostParam("$host") @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getLogAnalyticsRankings") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getLogAnalyticsRankings(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("profileName") String profileName, + Mono> getLogAnalyticsRankings(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, @QueryParam(value = "rankings", multipleQueryParams = true) List rankings, @QueryParam(value = "metrics", multipleQueryParams = true) List metrics, @QueryParam("maxRanking") int maxRanking, @QueryParam("dateTimeBegin") OffsetDateTime dateTimeBegin, @@ -116,28 +114,27 @@ Mono> getLogAnalyticsRankings(@HostParam("$host" @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getLogAnalyticsLocations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getLogAnalyticsLocations(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("profileName") String profileName, @HeaderParam("Accept") String accept, Context context); + Mono> getLogAnalyticsLocations(@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.Cdn/profiles/{profileName}/getLogAnalyticsResources") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getLogAnalyticsResources(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("profileName") String profileName, @HeaderParam("Accept") String accept, Context context); + Mono> getLogAnalyticsResources(@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.Cdn/profiles/{profileName}/getWafLogAnalyticsMetrics") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getWafLogAnalyticsMetrics(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("profileName") String profileName, + Mono> getWafLogAnalyticsMetrics(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, @QueryParam(value = "metrics", multipleQueryParams = true) List metrics, @QueryParam("dateTimeBegin") OffsetDateTime dateTimeBegin, @QueryParam("dateTimeEnd") OffsetDateTime dateTimeEnd, @@ -151,10 +148,9 @@ Mono> getWafLogAnalyticsMetrics(@HostParam("$h @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getWafLogAnalyticsRankings") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getWafLogAnalyticsRankings(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("profileName") String profileName, + Mono> getWafLogAnalyticsRankings(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, @QueryParam(value = "metrics", multipleQueryParams = true) List metrics, @QueryParam("dateTimeBegin") OffsetDateTime dateTimeBegin, @QueryParam("dateTimeEnd") OffsetDateTime dateTimeEnd, @QueryParam("maxRanking") int maxRanking, @@ -167,9 +163,9 @@ Mono> getWafLogAnalyticsRankings(@HostParam(" /** * Get log report for AFD profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param metrics The metrics parameter. * @param dateTimeBegin The dateTimeBegin parameter. * @param dateTimeEnd The dateTimeEnd parameter. @@ -240,7 +236,7 @@ public Mono> getLogAnalyticsMetricsWithResponseAs = protocols.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); return FluxUtil .withContext(context -> service.getLogAnalyticsMetrics(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), profileName, + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, profileName, metricsConverted, dateTimeBegin, dateTimeEnd, granularity, groupByConverted, continentsConverted, countryOrRegionsConverted, customDomainsConverted, protocolsConverted, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -249,9 +245,9 @@ public Mono> getLogAnalyticsMetricsWithResponseAs /** * Get log report for AFD profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param metrics The metrics parameter. * @param dateTimeBegin The dateTimeBegin parameter. * @param dateTimeEnd The dateTimeEnd parameter. @@ -322,18 +318,18 @@ private Mono> getLogAnalyticsMetricsWithResponseA List protocolsConverted = protocols.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); context = this.client.mergeContext(context); - return service.getLogAnalyticsMetrics(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), profileName, metricsConverted, dateTimeBegin, dateTimeEnd, - granularity, groupByConverted, continentsConverted, countryOrRegionsConverted, customDomainsConverted, - protocolsConverted, accept, context); + return service.getLogAnalyticsMetrics(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, metricsConverted, dateTimeBegin, + dateTimeEnd, granularity, groupByConverted, continentsConverted, countryOrRegionsConverted, + customDomainsConverted, protocolsConverted, accept, context); } /** * Get log report for AFD profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param metrics The metrics parameter. * @param dateTimeBegin The dateTimeBegin parameter. * @param dateTimeEnd The dateTimeEnd parameter. @@ -360,9 +356,9 @@ public Mono getLogAnalyticsMetricsAsync(String resourceGro /** * Get log report for AFD profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param metrics The metrics parameter. * @param dateTimeBegin The dateTimeBegin parameter. * @param dateTimeEnd The dateTimeEnd parameter. @@ -390,9 +386,9 @@ public Response getLogAnalyticsMetricsWithResponse(String /** * Get log report for AFD profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param metrics The metrics parameter. * @param dateTimeBegin The dateTimeBegin parameter. * @param dateTimeEnd The dateTimeEnd parameter. @@ -418,9 +414,9 @@ public MetricsResponseInner getLogAnalyticsMetrics(String resourceGroupName, Str /** * Get log analytics ranking report for AFD profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param rankings The rankings parameter. * @param metrics The metrics parameter. * @param maxRanking The maxRanking parameter. @@ -474,18 +470,18 @@ public Mono> getLogAnalyticsRankingsWithResponse : customDomains.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); return FluxUtil .withContext( - context -> service.getLogAnalyticsRankings(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), profileName, rankingsConverted, metricsConverted, - maxRanking, dateTimeBegin, dateTimeEnd, customDomainsConverted, accept, context)) + context -> service.getLogAnalyticsRankings(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, rankingsConverted, + metricsConverted, maxRanking, dateTimeBegin, dateTimeEnd, customDomainsConverted, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get log analytics ranking report for AFD profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param rankings The rankings parameter. * @param metrics The metrics parameter. * @param maxRanking The maxRanking parameter. @@ -539,17 +535,17 @@ private Mono> getLogAnalyticsRankingsWithRespons ? new ArrayList<>() : customDomains.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); context = this.client.mergeContext(context); - return service.getLogAnalyticsRankings(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), profileName, rankingsConverted, metricsConverted, + return service.getLogAnalyticsRankings(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, rankingsConverted, metricsConverted, maxRanking, dateTimeBegin, dateTimeEnd, customDomainsConverted, accept, context); } /** * Get log analytics ranking report for AFD profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param rankings The rankings parameter. * @param metrics The metrics parameter. * @param maxRanking The maxRanking parameter. @@ -572,9 +568,9 @@ public Mono getLogAnalyticsRankingsAsync(String resourceG /** * Get log analytics ranking report for AFD profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param rankings The rankings parameter. * @param metrics The metrics parameter. * @param maxRanking The maxRanking parameter. @@ -598,9 +594,9 @@ public Response getLogAnalyticsRankingsWithResponse(Strin /** * Get log analytics ranking report for AFD profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param rankings The rankings parameter. * @param metrics The metrics parameter. * @param maxRanking The maxRanking parameter. @@ -623,9 +619,9 @@ public RankingsResponseInner getLogAnalyticsRankings(String resourceGroupName, S /** * Get all available location names for AFD log analytics report. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -653,17 +649,17 @@ public Mono> getLogAnalyticsLocationsWithRespo final String accept = "application/json"; return FluxUtil .withContext( - context -> service.getLogAnalyticsLocations(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), profileName, accept, context)) + context -> service.getLogAnalyticsLocations(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get all available location names for AFD log analytics report. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -691,16 +687,16 @@ private Mono> getLogAnalyticsLocationsWithResp } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.getLogAnalyticsLocations(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), profileName, accept, context); + return service.getLogAnalyticsLocations(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, accept, context); } /** * Get all available location names for AFD log analytics report. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -715,9 +711,9 @@ public Mono getLogAnalyticsLocationsAsync(String resour /** * Get all available location names for AFD log analytics report. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -733,9 +729,9 @@ public Response getLogAnalyticsLocationsWithResponse(St /** * Get all available location names for AFD log analytics report. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -749,9 +745,9 @@ public ContinentsResponseInner getLogAnalyticsLocations(String resourceGroupName /** * Get all endpoints and custom domains available for AFD log report. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -779,17 +775,17 @@ public Mono> getLogAnalyticsResourcesWithRespon final String accept = "application/json"; return FluxUtil .withContext( - context -> service.getLogAnalyticsResources(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), profileName, accept, context)) + context -> service.getLogAnalyticsResources(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get all endpoints and custom domains available for AFD log report. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -817,16 +813,16 @@ private Mono> getLogAnalyticsResourcesWithRespo } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.getLogAnalyticsResources(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), profileName, accept, context); + return service.getLogAnalyticsResources(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, accept, context); } /** * Get all endpoints and custom domains available for AFD log report. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -841,9 +837,9 @@ public Mono getLogAnalyticsResourcesAsync(String resourc /** * Get all endpoints and custom domains available for AFD log report. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -859,9 +855,9 @@ public Response getLogAnalyticsResourcesWithResponse(Str /** * Get all endpoints and custom domains available for AFD log report. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -875,9 +871,9 @@ public ResourcesResponseInner getLogAnalyticsResources(String resourceGroupName, /** * Get Waf related log analytics report for AFD profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param metrics The metrics parameter. * @param dateTimeBegin The dateTimeBegin parameter. * @param dateTimeEnd The dateTimeEnd parameter. @@ -937,8 +933,8 @@ public Mono> getWafLogAnalyticsMetricsWithResp : ruleTypes.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); return FluxUtil .withContext( - context -> service.getWafLogAnalyticsMetrics(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), profileName, metricsConverted, dateTimeBegin, + context -> service.getWafLogAnalyticsMetrics(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, metricsConverted, dateTimeBegin, dateTimeEnd, granularity, actionsConverted, groupByConverted, ruleTypesConverted, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -946,9 +942,9 @@ public Mono> getWafLogAnalyticsMetricsWithResp /** * Get Waf related log analytics report for AFD profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param metrics The metrics parameter. * @param dateTimeBegin The dateTimeBegin parameter. * @param dateTimeEnd The dateTimeEnd parameter. @@ -1008,17 +1004,17 @@ private Mono> getWafLogAnalyticsMetricsWithRes ? new ArrayList<>() : ruleTypes.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); context = this.client.mergeContext(context); - return service.getWafLogAnalyticsMetrics(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), profileName, metricsConverted, dateTimeBegin, dateTimeEnd, - granularity, actionsConverted, groupByConverted, ruleTypesConverted, accept, context); + return service.getWafLogAnalyticsMetrics(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, metricsConverted, dateTimeBegin, + dateTimeEnd, granularity, actionsConverted, groupByConverted, ruleTypesConverted, accept, context); } /** * Get Waf related log analytics report for AFD profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param metrics The metrics parameter. * @param dateTimeBegin The dateTimeBegin parameter. * @param dateTimeEnd The dateTimeEnd parameter. @@ -1041,9 +1037,9 @@ public Mono getWafLogAnalyticsMetricsAsync(String resou /** * Get Waf related log analytics report for AFD profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param metrics The metrics parameter. * @param dateTimeBegin The dateTimeBegin parameter. * @param dateTimeEnd The dateTimeEnd parameter. @@ -1069,9 +1065,9 @@ public Response getWafLogAnalyticsMetricsWithResponse(S /** * Get Waf related log analytics report for AFD profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param metrics The metrics parameter. * @param dateTimeBegin The dateTimeBegin parameter. * @param dateTimeEnd The dateTimeEnd parameter. @@ -1094,9 +1090,9 @@ public WafMetricsResponseInner getWafLogAnalyticsMetrics(String resourceGroupNam /** * Get WAF log analytics charts for AFD profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param metrics The metrics parameter. * @param dateTimeBegin The dateTimeBegin parameter. * @param dateTimeEnd The dateTimeEnd parameter. @@ -1154,19 +1150,19 @@ public Mono> getWafLogAnalyticsRankingsWithRe ? new ArrayList<>() : ruleTypes.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); return FluxUtil - .withContext(context -> service.getWafLogAnalyticsRankings(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), profileName, - metricsConverted, dateTimeBegin, dateTimeEnd, maxRanking, rankingsConverted, actionsConverted, - ruleTypesConverted, accept, context)) + .withContext( + context -> service.getWafLogAnalyticsRankings(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, metricsConverted, dateTimeBegin, + dateTimeEnd, maxRanking, rankingsConverted, actionsConverted, ruleTypesConverted, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get WAF log analytics charts for AFD profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param metrics The metrics parameter. * @param dateTimeBegin The dateTimeBegin parameter. * @param dateTimeEnd The dateTimeEnd parameter. @@ -1225,17 +1221,17 @@ private Mono> getWafLogAnalyticsRankingsWithR ? new ArrayList<>() : ruleTypes.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); context = this.client.mergeContext(context); - return service.getWafLogAnalyticsRankings(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), profileName, metricsConverted, dateTimeBegin, dateTimeEnd, - maxRanking, rankingsConverted, actionsConverted, ruleTypesConverted, accept, context); + return service.getWafLogAnalyticsRankings(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, metricsConverted, dateTimeBegin, + dateTimeEnd, maxRanking, rankingsConverted, actionsConverted, ruleTypesConverted, accept, context); } /** * Get WAF log analytics charts for AFD profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param metrics The metrics parameter. * @param dateTimeBegin The dateTimeBegin parameter. * @param dateTimeEnd The dateTimeEnd parameter. @@ -1259,9 +1255,9 @@ public Mono getWafLogAnalyticsRankingsAsync(String res /** * Get WAF log analytics charts for AFD profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param metrics The metrics parameter. * @param dateTimeBegin The dateTimeBegin parameter. * @param dateTimeEnd The dateTimeEnd parameter. @@ -1287,9 +1283,9 @@ public Response getWafLogAnalyticsRankingsWithResponse /** * Get WAF log analytics charts for AFD profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param metrics The metrics parameter. * @param dateTimeBegin The dateTimeBegin parameter. * @param dateTimeEnd The dateTimeEnd parameter. diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/ManagedRuleSetsClientImpl.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/ManagedRuleSetsClientImpl.java index bfb86ee3a5f2..ec9df787af3c 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/ManagedRuleSetsClientImpl.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/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.cdn.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.cdn.fluent.ManagedRuleSetsClient; import com.azure.resourcemanager.cdn.fluent.models.ManagedRuleSetDefinitionInner; -import com.azure.resourcemanager.cdn.models.ManagedRuleSetDefinitionList; +import com.azure.resourcemanager.cdn.implementation.models.ManagedRuleSetDefinitionList; import reactor.core.publisher.Mono; /** @@ -59,15 +59,15 @@ public final class ManagedRuleSetsClientImpl implements ManagedRuleSetsClient { * The interface defining all the services for CdnManagementClientManagedRuleSets to be used by the proxy service to * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "CdnManagementClientM") + @Host("{endpoint}") + @ServiceInterface(name = "CdnManagementClientManagedRuleSets") public interface ManagedRuleSetsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/cdnWebApplicationFirewallManagedRuleSets") @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" }) @@ -75,7 +75,7 @@ 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); } @@ -99,8 +99,8 @@ private Mono> listSinglePageAsync() } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), 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())); @@ -129,7 +129,7 @@ private Mono> listSinglePageAsync(C final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + .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)); diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/OperationsClientImpl.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/OperationsClientImpl.java index 255b456d9d6e..6f238fc627a5 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/OperationsClientImpl.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/OperationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.cdn.fluent.OperationsClient; import com.azure.resourcemanager.cdn.fluent.models.OperationInner; -import com.azure.resourcemanager.cdn.models.OperationsListResult; +import com.azure.resourcemanager.cdn.implementation.models.OperationsListResult; import reactor.core.publisher.Mono; /** @@ -59,14 +59,14 @@ public final class OperationsClientImpl implements OperationsClient { * The interface defining all the services for CdnManagementClientOperations to be used by the proxy service to * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "CdnManagementClientO") + @Host("{endpoint}") + @ServiceInterface(name = "CdnManagementClientOperations") public interface OperationsService { @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.Cdn/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -74,11 +74,11 @@ Mono> list(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Lists all of the available CDN REST API operations. + * List the operations for the provider. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -101,7 +101,7 @@ private Mono> listSinglePageAsync() { } /** - * Lists all of the available CDN REST API operations. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -124,7 +124,7 @@ private Mono> listSinglePageAsync(Context context) } /** - * Lists all of the available CDN REST API operations. + * List the operations for the provider. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -136,7 +136,7 @@ public PagedFlux listAsync() { } /** - * Lists all of the available CDN REST API operations. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -151,7 +151,7 @@ private PagedFlux listAsync(Context context) { } /** - * Lists all of the available CDN REST API operations. + * List the operations for the provider. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -163,7 +163,7 @@ public PagedIterable list() { } /** - * Lists all of the available CDN REST API operations. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/OriginGroupsClientImpl.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/OriginGroupsClientImpl.java index 5f4f952b85a5..5c5b2ae466ba 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/OriginGroupsClientImpl.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/OriginGroupsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.implementation; @@ -34,7 +34,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.cdn.fluent.OriginGroupsClient; import com.azure.resourcemanager.cdn.fluent.models.OriginGroupInner; -import com.azure.resourcemanager.cdn.models.OriginGroupListResult; +import com.azure.resourcemanager.cdn.implementation.models.OriginGroupListResult; import com.azure.resourcemanager.cdn.models.OriginGroupUpdateParameters; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -69,232 +69,73 @@ public final class OriginGroupsClientImpl implements OriginGroupsClient { * The interface defining all the services for CdnManagementClientOriginGroups to be used by the proxy service to * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "CdnManagementClientO") + @Host("{endpoint}") + @ServiceInterface(name = "CdnManagementClientOriginGroups") public interface OriginGroupsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByEndpoint(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("endpointName") String endpointName, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups/{originGroupName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, @PathParam("endpointName") String endpointName, @PathParam("originGroupName") String originGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups/{originGroupName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, @PathParam("endpointName") String endpointName, @PathParam("originGroupName") String originGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") OriginGroupInner originGroup, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") OriginGroupInner originGroup, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups/{originGroupName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, @PathParam("endpointName") String endpointName, @PathParam("originGroupName") String originGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") OriginGroupUpdateParameters originGroupUpdateProperties, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") OriginGroupUpdateParameters originGroupUpdateProperties, 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.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups/{originGroupName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, @PathParam("endpointName") String endpointName, @PathParam("originGroupName") String originGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByEndpoint(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, + @PathParam("endpointName") String endpointName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByEndpointNext( - @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 existing origin groups within an endpoint. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. - * @param endpointName Name of the endpoint under the profile which is unique globally. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 origin groups along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByEndpointSinglePageAsync(String resourceGroupName, - String profileName, String endpointName) { - 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 (profileName == null) { - return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByEndpoint(this.client.getEndpoint(), resourceGroupName, profileName, - endpointName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists all of the existing origin groups within an endpoint. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. - * @param endpointName Name of the endpoint under the profile which is unique globally. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 origin groups along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByEndpointSinglePageAsync(String resourceGroupName, - String profileName, String endpointName, 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 (profileName == null) { - return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByEndpoint(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all of the existing origin groups within an endpoint. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. - * @param endpointName Name of the endpoint under the profile which is unique globally. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 origin groups as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByEndpointAsync(String resourceGroupName, String profileName, - String endpointName) { - return new PagedFlux<>(() -> listByEndpointSinglePageAsync(resourceGroupName, profileName, endpointName), - nextLink -> listByEndpointNextSinglePageAsync(nextLink)); - } - - /** - * Lists all of the existing origin groups within an endpoint. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. - * @param endpointName Name of the endpoint under the profile which is unique globally. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 origin groups as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByEndpointAsync(String resourceGroupName, String profileName, - String endpointName, Context context) { - return new PagedFlux<>( - () -> listByEndpointSinglePageAsync(resourceGroupName, profileName, endpointName, context), - nextLink -> listByEndpointNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all of the existing origin groups within an endpoint. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. - * @param endpointName Name of the endpoint under the profile which is unique globally. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 origin groups as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByEndpoint(String resourceGroupName, String profileName, - String endpointName) { - return new PagedIterable<>(listByEndpointAsync(resourceGroupName, profileName, endpointName)); - } - - /** - * Lists all of the existing origin groups within an endpoint. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. - * @param endpointName Name of the endpoint under the profile which is unique globally. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 origin groups as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByEndpoint(String resourceGroupName, String profileName, - String endpointName, Context context) { - return new PagedIterable<>(listByEndpointAsync(resourceGroupName, profileName, endpointName, context)); - } - /** * Gets an existing origin group within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -310,6 +151,10 @@ public Mono> getWithResponseAsync(String resourceGrou 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.")); @@ -324,22 +169,20 @@ public Mono> getWithResponseAsync(String resourceGrou return Mono .error(new IllegalArgumentException("Parameter originGroupName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, - originGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, originGroupName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets an existing origin group within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param context The context to associate with this operation. @@ -356,6 +199,10 @@ private Mono> getWithResponseAsync(String resourceGro 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.")); @@ -370,21 +217,18 @@ private Mono> getWithResponseAsync(String resourceGro return Mono .error(new IllegalArgumentException("Parameter originGroupName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, originGroupName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, endpointName, originGroupName, accept, context); } /** * Gets an existing origin group within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -402,8 +246,9 @@ public Mono getAsync(String resourceGroupName, String profileN /** * Gets an existing origin group within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param context The context to associate with this operation. @@ -421,8 +266,9 @@ public Response getWithResponse(String resourceGroupName, Stri /** * Gets an existing origin group within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -439,8 +285,9 @@ public OriginGroupInner get(String resourceGroupName, String profileName, String /** * Creates a new origin group within the specified endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroup Origin group properties. @@ -457,6 +304,10 @@ public Mono>> createWithResponseAsync(String resourceG 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.")); @@ -471,28 +322,26 @@ public Mono>> createWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter originGroupName 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 (originGroup == null) { return Mono.error(new IllegalArgumentException("Parameter originGroup is required and cannot be null.")); } else { originGroup.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), resourceGroupName, profileName, - endpointName, originGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), - originGroup, accept, context)) + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, originGroupName, + contentType, accept, originGroup, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates a new origin group within the specified endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroup Origin group properties. @@ -510,6 +359,10 @@ private Mono>> createWithResponseAsync(String resource 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.")); @@ -524,26 +377,24 @@ private Mono>> createWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter originGroupName 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 (originGroup == null) { return Mono.error(new IllegalArgumentException("Parameter originGroup is required and cannot be null.")); } else { originGroup.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, originGroupName, - this.client.getSubscriptionId(), this.client.getApiVersion(), originGroup, accept, context); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, endpointName, originGroupName, contentType, accept, originGroup, context); } /** * Creates a new origin group within the specified endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroup Origin group properties. @@ -565,8 +416,9 @@ public PollerFlux, OriginGroupInner> beginCreateAsy /** * Creates a new origin group within the specified endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroup Origin group properties. @@ -591,8 +443,9 @@ private PollerFlux, OriginGroupInner> beginCreateAs /** * Creates a new origin group within the specified endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroup Origin group properties. @@ -612,8 +465,9 @@ public SyncPoller, OriginGroupInner> beginCreate(St /** * Creates a new origin group within the specified endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroup Origin group properties. @@ -636,8 +490,9 @@ public SyncPoller, OriginGroupInner> beginCreate(St /** * Creates a new origin group within the specified endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroup Origin group properties. @@ -657,8 +512,9 @@ public Mono createAsync(String resourceGroupName, String profi /** * Creates a new origin group within the specified endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroup Origin group properties. @@ -680,8 +536,9 @@ private Mono createAsync(String resourceGroupName, String prof /** * Creates a new origin group within the specified endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroup Origin group properties. @@ -700,8 +557,9 @@ public OriginGroupInner create(String resourceGroupName, String profileName, Str /** * Creates a new origin group within the specified endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroup Origin group properties. @@ -721,8 +579,9 @@ public OriginGroupInner create(String resourceGroupName, String profileName, Str /** * Updates an existing origin group within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroupUpdateProperties Origin group properties. @@ -739,6 +598,10 @@ public Mono>> updateWithResponseAsync(String resourceG 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.")); @@ -753,29 +616,27 @@ public Mono>> updateWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter originGroupName 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 (originGroupUpdateProperties == null) { return Mono.error( new IllegalArgumentException("Parameter originGroupUpdateProperties is required and cannot be null.")); } else { originGroupUpdateProperties.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, profileName, - endpointName, originGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), - originGroupUpdateProperties, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, originGroupName, + contentType, accept, originGroupUpdateProperties, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates an existing origin group within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroupUpdateProperties Origin group properties. @@ -794,6 +655,10 @@ private Mono>> updateWithResponseAsync(String resource 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.")); @@ -808,27 +673,26 @@ private Mono>> updateWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter originGroupName 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 (originGroupUpdateProperties == null) { return Mono.error( new IllegalArgumentException("Parameter originGroupUpdateProperties is required and cannot be null.")); } else { originGroupUpdateProperties.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, originGroupName, - this.client.getSubscriptionId(), this.client.getApiVersion(), originGroupUpdateProperties, accept, context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, endpointName, originGroupName, contentType, accept, + originGroupUpdateProperties, context); } /** * Updates an existing origin group within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroupUpdateProperties Origin group properties. @@ -851,8 +715,9 @@ public PollerFlux, OriginGroupInner> beginUpdateAsy /** * Updates an existing origin group within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroupUpdateProperties Origin group properties. @@ -877,8 +742,9 @@ private PollerFlux, OriginGroupInner> beginUpdateAs /** * Updates an existing origin group within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroupUpdateProperties Origin group properties. @@ -901,8 +767,9 @@ public SyncPoller, OriginGroupInner> beginUpdate(St /** * Updates an existing origin group within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroupUpdateProperties Origin group properties. @@ -926,8 +793,9 @@ public SyncPoller, OriginGroupInner> beginUpdate(St /** * Updates an existing origin group within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroupUpdateProperties Origin group properties. @@ -947,8 +815,9 @@ public Mono updateAsync(String resourceGroupName, String profi /** * Updates an existing origin group within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroupUpdateProperties Origin group properties. @@ -969,8 +838,9 @@ private Mono updateAsync(String resourceGroupName, String prof /** * Updates an existing origin group within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroupUpdateProperties Origin group properties. @@ -990,8 +860,9 @@ public OriginGroupInner update(String resourceGroupName, String profileName, Str /** * Updates an existing origin group within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param originGroupUpdateProperties Origin group properties. @@ -1012,8 +883,9 @@ public OriginGroupInner update(String resourceGroupName, String profileName, Str /** * Deletes an existing origin group within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1028,6 +900,10 @@ public Mono>> deleteWithResponseAsync(String resourceG 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.")); @@ -1042,23 +918,17 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter originGroupName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, - originGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, originGroupName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes an existing origin group within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param context The context to associate with this operation. @@ -1074,6 +944,10 @@ private Mono>> deleteWithResponseAsync(String resource 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.")); @@ -1088,21 +962,17 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter originGroupName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, originGroupName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, endpointName, originGroupName, context); } /** * Deletes an existing origin group within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1122,8 +992,9 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN /** * Deletes an existing origin group within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param context The context to associate with this operation. @@ -1145,8 +1016,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup /** * Deletes an existing origin group within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1163,8 +1035,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes an existing origin group within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param context The context to associate with this operation. @@ -1183,8 +1056,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes an existing origin group within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1202,8 +1076,9 @@ public Mono deleteAsync(String resourceGroupName, String profileName, Stri /** * Deletes an existing origin group within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param context The context to associate with this operation. @@ -1222,8 +1097,9 @@ private Mono deleteAsync(String resourceGroupName, String profileName, Str /** * Deletes an existing origin group within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1238,8 +1114,9 @@ public void delete(String resourceGroupName, String profileName, String endpoint /** * Deletes an existing origin group within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originGroupName Name of the origin group which is unique within the endpoint. * @param context The context to associate with this operation. @@ -1253,6 +1130,170 @@ public void delete(String resourceGroupName, String profileName, String endpoint deleteAsync(resourceGroupName, profileName, endpointName, originGroupName, context).block(); } + /** + * Lists all of the existing origin groups within an endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a OriginGroup list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByEndpointSinglePageAsync(String resourceGroupName, + String profileName, String endpointName) { + 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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByEndpoint(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, 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 existing origin groups within an endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a OriginGroup list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByEndpointSinglePageAsync(String resourceGroupName, + String profileName, String endpointName, 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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByEndpoint(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, endpointName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists all of the existing origin groups within an endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a OriginGroup list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByEndpointAsync(String resourceGroupName, String profileName, + String endpointName) { + return new PagedFlux<>(() -> listByEndpointSinglePageAsync(resourceGroupName, profileName, endpointName), + nextLink -> listByEndpointNextSinglePageAsync(nextLink)); + } + + /** + * Lists all of the existing origin groups within an endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a OriginGroup list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByEndpointAsync(String resourceGroupName, String profileName, + String endpointName, Context context) { + return new PagedFlux<>( + () -> listByEndpointSinglePageAsync(resourceGroupName, profileName, endpointName, context), + nextLink -> listByEndpointNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all of the existing origin groups within an endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a OriginGroup list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByEndpoint(String resourceGroupName, String profileName, + String endpointName) { + return new PagedIterable<>(listByEndpointAsync(resourceGroupName, profileName, endpointName)); + } + + /** + * Lists all of the existing origin groups within an endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a OriginGroup list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByEndpoint(String resourceGroupName, String profileName, + String endpointName, Context context) { + return new PagedIterable<>(listByEndpointAsync(resourceGroupName, profileName, endpointName, context)); + } + /** * Get the next page of items. * @@ -1260,7 +1301,7 @@ public void delete(String resourceGroupName, String profileName, String endpoint * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 origin groups along with {@link PagedResponse} on successful completion of + * @return the response of a OriginGroup list operation along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -1288,7 +1329,7 @@ private Mono> listByEndpointNextSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 origin groups along with {@link PagedResponse} on successful completion of + * @return the response of a OriginGroup list operation along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/OriginsClientImpl.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/OriginsClientImpl.java index 7998d640badb..d87dcfec946d 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/OriginsClientImpl.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/OriginsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.implementation; @@ -34,7 +34,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.cdn.fluent.OriginsClient; import com.azure.resourcemanager.cdn.fluent.models.OriginInner; -import com.azure.resourcemanager.cdn.models.OriginListResult; +import com.azure.resourcemanager.cdn.implementation.models.OriginListResult; import com.azure.resourcemanager.cdn.models.OriginUpdateParameters; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -68,231 +68,73 @@ public final class OriginsClientImpl implements OriginsClient { * The interface defining all the services for CdnManagementClientOrigins to be used by the proxy service to perform * REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "CdnManagementClientO") + @Host("{endpoint}") + @ServiceInterface(name = "CdnManagementClientOrigins") public interface OriginsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByEndpoint(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("endpointName") String endpointName, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, @PathParam("endpointName") String endpointName, @PathParam("originName") String originName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, @PathParam("endpointName") String endpointName, @PathParam("originName") String originName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") OriginInner origin, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") OriginInner origin, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, @PathParam("endpointName") String endpointName, @PathParam("originName") String originName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") OriginUpdateParameters originUpdateProperties, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") OriginUpdateParameters originUpdateProperties, 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.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, @PathParam("endpointName") String endpointName, @PathParam("originName") String originName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByEndpoint(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, + @PathParam("endpointName") String endpointName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByEndpointNext( - @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 existing origins within an endpoint. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. - * @param endpointName Name of the endpoint under the profile which is unique globally. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 origins along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByEndpointSinglePageAsync(String resourceGroupName, String profileName, - String endpointName) { - 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 (profileName == null) { - return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByEndpoint(this.client.getEndpoint(), resourceGroupName, profileName, - endpointName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists all of the existing origins within an endpoint. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. - * @param endpointName Name of the endpoint under the profile which is unique globally. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 origins along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByEndpointSinglePageAsync(String resourceGroupName, String profileName, - String endpointName, 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 (profileName == null) { - return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByEndpoint(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all of the existing origins within an endpoint. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. - * @param endpointName Name of the endpoint under the profile which is unique globally. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 origins as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByEndpointAsync(String resourceGroupName, String profileName, - String endpointName) { - return new PagedFlux<>(() -> listByEndpointSinglePageAsync(resourceGroupName, profileName, endpointName), - nextLink -> listByEndpointNextSinglePageAsync(nextLink)); - } - - /** - * Lists all of the existing origins within an endpoint. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. - * @param endpointName Name of the endpoint under the profile which is unique globally. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 origins as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByEndpointAsync(String resourceGroupName, String profileName, - String endpointName, Context context) { - return new PagedFlux<>( - () -> listByEndpointSinglePageAsync(resourceGroupName, profileName, endpointName, context), - nextLink -> listByEndpointNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all of the existing origins within an endpoint. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. - * @param endpointName Name of the endpoint under the profile which is unique globally. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 origins as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByEndpoint(String resourceGroupName, String profileName, - String endpointName) { - return new PagedIterable<>(listByEndpointAsync(resourceGroupName, profileName, endpointName)); - } - - /** - * Lists all of the existing origins within an endpoint. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. - * @param endpointName Name of the endpoint under the profile which is unique globally. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 origins as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByEndpoint(String resourceGroupName, String profileName, String endpointName, - Context context) { - return new PagedIterable<>(listByEndpointAsync(resourceGroupName, profileName, endpointName, context)); - } - /** * Gets an existing origin within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -308,6 +150,10 @@ public Mono> getWithResponseAsync(String resourceGroupName 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.")); @@ -321,22 +167,18 @@ public Mono> getWithResponseAsync(String resourceGroupName if (originName == null) { return Mono.error(new IllegalArgumentException("Parameter originName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, - originName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, originName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets an existing origin within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @param context The context to associate with this operation. @@ -353,6 +195,10 @@ private Mono> getWithResponseAsync(String resourceGroupNam 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.")); @@ -366,21 +212,18 @@ private Mono> getWithResponseAsync(String resourceGroupNam if (originName == null) { return Mono.error(new IllegalArgumentException("Parameter originName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, originName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, endpointName, originName, accept, context); } /** * Gets an existing origin within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -398,8 +241,9 @@ public Mono getAsync(String resourceGroupName, String profileName, /** * Gets an existing origin within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @param context The context to associate with this operation. @@ -417,8 +261,9 @@ public Response getWithResponse(String resourceGroupName, String pr /** * Gets an existing origin within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -434,10 +279,11 @@ public OriginInner get(String resourceGroupName, String profileName, String endp /** * Creates a new origin within the specified endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. - * @param originName Name of the origin that is unique within the endpoint. + * @param originName Name of the origin which is unique within the endpoint. * @param origin Origin properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -452,6 +298,10 @@ public Mono>> createWithResponseAsync(String resourceG 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.")); @@ -465,30 +315,28 @@ public Mono>> createWithResponseAsync(String resourceG if (originName == null) { return Mono.error(new IllegalArgumentException("Parameter originName 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 (origin == null) { return Mono.error(new IllegalArgumentException("Parameter origin is required and cannot be null.")); } else { origin.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.create(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, - originName, this.client.getSubscriptionId(), this.client.getApiVersion(), origin, accept, context)) + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, originName, contentType, + accept, origin, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates a new origin within the specified endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. - * @param originName Name of the origin that is unique within the endpoint. + * @param originName Name of the origin which is unique within the endpoint. * @param origin Origin properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -504,6 +352,10 @@ private Mono>> createWithResponseAsync(String resource 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.")); @@ -517,28 +369,26 @@ private Mono>> createWithResponseAsync(String resource if (originName == null) { return Mono.error(new IllegalArgumentException("Parameter originName 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 (origin == null) { return Mono.error(new IllegalArgumentException("Parameter origin is required and cannot be null.")); } else { origin.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, originName, - this.client.getSubscriptionId(), this.client.getApiVersion(), origin, accept, context); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, endpointName, originName, contentType, accept, origin, context); } /** * Creates a new origin within the specified endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. - * @param originName Name of the origin that is unique within the endpoint. + * @param originName Name of the origin which is unique within the endpoint. * @param origin Origin properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -557,10 +407,11 @@ public PollerFlux, OriginInner> beginCreateAsync(String /** * Creates a new origin within the specified endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. - * @param originName Name of the origin that is unique within the endpoint. + * @param originName Name of the origin which is unique within the endpoint. * @param origin Origin properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -581,10 +432,11 @@ private PollerFlux, OriginInner> beginCreateAsync(String /** * Creates a new origin within the specified endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. - * @param originName Name of the origin that is unique within the endpoint. + * @param originName Name of the origin which is unique within the endpoint. * @param origin Origin properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -600,10 +452,11 @@ public SyncPoller, OriginInner> beginCreate(String resou /** * Creates a new origin within the specified endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. - * @param originName Name of the origin that is unique within the endpoint. + * @param originName Name of the origin which is unique within the endpoint. * @param origin Origin properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -621,10 +474,11 @@ public SyncPoller, OriginInner> beginCreate(String resou /** * Creates a new origin within the specified endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. - * @param originName Name of the origin that is unique within the endpoint. + * @param originName Name of the origin which is unique within the endpoint. * @param origin Origin properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -641,10 +495,11 @@ public Mono createAsync(String resourceGroupName, String profileNam /** * Creates a new origin within the specified endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. - * @param originName Name of the origin that is unique within the endpoint. + * @param originName Name of the origin which is unique within the endpoint. * @param origin Origin properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -662,10 +517,11 @@ private Mono createAsync(String resourceGroupName, String profileNa /** * Creates a new origin within the specified endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. - * @param originName Name of the origin that is unique within the endpoint. + * @param originName Name of the origin which is unique within the endpoint. * @param origin Origin properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -681,10 +537,11 @@ public OriginInner create(String resourceGroupName, String profileName, String e /** * Creates a new origin within the specified endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. - * @param originName Name of the origin that is unique within the endpoint. + * @param originName Name of the origin which is unique within the endpoint. * @param origin Origin properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -701,8 +558,9 @@ public OriginInner create(String resourceGroupName, String profileName, String e /** * Updates an existing origin within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @param originUpdateProperties Origin properties. @@ -719,6 +577,10 @@ public Mono>> updateWithResponseAsync(String resourceG 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.")); @@ -732,29 +594,27 @@ public Mono>> updateWithResponseAsync(String resourceG if (originName == null) { return Mono.error(new IllegalArgumentException("Parameter originName 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 (originUpdateProperties == null) { return Mono.error( new IllegalArgumentException("Parameter originUpdateProperties is required and cannot be null.")); } else { originUpdateProperties.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, profileName, - endpointName, originName, this.client.getSubscriptionId(), this.client.getApiVersion(), - originUpdateProperties, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, originName, contentType, + accept, originUpdateProperties, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates an existing origin within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @param originUpdateProperties Origin properties. @@ -772,6 +632,10 @@ private Mono>> updateWithResponseAsync(String resource 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.")); @@ -785,27 +649,26 @@ private Mono>> updateWithResponseAsync(String resource if (originName == null) { return Mono.error(new IllegalArgumentException("Parameter originName 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 (originUpdateProperties == null) { return Mono.error( new IllegalArgumentException("Parameter originUpdateProperties is required and cannot be null.")); } else { originUpdateProperties.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, originName, - this.client.getSubscriptionId(), this.client.getApiVersion(), originUpdateProperties, accept, context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, endpointName, originName, contentType, accept, originUpdateProperties, + context); } /** * Updates an existing origin within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @param originUpdateProperties Origin properties. @@ -826,8 +689,9 @@ public PollerFlux, OriginInner> beginUpdateAsync(String /** * Updates an existing origin within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @param originUpdateProperties Origin properties. @@ -851,8 +715,9 @@ private PollerFlux, OriginInner> beginUpdateAsync(String /** * Updates an existing origin within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @param originUpdateProperties Origin properties. @@ -871,8 +736,9 @@ public SyncPoller, OriginInner> beginUpdate(String resou /** * Updates an existing origin within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @param originUpdateProperties Origin properties. @@ -893,8 +759,9 @@ public SyncPoller, OriginInner> beginUpdate(String resou /** * Updates an existing origin within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @param originUpdateProperties Origin properties. @@ -913,8 +780,9 @@ public Mono updateAsync(String resourceGroupName, String profileNam /** * Updates an existing origin within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @param originUpdateProperties Origin properties. @@ -934,8 +802,9 @@ private Mono updateAsync(String resourceGroupName, String profileNa /** * Updates an existing origin within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @param originUpdateProperties Origin properties. @@ -953,8 +822,9 @@ public OriginInner update(String resourceGroupName, String profileName, String e /** * Updates an existing origin within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @param originUpdateProperties Origin properties. @@ -974,8 +844,9 @@ public OriginInner update(String resourceGroupName, String profileName, String e /** * Deletes an existing origin within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -990,6 +861,10 @@ public Mono>> deleteWithResponseAsync(String resourceG 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.")); @@ -1003,23 +878,18 @@ public Mono>> deleteWithResponseAsync(String resourceG if (originName == null) { return Mono.error(new IllegalArgumentException("Parameter originName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, - originName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, originName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes an existing origin within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @param context The context to associate with this operation. @@ -1035,6 +905,10 @@ private Mono>> deleteWithResponseAsync(String resource 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.")); @@ -1048,21 +922,17 @@ private Mono>> deleteWithResponseAsync(String resource if (originName == null) { return Mono.error(new IllegalArgumentException("Parameter originName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, originName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, endpointName, originName, context); } /** * Deletes an existing origin within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1082,8 +952,9 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN /** * Deletes an existing origin within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @param context The context to associate with this operation. @@ -1105,8 +976,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup /** * Deletes an existing origin within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1123,8 +995,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes an existing origin within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @param context The context to associate with this operation. @@ -1142,8 +1015,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes an existing origin within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1161,8 +1035,9 @@ public Mono deleteAsync(String resourceGroupName, String profileName, Stri /** * Deletes an existing origin within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @param context The context to associate with this operation. @@ -1181,8 +1056,9 @@ private Mono deleteAsync(String resourceGroupName, String profileName, Str /** * Deletes an existing origin within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1197,8 +1073,9 @@ public void delete(String resourceGroupName, String profileName, String endpoint /** * Deletes an existing origin within an endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param originName Name of the origin which is unique within the endpoint. * @param context The context to associate with this operation. @@ -1212,6 +1089,170 @@ public void delete(String resourceGroupName, String profileName, String endpoint deleteAsync(resourceGroupName, profileName, endpointName, originName, context).block(); } + /** + * Lists all of the existing origins within an endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Origin list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByEndpointSinglePageAsync(String resourceGroupName, String profileName, + String endpointName) { + 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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByEndpoint(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, 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 existing origins within an endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Origin list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByEndpointSinglePageAsync(String resourceGroupName, String profileName, + String endpointName, 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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByEndpoint(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, endpointName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists all of the existing origins within an endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Origin list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByEndpointAsync(String resourceGroupName, String profileName, + String endpointName) { + return new PagedFlux<>(() -> listByEndpointSinglePageAsync(resourceGroupName, profileName, endpointName), + nextLink -> listByEndpointNextSinglePageAsync(nextLink)); + } + + /** + * Lists all of the existing origins within an endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Origin list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByEndpointAsync(String resourceGroupName, String profileName, + String endpointName, Context context) { + return new PagedFlux<>( + () -> listByEndpointSinglePageAsync(resourceGroupName, profileName, endpointName, context), + nextLink -> listByEndpointNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all of the existing origins within an endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Origin list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByEndpoint(String resourceGroupName, String profileName, + String endpointName) { + return new PagedIterable<>(listByEndpointAsync(resourceGroupName, profileName, endpointName)); + } + + /** + * Lists all of the existing origins within an endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Origin list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByEndpoint(String resourceGroupName, String profileName, String endpointName, + Context context) { + return new PagedIterable<>(listByEndpointAsync(resourceGroupName, profileName, endpointName, context)); + } + /** * Get the next page of items. * @@ -1219,7 +1260,7 @@ public void delete(String resourceGroupName, String profileName, String endpoint * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 origins along with {@link PagedResponse} on successful completion of + * @return the response of a Origin list operation along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -1247,7 +1288,7 @@ private Mono> listByEndpointNextSinglePageAsync(Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 origins along with {@link PagedResponse} on successful completion of + * @return the response of a Origin list operation along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/PoliciesClientImpl.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/PoliciesClientImpl.java index b9b46bd17d90..98dbd8e5f13c 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/PoliciesClientImpl.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/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.cdn.implementation; @@ -34,7 +34,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.cdn.fluent.PoliciesClient; import com.azure.resourcemanager.cdn.fluent.models.CdnWebApplicationFirewallPolicyInner; -import com.azure.resourcemanager.cdn.models.CdnWebApplicationFirewallPolicyList; +import com.azure.resourcemanager.cdn.implementation.models.CdnWebApplicationFirewallPolicyList; import com.azure.resourcemanager.cdn.models.CdnWebApplicationFirewallPolicyPatchParameters; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; @@ -71,204 +71,69 @@ public final class PoliciesClientImpl * The interface defining all the services for CdnManagementClientPolicies to be used by the proxy service to * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "CdnManagementClientP") + @Host("{endpoint}") + @ServiceInterface(name = "CdnManagementClientPolicies") public interface PoliciesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/cdnWebApplicationFirewallPolicies") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/cdnWebApplicationFirewallPolicies/{policyName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("policyName") String policyName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/cdnWebApplicationFirewallPolicies/{policyName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("policyName") String policyName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("application/json") CdnWebApplicationFirewallPolicyInner cdnWebApplicationFirewallPolicy, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/cdnWebApplicationFirewallPolicies/{policyName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> update(@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("Content-Type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("application/json") CdnWebApplicationFirewallPolicyPatchParameters cdnWebApplicationFirewallPolicyPatchParameters, - @HeaderParam("Accept") String accept, Context context); + 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.Cdn/cdnWebApplicationFirewallPolicies/{policyName}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("policyName") String policyName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/cdnWebApplicationFirewallPolicies") + @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("{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); } - /** - * 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 for Azure CDN 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 accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists 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 for Azure CDN 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 accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists 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 for Azure CDN as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public 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 for Azure CDN 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 for Azure CDN 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 for Azure CDN as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, - Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, 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 CdnWebApplicationFirewallPolicy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -283,6 +148,10 @@ public PagedIterable listByResourceGroup(S 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.")); @@ -290,21 +159,17 @@ public PagedIterable listByResourceGroup(S 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 accept = "application/json"; return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, policyName, - this.client.getSubscriptionId(), this.client.getApiVersion(), 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName The name of the CdnWebApplicationFirewallPolicy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -320,6 +185,10 @@ public PagedIterable listByResourceGroup(S 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.")); @@ -327,20 +196,16 @@ public PagedIterable listByResourceGroup(S 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 accept = "application/json"; context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, policyName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); + return service.getByResourceGroup(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 CdnWebApplicationFirewallPolicy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -357,7 +222,7 @@ public Mono getByResourceGroupAsync(String /** * 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 CdnWebApplicationFirewallPolicy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -374,7 +239,7 @@ public Response getByResourceGroupWithResp /** * 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 CdnWebApplicationFirewallPolicy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -389,7 +254,7 @@ public CdnWebApplicationFirewallPolicyInner getByResourceGroup(String resourceGr /** * 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 CdnWebApplicationFirewallPolicy. * @param cdnWebApplicationFirewallPolicy Policy to be created. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -405,6 +270,10 @@ public Mono>> createOrUpdateWithResponseAsync(String r 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.")); @@ -412,28 +281,25 @@ public Mono>> createOrUpdateWithResponseAsync(String r 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 (cdnWebApplicationFirewallPolicy == null) { return Mono.error(new IllegalArgumentException( "Parameter cdnWebApplicationFirewallPolicy is required and cannot be null.")); } else { cdnWebApplicationFirewallPolicy.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, policyName, - this.client.getSubscriptionId(), this.client.getApiVersion(), cdnWebApplicationFirewallPolicy, accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, policyName, contentType, accept, + cdnWebApplicationFirewallPolicy, 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 CdnWebApplicationFirewallPolicy. * @param cdnWebApplicationFirewallPolicy Policy to be created. * @param context The context to associate with this operation. @@ -450,6 +316,10 @@ private Mono>> createOrUpdateWithResponseAsync(String 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.")); @@ -457,27 +327,24 @@ private Mono>> createOrUpdateWithResponseAsync(String 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 (cdnWebApplicationFirewallPolicy == null) { return Mono.error(new IllegalArgumentException( "Parameter cdnWebApplicationFirewallPolicy is required and cannot be null.")); } else { cdnWebApplicationFirewallPolicy.validate(); } + 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(), this.client.getApiVersion(), cdnWebApplicationFirewallPolicy, accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, policyName, contentType, accept, + cdnWebApplicationFirewallPolicy, 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 CdnWebApplicationFirewallPolicy. * @param cdnWebApplicationFirewallPolicy Policy to be created. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -499,7 +366,7 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * 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 CdnWebApplicationFirewallPolicy. * @param cdnWebApplicationFirewallPolicy Policy to be created. * @param context The context to associate with this operation. @@ -523,7 +390,7 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * 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 CdnWebApplicationFirewallPolicy. * @param cdnWebApplicationFirewallPolicy Policy to be created. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -542,7 +409,7 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * 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 CdnWebApplicationFirewallPolicy. * @param cdnWebApplicationFirewallPolicy Policy to be created. * @param context The context to associate with this operation. @@ -562,7 +429,7 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * 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 CdnWebApplicationFirewallPolicy. * @param cdnWebApplicationFirewallPolicy Policy to be created. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -580,7 +447,7 @@ public Mono createOrUpdateAsync(String res /** * 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 CdnWebApplicationFirewallPolicy. * @param cdnWebApplicationFirewallPolicy Policy to be created. * @param context The context to associate with this operation. @@ -599,7 +466,7 @@ private Mono createOrUpdateAsync(String re /** * 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 CdnWebApplicationFirewallPolicy. * @param cdnWebApplicationFirewallPolicy Policy to be created. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -616,7 +483,7 @@ public CdnWebApplicationFirewallPolicyInner createOrUpdate(String resourceGroupN /** * 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 CdnWebApplicationFirewallPolicy. * @param cdnWebApplicationFirewallPolicy Policy to be created. * @param context The context to associate with this operation. @@ -635,7 +502,7 @@ public CdnWebApplicationFirewallPolicyInner createOrUpdate(String resourceGroupN * Update an existing CdnWebApplicationFirewallPolicy with the specified policy 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 policyName The name of the CdnWebApplicationFirewallPolicy. * @param cdnWebApplicationFirewallPolicyPatchParameters CdnWebApplicationFirewallPolicy parameters to be patched. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -651,6 +518,10 @@ public Mono>> updateWithResponseAsync(String resourceG 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.")); @@ -658,21 +529,18 @@ public Mono>> updateWithResponseAsync(String resourceG 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 (cdnWebApplicationFirewallPolicyPatchParameters == null) { return Mono.error(new IllegalArgumentException( "Parameter cdnWebApplicationFirewallPolicyPatchParameters is required and cannot be null.")); } else { cdnWebApplicationFirewallPolicyPatchParameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, policyName, - this.client.getSubscriptionId(), this.client.getApiVersion(), - cdnWebApplicationFirewallPolicyPatchParameters, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, policyName, contentType, accept, + cdnWebApplicationFirewallPolicyPatchParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -680,7 +548,7 @@ public Mono>> updateWithResponseAsync(String resourceG * Update an existing CdnWebApplicationFirewallPolicy with the specified policy 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 policyName The name of the CdnWebApplicationFirewallPolicy. * @param cdnWebApplicationFirewallPolicyPatchParameters CdnWebApplicationFirewallPolicy parameters to be patched. * @param context The context to associate with this operation. @@ -698,6 +566,10 @@ private Mono>> updateWithResponseAsync(String resource 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.")); @@ -705,27 +577,25 @@ private Mono>> updateWithResponseAsync(String resource 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 (cdnWebApplicationFirewallPolicyPatchParameters == null) { return Mono.error(new IllegalArgumentException( "Parameter cdnWebApplicationFirewallPolicyPatchParameters is required and cannot be null.")); } else { cdnWebApplicationFirewallPolicyPatchParameters.validate(); } + 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(), - this.client.getApiVersion(), cdnWebApplicationFirewallPolicyPatchParameters, accept, context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, policyName, contentType, accept, cdnWebApplicationFirewallPolicyPatchParameters, + context); } /** * Update an existing CdnWebApplicationFirewallPolicy with the specified policy 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 policyName The name of the CdnWebApplicationFirewallPolicy. * @param cdnWebApplicationFirewallPolicyPatchParameters CdnWebApplicationFirewallPolicy parameters to be patched. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -748,7 +618,7 @@ private Mono>> updateWithResponseAsync(String resource * Update an existing CdnWebApplicationFirewallPolicy with the specified policy 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 policyName The name of the CdnWebApplicationFirewallPolicy. * @param cdnWebApplicationFirewallPolicyPatchParameters CdnWebApplicationFirewallPolicy parameters to be patched. * @param context The context to associate with this operation. @@ -774,7 +644,7 @@ private Mono>> updateWithResponseAsync(String resource * Update an existing CdnWebApplicationFirewallPolicy with the specified policy 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 policyName The name of the CdnWebApplicationFirewallPolicy. * @param cdnWebApplicationFirewallPolicyPatchParameters CdnWebApplicationFirewallPolicy parameters to be patched. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -794,7 +664,7 @@ private Mono>> updateWithResponseAsync(String resource * Update an existing CdnWebApplicationFirewallPolicy with the specified policy 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 policyName The name of the CdnWebApplicationFirewallPolicy. * @param cdnWebApplicationFirewallPolicyPatchParameters CdnWebApplicationFirewallPolicy parameters to be patched. * @param context The context to associate with this operation. @@ -817,7 +687,7 @@ private Mono>> updateWithResponseAsync(String resource * Update an existing CdnWebApplicationFirewallPolicy with the specified policy 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 policyName The name of the CdnWebApplicationFirewallPolicy. * @param cdnWebApplicationFirewallPolicyPatchParameters CdnWebApplicationFirewallPolicy parameters to be patched. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -836,7 +706,7 @@ public Mono updateAsync(String resourceGro * Update an existing CdnWebApplicationFirewallPolicy with the specified policy 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 policyName The name of the CdnWebApplicationFirewallPolicy. * @param cdnWebApplicationFirewallPolicyPatchParameters CdnWebApplicationFirewallPolicy parameters to be patched. * @param context The context to associate with this operation. @@ -858,7 +728,7 @@ private Mono updateAsync(String resourceGr * Update an existing CdnWebApplicationFirewallPolicy with the specified policy 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 policyName The name of the CdnWebApplicationFirewallPolicy. * @param cdnWebApplicationFirewallPolicyPatchParameters CdnWebApplicationFirewallPolicy parameters to be patched. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -876,7 +746,7 @@ public CdnWebApplicationFirewallPolicyInner update(String resourceGroupName, Str * Update an existing CdnWebApplicationFirewallPolicy with the specified policy 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 policyName The name of the CdnWebApplicationFirewallPolicy. * @param cdnWebApplicationFirewallPolicyPatchParameters CdnWebApplicationFirewallPolicy parameters to be patched. * @param context The context to associate with this operation. @@ -896,7 +766,7 @@ public CdnWebApplicationFirewallPolicyInner update(String resourceGroupName, Str /** * 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 CdnWebApplicationFirewallPolicy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -909,6 +779,10 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St 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.")); @@ -916,21 +790,16 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St 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 accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, policyName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, 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 CdnWebApplicationFirewallPolicy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -944,6 +813,10 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S 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.")); @@ -951,20 +824,15 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S 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 accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), resourceGroupName, policyName, this.client.getSubscriptionId(), - this.client.getApiVersion(), accept, context); + return service.delete(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 CdnWebApplicationFirewallPolicy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -979,7 +847,7 @@ public 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 CdnWebApplicationFirewallPolicy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -995,7 +863,7 @@ public Response deleteWithResponse(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 CdnWebApplicationFirewallPolicy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1006,6 +874,141 @@ public void delete(String resourceGroupName, String policyName) { deleteWithResponse(resourceGroupName, policyName, Context.NONE); } + /** + * 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 for Azure CDN along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists 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 for Azure CDN along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists 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 for Azure CDN as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 for Azure CDN 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 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 for Azure CDN 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 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 for Azure CDN as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, + Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + /** * Get the next page of items. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/ProfileAgentsClientImpl.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/ProfileAgentsClientImpl.java new file mode 100644 index 000000000000..4214aaf874de --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/ProfileAgentsClientImpl.java @@ -0,0 +1,1226 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.cdn.fluent.ProfileAgentsClient; +import com.azure.resourcemanager.cdn.fluent.models.ProfileAgentInner; +import com.azure.resourcemanager.cdn.implementation.models.ProfileAgentListResult; +import com.azure.resourcemanager.cdn.models.ProfileAgentUpdateParameters; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ProfileAgentsClient. + */ +public final class ProfileAgentsClientImpl implements ProfileAgentsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ProfileAgentsService service; + + /** + * The service client containing this operation class. + */ + private final CdnManagementClientImpl client; + + /** + * Initializes an instance of ProfileAgentsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ProfileAgentsClientImpl(CdnManagementClientImpl client) { + this.service + = RestProxy.create(ProfileAgentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for CdnManagementClientProfileAgents to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "CdnManagementClientProfileAgents") + public interface ProfileAgentsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/agents/{agentName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, + @PathParam("agentName") String agentName, @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/agents/{agentName}") + @ExpectedResponses({ 200, 201, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, + @PathParam("agentName") String agentName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ProfileAgentInner profileAgent, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/agents/{agentName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, + @PathParam("agentName") String agentName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") ProfileAgentUpdateParameters profileAgentUpdateParameters, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/agents/{agentName}") + @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, + @PathParam("agentName") String agentName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/agents") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + 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); + + @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 an agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 agent link (web agent association) within a CDN profile along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, String profileName, + String agentName) { + 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 (agentName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, agentName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets an agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 agent link (web agent association) within a CDN profile along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String profileName, + String agentName, 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 (agentName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, agentName, accept, context); + } + + /** + * Gets an agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 agent link (web agent association) within a CDN profile on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String profileName, String agentName) { + return getWithResponseAsync(resourceGroupName, profileName, agentName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets an agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 agent link (web agent association) within a CDN profile along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String profileName, String agentName, + Context context) { + return getWithResponseAsync(resourceGroupName, profileName, agentName, context).block(); + } + + /** + * Gets an agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 agent link (web agent association) within a CDN profile. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ProfileAgentInner get(String resourceGroupName, String profileName, String agentName) { + return getWithResponse(resourceGroupName, profileName, agentName, Context.NONE).getValue(); + } + + /** + * Creates or updates an agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param profileAgent Profile agent association properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 agent link (web agent association) within a CDN profile along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String profileName, String agentName, ProfileAgentInner profileAgent) { + 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 (agentName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentName is required and cannot be null.")); + } + if (profileAgent == null) { + return Mono.error(new IllegalArgumentException("Parameter profileAgent is required and cannot be null.")); + } else { + profileAgent.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, agentName, contentType, accept, + profileAgent, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates an agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param profileAgent Profile agent association properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 agent link (web agent association) within a CDN profile along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String profileName, String agentName, ProfileAgentInner profileAgent, 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 (agentName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentName is required and cannot be null.")); + } + if (profileAgent == null) { + return Mono.error(new IllegalArgumentException("Parameter profileAgent is required and cannot be null.")); + } else { + profileAgent.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, agentName, contentType, accept, + profileAgent, context); + } + + /** + * Creates or updates an agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param profileAgent Profile agent association properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 an agent link (web agent association) within a CDN profile. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, ProfileAgentInner> beginCreateOrUpdateAsync( + String resourceGroupName, String profileName, String agentName, ProfileAgentInner profileAgent) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, profileName, agentName, profileAgent); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ProfileAgentInner.class, ProfileAgentInner.class, this.client.getContext()); + } + + /** + * Creates or updates an agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param profileAgent Profile agent association properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 an agent link (web agent association) within a CDN profile. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ProfileAgentInner> beginCreateOrUpdateAsync( + String resourceGroupName, String profileName, String agentName, ProfileAgentInner profileAgent, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, profileName, agentName, profileAgent, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ProfileAgentInner.class, ProfileAgentInner.class, context); + } + + /** + * Creates or updates an agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param profileAgent Profile agent association properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an agent link (web agent association) within a CDN profile. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ProfileAgentInner> beginCreateOrUpdate(String resourceGroupName, + String profileName, String agentName, ProfileAgentInner profileAgent) { + return this.beginCreateOrUpdateAsync(resourceGroupName, profileName, agentName, profileAgent).getSyncPoller(); + } + + /** + * Creates or updates an agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param profileAgent Profile agent association properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an agent link (web agent association) within a CDN profile. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ProfileAgentInner> beginCreateOrUpdate(String resourceGroupName, + String profileName, String agentName, ProfileAgentInner profileAgent, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, profileName, agentName, profileAgent, context) + .getSyncPoller(); + } + + /** + * Creates or updates an agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param profileAgent Profile agent association properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 agent link (web agent association) within a CDN profile on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync(String resourceGroupName, String profileName, String agentName, + ProfileAgentInner profileAgent) { + return beginCreateOrUpdateAsync(resourceGroupName, profileName, agentName, profileAgent).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates an agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param profileAgent Profile agent association properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 agent link (web agent association) within a CDN profile on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String profileName, String agentName, + ProfileAgentInner profileAgent, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, profileName, agentName, profileAgent, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates an agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param profileAgent Profile agent association properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 agent link (web agent association) within a CDN profile. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ProfileAgentInner createOrUpdate(String resourceGroupName, String profileName, String agentName, + ProfileAgentInner profileAgent) { + return createOrUpdateAsync(resourceGroupName, profileName, agentName, profileAgent).block(); + } + + /** + * Creates or updates an agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param profileAgent Profile agent association properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 agent link (web agent association) within a CDN profile. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ProfileAgentInner createOrUpdate(String resourceGroupName, String profileName, String agentName, + ProfileAgentInner profileAgent, Context context) { + return createOrUpdateAsync(resourceGroupName, profileName, agentName, profileAgent, context).block(); + } + + /** + * Updates an existing agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param profileAgentUpdateParameters Profile agent association update properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 agent link (web agent association) within a CDN profile along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> updateWithResponseAsync(String resourceGroupName, String profileName, + String agentName, ProfileAgentUpdateParameters profileAgentUpdateParameters) { + 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 (agentName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentName is required and cannot be null.")); + } + if (profileAgentUpdateParameters == null) { + return Mono.error( + new IllegalArgumentException("Parameter profileAgentUpdateParameters is required and cannot be null.")); + } else { + profileAgentUpdateParameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, agentName, contentType, accept, + profileAgentUpdateParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates an existing agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param profileAgentUpdateParameters Profile agent association update properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 agent link (web agent association) within a CDN profile along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String profileName, + String agentName, ProfileAgentUpdateParameters profileAgentUpdateParameters, 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 (agentName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentName is required and cannot be null.")); + } + if (profileAgentUpdateParameters == null) { + return Mono.error( + new IllegalArgumentException("Parameter profileAgentUpdateParameters is required and cannot be null.")); + } else { + profileAgentUpdateParameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, agentName, contentType, accept, profileAgentUpdateParameters, context); + } + + /** + * Updates an existing agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param profileAgentUpdateParameters Profile agent association update properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 an agent link (web agent association) within a CDN profile. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginUpdateAsync(String resourceGroupName, String profileName, + String agentName, ProfileAgentUpdateParameters profileAgentUpdateParameters) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, profileName, agentName, profileAgentUpdateParameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Updates an existing agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param profileAgentUpdateParameters Profile agent association update properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 an agent link (web agent association) within a CDN profile. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginUpdateAsync(String resourceGroupName, String profileName, + String agentName, ProfileAgentUpdateParameters profileAgentUpdateParameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, profileName, agentName, profileAgentUpdateParameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Updates an existing agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param profileAgentUpdateParameters Profile agent association update properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an agent link (web agent association) within a CDN profile. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginUpdate(String resourceGroupName, String profileName, + String agentName, ProfileAgentUpdateParameters profileAgentUpdateParameters) { + return this.beginUpdateAsync(resourceGroupName, profileName, agentName, profileAgentUpdateParameters) + .getSyncPoller(); + } + + /** + * Updates an existing agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param profileAgentUpdateParameters Profile agent association update properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an agent link (web agent association) within a CDN profile. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginUpdate(String resourceGroupName, String profileName, + String agentName, ProfileAgentUpdateParameters profileAgentUpdateParameters, Context context) { + return this.beginUpdateAsync(resourceGroupName, profileName, agentName, profileAgentUpdateParameters, context) + .getSyncPoller(); + } + + /** + * Updates an existing agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param profileAgentUpdateParameters Profile agent association update properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 agent link (web agent association) within a CDN profile on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateAsync(String resourceGroupName, String profileName, String agentName, + ProfileAgentUpdateParameters profileAgentUpdateParameters) { + return beginUpdateAsync(resourceGroupName, profileName, agentName, profileAgentUpdateParameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates an existing agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param profileAgentUpdateParameters Profile agent association update properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 agent link (web agent association) within a CDN profile on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String profileName, String agentName, + ProfileAgentUpdateParameters profileAgentUpdateParameters, Context context) { + return beginUpdateAsync(resourceGroupName, profileName, agentName, profileAgentUpdateParameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates an existing agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param profileAgentUpdateParameters Profile agent association update properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 update(String resourceGroupName, String profileName, String agentName, + ProfileAgentUpdateParameters profileAgentUpdateParameters) { + updateAsync(resourceGroupName, profileName, agentName, profileAgentUpdateParameters).block(); + } + + /** + * Updates an existing agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param profileAgentUpdateParameters Profile agent association update properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 update(String resourceGroupName, String profileName, String agentName, + ProfileAgentUpdateParameters profileAgentUpdateParameters, Context context) { + updateAsync(resourceGroupName, profileName, agentName, profileAgentUpdateParameters, context).block(); + } + + /** + * Deletes an existing agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> deleteWithResponseAsync(String resourceGroupName, String profileName, + String agentName) { + 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 (agentName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, agentName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes an existing agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String profileName, + String agentName, 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 (agentName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentName is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, agentName, context); + } + + /** + * Deletes an existing agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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) + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String profileName, + String agentName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, profileName, agentName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes an existing agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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, + String agentName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, profileName, agentName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes an existing agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String profileName, + String agentName) { + return this.beginDeleteAsync(resourceGroupName, profileName, agentName).getSyncPoller(); + } + + /** + * Deletes an existing agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String profileName, + String agentName, Context context) { + return this.beginDeleteAsync(resourceGroupName, profileName, agentName, context).getSyncPoller(); + } + + /** + * Deletes an existing agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String profileName, String agentName) { + return beginDeleteAsync(resourceGroupName, profileName, agentName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes an existing agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 agentName, Context context) { + return beginDeleteAsync(resourceGroupName, profileName, agentName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes an existing agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 agentName) { + deleteAsync(resourceGroupName, profileName, agentName).block(); + } + + /** + * Deletes an existing agent link (web agent association) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param agentName Name of the web agent association. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 agentName, Context context) { + deleteAsync(resourceGroupName, profileName, agentName, context).block(); + } + + /** + * Lists all agent links (web agent associations) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ProfileAgent list operation 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 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())); + } + + /** + * Lists all agent links (web agent associations) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ProfileAgent list operation 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 accept = "application/json"; + context = this.client.mergeContext(context); + return 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)); + } + + /** + * Lists all agent links (web agent associations) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ProfileAgent list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByProfileAsync(String resourceGroupName, String profileName) { + return new PagedFlux<>(() -> listByProfileSinglePageAsync(resourceGroupName, profileName), + nextLink -> listByProfileNextSinglePageAsync(nextLink)); + } + + /** + * Lists all agent links (web agent associations) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ProfileAgent list operation 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)); + } + + /** + * Lists all agent links (web agent associations) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ProfileAgent list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByProfile(String resourceGroupName, String profileName) { + return new PagedIterable<>(listByProfileAsync(resourceGroupName, profileName)); + } + + /** + * Lists all agent links (web agent associations) within a CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ProfileAgent list operation 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)); + } + + /** + * 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 the response of a ProfileAgent list operation 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)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ProfileAgent list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @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.")); + } + 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)); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/ProfilesClientImpl.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/ProfilesClientImpl.java index 4dedae25a913..c396cb1ac71f 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/ProfilesClientImpl.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/ProfilesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.implementation; @@ -40,11 +40,12 @@ import com.azure.resourcemanager.cdn.fluent.models.ResourceUsageInner; import com.azure.resourcemanager.cdn.fluent.models.SsoUriInner; import com.azure.resourcemanager.cdn.fluent.models.SupportedOptimizationTypesListResultInner; +import com.azure.resourcemanager.cdn.implementation.models.ProfileListResult; +import com.azure.resourcemanager.cdn.implementation.models.ResourceUsageListResult; import com.azure.resourcemanager.cdn.models.CanMigrateParameters; +import com.azure.resourcemanager.cdn.models.CdnMigrationToAfdParameters; import com.azure.resourcemanager.cdn.models.MigrationParameters; -import com.azure.resourcemanager.cdn.models.ProfileListResult; import com.azure.resourcemanager.cdn.models.ProfileUpdateParameters; -import com.azure.resourcemanager.cdn.models.ResourceUsageListResult; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; @@ -81,99 +82,78 @@ public final class ProfilesClientImpl implements InnerSupportsGet, * The interface defining all the services for CdnManagementClientProfiles to be used by the proxy service to * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "CdnManagementClientP") + @Host("{endpoint}") + @ServiceInterface(name = "CdnManagementClientProfiles") public interface ProfilesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/profiles") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ProfileInner profile, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ProfileInner profile, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ProfileUpdateParameters profileUpdateParameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ProfileUpdateParameters profileUpdateParameters, 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.Cdn/profiles/{profileName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("subscriptionId") String subscriptionId, @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.Cdn/canMigrate") - @ExpectedResponses({ 200, 202 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> canMigrate(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CanMigrateParameters canMigrateParameters, - @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" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/migrate") - @ExpectedResponses({ 200, 202 }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/profiles") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> migrate(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") MigrationParameters migrationParameters, + 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" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/migrationCommit") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> migrationCommit(@HostParam("$host") String endpoint, + Mono>> migrationCommit(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("subscriptionId") String subscriptionId, @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.Cdn/profiles/{profileName}/generateSsoUri") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> generateSsoUri(@HostParam("$host") String endpoint, + Mono> generateSsoUri(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -181,54 +161,106 @@ Mono> generateSsoUri(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listSupportedOptimizationTypes( - @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("profileName") String profileName, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @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" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/checkResourceUsage") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listResourceUsage(@HostParam("$host") String endpoint, + Mono> listResourceUsage(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/cdnCanMigrateToAfd") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + Mono>> cdnCanMigrateToAfd(@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); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/cdnMigrateToAfd") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> cdnMigrateToAfd(@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") CdnMigrationToAfdParameters migrationParameters, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/migrationAbort") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> migrationAbort(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/canMigrate") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> canMigrate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") CanMigrateParameters canMigrateParameters, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/migrate") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> migrate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") MigrationParameters migrationParameters, 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); + @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); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listResourceUsageNext( - @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 Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within an Azure - * subscription. + * Gets an Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name + * under the specified subscription and resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 profiles along with {@link PagedResponse} on successful completion of + * @return an Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name + * under the specified subscription and resource group along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { + public 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.")); @@ -237,28 +269,38 @@ private Mono> listSinglePageAsync() { 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 accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .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())); } /** - * Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within an Azure - * subscription. + * Gets an Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name + * under the specified subscription and resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 profiles along with {@link PagedResponse} on successful completion of + * @return an Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name + * under the specified subscription and resource group along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { + 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.")); @@ -267,343 +309,341 @@ private Mono> listSinglePageAsync(Context context) { 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 accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, accept, context); } /** - * Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within an Azure - * subscription. + * Gets an Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name + * under the specified subscription and resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 profiles as paginated response with {@link PagedFlux}. + * @return an Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name + * under the specified subscription and resource group on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getByResourceGroupAsync(String resourceGroupName, String profileName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, profileName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within an Azure - * subscription. + * Gets an Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name + * under the specified subscription and resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 profiles 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 Azure Front Door Standard, Azure Front Door Premium, and CDN profiles 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 profiles as paginated response with {@link PagedIterable}. + * @return an Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name + * under the specified subscription and resource group along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String profileName, + Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, profileName, context).block(); } /** - * Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within an Azure - * subscription. + * Gets an Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile 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 profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 profiles as paginated response with {@link PagedIterable}. + * @return an Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name + * under the specified subscription and resource group. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public ProfileInner getByResourceGroup(String resourceGroupName, String profileName) { + return getByResourceGroupWithResponse(resourceGroupName, profileName, Context.NONE).getValue(); } /** - * Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within a resource group. + * Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a profile 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 profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param profile Profile properties needed to create a new profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 profiles along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a profile is a logical grouping of endpoints that share the same settings along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + public Mono>> createWithResponseAsync(String resourceGroupName, String profileName, + ProfileInner profile) { 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 (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + if (profileName == null) { + return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); + } + if (profile == null) { + return Mono.error(new IllegalArgumentException("Parameter profile is required and cannot be null.")); + } else { + profile.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, contentType, accept, profile, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within a resource group. + * Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a profile 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 profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param profile Profile properties needed to create a new 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 result of the request to list profiles along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a profile is a logical grouping of endpoints that share the same settings along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { + private Mono>> createWithResponseAsync(String resourceGroupName, String profileName, + ProfileInner profile, 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 (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + if (profileName == null) { + return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); + } + if (profile == null) { + return Mono.error(new IllegalArgumentException("Parameter profile is required and cannot be null.")); + } else { + profile.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, contentType, accept, profile, context); } /** - * Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within a resource group. + * Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a profile 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 profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param profile Profile properties needed to create a new profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 profiles as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of a profile is a logical grouping of endpoints that share the same + * settings. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, ProfileInner> beginCreateAsync(String resourceGroupName, + String profileName, ProfileInner profile) { + Mono>> mono = createWithResponseAsync(resourceGroupName, profileName, profile); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ProfileInner.class, ProfileInner.class, this.client.getContext()); } /** - * Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within a resource group. + * Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a profile 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 profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param profile Profile properties needed to create a new 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 result of the request to list profiles as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of a profile is a logical grouping of endpoints that share the same + * settings. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ProfileInner> beginCreateAsync(String resourceGroupName, + String profileName, ProfileInner profile, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createWithResponseAsync(resourceGroupName, profileName, profile, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ProfileInner.class, ProfileInner.class, context); } /** - * Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within a resource group. + * Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a profile 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 profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param profile Profile properties needed to create a new profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 profiles as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of a profile is a logical grouping of endpoints that share the same + * settings. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ProfileInner> beginCreate(String resourceGroupName, String profileName, + ProfileInner profile) { + return this.beginCreateAsync(resourceGroupName, profileName, profile).getSyncPoller(); } /** - * Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within a resource group. + * Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a profile 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 profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param profile Profile properties needed to create a new 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 result of the request to list profiles as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of a profile is a logical grouping of endpoints that share the same + * settings. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ProfileInner> beginCreate(String resourceGroupName, String profileName, + ProfileInner profile, Context context) { + return this.beginCreateAsync(resourceGroupName, profileName, profile, context).getSyncPoller(); } /** - * Gets an Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name - * under the specified subscription and resource group. + * Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a profile 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 profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. + * @param profile Profile properties needed to create a new profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name - * under the specified subscription and resource group along with {@link Response} on successful completion of + * @return a profile is a logical grouping of endpoints that share the same settings on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public 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 (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 (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, - profileName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + public Mono createAsync(String resourceGroupName, String profileName, ProfileInner profile) { + return beginCreateAsync(resourceGroupName, profileName, profile).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets an Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name - * under the specified subscription and resource group. + * Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a profile 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 profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. + * @param profile Profile properties needed to create a new 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 an Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name - * under the specified subscription and resource group along with {@link Response} on successful completion of + * @return a profile is a logical grouping of endpoints that share the same settings 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 (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 (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, profileName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); + private Mono createAsync(String resourceGroupName, String profileName, ProfileInner profile, + Context context) { + return beginCreateAsync(resourceGroupName, profileName, profile, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets an Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name - * under the specified subscription and resource group. + * Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a profile 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 profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. + * @param profile Profile properties needed to create a new profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name - * under the specified subscription and resource group on successful completion of {@link Mono}. + * @return a profile is a logical grouping of endpoints that share the same settings. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getByResourceGroupAsync(String resourceGroupName, String profileName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, profileName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public ProfileInner create(String resourceGroupName, String profileName, ProfileInner profile) { + return createAsync(resourceGroupName, profileName, profile).block(); } /** - * Gets an Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name - * under the specified subscription and resource group. + * Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a profile 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 profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. + * @param profile Profile properties needed to create a new 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 an Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name - * under the specified subscription and resource group along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String profileName, - Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, profileName, context).block(); - } - - /** - * Gets an Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name - * under the specified subscription and resource group. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is - * unique within the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name - * under the specified subscription and resource group. + * @return a profile is a logical grouping of endpoints that share the same settings. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ProfileInner getByResourceGroup(String resourceGroupName, String profileName) { - return getByResourceGroupWithResponse(resourceGroupName, profileName, Context.NONE).getValue(); + public ProfileInner create(String resourceGroupName, String profileName, ProfileInner profile, Context context) { + return createAsync(resourceGroupName, profileName, profile, context).block(); } /** - * Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a profile name under the - * specified subscription and resource group. + * Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified + * profile 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 profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. - * @param profile Profile properties needed to create a new profile. + * @param profileUpdateParameters Profile properties needed to update an existing profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -611,12 +651,16 @@ public ProfileInner getByResourceGroup(String resourceGroupName, String profileN * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createWithResponseAsync(String resourceGroupName, String profileName, - ProfileInner profile) { + public Mono>> updateWithResponseAsync(String resourceGroupName, String profileName, + ProfileUpdateParameters profileUpdateParameters) { 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.")); @@ -624,30 +668,29 @@ public Mono>> createWithResponseAsync(String resourceG 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 (profile == null) { - return Mono.error(new IllegalArgumentException("Parameter profile is required and cannot be null.")); + if (profileUpdateParameters == null) { + return Mono.error( + new IllegalArgumentException("Parameter profileUpdateParameters is required and cannot be null.")); } else { - profile.validate(); + profileUpdateParameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), resourceGroupName, profileName, - this.client.getSubscriptionId(), this.client.getApiVersion(), profile, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, contentType, accept, + profileUpdateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a profile name under the - * specified subscription and resource group. + * Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified + * profile 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 profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. - * @param profile Profile properties needed to create a new profile. + * @param profileUpdateParameters Profile properties needed to update an existing 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. @@ -656,12 +699,16 @@ public Mono>> createWithResponseAsync(String resourceG * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String profileName, - ProfileInner profile, Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String profileName, + ProfileUpdateParameters profileUpdateParameters, 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.")); @@ -669,29 +716,27 @@ private Mono>> createWithResponseAsync(String resource 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 (profile == null) { - return Mono.error(new IllegalArgumentException("Parameter profile is required and cannot be null.")); + if (profileUpdateParameters == null) { + return Mono.error( + new IllegalArgumentException("Parameter profileUpdateParameters is required and cannot be null.")); } else { - profile.validate(); + profileUpdateParameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), resourceGroupName, profileName, - this.client.getSubscriptionId(), this.client.getApiVersion(), profile, accept, context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, contentType, accept, profileUpdateParameters, context); } /** - * Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a profile name under the - * specified subscription and resource group. + * Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified + * profile 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 profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. - * @param profile Profile properties needed to create a new profile. + * @param profileUpdateParameters Profile properties needed to update an existing profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -699,21 +744,22 @@ private Mono>> createWithResponseAsync(String resource * settings. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ProfileInner> beginCreateAsync(String resourceGroupName, - String profileName, ProfileInner profile) { - Mono>> mono = createWithResponseAsync(resourceGroupName, profileName, profile); + public PollerFlux, ProfileInner> beginUpdateAsync(String resourceGroupName, + String profileName, ProfileUpdateParameters profileUpdateParameters) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, profileName, profileUpdateParameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), ProfileInner.class, ProfileInner.class, this.client.getContext()); } /** - * Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a profile name under the - * specified subscription and resource group. + * Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified + * profile 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 profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. - * @param profile Profile properties needed to create a new profile. + * @param profileUpdateParameters Profile properties needed to update an existing 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. @@ -722,23 +768,23 @@ public PollerFlux, ProfileInner> beginCreateAsync(Strin * settings. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ProfileInner> beginCreateAsync(String resourceGroupName, - String profileName, ProfileInner profile, Context context) { + private PollerFlux, ProfileInner> beginUpdateAsync(String resourceGroupName, + String profileName, ProfileUpdateParameters profileUpdateParameters, Context context) { context = this.client.mergeContext(context); Mono>> mono - = createWithResponseAsync(resourceGroupName, profileName, profile, context); + = updateWithResponseAsync(resourceGroupName, profileName, profileUpdateParameters, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), ProfileInner.class, ProfileInner.class, context); } /** - * Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a profile name under the - * specified subscription and resource group. + * Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified + * profile 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 profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. - * @param profile Profile properties needed to create a new profile. + * @param profileUpdateParameters Profile properties needed to update an existing profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -746,19 +792,19 @@ private PollerFlux, ProfileInner> beginCreateAsync(Stri * settings. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ProfileInner> beginCreate(String resourceGroupName, String profileName, - ProfileInner profile) { - return this.beginCreateAsync(resourceGroupName, profileName, profile).getSyncPoller(); + public SyncPoller, ProfileInner> beginUpdate(String resourceGroupName, String profileName, + ProfileUpdateParameters profileUpdateParameters) { + return this.beginUpdateAsync(resourceGroupName, profileName, profileUpdateParameters).getSyncPoller(); } /** - * Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a profile name under the - * specified subscription and resource group. + * Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified + * profile 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 profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. - * @param profile Profile properties needed to create a new profile. + * @param profileUpdateParameters Profile properties needed to update an existing 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. @@ -767,19 +813,19 @@ public SyncPoller, ProfileInner> beginCreate(String res * settings. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ProfileInner> beginCreate(String resourceGroupName, String profileName, - ProfileInner profile, Context context) { - return this.beginCreateAsync(resourceGroupName, profileName, profile, context).getSyncPoller(); + public SyncPoller, ProfileInner> beginUpdate(String resourceGroupName, String profileName, + ProfileUpdateParameters profileUpdateParameters, Context context) { + return this.beginUpdateAsync(resourceGroupName, profileName, profileUpdateParameters, context).getSyncPoller(); } /** - * Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a profile name under the - * specified subscription and resource group. + * Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified + * profile 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 profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. - * @param profile Profile properties needed to create a new profile. + * @param profileUpdateParameters Profile properties needed to update an existing profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -787,19 +833,20 @@ public SyncPoller, ProfileInner> beginCreate(String res * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createAsync(String resourceGroupName, String profileName, ProfileInner profile) { - return beginCreateAsync(resourceGroupName, profileName, profile).last() + public Mono updateAsync(String resourceGroupName, String profileName, + ProfileUpdateParameters profileUpdateParameters) { + return beginUpdateAsync(resourceGroupName, profileName, profileUpdateParameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a profile name under the - * specified subscription and resource group. + * Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified + * profile 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 profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. - * @param profile Profile properties needed to create a new profile. + * @param profileUpdateParameters Profile properties needed to update an existing 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. @@ -808,38 +855,39 @@ public Mono createAsync(String resourceGroupName, String profileNa * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String profileName, ProfileInner profile, - Context context) { - return beginCreateAsync(resourceGroupName, profileName, profile, context).last() + private Mono updateAsync(String resourceGroupName, String profileName, + ProfileUpdateParameters profileUpdateParameters, Context context) { + return beginUpdateAsync(resourceGroupName, profileName, profileUpdateParameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a profile name under the - * specified subscription and resource group. + * Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified + * profile 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 profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. - * @param profile Profile properties needed to create a new profile. + * @param profileUpdateParameters Profile properties needed to update an existing profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 profile is a logical grouping of endpoints that share the same settings. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ProfileInner create(String resourceGroupName, String profileName, ProfileInner profile) { - return createAsync(resourceGroupName, profileName, profile).block(); + public ProfileInner update(String resourceGroupName, String profileName, + ProfileUpdateParameters profileUpdateParameters) { + return updateAsync(resourceGroupName, profileName, profileUpdateParameters).block(); } /** - * Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a profile name under the - * specified subscription and resource group. + * Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified + * profile 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 profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. - * @param profile Profile properties needed to create a new profile. + * @param profileUpdateParameters Profile properties needed to update an existing 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. @@ -847,31 +895,34 @@ public ProfileInner create(String resourceGroupName, String profileName, Profile * @return a profile is a logical grouping of endpoints that share the same settings. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ProfileInner create(String resourceGroupName, String profileName, ProfileInner profile, Context context) { - return createAsync(resourceGroupName, profileName, profile, context).block(); + public ProfileInner update(String resourceGroupName, String profileName, + ProfileUpdateParameters profileUpdateParameters, Context context) { + return updateAsync(resourceGroupName, profileName, profileUpdateParameters, context).block(); } /** - * Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified - * profile name under the specified subscription and resource group. + * Deletes an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified + * parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, + * origins and custom domains. * - * @param 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 Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. - * @param profileUpdateParameters Profile properties needed to update an existing profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 profile is a logical grouping of endpoints that share the same settings along with {@link Response} on - * successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> updateWithResponseAsync(String resourceGroupName, String profileName, - ProfileUpdateParameters profileUpdateParameters) { + public 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.")); @@ -879,45 +930,37 @@ public Mono>> updateWithResponseAsync(String resourceG 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 (profileUpdateParameters == null) { - return Mono.error( - new IllegalArgumentException("Parameter profileUpdateParameters is required and cannot be null.")); - } else { - profileUpdateParameters.validate(); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, profileName, - this.client.getSubscriptionId(), this.client.getApiVersion(), profileUpdateParameters, 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())); } /** - * Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified - * profile name under the specified subscription and resource group. + * Deletes an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified + * parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, + * origins and custom domains. * - * @param 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 Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. - * @param profileUpdateParameters Profile properties needed to update an existing 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 a profile is a logical grouping of endpoints that share the same settings along with {@link Response} on - * successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String profileName, - ProfileUpdateParameters profileUpdateParameters, Context context) { + 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.")); @@ -925,294 +968,500 @@ private Mono>> updateWithResponseAsync(String resource 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 (profileUpdateParameters == null) { - return Mono.error( - new IllegalArgumentException("Parameter profileUpdateParameters is required and cannot be null.")); - } else { - profileUpdateParameters.validate(); - } - final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), resourceGroupName, profileName, - this.client.getSubscriptionId(), this.client.getApiVersion(), profileUpdateParameters, accept, context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, context); } /** - * Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified - * profile name under the specified subscription and resource group. + * Deletes an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified + * parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, + * origins and custom domains. * - * @param 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 Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. - * @param profileUpdateParameters Profile properties needed to update an existing profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 profile is a logical grouping of endpoints that share the same - * settings. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ProfileInner> beginUpdateAsync(String resourceGroupName, - String profileName, ProfileUpdateParameters profileUpdateParameters) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, profileName, profileUpdateParameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ProfileInner.class, ProfileInner.class, this.client.getContext()); + public 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()); } /** - * Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified - * profile name under the specified subscription and resource group. + * Deletes an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified + * parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, + * origins and custom domains. * - * @param 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 Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. - * @param profileUpdateParameters Profile properties needed to update an existing 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 a profile is a logical grouping of endpoints that share the same - * settings. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ProfileInner> beginUpdateAsync(String resourceGroupName, - String profileName, ProfileUpdateParameters profileUpdateParameters, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String profileName, + Context context) { context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, profileName, profileUpdateParameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ProfileInner.class, ProfileInner.class, context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, profileName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified - * profile name under the specified subscription and resource group. + * Deletes an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified + * parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, + * origins and custom domains. * - * @param 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 Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. - * @param profileUpdateParameters Profile properties needed to update an existing profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of a profile is a logical grouping of endpoints that share the same - * settings. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ProfileInner> beginUpdate(String resourceGroupName, String profileName, - ProfileUpdateParameters profileUpdateParameters) { - return this.beginUpdateAsync(resourceGroupName, profileName, profileUpdateParameters).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String profileName) { + return this.beginDeleteAsync(resourceGroupName, profileName).getSyncPoller(); } /** - * Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified - * profile name under the specified subscription and resource group. + * Deletes an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified + * parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, + * origins and custom domains. * - * @param 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 Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. - * @param profileUpdateParameters Profile properties needed to update an existing 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 SyncPoller} for polling of a profile is a logical grouping of endpoints that share the same - * settings. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ProfileInner> beginUpdate(String resourceGroupName, String profileName, - ProfileUpdateParameters profileUpdateParameters, Context context) { - return this.beginUpdateAsync(resourceGroupName, profileName, profileUpdateParameters, context).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String profileName, + Context context) { + return this.beginDeleteAsync(resourceGroupName, profileName, context).getSyncPoller(); } /** - * Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified - * profile name under the specified subscription and resource group. + * Deletes an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified + * parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, + * origins and custom domains. * - * @param 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 Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. - * @param profileUpdateParameters Profile properties needed to update an existing profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 profile is a logical grouping of endpoints that share the same settings on successful completion of - * {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String profileName, - ProfileUpdateParameters profileUpdateParameters) { - return beginUpdateAsync(resourceGroupName, profileName, profileUpdateParameters).last() - .flatMap(this.client::getLroFinalResultOrError); + public Mono deleteAsync(String resourceGroupName, String profileName) { + return beginDeleteAsync(resourceGroupName, profileName).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified - * profile name under the specified subscription and resource group. + * Deletes an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified + * parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, + * origins and custom domains. * - * @param 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 Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. - * @param profileUpdateParameters Profile properties needed to update an existing 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 a profile is a logical grouping of endpoints that share the same settings on successful completion of - * {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String profileName, - ProfileUpdateParameters profileUpdateParameters, Context context) { - return beginUpdateAsync(resourceGroupName, profileName, profileUpdateParameters, context).last() + private Mono deleteAsync(String resourceGroupName, String profileName, Context context) { + return beginDeleteAsync(resourceGroupName, profileName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified - * profile name under the specified subscription and resource group. + * Deletes an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified + * parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, + * origins and custom domains. * - * @param 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 Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. - * @param profileUpdateParameters Profile properties needed to update an existing profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 profile is a logical grouping of endpoints that share the same settings. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ProfileInner update(String resourceGroupName, String profileName, - ProfileUpdateParameters profileUpdateParameters) { - return updateAsync(resourceGroupName, profileName, profileUpdateParameters).block(); + public void delete(String resourceGroupName, String profileName) { + deleteAsync(resourceGroupName, profileName).block(); } /** - * Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified - * profile name under the specified subscription and resource group. + * Deletes an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified + * parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, + * origins and custom domains. * - * @param 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 Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. - * @param profileUpdateParameters Profile properties needed to update an existing 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 a profile is a logical grouping of endpoints that share the same settings. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ProfileInner update(String resourceGroupName, String profileName, - ProfileUpdateParameters profileUpdateParameters, Context context) { - return updateAsync(resourceGroupName, profileName, profileUpdateParameters, context).block(); + public void delete(String resourceGroupName, String profileName, Context context) { + deleteAsync(resourceGroupName, profileName, context).block(); } /** - * Deletes an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified - * parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, - * origins and custom domains. + * Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within a resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is - * unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response of a Profile list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync(String resourceGroupName, String profileName) { + 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 (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.")); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, profileName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified - * parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, - * origins and custom domains. + * Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within a resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is - * unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @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 of a Profile list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String profileName, + 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 (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.")); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), resourceGroupName, profileName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); + return service + .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Deletes an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified - * parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, - * origins and custom domains. + * Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within a resource group. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is - * unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response of a Profile list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String profileName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, profileName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles 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 the response of a Profile list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles 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 the response of a Profile list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles 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 the response of a Profile list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles 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 the response of a Profile list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles 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 the response of a Profile list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles 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 the response of a Profile list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles 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 the response of a Profile list operation 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 Azure Front Door Standard, Azure Front Door Premium, and CDN profiles 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 the response of a Profile list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles 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 the response of a Profile list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Commit the migrated Azure Frontdoor(Standard/Premium) profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> migrationCommitWithResponseAsync(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.")); + } + return FluxUtil + .withContext(context -> service.migrationCommit(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Commit the migrated Azure Frontdoor(Standard/Premium) profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> migrationCommitWithResponseAsync(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.")); + } + context = this.client.mergeContext(context); + return service.migrationCommit(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, context); + } + + /** + * Commit the migrated Azure Frontdoor(Standard/Premium) profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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) + public PollerFlux, Void> beginMigrationCommitAsync(String resourceGroupName, String profileName) { + Mono>> mono = migrationCommitWithResponseAsync(resourceGroupName, profileName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Deletes an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified - * parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, - * origins and custom domains. + * Commit the migrated Azure Frontdoor(Standard/Premium) profile. * - * @param 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 Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. * @param context The context to associate with this operation. @@ -1222,20 +1471,19 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String profileName, + private PollerFlux, Void> beginMigrationCommitAsync(String resourceGroupName, String profileName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, profileName, context); + Mono>> mono + = migrationCommitWithResponseAsync(resourceGroupName, profileName, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } /** - * Deletes an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified - * parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, - * origins and custom domains. + * Commit the migrated Azure Frontdoor(Standard/Premium) profile. * - * @param 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 Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1244,193 +1492,609 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String profileName) { - return this.beginDeleteAsync(resourceGroupName, profileName).getSyncPoller(); + public SyncPoller, Void> beginMigrationCommit(String resourceGroupName, String profileName) { + return this.beginMigrationCommitAsync(resourceGroupName, profileName).getSyncPoller(); + } + + /** + * Commit the migrated Azure Frontdoor(Standard/Premium) profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginMigrationCommit(String resourceGroupName, String profileName, + Context context) { + return this.beginMigrationCommitAsync(resourceGroupName, profileName, context).getSyncPoller(); + } + + /** + * Commit the migrated Azure Frontdoor(Standard/Premium) profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono migrationCommitAsync(String resourceGroupName, String profileName) { + return beginMigrationCommitAsync(resourceGroupName, profileName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Commit the migrated Azure Frontdoor(Standard/Premium) profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 migrationCommitAsync(String resourceGroupName, String profileName, Context context) { + return beginMigrationCommitAsync(resourceGroupName, profileName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Commit the migrated Azure Frontdoor(Standard/Premium) profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 migrationCommit(String resourceGroupName, String profileName) { + migrationCommitAsync(resourceGroupName, profileName).block(); + } + + /** + * Commit the migrated Azure Frontdoor(Standard/Premium) profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 migrationCommit(String resourceGroupName, String profileName, Context context) { + migrationCommitAsync(resourceGroupName, profileName, context).block(); + } + + /** + * Generates a dynamic SSO URI used to sign in to the CDN supplemental portal. Supplemental portal is used to + * configure advanced feature capabilities that are not yet available in the Azure portal, such as core reports in a + * standard profile; rules engine, advanced HTTP reports, and real-time stats and alerts in a premium profile. The + * SSO URI changes approximately every 10 minutes. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the URI required to login to the supplemental portal from the Azure portal along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> generateSsoUriWithResponseAsync(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 accept = "application/json"; + return FluxUtil + .withContext(context -> service.generateSsoUri(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Generates a dynamic SSO URI used to sign in to the CDN supplemental portal. Supplemental portal is used to + * configure advanced feature capabilities that are not yet available in the Azure portal, such as core reports in a + * standard profile; rules engine, advanced HTTP reports, and real-time stats and alerts in a premium profile. The + * SSO URI changes approximately every 10 minutes. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the URI required to login to the supplemental portal from the Azure portal along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> generateSsoUriWithResponseAsync(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 accept = "application/json"; + context = this.client.mergeContext(context); + return service.generateSsoUri(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, accept, context); + } + + /** + * Generates a dynamic SSO URI used to sign in to the CDN supplemental portal. Supplemental portal is used to + * configure advanced feature capabilities that are not yet available in the Azure portal, such as core reports in a + * standard profile; rules engine, advanced HTTP reports, and real-time stats and alerts in a premium profile. The + * SSO URI changes approximately every 10 minutes. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the URI required to login to the supplemental portal from the Azure portal on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono generateSsoUriAsync(String resourceGroupName, String profileName) { + return generateSsoUriWithResponseAsync(resourceGroupName, profileName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Generates a dynamic SSO URI used to sign in to the CDN supplemental portal. Supplemental portal is used to + * configure advanced feature capabilities that are not yet available in the Azure portal, such as core reports in a + * standard profile; rules engine, advanced HTTP reports, and real-time stats and alerts in a premium profile. The + * SSO URI changes approximately every 10 minutes. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the URI required to login to the supplemental portal from the Azure portal along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response generateSsoUriWithResponse(String resourceGroupName, String profileName, + Context context) { + return generateSsoUriWithResponseAsync(resourceGroupName, profileName, context).block(); + } + + /** + * Generates a dynamic SSO URI used to sign in to the CDN supplemental portal. Supplemental portal is used to + * configure advanced feature capabilities that are not yet available in the Azure portal, such as core reports in a + * standard profile; rules engine, advanced HTTP reports, and real-time stats and alerts in a premium profile. The + * SSO URI changes approximately every 10 minutes. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the URI required to login to the supplemental portal from the Azure portal. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SsoUriInner generateSsoUri(String resourceGroupName, String profileName) { + return generateSsoUriWithResponse(resourceGroupName, profileName, Context.NONE).getValue(); + } + + /** + * Gets the supported optimization types for the current profile. A user can create an endpoint with an optimization + * type from the listed values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the supported optimization types for the current profile along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> + listSupportedOptimizationTypesWithResponseAsync(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 accept = "application/json"; + return FluxUtil + .withContext(context -> service.listSupportedOptimizationTypes(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, profileName, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the supported optimization types for the current profile. A user can create an endpoint with an optimization + * type from the listed values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the supported optimization types for the current profile along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listSupportedOptimizationTypesWithResponseAsync(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 accept = "application/json"; + context = this.client.mergeContext(context); + return service.listSupportedOptimizationTypes(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, accept, context); + } + + /** + * Gets the supported optimization types for the current profile. A user can create an endpoint with an optimization + * type from the listed values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the supported optimization types for the current profile on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listSupportedOptimizationTypesAsync(String resourceGroupName, + String profileName) { + return listSupportedOptimizationTypesWithResponseAsync(resourceGroupName, profileName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the supported optimization types for the current profile. A user can create an endpoint with an optimization + * type from the listed values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the supported optimization types for the current profile along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response + listSupportedOptimizationTypesWithResponse(String resourceGroupName, String profileName, Context context) { + return listSupportedOptimizationTypesWithResponseAsync(resourceGroupName, profileName, context).block(); + } + + /** + * Gets the supported optimization types for the current profile. A user can create an endpoint with an optimization + * type from the listed values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the supported optimization types for the current profile. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SupportedOptimizationTypesListResultInner listSupportedOptimizationTypes(String resourceGroupName, + String profileName) { + return listSupportedOptimizationTypesWithResponse(resourceGroupName, profileName, Context.NONE).getValue(); + } + + /** + * Checks the quota and actual usage of endpoints under the given Azure Front Door Standard or Azure Front Door + * Premium or CDN profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 resource usage API along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listResourceUsageSinglePageAsync(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 accept = "application/json"; + return FluxUtil + .withContext(context -> service.listResourceUsage(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())); } /** - * Deletes an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified - * parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, - * origins and custom domains. + * Checks the quota and actual usage of endpoints under the given Azure Front Door Standard or Azure Front Door + * Premium or CDN profile. * - * @param 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 Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return output of check resource usage API along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String profileName, - Context context) { - return this.beginDeleteAsync(resourceGroupName, profileName, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listResourceUsageSinglePageAsync(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 accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listResourceUsage(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)); } /** - * Deletes an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified - * parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, - * origins and custom domains. + * Checks the quota and actual usage of endpoints under the given Azure Front Door Standard or Azure Front Door + * Premium or CDN profile. * - * @param 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 Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return output of check resource usage API as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String profileName) { - return beginDeleteAsync(resourceGroupName, profileName).last().flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listResourceUsageAsync(String resourceGroupName, String profileName) { + return new PagedFlux<>(() -> listResourceUsageSinglePageAsync(resourceGroupName, profileName), + nextLink -> listResourceUsageNextSinglePageAsync(nextLink)); } /** - * Deletes an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified - * parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, - * origins and custom domains. + * Checks the quota and actual usage of endpoints under the given Azure Front Door Standard or Azure Front Door + * Premium or CDN profile. * - * @param 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 Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return output of check resource usage API as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String profileName, Context context) { - return beginDeleteAsync(resourceGroupName, profileName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listResourceUsageAsync(String resourceGroupName, String profileName, + Context context) { + return new PagedFlux<>(() -> listResourceUsageSinglePageAsync(resourceGroupName, profileName, context), + nextLink -> listResourceUsageNextSinglePageAsync(nextLink, context)); } /** - * Deletes an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified - * parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, - * origins and custom domains. + * Checks the quota and actual usage of endpoints under the given Azure Front Door Standard or Azure Front Door + * Premium or CDN profile. * - * @param 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 Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 resource usage API as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String profileName) { - deleteAsync(resourceGroupName, profileName).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listResourceUsage(String resourceGroupName, String profileName) { + return new PagedIterable<>(listResourceUsageAsync(resourceGroupName, profileName)); } /** - * Deletes an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified - * parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, - * origins and custom domains. + * Checks the quota and actual usage of endpoints under the given Azure Front Door Standard or Azure Front Door + * Premium or CDN profile. * - * @param 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 Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is * unique within the resource group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 resource usage API as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String profileName, Context context) { - deleteAsync(resourceGroupName, profileName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listResourceUsage(String resourceGroupName, String profileName, + Context context) { + return new PagedIterable<>(listResourceUsageAsync(resourceGroupName, profileName, context)); } /** * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param canMigrateParameters Properties needed to check if cdn profile or classic frontdoor can be migrated. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 for canMigrate operation along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> canMigrateWithResponseAsync(String resourceGroupName, - CanMigrateParameters canMigrateParameters) { + public Mono>> cdnCanMigrateToAfdWithResponseAsync(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 (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } if (this.client.getSubscriptionId() == null) { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - if (canMigrateParameters == null) { + if (resourceGroupName == null) { return Mono - .error(new IllegalArgumentException("Parameter canMigrateParameters is required and cannot be null.")); - } else { - canMigrateParameters.validate(); + .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 accept = "application/json"; return FluxUtil - .withContext(context -> service.canMigrate(this.client.getEndpoint(), resourceGroupName, - this.client.getSubscriptionId(), this.client.getApiVersion(), canMigrateParameters, accept, context)) + .withContext(context -> service.cdnCanMigrateToAfd(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param canMigrateParameters Properties needed to check if cdn profile or classic frontdoor can be migrated. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 for canMigrate operation along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> canMigrateWithResponseAsync(String resourceGroupName, - CanMigrateParameters canMigrateParameters, Context context) { + private Mono>> cdnCanMigrateToAfdWithResponseAsync(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 (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } if (this.client.getSubscriptionId() == null) { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - if (canMigrateParameters == null) { + if (resourceGroupName == null) { return Mono - .error(new IllegalArgumentException("Parameter canMigrateParameters is required and cannot be null.")); - } else { - canMigrateParameters.validate(); + .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 accept = "application/json"; context = this.client.mergeContext(context); - return service.canMigrate(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), canMigrateParameters, accept, context); + return service.cdnCanMigrateToAfd(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, accept, context); } /** * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param canMigrateParameters Properties needed to check if cdn profile or classic frontdoor can be migrated. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 result for canMigrate operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, CanMigrateResultInner> - beginCanMigrateAsync(String resourceGroupName, CanMigrateParameters canMigrateParameters) { - Mono>> mono = canMigrateWithResponseAsync(resourceGroupName, canMigrateParameters); + beginCdnCanMigrateToAfdAsync(String resourceGroupName, String profileName) { + Mono>> mono = cdnCanMigrateToAfdWithResponseAsync(resourceGroupName, profileName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), CanMigrateResultInner.class, CanMigrateResultInner.class, this.client.getContext()); @@ -1439,20 +2103,21 @@ private Mono>> canMigrateWithResponseAsync(String reso /** * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param canMigrateParameters Properties needed to check if cdn profile or classic frontdoor can be migrated. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 result for canMigrate operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, CanMigrateResultInner> - beginCanMigrateAsync(String resourceGroupName, CanMigrateParameters canMigrateParameters, Context context) { + beginCdnCanMigrateToAfdAsync(String resourceGroupName, String profileName, Context context) { context = this.client.mergeContext(context); Mono>> mono - = canMigrateWithResponseAsync(resourceGroupName, canMigrateParameters, context); + = cdnCanMigrateToAfdWithResponseAsync(resourceGroupName, profileName, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), CanMigrateResultInner.class, CanMigrateResultInner.class, context); } @@ -1460,127 +2125,137 @@ private Mono>> canMigrateWithResponseAsync(String reso /** * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param canMigrateParameters Properties needed to check if cdn profile or classic frontdoor can be migrated. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of result for canMigrate operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CanMigrateResultInner> - beginCanMigrate(String resourceGroupName, CanMigrateParameters canMigrateParameters) { - return this.beginCanMigrateAsync(resourceGroupName, canMigrateParameters).getSyncPoller(); + beginCdnCanMigrateToAfd(String resourceGroupName, String profileName) { + return this.beginCdnCanMigrateToAfdAsync(resourceGroupName, profileName).getSyncPoller(); } /** * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param canMigrateParameters Properties needed to check if cdn profile or classic frontdoor can be migrated. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of result for canMigrate operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CanMigrateResultInner> - beginCanMigrate(String resourceGroupName, CanMigrateParameters canMigrateParameters, Context context) { - return this.beginCanMigrateAsync(resourceGroupName, canMigrateParameters, context).getSyncPoller(); + beginCdnCanMigrateToAfd(String resourceGroupName, String profileName, Context context) { + return this.beginCdnCanMigrateToAfdAsync(resourceGroupName, profileName, context).getSyncPoller(); } /** * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param canMigrateParameters Properties needed to check if cdn profile or classic frontdoor can be migrated. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 for canMigrate operation on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono canMigrateAsync(String resourceGroupName, - CanMigrateParameters canMigrateParameters) { - return beginCanMigrateAsync(resourceGroupName, canMigrateParameters).last() + public Mono cdnCanMigrateToAfdAsync(String resourceGroupName, String profileName) { + return beginCdnCanMigrateToAfdAsync(resourceGroupName, profileName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param canMigrateParameters Properties needed to check if cdn profile or classic frontdoor can be migrated. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 for canMigrate operation on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono canMigrateAsync(String resourceGroupName, - CanMigrateParameters canMigrateParameters, Context context) { - return beginCanMigrateAsync(resourceGroupName, canMigrateParameters, context).last() + private Mono cdnCanMigrateToAfdAsync(String resourceGroupName, String profileName, + Context context) { + return beginCdnCanMigrateToAfdAsync(resourceGroupName, profileName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param canMigrateParameters Properties needed to check if cdn profile or classic frontdoor can be migrated. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 for canMigrate operation. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CanMigrateResultInner canMigrate(String resourceGroupName, CanMigrateParameters canMigrateParameters) { - return canMigrateAsync(resourceGroupName, canMigrateParameters).block(); + public CanMigrateResultInner cdnCanMigrateToAfd(String resourceGroupName, String profileName) { + return cdnCanMigrateToAfdAsync(resourceGroupName, profileName).block(); } /** * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param canMigrateParameters Properties needed to check if cdn profile or classic frontdoor can be migrated. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 for canMigrate operation. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CanMigrateResultInner canMigrate(String resourceGroupName, CanMigrateParameters canMigrateParameters, - Context context) { - return canMigrateAsync(resourceGroupName, canMigrateParameters, context).block(); + public CanMigrateResultInner cdnCanMigrateToAfd(String resourceGroupName, String profileName, Context context) { + return cdnCanMigrateToAfdAsync(resourceGroupName, profileName, context).block(); } /** - * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. + * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. This step prepares the profile for + * migration and will be followed by Commit to finalize the migration. * - * @param 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 Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param migrationParameters Properties needed to migrate the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 for migrate operation along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> migrateWithResponseAsync(String resourceGroupName, - MigrationParameters migrationParameters) { + public Mono>> cdnMigrateToAfdWithResponseAsync(String resourceGroupName, + String profileName, CdnMigrationToAfdParameters migrationParameters) { 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 (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + if (profileName == null) { + return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); } if (migrationParameters == null) { return Mono @@ -1588,38 +2263,46 @@ public Mono>> migrateWithResponseAsync(String resource } else { migrationParameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.migrate(this.client.getEndpoint(), resourceGroupName, - this.client.getSubscriptionId(), this.client.getApiVersion(), migrationParameters, accept, context)) + .withContext(context -> service.cdnMigrateToAfd(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, contentType, accept, + migrationParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. + * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. This step prepares the profile for + * migration and will be followed by Commit to finalize the migration. * - * @param 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 Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param migrationParameters Properties needed to migrate the 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 result for migrate operation along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> migrateWithResponseAsync(String resourceGroupName, - MigrationParameters migrationParameters, Context context) { + private Mono>> cdnMigrateToAfdWithResponseAsync(String resourceGroupName, + String profileName, CdnMigrationToAfdParameters migrationParameters, 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 (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + if (profileName == null) { + return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); } if (migrationParameters == null) { return Mono @@ -1627,167 +2310,203 @@ private Mono>> migrateWithResponseAsync(String resourc } else { migrationParameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.migrate(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), migrationParameters, accept, context); + return service.cdnMigrateToAfd(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, contentType, accept, migrationParameters, + context); } /** - * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. + * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. This step prepares the profile for + * migration and will be followed by Commit to finalize the migration. * - * @param 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 Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param migrationParameters Properties needed to migrate the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 result for migrate operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, MigrateResultInner> beginMigrateAsync(String resourceGroupName, - MigrationParameters migrationParameters) { - Mono>> mono = migrateWithResponseAsync(resourceGroupName, migrationParameters); + public PollerFlux, MigrateResultInner> beginCdnMigrateToAfdAsync( + String resourceGroupName, String profileName, CdnMigrationToAfdParameters migrationParameters) { + Mono>> mono + = cdnMigrateToAfdWithResponseAsync(resourceGroupName, profileName, migrationParameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), MigrateResultInner.class, MigrateResultInner.class, this.client.getContext()); } /** - * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. + * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. This step prepares the profile for + * migration and will be followed by Commit to finalize the migration. * - * @param 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 Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param migrationParameters Properties needed to migrate the 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 result for migrate operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, MigrateResultInner> beginMigrateAsync(String resourceGroupName, - MigrationParameters migrationParameters, Context context) { + private PollerFlux, MigrateResultInner> beginCdnMigrateToAfdAsync( + String resourceGroupName, String profileName, CdnMigrationToAfdParameters migrationParameters, + Context context) { context = this.client.mergeContext(context); Mono>> mono - = migrateWithResponseAsync(resourceGroupName, migrationParameters, context); + = cdnMigrateToAfdWithResponseAsync(resourceGroupName, profileName, migrationParameters, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), MigrateResultInner.class, MigrateResultInner.class, context); } /** - * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. + * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. This step prepares the profile for + * migration and will be followed by Commit to finalize the migration. * - * @param 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 Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param migrationParameters Properties needed to migrate the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of result for migrate operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, MigrateResultInner> beginMigrate(String resourceGroupName, - MigrationParameters migrationParameters) { - return this.beginMigrateAsync(resourceGroupName, migrationParameters).getSyncPoller(); + public SyncPoller, MigrateResultInner> beginCdnMigrateToAfd(String resourceGroupName, + String profileName, CdnMigrationToAfdParameters migrationParameters) { + return this.beginCdnMigrateToAfdAsync(resourceGroupName, profileName, migrationParameters).getSyncPoller(); } /** - * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. + * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. This step prepares the profile for + * migration and will be followed by Commit to finalize the migration. * - * @param 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 Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param migrationParameters Properties needed to migrate the 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 SyncPoller} for polling of result for migrate operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, MigrateResultInner> beginMigrate(String resourceGroupName, - MigrationParameters migrationParameters, Context context) { - return this.beginMigrateAsync(resourceGroupName, migrationParameters, context).getSyncPoller(); + public SyncPoller, MigrateResultInner> beginCdnMigrateToAfd(String resourceGroupName, + String profileName, CdnMigrationToAfdParameters migrationParameters, Context context) { + return this.beginCdnMigrateToAfdAsync(resourceGroupName, profileName, migrationParameters, context) + .getSyncPoller(); } /** - * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. + * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. This step prepares the profile for + * migration and will be followed by Commit to finalize the migration. * - * @param 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 Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param migrationParameters Properties needed to migrate the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 for migrate operation on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono migrateAsync(String resourceGroupName, MigrationParameters migrationParameters) { - return beginMigrateAsync(resourceGroupName, migrationParameters).last() + public Mono cdnMigrateToAfdAsync(String resourceGroupName, String profileName, + CdnMigrationToAfdParameters migrationParameters) { + return beginCdnMigrateToAfdAsync(resourceGroupName, profileName, migrationParameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. + * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. This step prepares the profile for + * migration and will be followed by Commit to finalize the migration. * - * @param 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 Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param migrationParameters Properties needed to migrate the 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 result for migrate operation on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono migrateAsync(String resourceGroupName, MigrationParameters migrationParameters, - Context context) { - return beginMigrateAsync(resourceGroupName, migrationParameters, context).last() + private Mono cdnMigrateToAfdAsync(String resourceGroupName, String profileName, + CdnMigrationToAfdParameters migrationParameters, Context context) { + return beginCdnMigrateToAfdAsync(resourceGroupName, profileName, migrationParameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. + * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. This step prepares the profile for + * migration and will be followed by Commit to finalize the migration. * - * @param 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 Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param migrationParameters Properties needed to migrate the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 for migrate operation. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MigrateResultInner migrate(String resourceGroupName, MigrationParameters migrationParameters) { - return migrateAsync(resourceGroupName, migrationParameters).block(); + public MigrateResultInner cdnMigrateToAfd(String resourceGroupName, String profileName, + CdnMigrationToAfdParameters migrationParameters) { + return cdnMigrateToAfdAsync(resourceGroupName, profileName, migrationParameters).block(); } /** - * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. + * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. This step prepares the profile for + * migration and will be followed by Commit to finalize the migration. * - * @param 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 Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param migrationParameters Properties needed to migrate the 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 result for migrate operation. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MigrateResultInner migrate(String resourceGroupName, MigrationParameters migrationParameters, - Context context) { - return migrateAsync(resourceGroupName, migrationParameters, context).block(); + public MigrateResultInner cdnMigrateToAfd(String resourceGroupName, String profileName, + CdnMigrationToAfdParameters migrationParameters, Context context) { + return cdnMigrateToAfdAsync(resourceGroupName, profileName, migrationParameters, context).block(); } /** - * Commit the migrated Azure Frontdoor(Standard/Premium) profile. + * Abort the migration to Azure Frontdoor Premium/Standard. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> migrationCommitWithResponseAsync(String resourceGroupName, + public Mono>> migrationAbortWithResponseAsync(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.")); @@ -1795,22 +2514,18 @@ public Mono>> migrationCommitWithResponseAsync(String 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.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.migrationCommit(this.client.getEndpoint(), resourceGroupName, profileName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .withContext(context -> service.migrationAbort(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Commit the migrated Azure Frontdoor(Standard/Premium) profile. + * Abort the migration to Azure Frontdoor Premium/Standard. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1818,12 +2533,16 @@ public Mono>> migrationCommitWithResponseAsync(String * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> migrationCommitWithResponseAsync(String resourceGroupName, + private Mono>> migrationAbortWithResponseAsync(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.")); @@ -1831,38 +2550,35 @@ private Mono>> migrationCommitWithResponseAsync(String 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.")); - } - final String accept = "application/json"; context = this.client.mergeContext(context); - return service.migrationCommit(this.client.getEndpoint(), resourceGroupName, profileName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); + return service.migrationAbort(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, context); } /** - * Commit the migrated Azure Frontdoor(Standard/Premium) profile. + * Abort the migration to Azure Frontdoor Premium/Standard. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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) - public PollerFlux, Void> beginMigrationCommitAsync(String resourceGroupName, String profileName) { - Mono>> mono = migrationCommitWithResponseAsync(resourceGroupName, profileName); + public PollerFlux, Void> beginMigrationAbortAsync(String resourceGroupName, String profileName) { + Mono>> mono = migrationAbortWithResponseAsync(resourceGroupName, profileName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Commit the migrated Azure Frontdoor(Standard/Premium) profile. + * Abort the migration to Azure Frontdoor Premium/Standard. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1870,35 +2586,37 @@ public PollerFlux, Void> beginMigrationCommitAsync(String resou * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginMigrationCommitAsync(String resourceGroupName, String profileName, + private PollerFlux, Void> beginMigrationAbortAsync(String resourceGroupName, String profileName, Context context) { context = this.client.mergeContext(context); Mono>> mono - = migrationCommitWithResponseAsync(resourceGroupName, profileName, context); + = migrationAbortWithResponseAsync(resourceGroupName, profileName, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } /** - * Commit the migrated Azure Frontdoor(Standard/Premium) profile. + * Abort the migration to Azure Frontdoor Premium/Standard. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginMigrationCommit(String resourceGroupName, String profileName) { - return this.beginMigrationCommitAsync(resourceGroupName, profileName).getSyncPoller(); + public SyncPoller, Void> beginMigrationAbort(String resourceGroupName, String profileName) { + return this.beginMigrationAbortAsync(resourceGroupName, profileName).getSyncPoller(); } /** - * Commit the migrated Azure Frontdoor(Standard/Premium) profile. + * Abort the migration to Azure Frontdoor Premium/Standard. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1906,32 +2624,34 @@ public SyncPoller, Void> beginMigrationCommit(String resourceGr * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginMigrationCommit(String resourceGroupName, String profileName, + public SyncPoller, Void> beginMigrationAbort(String resourceGroupName, String profileName, Context context) { - return this.beginMigrationCommitAsync(resourceGroupName, profileName, context).getSyncPoller(); + return this.beginMigrationAbortAsync(resourceGroupName, profileName, context).getSyncPoller(); } /** - * Commit the migrated Azure Frontdoor(Standard/Premium) profile. + * Abort the migration to Azure Frontdoor Premium/Standard. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono migrationCommitAsync(String resourceGroupName, String profileName) { - return beginMigrationCommitAsync(resourceGroupName, profileName).last() + public Mono migrationAbortAsync(String resourceGroupName, String profileName) { + return beginMigrationAbortAsync(resourceGroupName, profileName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Commit the migrated Azure Frontdoor(Standard/Premium) profile. + * Abort the migration to Azure Frontdoor Premium/Standard. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1939,56 +2659,55 @@ public Mono migrationCommitAsync(String resourceGroupName, String profileN * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono migrationCommitAsync(String resourceGroupName, String profileName, Context context) { - return beginMigrationCommitAsync(resourceGroupName, profileName, context).last() + private Mono migrationAbortAsync(String resourceGroupName, String profileName, Context context) { + return beginMigrationAbortAsync(resourceGroupName, profileName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Commit the migrated Azure Frontdoor(Standard/Premium) profile. + * Abort the migration to Azure Frontdoor Premium/Standard. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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 migrationCommit(String resourceGroupName, String profileName) { - migrationCommitAsync(resourceGroupName, profileName).block(); + public void migrationAbort(String resourceGroupName, String profileName) { + migrationAbortAsync(resourceGroupName, profileName).block(); } /** - * Commit the migrated Azure Frontdoor(Standard/Premium) profile. + * Abort the migration to Azure Frontdoor Premium/Standard. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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 migrationCommit(String resourceGroupName, String profileName, Context context) { - migrationCommitAsync(resourceGroupName, profileName, context).block(); + public void migrationAbort(String resourceGroupName, String profileName, Context context) { + migrationAbortAsync(resourceGroupName, profileName, context).block(); } /** - * Generates a dynamic SSO URI used to sign in to the CDN supplemental portal. Supplemental portal is used to - * configure advanced feature capabilities that are not yet available in the Azure portal, such as core reports in a - * standard profile; rules engine, advanced HTTP reports, and real-time stats and alerts in a premium profile. The - * SSO URI changes approximately every 10 minutes. + * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param canMigrateParameters Properties needed to check if cdn profile or classic frontdoor can be migrated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the URI required to login to the supplemental portal from the Azure portal along with {@link Response} on - * successful completion of {@link Mono}. + * @return result for canMigrate operation along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> generateSsoUriWithResponseAsync(String resourceGroupName, String profileName) { + public Mono>> canMigrateWithResponseAsync(String resourceGroupName, + CanMigrateParameters canMigrateParameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1997,38 +2716,38 @@ public Mono> generateSsoUriWithResponseAsync(String resour 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 (this.client.getSubscriptionId() == null) { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + if (canMigrateParameters == null) { + return Mono + .error(new IllegalArgumentException("Parameter canMigrateParameters is required and cannot be null.")); + } else { + canMigrateParameters.validate(); + } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.generateSsoUri(this.client.getEndpoint(), resourceGroupName, profileName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .withContext(context -> service.canMigrate(this.client.getEndpoint(), this.client.getApiVersion(), + resourceGroupName, this.client.getSubscriptionId(), contentType, accept, canMigrateParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Generates a dynamic SSO URI used to sign in to the CDN supplemental portal. Supplemental portal is used to - * configure advanced feature capabilities that are not yet available in the Azure portal, such as core reports in a - * standard profile; rules engine, advanced HTTP reports, and real-time stats and alerts in a premium profile. The - * SSO URI changes approximately every 10 minutes. + * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param canMigrateParameters Properties needed to check if cdn profile or classic frontdoor can be migrated. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the URI required to login to the supplemental portal from the Azure portal along with {@link Response} on - * successful completion of {@link Mono}. + * @return result for canMigrate operation along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> generateSsoUriWithResponseAsync(String resourceGroupName, String profileName, - Context context) { + private Mono>> canMigrateWithResponseAsync(String resourceGroupName, + CanMigrateParameters canMigrateParameters, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2037,93 +2756,176 @@ private Mono> generateSsoUriWithResponseAsync(String resou 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 (this.client.getSubscriptionId() == null) { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + if (canMigrateParameters == null) { + return Mono + .error(new IllegalArgumentException("Parameter canMigrateParameters is required and cannot be null.")); + } else { + canMigrateParameters.validate(); + } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.generateSsoUri(this.client.getEndpoint(), resourceGroupName, profileName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); + return service.canMigrate(this.client.getEndpoint(), this.client.getApiVersion(), resourceGroupName, + this.client.getSubscriptionId(), contentType, accept, canMigrateParameters, context); } /** - * Generates a dynamic SSO URI used to sign in to the CDN supplemental portal. Supplemental portal is used to - * configure advanced feature capabilities that are not yet available in the Azure portal, such as core reports in a - * standard profile; rules engine, advanced HTTP reports, and real-time stats and alerts in a premium profile. The - * SSO URI changes approximately every 10 minutes. + * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param canMigrateParameters Properties needed to check if cdn profile or classic frontdoor can be migrated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the URI required to login to the supplemental portal from the Azure portal on successful completion of - * {@link Mono}. + * @return the {@link PollerFlux} for polling of result for canMigrate operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, CanMigrateResultInner> + beginCanMigrateAsync(String resourceGroupName, CanMigrateParameters canMigrateParameters) { + Mono>> mono = canMigrateWithResponseAsync(resourceGroupName, canMigrateParameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), CanMigrateResultInner.class, CanMigrateResultInner.class, + this.client.getContext()); + } + + /** + * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param canMigrateParameters Properties needed to check if cdn profile or classic frontdoor can be migrated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 result for canMigrate operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CanMigrateResultInner> + beginCanMigrateAsync(String resourceGroupName, CanMigrateParameters canMigrateParameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = canMigrateWithResponseAsync(resourceGroupName, canMigrateParameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), CanMigrateResultInner.class, CanMigrateResultInner.class, context); + } + + /** + * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param canMigrateParameters Properties needed to check if cdn profile or classic frontdoor can be migrated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of result for canMigrate operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CanMigrateResultInner> + beginCanMigrate(String resourceGroupName, CanMigrateParameters canMigrateParameters) { + return this.beginCanMigrateAsync(resourceGroupName, canMigrateParameters).getSyncPoller(); + } + + /** + * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param canMigrateParameters Properties needed to check if cdn profile or classic frontdoor can be migrated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of result for canMigrate operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CanMigrateResultInner> + beginCanMigrate(String resourceGroupName, CanMigrateParameters canMigrateParameters, Context context) { + return this.beginCanMigrateAsync(resourceGroupName, canMigrateParameters, context).getSyncPoller(); + } + + /** + * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param canMigrateParameters Properties needed to check if cdn profile or classic frontdoor can be migrated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 for canMigrate operation on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono generateSsoUriAsync(String resourceGroupName, String profileName) { - return generateSsoUriWithResponseAsync(resourceGroupName, profileName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono canMigrateAsync(String resourceGroupName, + CanMigrateParameters canMigrateParameters) { + return beginCanMigrateAsync(resourceGroupName, canMigrateParameters).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Generates a dynamic SSO URI used to sign in to the CDN supplemental portal. Supplemental portal is used to - * configure advanced feature capabilities that are not yet available in the Azure portal, such as core reports in a - * standard profile; rules engine, advanced HTTP reports, and real-time stats and alerts in a premium profile. The - * SSO URI changes approximately every 10 minutes. + * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param canMigrateParameters Properties needed to check if cdn profile or classic frontdoor can be migrated. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the URI required to login to the supplemental portal from the Azure portal along with {@link Response}. + * @return result for canMigrate operation on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response generateSsoUriWithResponse(String resourceGroupName, String profileName, - Context context) { - return generateSsoUriWithResponseAsync(resourceGroupName, profileName, context).block(); + private Mono canMigrateAsync(String resourceGroupName, + CanMigrateParameters canMigrateParameters, Context context) { + return beginCanMigrateAsync(resourceGroupName, canMigrateParameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Generates a dynamic SSO URI used to sign in to the CDN supplemental portal. Supplemental portal is used to - * configure advanced feature capabilities that are not yet available in the Azure portal, such as core reports in a - * standard profile; rules engine, advanced HTTP reports, and real-time stats and alerts in a premium profile. The - * SSO URI changes approximately every 10 minutes. + * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the CDN profile which is unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param canMigrateParameters Properties needed to check if cdn profile or classic frontdoor can be migrated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the URI required to login to the supplemental portal from the Azure portal. + * @return result for canMigrate operation. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SsoUriInner generateSsoUri(String resourceGroupName, String profileName) { - return generateSsoUriWithResponse(resourceGroupName, profileName, Context.NONE).getValue(); + public CanMigrateResultInner canMigrate(String resourceGroupName, CanMigrateParameters canMigrateParameters) { + return canMigrateAsync(resourceGroupName, canMigrateParameters).block(); + } + + /** + * Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param canMigrateParameters Properties needed to check if cdn profile or classic frontdoor can be migrated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 for canMigrate operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CanMigrateResultInner canMigrate(String resourceGroupName, CanMigrateParameters canMigrateParameters, + Context context) { + return canMigrateAsync(resourceGroupName, canMigrateParameters, context).block(); } /** - * Gets the supported optimization types for the current profile. A user can create an endpoint with an optimization - * type from the listed values. + * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is - * unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param migrationParameters Properties needed to migrate the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the supported optimization types for the current profile along with {@link Response} on successful - * completion of {@link Mono}. + * @return result for migrate operation along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> - listSupportedOptimizationTypesWithResponseAsync(String resourceGroupName, String profileName) { + public Mono>> migrateWithResponseAsync(String resourceGroupName, + MigrationParameters migrationParameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2132,37 +2934,38 @@ public SsoUriInner generateSsoUri(String resourceGroupName, String profileName) 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 (this.client.getSubscriptionId() == null) { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + if (migrationParameters == null) { + return Mono + .error(new IllegalArgumentException("Parameter migrationParameters is required and cannot be null.")); + } else { + migrationParameters.validate(); + } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listSupportedOptimizationTypes(this.client.getEndpoint(), resourceGroupName, - profileName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .withContext(context -> service.migrate(this.client.getEndpoint(), this.client.getApiVersion(), + resourceGroupName, this.client.getSubscriptionId(), contentType, accept, migrationParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets the supported optimization types for the current profile. A user can create an endpoint with an optimization - * type from the listed values. + * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is - * unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param migrationParameters Properties needed to migrate the 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 supported optimization types for the current profile along with {@link Response} on successful - * completion of {@link Mono}. + * @return result for migrate operation along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listSupportedOptimizationTypesWithResponseAsync(String resourceGroupName, String profileName, Context context) { + private Mono>> migrateWithResponseAsync(String resourceGroupName, + MigrationParameters migrationParameters, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2171,228 +2974,159 @@ public SsoUriInner generateSsoUri(String resourceGroupName, String profileName) 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 (this.client.getSubscriptionId() == null) { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + if (migrationParameters == null) { + return Mono + .error(new IllegalArgumentException("Parameter migrationParameters is required and cannot be null.")); + } else { + migrationParameters.validate(); + } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listSupportedOptimizationTypes(this.client.getEndpoint(), resourceGroupName, profileName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); + return service.migrate(this.client.getEndpoint(), this.client.getApiVersion(), resourceGroupName, + this.client.getSubscriptionId(), contentType, accept, migrationParameters, context); } /** - * Gets the supported optimization types for the current profile. A user can create an endpoint with an optimization - * type from the listed values. + * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is - * unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param migrationParameters Properties needed to migrate the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the supported optimization types for the current profile on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of result for migrate operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono listSupportedOptimizationTypesAsync(String resourceGroupName, - String profileName) { - return listSupportedOptimizationTypesWithResponseAsync(resourceGroupName, profileName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, MigrateResultInner> beginMigrateAsync(String resourceGroupName, + MigrationParameters migrationParameters) { + Mono>> mono = migrateWithResponseAsync(resourceGroupName, migrationParameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + MigrateResultInner.class, MigrateResultInner.class, this.client.getContext()); } /** - * Gets the supported optimization types for the current profile. A user can create an endpoint with an optimization - * type from the listed values. + * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is - * unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param migrationParameters Properties needed to migrate the 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 supported optimization types for the current profile along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response - listSupportedOptimizationTypesWithResponse(String resourceGroupName, String profileName, Context context) { - return listSupportedOptimizationTypesWithResponseAsync(resourceGroupName, profileName, context).block(); - } - - /** - * Gets the supported optimization types for the current profile. A user can create an endpoint with an optimization - * type from the listed values. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is - * unique within the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the supported optimization types for the current profile. + * @return the {@link PollerFlux} for polling of result for migrate operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SupportedOptimizationTypesListResultInner listSupportedOptimizationTypes(String resourceGroupName, - String profileName) { - return listSupportedOptimizationTypesWithResponse(resourceGroupName, profileName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, MigrateResultInner> beginMigrateAsync(String resourceGroupName, + MigrationParameters migrationParameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = migrateWithResponseAsync(resourceGroupName, migrationParameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + MigrateResultInner.class, MigrateResultInner.class, context); } /** - * Checks the quota and actual usage of endpoints under the given Azure Front Door Standard or Azure Front Door - * Premium or CDN profile. + * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is - * unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param migrationParameters Properties needed to migrate the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 resource usage API along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of result for migrate operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listResourceUsageSinglePageAsync(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 (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 (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listResourceUsage(this.client.getEndpoint(), resourceGroupName, profileName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, MigrateResultInner> beginMigrate(String resourceGroupName, + MigrationParameters migrationParameters) { + return this.beginMigrateAsync(resourceGroupName, migrationParameters).getSyncPoller(); } /** - * Checks the quota and actual usage of endpoints under the given Azure Front Door Standard or Azure Front Door - * Premium or CDN profile. + * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is - * unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param migrationParameters Properties needed to migrate the 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 output of check resource usage API along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of result for migrate operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listResourceUsageSinglePageAsync(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 (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 (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listResourceUsage(this.client.getEndpoint(), resourceGroupName, profileName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, MigrateResultInner> beginMigrate(String resourceGroupName, + MigrationParameters migrationParameters, Context context) { + return this.beginMigrateAsync(resourceGroupName, migrationParameters, context).getSyncPoller(); } /** - * Checks the quota and actual usage of endpoints under the given Azure Front Door Standard or Azure Front Door - * Premium or CDN profile. + * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is - * unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param migrationParameters Properties needed to migrate the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 resource usage API as paginated response with {@link PagedFlux}. + * @return result for migrate operation on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listResourceUsageAsync(String resourceGroupName, String profileName) { - return new PagedFlux<>(() -> listResourceUsageSinglePageAsync(resourceGroupName, profileName), - nextLink -> listResourceUsageNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono migrateAsync(String resourceGroupName, MigrationParameters migrationParameters) { + return beginMigrateAsync(resourceGroupName, migrationParameters).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Checks the quota and actual usage of endpoints under the given Azure Front Door Standard or Azure Front Door - * Premium or CDN profile. + * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is - * unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param migrationParameters Properties needed to migrate the 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 output of check resource usage API as paginated response with {@link PagedFlux}. + * @return result for migrate operation on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listResourceUsageAsync(String resourceGroupName, String profileName, + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono migrateAsync(String resourceGroupName, MigrationParameters migrationParameters, Context context) { - return new PagedFlux<>(() -> listResourceUsageSinglePageAsync(resourceGroupName, profileName, context), - nextLink -> listResourceUsageNextSinglePageAsync(nextLink, context)); + return beginMigrateAsync(resourceGroupName, migrationParameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Checks the quota and actual usage of endpoints under the given Azure Front Door Standard or Azure Front Door - * Premium or CDN profile. + * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is - * unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param migrationParameters Properties needed to migrate the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 resource usage API as paginated response with {@link PagedIterable}. + * @return result for migrate operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listResourceUsage(String resourceGroupName, String profileName) { - return new PagedIterable<>(listResourceUsageAsync(resourceGroupName, profileName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public MigrateResultInner migrate(String resourceGroupName, MigrationParameters migrationParameters) { + return migrateAsync(resourceGroupName, migrationParameters).block(); } /** - * Checks the quota and actual usage of endpoints under the given Azure Front Door Standard or Azure Front Door - * Premium or CDN profile. + * Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is - * unique within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param migrationParameters Properties needed to migrate the 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 output of check resource usage API as paginated response with {@link PagedIterable}. + * @return result for migrate operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listResourceUsage(String resourceGroupName, String profileName, + @ServiceMethod(returns = ReturnType.SINGLE) + public MigrateResultInner migrate(String resourceGroupName, MigrationParameters migrationParameters, Context context) { - return new PagedIterable<>(listResourceUsageAsync(resourceGroupName, profileName, context)); + return migrateAsync(resourceGroupName, migrationParameters, context).block(); } /** @@ -2402,11 +3136,11 @@ public PagedIterable listResourceUsage(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 profiles along with {@link PagedResponse} on successful completion of + * @return the response of a Profile list operation along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -2415,7 +3149,9 @@ private Mono> listNextSinglePageAsync(String nextLin 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)) + 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())); @@ -2429,11 +3165,11 @@ private Mono> listNextSinglePageAsync(String nextLin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 profiles along with {@link PagedResponse} on successful completion of + * @return the response of a Profile list operation along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -2443,7 +3179,7 @@ private Mono> listNextSinglePageAsync(String nextLin } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -2455,11 +3191,11 @@ private Mono> listNextSinglePageAsync(String nextLin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 profiles along with {@link PagedResponse} on successful completion of + * @return the response of a Profile list operation along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + private Mono> listNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -2468,9 +3204,7 @@ private Mono> listByResourceGroupNextSinglePageAsync new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + 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())); @@ -2484,11 +3218,11 @@ 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 result of the request to list profiles along with {@link PagedResponse} on successful completion of + * @return the response of a Profile list operation along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { + private Mono> listNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -2498,7 +3232,7 @@ private Mono> listByResourceGroupNextSinglePageAsync } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/ResourceUsagesClientImpl.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/ResourceUsagesClientImpl.java index adc7d5097997..ebf89b8ea495 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/ResourceUsagesClientImpl.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/ResourceUsagesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.implementation; @@ -28,7 +28,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.cdn.fluent.ResourceUsagesClient; import com.azure.resourcemanager.cdn.fluent.models.ResourceUsageInner; -import com.azure.resourcemanager.cdn.models.ResourceUsageListResult; +import com.azure.resourcemanager.cdn.implementation.models.ResourceUsageListResult; import reactor.core.publisher.Mono; /** @@ -60,15 +60,15 @@ public final class ResourceUsagesClientImpl implements ResourceUsagesClient { * The interface defining all the services for CdnManagementClientResourceUsages to be used by the proxy service to * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "CdnManagementClientR") + @Host("{endpoint}") + @ServiceInterface(name = "CdnManagementClientResourceUsages") public interface ResourceUsagesService { @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/checkResourceUsage") @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" }) @@ -76,7 +76,7 @@ Mono> list(@HostParam("$host") String endpoint @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** @@ -99,8 +99,8 @@ private Mono> listSinglePageAsync() { } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), 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())); @@ -129,7 +129,7 @@ private Mono> listSinglePageAsync(Context cont final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + .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)); diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/RoutesClientImpl.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/RoutesClientImpl.java index 5ad29825792a..05f3f48c7c3c 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/RoutesClientImpl.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/RoutesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.implementation; @@ -34,7 +34,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.cdn.fluent.RoutesClient; import com.azure.resourcemanager.cdn.fluent.models.RouteInner; -import com.azure.resourcemanager.cdn.models.RouteListResult; +import com.azure.resourcemanager.cdn.implementation.models.RouteListResult; import com.azure.resourcemanager.cdn.models.RouteUpdateParameters; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -68,238 +68,73 @@ public final class RoutesClientImpl implements RoutesClient { * The interface defining all the services for CdnManagementClientRoutes to be used by the proxy service to perform * REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "CdnManagementClientR") + @Host("{endpoint}") + @ServiceInterface(name = "CdnManagementClientRoutes") public interface RoutesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByEndpoint(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("endpointName") String endpointName, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, @PathParam("endpointName") String endpointName, @PathParam("routeName") String routeName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, @PathParam("endpointName") String endpointName, @PathParam("routeName") String routeName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") RouteInner route, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") RouteInner route, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, @PathParam("endpointName") String endpointName, @PathParam("routeName") String routeName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") RouteUpdateParameters routeUpdateProperties, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") RouteUpdateParameters routeUpdateProperties, 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.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("endpointName") String endpointName, @PathParam("routeName") String routeName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("endpointName") String endpointName, @PathParam("routeName") String routeName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByEndpoint(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, + @PathParam("endpointName") String endpointName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByEndpointNext( - @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 existing origins within a profile. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param endpointName Name of the endpoint under the profile which is unique globally. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 routes along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByEndpointSinglePageAsync(String resourceGroupName, String profileName, - String endpointName) { - 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 (profileName == null) { - return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByEndpoint(this.client.getEndpoint(), resourceGroupName, profileName, - endpointName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists all of the existing origins within a profile. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param endpointName Name of the endpoint under the profile which is unique globally. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 routes along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByEndpointSinglePageAsync(String resourceGroupName, String profileName, - String endpointName, 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 (profileName == null) { - return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByEndpoint(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all of the existing origins within a profile. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param endpointName Name of the endpoint under the profile which is unique globally. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 routes as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByEndpointAsync(String resourceGroupName, String profileName, - String endpointName) { - return new PagedFlux<>(() -> listByEndpointSinglePageAsync(resourceGroupName, profileName, endpointName), - nextLink -> listByEndpointNextSinglePageAsync(nextLink)); - } - - /** - * Lists all of the existing origins within a profile. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param endpointName Name of the endpoint under the profile which is unique globally. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 routes as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByEndpointAsync(String resourceGroupName, String profileName, String endpointName, - Context context) { - return new PagedFlux<>( - () -> listByEndpointSinglePageAsync(resourceGroupName, profileName, endpointName, context), - nextLink -> listByEndpointNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all of the existing origins within a profile. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param endpointName Name of the endpoint under the profile which is unique globally. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 routes as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByEndpoint(String resourceGroupName, String profileName, String endpointName) { - return new PagedIterable<>(listByEndpointAsync(resourceGroupName, profileName, endpointName)); - } - - /** - * Lists all of the existing origins within a profile. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param endpointName Name of the endpoint under the profile which is unique globally. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 routes as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByEndpoint(String resourceGroupName, String profileName, String endpointName, - Context context) { - return new PagedIterable<>(listByEndpointAsync(resourceGroupName, profileName, endpointName, context)); - } - /** * Gets an existing route with the specified route name under the specified subscription, resource group, profile, * and AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -315,6 +150,10 @@ public Mono> getWithResponseAsync(String resourceGroupName, 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.")); @@ -328,14 +167,9 @@ public Mono> getWithResponseAsync(String resourceGroupName, if (routeName == null) { return Mono.error(new IllegalArgumentException("Parameter routeName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, - routeName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, routeName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -343,9 +177,9 @@ public Mono> getWithResponseAsync(String resourceGroupName, * Gets an existing route with the specified route name under the specified subscription, resource group, profile, * and AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param context The context to associate with this operation. @@ -362,6 +196,10 @@ private Mono> getWithResponseAsync(String resourceGroupName 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.")); @@ -375,23 +213,19 @@ private Mono> getWithResponseAsync(String resourceGroupName if (routeName == null) { return Mono.error(new IllegalArgumentException("Parameter routeName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, routeName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, endpointName, routeName, accept, context); } /** * Gets an existing route with the specified route name under the specified subscription, resource group, profile, * and AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -411,9 +245,9 @@ public Mono getAsync(String resourceGroupName, String profileName, S * Gets an existing route with the specified route name under the specified subscription, resource group, profile, * and AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param context The context to associate with this operation. @@ -433,9 +267,9 @@ public Response getWithResponse(String resourceGroupName, String pro * Gets an existing route with the specified route name under the specified subscription, resource group, profile, * and AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -453,9 +287,9 @@ public RouteInner get(String resourceGroupName, String profileName, String endpo * Creates a new route with the specified route name under the specified subscription, resource group, profile, and * AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param route Route properties. @@ -472,6 +306,10 @@ public Mono>> createWithResponseAsync(String resourceG 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.")); @@ -485,20 +323,17 @@ public Mono>> createWithResponseAsync(String resourceG if (routeName == null) { return Mono.error(new IllegalArgumentException("Parameter routeName 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 (route == null) { return Mono.error(new IllegalArgumentException("Parameter route is required and cannot be null.")); } else { route.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.create(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, - routeName, this.client.getSubscriptionId(), this.client.getApiVersion(), route, accept, context)) + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, routeName, contentType, + accept, route, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -506,9 +341,9 @@ public Mono>> createWithResponseAsync(String resourceG * Creates a new route with the specified route name under the specified subscription, resource group, profile, and * AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param route Route properties. @@ -526,6 +361,10 @@ private Mono>> createWithResponseAsync(String resource 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.")); @@ -539,28 +378,25 @@ private Mono>> createWithResponseAsync(String resource if (routeName == null) { return Mono.error(new IllegalArgumentException("Parameter routeName 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 (route == null) { return Mono.error(new IllegalArgumentException("Parameter route is required and cannot be null.")); } else { route.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, routeName, - this.client.getSubscriptionId(), this.client.getApiVersion(), route, accept, context); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, endpointName, routeName, contentType, accept, route, context); } /** * Creates a new route with the specified route name under the specified subscription, resource group, profile, and * AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param route Route properties. @@ -583,9 +419,9 @@ public PollerFlux, RouteInner> beginCreateAsync(String re * Creates a new route with the specified route name under the specified subscription, resource group, profile, and * AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param route Route properties. @@ -610,9 +446,9 @@ private PollerFlux, RouteInner> beginCreateAsync(String r * Creates a new route with the specified route name under the specified subscription, resource group, profile, and * AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param route Route properties. @@ -632,9 +468,9 @@ public SyncPoller, RouteInner> beginCreate(String resourc * Creates a new route with the specified route name under the specified subscription, resource group, profile, and * AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param route Route properties. @@ -656,9 +492,9 @@ public SyncPoller, RouteInner> beginCreate(String resourc * Creates a new route with the specified route name under the specified subscription, resource group, profile, and * AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param route Route properties. @@ -679,9 +515,9 @@ public Mono createAsync(String resourceGroupName, String profileName * Creates a new route with the specified route name under the specified subscription, resource group, profile, and * AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param route Route properties. @@ -703,9 +539,9 @@ private Mono createAsync(String resourceGroupName, String profileNam * Creates a new route with the specified route name under the specified subscription, resource group, profile, and * AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param route Route properties. @@ -724,9 +560,9 @@ public RouteInner create(String resourceGroupName, String profileName, String en * Creates a new route with the specified route name under the specified subscription, resource group, profile, and * AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param route Route properties. @@ -746,9 +582,9 @@ public RouteInner create(String resourceGroupName, String profileName, String en * Updates an existing route with the specified route name under the specified subscription, resource group, * profile, and AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param routeUpdateProperties Route update properties. @@ -765,6 +601,10 @@ public Mono>> updateWithResponseAsync(String resourceG 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.")); @@ -778,21 +618,18 @@ public Mono>> updateWithResponseAsync(String resourceG if (routeName == null) { return Mono.error(new IllegalArgumentException("Parameter routeName 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 (routeUpdateProperties == null) { return Mono .error(new IllegalArgumentException("Parameter routeUpdateProperties is required and cannot be null.")); } else { routeUpdateProperties.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, profileName, - endpointName, routeName, this.client.getSubscriptionId(), this.client.getApiVersion(), - routeUpdateProperties, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, routeName, contentType, + accept, routeUpdateProperties, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -800,9 +637,9 @@ public Mono>> updateWithResponseAsync(String resourceG * Updates an existing route with the specified route name under the specified subscription, resource group, * profile, and AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param routeUpdateProperties Route update properties. @@ -820,6 +657,10 @@ private Mono>> updateWithResponseAsync(String resource 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.")); @@ -833,29 +674,27 @@ private Mono>> updateWithResponseAsync(String resource if (routeName == null) { return Mono.error(new IllegalArgumentException("Parameter routeName 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 (routeUpdateProperties == null) { return Mono .error(new IllegalArgumentException("Parameter routeUpdateProperties is required and cannot be null.")); } else { routeUpdateProperties.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, routeName, - this.client.getSubscriptionId(), this.client.getApiVersion(), routeUpdateProperties, accept, context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, endpointName, routeName, contentType, accept, routeUpdateProperties, + context); } /** * Updates an existing route with the specified route name under the specified subscription, resource group, * profile, and AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param routeUpdateProperties Route update properties. @@ -878,9 +717,9 @@ public PollerFlux, RouteInner> beginUpdateAsync(String re * Updates an existing route with the specified route name under the specified subscription, resource group, * profile, and AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param routeUpdateProperties Route update properties. @@ -906,9 +745,9 @@ private PollerFlux, RouteInner> beginUpdateAsync(String r * Updates an existing route with the specified route name under the specified subscription, resource group, * profile, and AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param routeUpdateProperties Route update properties. @@ -929,9 +768,9 @@ public SyncPoller, RouteInner> beginUpdate(String resourc * Updates an existing route with the specified route name under the specified subscription, resource group, * profile, and AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param routeUpdateProperties Route update properties. @@ -954,9 +793,9 @@ public SyncPoller, RouteInner> beginUpdate(String resourc * Updates an existing route with the specified route name under the specified subscription, resource group, * profile, and AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param routeUpdateProperties Route update properties. @@ -977,9 +816,9 @@ public Mono updateAsync(String resourceGroupName, String profileName * Updates an existing route with the specified route name under the specified subscription, resource group, * profile, and AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param routeUpdateProperties Route update properties. @@ -1002,9 +841,9 @@ private Mono updateAsync(String resourceGroupName, String profileNam * Updates an existing route with the specified route name under the specified subscription, resource group, * profile, and AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param routeUpdateProperties Route update properties. @@ -1023,9 +862,9 @@ public RouteInner update(String resourceGroupName, String profileName, String en * Updates an existing route with the specified route name under the specified subscription, resource group, * profile, and AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param routeUpdateProperties Route update properties. @@ -1046,9 +885,9 @@ public RouteInner update(String resourceGroupName, String profileName, String en * Deletes an existing route with the specified route name under the specified subscription, resource group, * profile, and AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1063,6 +902,10 @@ public Mono>> deleteWithResponseAsync(String resourceG 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.")); @@ -1076,14 +919,9 @@ public Mono>> deleteWithResponseAsync(String resourceG if (routeName == null) { return Mono.error(new IllegalArgumentException("Parameter routeName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, profileName, - endpointName, routeName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, routeName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1091,9 +929,9 @@ public Mono>> deleteWithResponseAsync(String resourceG * Deletes an existing route with the specified route name under the specified subscription, resource group, * profile, and AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param context The context to associate with this operation. @@ -1109,6 +947,10 @@ private Mono>> deleteWithResponseAsync(String resource 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.")); @@ -1122,23 +964,18 @@ private Mono>> deleteWithResponseAsync(String resource if (routeName == null) { return Mono.error(new IllegalArgumentException("Parameter routeName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), resourceGroupName, profileName, endpointName, routeName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, endpointName, routeName, context); } /** * Deletes an existing route with the specified route name under the specified subscription, resource group, * profile, and AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1159,9 +996,9 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN * Deletes an existing route with the specified route name under the specified subscription, resource group, * profile, and AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param context The context to associate with this operation. @@ -1184,9 +1021,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * Deletes an existing route with the specified route name under the specified subscription, resource group, * profile, and AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1204,9 +1041,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * Deletes an existing route with the specified route name under the specified subscription, resource group, * profile, and AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param context The context to associate with this operation. @@ -1225,9 +1062,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * Deletes an existing route with the specified route name under the specified subscription, resource group, * profile, and AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1245,9 +1082,9 @@ public Mono deleteAsync(String resourceGroupName, String profileName, Stri * Deletes an existing route with the specified route name under the specified subscription, resource group, * profile, and AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param context The context to associate with this operation. @@ -1267,9 +1104,9 @@ private Mono deleteAsync(String resourceGroupName, String profileName, Str * Deletes an existing route with the specified route name under the specified subscription, resource group, * profile, and AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1285,9 +1122,9 @@ public void delete(String resourceGroupName, String profileName, String endpoint * Deletes an existing route with the specified route name under the specified subscription, resource group, * profile, and AzureFrontDoor endpoint. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param routeName Name of the routing rule. * @param context The context to associate with this operation. @@ -1301,6 +1138,169 @@ public void delete(String resourceGroupName, String profileName, String endpoint deleteAsync(resourceGroupName, profileName, endpointName, routeName, context).block(); } + /** + * Lists all of the existing origins within a profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Route list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByEndpointSinglePageAsync(String resourceGroupName, String profileName, + String endpointName) { + 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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByEndpoint(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointName, 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 existing origins within a profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Route list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByEndpointSinglePageAsync(String resourceGroupName, String profileName, + String endpointName, 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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByEndpoint(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, endpointName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists all of the existing origins within a profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Route list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByEndpointAsync(String resourceGroupName, String profileName, + String endpointName) { + return new PagedFlux<>(() -> listByEndpointSinglePageAsync(resourceGroupName, profileName, endpointName), + nextLink -> listByEndpointNextSinglePageAsync(nextLink)); + } + + /** + * Lists all of the existing origins within a profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Route list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByEndpointAsync(String resourceGroupName, String profileName, String endpointName, + Context context) { + return new PagedFlux<>( + () -> listByEndpointSinglePageAsync(resourceGroupName, profileName, endpointName, context), + nextLink -> listByEndpointNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all of the existing origins within a profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Route list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByEndpoint(String resourceGroupName, String profileName, String endpointName) { + return new PagedIterable<>(listByEndpointAsync(resourceGroupName, profileName, endpointName)); + } + + /** + * Lists all of the existing origins within a profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param endpointName Name of the endpoint under the profile which is unique globally. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Route list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByEndpoint(String resourceGroupName, String profileName, String endpointName, + Context context) { + return new PagedIterable<>(listByEndpointAsync(resourceGroupName, profileName, endpointName, context)); + } + /** * Get the next page of items. * @@ -1308,7 +1308,7 @@ public void delete(String resourceGroupName, String profileName, String endpoint * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 routes along with {@link PagedResponse} on successful completion of + * @return the response of a Route list operation along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -1336,7 +1336,7 @@ private Mono> listByEndpointNextSinglePageAsync(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 routes along with {@link PagedResponse} on successful completion of + * @return the response of a Route list operation along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/RuleSetsClientImpl.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/RuleSetsClientImpl.java index 4067fd9312d2..4d6e8e9b7d75 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/RuleSetsClientImpl.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/RuleSetsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.implementation; @@ -34,8 +34,9 @@ import com.azure.resourcemanager.cdn.fluent.RuleSetsClient; import com.azure.resourcemanager.cdn.fluent.models.RuleSetInner; import com.azure.resourcemanager.cdn.fluent.models.UsageInner; -import com.azure.resourcemanager.cdn.models.RuleSetListResult; -import com.azure.resourcemanager.cdn.models.UsagesListResult; +import com.azure.resourcemanager.cdn.implementation.models.RuleSetListResult; +import com.azure.resourcemanager.cdn.implementation.models.UsagesListResult; +import com.azure.resourcemanager.cdn.models.RuleSetsCreateResponse; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -68,60 +69,60 @@ public final class RuleSetsClientImpl implements RuleSetsClient { * The interface defining all the services for CdnManagementClientRuleSets to be used by the proxy service to * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "CdnManagementClientR") + @Host("{endpoint}") + @ServiceInterface(name = "CdnManagementClientRuleSets") public interface RuleSetsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByProfile(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("ruleSetName") String ruleSetName, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("ruleSetName") String ruleSetName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create(@HostParam("$host") String endpoint, + Mono create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("ruleSetName") String ruleSetName, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("ruleSetName") String ruleSetName, @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.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("ruleSetName") String ruleSetName, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("ruleSetName") String ruleSetName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + 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); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/usages") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listResourceUsage(@HostParam("$host") String endpoint, + Mono> listResourceUsage(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("ruleSetName") String ruleSetName, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("ruleSetName") String ruleSetName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByProfileNext( - @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" }) @@ -129,164 +130,17 @@ Mono> listByProfileNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listResourceUsageNext( - @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 existing AzureFrontDoor rule sets within a profile. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 rule sets 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 (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 (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByProfile(this.client.getEndpoint(), resourceGroupName, profileName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists existing AzureFrontDoor rule sets within a profile. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 rule sets 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 (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 (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByProfile(this.client.getEndpoint(), resourceGroupName, profileName, this.client.getSubscriptionId(), - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists existing AzureFrontDoor rule sets within a profile. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 rule sets as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByProfileAsync(String resourceGroupName, String profileName) { - return new PagedFlux<>(() -> listByProfileSinglePageAsync(resourceGroupName, profileName), - nextLink -> listByProfileNextSinglePageAsync(nextLink)); - } - - /** - * Lists existing AzureFrontDoor rule sets within a profile. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 rule sets 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)); - } - - /** - * Lists existing AzureFrontDoor rule sets within a profile. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 rule sets as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByProfile(String resourceGroupName, String profileName) { - return new PagedIterable<>(listByProfileAsync(resourceGroupName, profileName)); - } - - /** - * Lists existing AzureFrontDoor rule sets within a profile. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 rule sets 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)); - } - /** * Gets an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -301,6 +155,10 @@ public Mono> getWithResponseAsync(String resourceGroupNam 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.")); @@ -311,14 +169,10 @@ public Mono> getWithResponseAsync(String resourceGroupNam if (ruleSetName == null) { return Mono.error(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, profileName, ruleSetName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, ruleSetName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -326,9 +180,9 @@ public Mono> getWithResponseAsync(String resourceGroupNam * Gets an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -344,6 +198,10 @@ private Mono> getWithResponseAsync(String resourceGroupNa 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.")); @@ -354,23 +212,19 @@ private Mono> getWithResponseAsync(String resourceGroupNa if (ruleSetName == null) { return Mono.error(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), resourceGroupName, profileName, ruleSetName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, ruleSetName, accept, context); } /** * Gets an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -388,9 +242,9 @@ public Mono getAsync(String resourceGroupName, String profileName, * Gets an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -409,9 +263,9 @@ public Response getWithResponse(String resourceGroupName, String p * Gets an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -427,23 +281,27 @@ public RuleSetInner get(String resourceGroupName, String profileName, String rul /** * Creates a new rule set within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return friendly RuleSet name mapping to the any RuleSet or secret related information along with - * {@link Response} on successful completion of {@link Mono}. + * @return friendly RuleSet name mapping to the any RuleSet or secret related information on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createWithResponseAsync(String resourceGroupName, String profileName, + public Mono createWithResponseAsync(String resourceGroupName, String profileName, String ruleSetName) { 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.")); @@ -454,38 +312,38 @@ public Mono> createWithResponseAsync(String resourceGroup if (ruleSetName == null) { return Mono.error(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), resourceGroupName, profileName, - ruleSetName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, ruleSetName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates a new rule set within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return friendly RuleSet name mapping to the any RuleSet or secret related information along with - * {@link Response} on successful completion of {@link Mono}. + * @return friendly RuleSet name mapping to the any RuleSet or secret related information on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync(String resourceGroupName, String profileName, + private Mono createWithResponseAsync(String resourceGroupName, String profileName, String ruleSetName, 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.")); @@ -496,22 +354,18 @@ private Mono> createWithResponseAsync(String resourceGrou if (ruleSetName == null) { return Mono.error(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), resourceGroupName, profileName, ruleSetName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, ruleSetName, accept, context); } /** * Creates a new rule set within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -528,19 +382,18 @@ public Mono createAsync(String resourceGroupName, String profileNa /** * Creates a new rule set within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return friendly RuleSet name mapping to the any RuleSet or secret related information along with - * {@link Response}. + * @return friendly RuleSet name mapping to the any RuleSet or secret related information. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse(String resourceGroupName, String profileName, String ruleSetName, + public RuleSetsCreateResponse createWithResponse(String resourceGroupName, String profileName, String ruleSetName, Context context) { return createWithResponseAsync(resourceGroupName, profileName, ruleSetName, context).block(); } @@ -548,9 +401,9 @@ public Response createWithResponse(String resourceGroupName, Strin /** * Creates a new rule set within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -566,9 +419,9 @@ public RuleSetInner create(String resourceGroupName, String profileName, String * Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -582,6 +435,10 @@ public Mono>> deleteWithResponseAsync(String resourceG 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.")); @@ -592,14 +449,9 @@ public Mono>> deleteWithResponseAsync(String resourceG if (ruleSetName == null) { return Mono.error(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, profileName, - ruleSetName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, ruleSetName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -607,9 +459,9 @@ public Mono>> deleteWithResponseAsync(String resourceG * Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -624,6 +476,10 @@ private Mono>> deleteWithResponseAsync(String resource 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.")); @@ -634,23 +490,18 @@ private Mono>> deleteWithResponseAsync(String resource if (ruleSetName == null) { return Mono.error(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), resourceGroupName, profileName, ruleSetName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, ruleSetName, context); } /** * Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -669,9 +520,9 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN * Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -693,9 +544,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -712,9 +563,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -732,9 +583,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -751,9 +602,9 @@ public Mono deleteAsync(String resourceGroupName, String profileName, Stri * Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -771,9 +622,9 @@ private Mono deleteAsync(String resourceGroupName, String profileName, Str * Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -788,9 +639,9 @@ public void delete(String resourceGroupName, String profileName, String ruleSetN * Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, * resource group and profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -803,11 +654,158 @@ public void delete(String resourceGroupName, String profileName, String ruleSetN } /** - * Checks the quota and actual usage of endpoints under the given Azure Front Door profile.. + * Lists existing AzureFrontDoor rule sets within a profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a RuleSet list operation 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 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())); + } + + /** + * Lists existing AzureFrontDoor rule sets within a profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a RuleSet list operation 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 accept = "application/json"; + context = this.client.mergeContext(context); + return 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)); + } + + /** + * Lists existing AzureFrontDoor rule sets within a profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a RuleSet list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByProfileAsync(String resourceGroupName, String profileName) { + return new PagedFlux<>(() -> listByProfileSinglePageAsync(resourceGroupName, profileName), + nextLink -> listByProfileNextSinglePageAsync(nextLink)); + } + + /** + * Lists existing AzureFrontDoor rule sets within a profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a RuleSet list operation 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)); + } + + /** + * Lists existing AzureFrontDoor rule sets within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a RuleSet list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByProfile(String resourceGroupName, String profileName) { + return new PagedIterable<>(listByProfileAsync(resourceGroupName, profileName)); + } + + /** + * Lists existing AzureFrontDoor rule sets within a profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a RuleSet list operation 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)); + } + + /** + * Checks the quota and actual usage of endpoints under the given Azure Front Door profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -822,6 +820,10 @@ private Mono> listResourceUsageSinglePageAsync(String 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.")); @@ -832,25 +834,21 @@ private Mono> listResourceUsageSinglePageAsync(String if (ruleSetName == null) { return Mono.error(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listResourceUsage(this.client.getEndpoint(), resourceGroupName, profileName, - ruleSetName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .withContext(context -> service.listResourceUsage(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, ruleSetName, 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())); } /** - * Checks the quota and actual usage of endpoints under the given Azure Front Door profile.. + * Checks the quota and actual usage of endpoints under the given Azure Front Door profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -866,6 +864,10 @@ private Mono> listResourceUsageSinglePageAsync(String 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.")); @@ -876,25 +878,21 @@ private Mono> listResourceUsageSinglePageAsync(String if (ruleSetName == null) { return Mono.error(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listResourceUsage(this.client.getEndpoint(), resourceGroupName, profileName, ruleSetName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .listResourceUsage(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, ruleSetName, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Checks the quota and actual usage of endpoints under the given Azure Front Door profile.. + * Checks the quota and actual usage of endpoints under the given Azure Front Door profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -909,11 +907,11 @@ public PagedFlux listResourceUsageAsync(String resourceGroupName, St } /** - * Checks the quota and actual usage of endpoints under the given Azure Front Door profile.. + * Checks the quota and actual usage of endpoints under the given Azure Front Door profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -930,11 +928,11 @@ private PagedFlux listResourceUsageAsync(String resourceGroupName, S } /** - * Checks the quota and actual usage of endpoints under the given Azure Front Door profile.. + * Checks the quota and actual usage of endpoints under the given Azure Front Door profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -948,11 +946,11 @@ public PagedIterable listResourceUsage(String resourceGroupName, Str } /** - * Checks the quota and actual usage of endpoints under the given Azure Front Door profile.. + * Checks the quota and actual usage of endpoints under the given Azure Front Door profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -973,7 +971,7 @@ public PagedIterable listResourceUsage(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list rule sets along with {@link PagedResponse} on successful completion of + * @return the response of a RuleSet list operation along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -1001,7 +999,7 @@ private Mono> listByProfileNextSinglePageAsync(Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 rule sets along with {@link PagedResponse} on successful completion of + * @return the response of a RuleSet list operation along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/RulesClientImpl.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/RulesClientImpl.java index a3972d7fd9df..94ac1537c8ce 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/RulesClientImpl.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/RulesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.implementation; @@ -34,7 +34,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.cdn.fluent.RulesClient; import com.azure.resourcemanager.cdn.fluent.models.RuleInner; -import com.azure.resourcemanager.cdn.models.RuleListResult; +import com.azure.resourcemanager.cdn.implementation.models.RuleListResult; import com.azure.resourcemanager.cdn.models.RuleUpdateParameters; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -68,235 +68,72 @@ public final class RulesClientImpl implements RulesClient { * The interface defining all the services for CdnManagementClientRules to be used by the proxy service to perform * REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "CdnManagementClientR") + @Host("{endpoint}") + @ServiceInterface(name = "CdnManagementClientRules") public interface RulesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/rules") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByRuleSet(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("ruleSetName") String ruleSetName, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/rules/{ruleName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, @PathParam("ruleSetName") String ruleSetName, @PathParam("ruleName") String ruleName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/rules/{ruleName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, @PathParam("ruleSetName") String ruleSetName, @PathParam("ruleName") String ruleName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") RuleInner rule, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") RuleInner rule, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/rules/{ruleName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, @PathParam("ruleSetName") String ruleSetName, @PathParam("ruleName") String ruleName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") RuleUpdateParameters ruleUpdateProperties, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") RuleUpdateParameters ruleUpdateProperties, 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.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/rules/{ruleName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("ruleSetName") String ruleSetName, @PathParam("ruleName") String ruleName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("ruleSetName") String ruleSetName, @PathParam("ruleName") String ruleName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/rules") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByRuleSet(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, + @PathParam("ruleSetName") String ruleSetName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByRuleSetNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Lists all of the existing delivery rules within a rule set. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByRuleSetSinglePageAsync(String resourceGroupName, String profileName, - String ruleSetName) { - 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 (profileName == null) { - return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); - } - if (ruleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByRuleSet(this.client.getEndpoint(), resourceGroupName, profileName, - ruleSetName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists all of the existing delivery rules within a rule set. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the 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 result of the request to list rules along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByRuleSetSinglePageAsync(String resourceGroupName, String profileName, - String ruleSetName, 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 (profileName == null) { - return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); - } - if (ruleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByRuleSet(this.client.getEndpoint(), resourceGroupName, profileName, ruleSetName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all of the existing delivery rules within a rule set. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByRuleSetAsync(String resourceGroupName, String profileName, String ruleSetName) { - return new PagedFlux<>(() -> listByRuleSetSinglePageAsync(resourceGroupName, profileName, ruleSetName), - nextLink -> listByRuleSetNextSinglePageAsync(nextLink)); - } - - /** - * Lists all of the existing delivery rules within a rule set. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the 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 result of the request to list rules as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByRuleSetAsync(String resourceGroupName, String profileName, String ruleSetName, - Context context) { - return new PagedFlux<>(() -> listByRuleSetSinglePageAsync(resourceGroupName, profileName, ruleSetName, context), - nextLink -> listByRuleSetNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all of the existing delivery rules within a rule set. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByRuleSet(String resourceGroupName, String profileName, String ruleSetName) { - return new PagedIterable<>(listByRuleSetAsync(resourceGroupName, profileName, ruleSetName)); - } - - /** - * Lists all of the existing delivery rules within a rule set. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the 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 result of the request to list rules as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByRuleSet(String resourceGroupName, String profileName, String ruleSetName, - Context context) { - return new PagedIterable<>(listByRuleSetAsync(resourceGroupName, profileName, ruleSetName, context)); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Gets an existing delivery rule within a rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -311,6 +148,10 @@ public Mono> getWithResponseAsync(String resourceGroupName, 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.")); @@ -324,24 +165,19 @@ public Mono> getWithResponseAsync(String resourceGroupName, if (ruleName == null) { return Mono.error(new IllegalArgumentException("Parameter ruleName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, profileName, ruleSetName, - ruleName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, ruleSetName, ruleName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets an existing delivery rule within a rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -357,6 +193,10 @@ private Mono> getWithResponseAsync(String resourceGroupName, 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.")); @@ -370,23 +210,19 @@ private Mono> getWithResponseAsync(String resourceGroupName, if (ruleName == null) { return Mono.error(new IllegalArgumentException("Parameter ruleName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), resourceGroupName, profileName, ruleSetName, ruleName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, ruleSetName, ruleName, accept, context); } /** * Gets an existing delivery rule within a rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -402,10 +238,10 @@ public Mono getAsync(String resourceGroupName, String profileName, St /** * Gets an existing delivery rule within a rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -422,10 +258,10 @@ public Response getWithResponse(String resourceGroupName, String prof /** * Gets an existing delivery rule within a rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -440,10 +276,10 @@ public RuleInner get(String resourceGroupName, String profileName, String ruleSe /** * Creates a new delivery rule within the specified rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param rule The delivery rule properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -459,6 +295,10 @@ public Mono>> createWithResponseAsync(String resourceG 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.")); @@ -472,30 +312,27 @@ public Mono>> createWithResponseAsync(String resourceG if (ruleName == null) { return Mono.error(new IllegalArgumentException("Parameter ruleName 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 (rule == null) { return Mono.error(new IllegalArgumentException("Parameter rule is required and cannot be null.")); } else { rule.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.create(this.client.getEndpoint(), resourceGroupName, profileName, ruleSetName, - ruleName, this.client.getSubscriptionId(), this.client.getApiVersion(), rule, accept, context)) + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, ruleSetName, ruleName, contentType, + accept, rule, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates a new delivery rule within the specified rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param rule The delivery rule properties. * @param context The context to associate with this operation. @@ -512,6 +349,10 @@ private Mono>> createWithResponseAsync(String resource 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.")); @@ -525,28 +366,25 @@ private Mono>> createWithResponseAsync(String resource if (ruleName == null) { return Mono.error(new IllegalArgumentException("Parameter ruleName 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 (rule == null) { return Mono.error(new IllegalArgumentException("Parameter rule is required and cannot be null.")); } else { rule.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), resourceGroupName, profileName, ruleSetName, ruleName, - this.client.getSubscriptionId(), this.client.getApiVersion(), rule, accept, context); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, ruleSetName, ruleName, contentType, accept, rule, context); } /** * Creates a new delivery rule within the specified rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param rule The delivery rule properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -567,10 +405,10 @@ public PollerFlux, RuleInner> beginCreateAsync(String reso /** * Creates a new delivery rule within the specified rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param rule The delivery rule properties. * @param context The context to associate with this operation. @@ -593,10 +431,10 @@ private PollerFlux, RuleInner> beginCreateAsync(String res /** * Creates a new delivery rule within the specified rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param rule The delivery rule properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -614,10 +452,10 @@ public SyncPoller, RuleInner> beginCreate(String resourceG /** * Creates a new delivery rule within the specified rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param rule The delivery rule properties. * @param context The context to associate with this operation. @@ -637,10 +475,10 @@ public SyncPoller, RuleInner> beginCreate(String resourceG /** * Creates a new delivery rule within the specified rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param rule The delivery rule properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -659,10 +497,10 @@ public Mono createAsync(String resourceGroupName, String profileName, /** * Creates a new delivery rule within the specified rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param rule The delivery rule properties. * @param context The context to associate with this operation. @@ -682,10 +520,10 @@ private Mono createAsync(String resourceGroupName, String profileName /** * Creates a new delivery rule within the specified rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param rule The delivery rule properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -702,10 +540,10 @@ public RuleInner create(String resourceGroupName, String profileName, String rul /** * Creates a new delivery rule within the specified rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param rule The delivery rule properties. * @param context The context to associate with this operation. @@ -723,10 +561,10 @@ public RuleInner create(String resourceGroupName, String profileName, String rul /** * Updates an existing delivery rule within a rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param ruleUpdateProperties Delivery rule properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -742,6 +580,10 @@ public Mono>> updateWithResponseAsync(String resourceG 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.")); @@ -755,31 +597,28 @@ public Mono>> updateWithResponseAsync(String resourceG if (ruleName == null) { return Mono.error(new IllegalArgumentException("Parameter ruleName 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 (ruleUpdateProperties == null) { return Mono .error(new IllegalArgumentException("Parameter ruleUpdateProperties is required and cannot be null.")); } else { ruleUpdateProperties.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, profileName, - ruleSetName, ruleName, this.client.getSubscriptionId(), this.client.getApiVersion(), - ruleUpdateProperties, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, ruleSetName, ruleName, contentType, + accept, ruleUpdateProperties, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates an existing delivery rule within a rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param ruleUpdateProperties Delivery rule properties. * @param context The context to associate with this operation. @@ -796,6 +635,10 @@ private Mono>> updateWithResponseAsync(String resource 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.")); @@ -809,29 +652,26 @@ private Mono>> updateWithResponseAsync(String resource if (ruleName == null) { return Mono.error(new IllegalArgumentException("Parameter ruleName 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 (ruleUpdateProperties == null) { return Mono .error(new IllegalArgumentException("Parameter ruleUpdateProperties is required and cannot be null.")); } else { ruleUpdateProperties.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), resourceGroupName, profileName, ruleSetName, ruleName, - this.client.getSubscriptionId(), this.client.getApiVersion(), ruleUpdateProperties, accept, context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, ruleSetName, ruleName, contentType, accept, ruleUpdateProperties, context); } /** * Updates an existing delivery rule within a rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param ruleUpdateProperties Delivery rule properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -852,10 +692,10 @@ public PollerFlux, RuleInner> beginUpdateAsync(String reso /** * Updates an existing delivery rule within a rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param ruleUpdateProperties Delivery rule properties. * @param context The context to associate with this operation. @@ -878,10 +718,10 @@ private PollerFlux, RuleInner> beginUpdateAsync(String res /** * Updates an existing delivery rule within a rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param ruleUpdateProperties Delivery rule properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -900,10 +740,10 @@ public SyncPoller, RuleInner> beginUpdate(String resourceG /** * Updates an existing delivery rule within a rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param ruleUpdateProperties Delivery rule properties. * @param context The context to associate with this operation. @@ -924,10 +764,10 @@ public SyncPoller, RuleInner> beginUpdate(String resourceG /** * Updates an existing delivery rule within a rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param ruleUpdateProperties Delivery rule properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -946,10 +786,10 @@ public Mono updateAsync(String resourceGroupName, String profileName, /** * Updates an existing delivery rule within a rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param ruleUpdateProperties Delivery rule properties. * @param context The context to associate with this operation. @@ -970,10 +810,10 @@ private Mono updateAsync(String resourceGroupName, String profileName /** * Updates an existing delivery rule within a rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param ruleUpdateProperties Delivery rule properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -990,10 +830,10 @@ public RuleInner update(String resourceGroupName, String profileName, String rul /** * Updates an existing delivery rule within a rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param ruleUpdateProperties Delivery rule properties. * @param context The context to associate with this operation. @@ -1012,10 +852,10 @@ public RuleInner update(String resourceGroupName, String profileName, String rul /** * Deletes an existing delivery rule within a rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1029,6 +869,10 @@ public Mono>> deleteWithResponseAsync(String resourceG 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.")); @@ -1042,24 +886,19 @@ public Mono>> deleteWithResponseAsync(String resourceG if (ruleName == null) { return Mono.error(new IllegalArgumentException("Parameter ruleName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, profileName, - ruleSetName, ruleName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, ruleSetName, ruleName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes an existing delivery rule within a rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1074,6 +913,10 @@ private Mono>> deleteWithResponseAsync(String resource 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.")); @@ -1087,23 +930,18 @@ private Mono>> deleteWithResponseAsync(String resource if (ruleName == null) { return Mono.error(new IllegalArgumentException("Parameter ruleName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), resourceGroupName, profileName, ruleSetName, ruleName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, ruleSetName, ruleName, context); } /** * Deletes an existing delivery rule within a rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1122,10 +960,10 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN /** * Deletes an existing delivery rule within a rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1146,10 +984,10 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup /** * Deletes an existing delivery rule within a rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1165,10 +1003,10 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes an existing delivery rule within a rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1185,10 +1023,10 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes an existing delivery rule within a rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1204,10 +1042,10 @@ public Mono deleteAsync(String resourceGroupName, String profileName, Stri /** * Deletes an existing delivery rule within a rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1225,10 +1063,10 @@ private Mono deleteAsync(String resourceGroupName, String profileName, Str /** * Deletes an existing delivery rule within a rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1242,10 +1080,10 @@ public void delete(String resourceGroupName, String profileName, String ruleSetN /** * Deletes an existing delivery rule within a rule set. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param ruleSetName Name of the rule set under the profile. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. * @param ruleName Name of the delivery rule which is unique within the endpoint. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1258,6 +1096,167 @@ public void delete(String resourceGroupName, String profileName, String ruleSetN deleteAsync(resourceGroupName, profileName, ruleSetName, ruleName, context).block(); } + /** + * Lists all of the existing delivery rules within a rule set. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Rule list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByRuleSetSinglePageAsync(String resourceGroupName, String profileName, + String ruleSetName) { + 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 (ruleSetName == null) { + return Mono.error(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByRuleSet(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, ruleSetName, 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 existing delivery rules within a rule set. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Rule list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByRuleSetSinglePageAsync(String resourceGroupName, String profileName, + String ruleSetName, 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 (ruleSetName == null) { + return Mono.error(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByRuleSet(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, ruleSetName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists all of the existing delivery rules within a rule set. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Rule list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByRuleSetAsync(String resourceGroupName, String profileName, String ruleSetName) { + return new PagedFlux<>(() -> listByRuleSetSinglePageAsync(resourceGroupName, profileName, ruleSetName), + nextLink -> listByRuleSetNextSinglePageAsync(nextLink)); + } + + /** + * Lists all of the existing delivery rules within a rule set. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Rule list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByRuleSetAsync(String resourceGroupName, String profileName, String ruleSetName, + Context context) { + return new PagedFlux<>(() -> listByRuleSetSinglePageAsync(resourceGroupName, profileName, ruleSetName, context), + nextLink -> listByRuleSetNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all of the existing delivery rules within a rule set. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Rule list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByRuleSet(String resourceGroupName, String profileName, String ruleSetName) { + return new PagedIterable<>(listByRuleSetAsync(resourceGroupName, profileName, ruleSetName)); + } + + /** + * Lists all of the existing delivery rules within a rule set. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param ruleSetName Name of the rule set under the profile which is unique globally. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Rule list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByRuleSet(String resourceGroupName, String profileName, String ruleSetName, + Context context) { + return new PagedIterable<>(listByRuleSetAsync(resourceGroupName, profileName, ruleSetName, context)); + } + /** * Get the next page of items. * @@ -1265,7 +1264,7 @@ public void delete(String resourceGroupName, String profileName, String ruleSetN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 along with {@link PagedResponse} on successful completion of + * @return the response of a Rule list operation along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -1293,7 +1292,7 @@ private Mono> listByRuleSetNextSinglePageAsync(String n * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 along with {@link PagedResponse} on successful completion of + * @return the response of a Rule list operation along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/SecretsClientImpl.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/SecretsClientImpl.java index e5850b879574..a5626a0af515 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/SecretsClientImpl.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/SecretsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.implementation; @@ -33,7 +33,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.cdn.fluent.SecretsClient; import com.azure.resourcemanager.cdn.fluent.models.SecretInner; -import com.azure.resourcemanager.cdn.models.SecretListResult; +import com.azure.resourcemanager.cdn.implementation.models.SecretListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -66,208 +66,60 @@ public final class SecretsClientImpl implements SecretsClient { * The interface defining all the services for CdnManagementClientSecrets to be used by the proxy service to perform * REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "CdnManagementClientS") + @Host("{endpoint}") + @ServiceInterface(name = "CdnManagementClientSecrets") public interface SecretsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/secrets") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByProfile(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/secrets/{secretName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("secretName") String secretName, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("secretName") String secretName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/secrets/{secretName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("secretName") String secretName, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") SecretInner secret, - @HeaderParam("Accept") String accept, Context context); + @PathParam("secretName") String secretName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") SecretInner secret, 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.Cdn/profiles/{profileName}/secrets/{secretName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("secretName") String secretName, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("secretName") String secretName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/secrets") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + 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); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByProfileNext( - @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 existing AzureFrontDoor secrets. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 secrets 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 (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 (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByProfile(this.client.getEndpoint(), resourceGroupName, profileName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists existing AzureFrontDoor secrets. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 secrets 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 (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 (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByProfile(this.client.getEndpoint(), resourceGroupName, profileName, this.client.getSubscriptionId(), - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists existing AzureFrontDoor secrets. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 secrets as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByProfileAsync(String resourceGroupName, String profileName) { - return new PagedFlux<>(() -> listByProfileSinglePageAsync(resourceGroupName, profileName), - nextLink -> listByProfileNextSinglePageAsync(nextLink)); - } - - /** - * Lists existing AzureFrontDoor secrets. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 secrets 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)); - } - - /** - * Lists existing AzureFrontDoor secrets. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 secrets as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByProfile(String resourceGroupName, String profileName) { - return new PagedIterable<>(listByProfileAsync(resourceGroupName, profileName)); - } - - /** - * Lists existing AzureFrontDoor secrets. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 secrets 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)); - } - /** * Gets an existing Secret within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param secretName Name of the Secret under the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -281,6 +133,10 @@ public Mono> getWithResponseAsync(String resourceGroupName 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.")); @@ -291,23 +147,19 @@ public Mono> getWithResponseAsync(String resourceGroupName if (secretName == null) { return Mono.error(new IllegalArgumentException("Parameter secretName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, profileName, secretName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, secretName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets an existing Secret within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param secretName Name of the Secret under the profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -322,6 +174,10 @@ private Mono> getWithResponseAsync(String resourceGroupNam 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.")); @@ -332,22 +188,18 @@ private Mono> getWithResponseAsync(String resourceGroupNam if (secretName == null) { return Mono.error(new IllegalArgumentException("Parameter secretName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), resourceGroupName, profileName, secretName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, secretName, accept, context); } /** * Gets an existing Secret within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param secretName Name of the Secret under the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -363,9 +215,9 @@ public Mono getAsync(String resourceGroupName, String profileName, /** * Gets an existing Secret within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param secretName Name of the Secret under the profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -382,9 +234,9 @@ public Response getWithResponse(String resourceGroupName, String pr /** * Gets an existing Secret within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param secretName Name of the Secret under the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -399,9 +251,9 @@ public SecretInner get(String resourceGroupName, String profileName, String secr /** * Creates a new Secret within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param secretName Name of the Secret under the profile. * @param secret The Secret properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -417,6 +269,10 @@ public Mono>> createWithResponseAsync(String resourceG 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.")); @@ -427,28 +283,26 @@ public Mono>> createWithResponseAsync(String resourceG if (secretName == null) { return Mono.error(new IllegalArgumentException("Parameter secretName 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 (secret == null) { return Mono.error(new IllegalArgumentException("Parameter secret is required and cannot be null.")); } else { secret.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), resourceGroupName, profileName, - secretName, this.client.getSubscriptionId(), this.client.getApiVersion(), secret, accept, context)) + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, secretName, contentType, accept, + secret, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates a new Secret within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param secretName Name of the Secret under the profile. * @param secret The Secret properties. * @param context The context to associate with this operation. @@ -465,6 +319,10 @@ private Mono>> createWithResponseAsync(String resource 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.")); @@ -475,27 +333,24 @@ private Mono>> createWithResponseAsync(String resource if (secretName == null) { return Mono.error(new IllegalArgumentException("Parameter secretName 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 (secret == null) { return Mono.error(new IllegalArgumentException("Parameter secret is required and cannot be null.")); } else { secret.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), resourceGroupName, profileName, secretName, - this.client.getSubscriptionId(), this.client.getApiVersion(), secret, accept, context); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, secretName, contentType, accept, secret, context); } /** * Creates a new Secret within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param secretName Name of the Secret under the profile. * @param secret The Secret properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -516,9 +371,9 @@ public PollerFlux, SecretInner> beginCreateAsync(String /** * Creates a new Secret within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param secretName Name of the Secret under the profile. * @param secret The Secret properties. * @param context The context to associate with this operation. @@ -541,9 +396,9 @@ private PollerFlux, SecretInner> beginCreateAsync(String /** * Creates a new Secret within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param secretName Name of the Secret under the profile. * @param secret The Secret properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -561,9 +416,9 @@ public SyncPoller, SecretInner> beginCreate(String resou /** * Creates a new Secret within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param secretName Name of the Secret under the profile. * @param secret The Secret properties. * @param context The context to associate with this operation. @@ -582,9 +437,9 @@ public SyncPoller, SecretInner> beginCreate(String resou /** * Creates a new Secret within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param secretName Name of the Secret under the profile. * @param secret The Secret properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -603,9 +458,9 @@ public Mono createAsync(String resourceGroupName, String profileNam /** * Creates a new Secret within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param secretName Name of the Secret under the profile. * @param secret The Secret properties. * @param context The context to associate with this operation. @@ -625,9 +480,9 @@ private Mono createAsync(String resourceGroupName, String profileNa /** * Creates a new Secret within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param secretName Name of the Secret under the profile. * @param secret The Secret properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -643,9 +498,9 @@ public SecretInner create(String resourceGroupName, String profileName, String s /** * Creates a new Secret within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param secretName Name of the Secret under the profile. * @param secret The Secret properties. * @param context The context to associate with this operation. @@ -663,9 +518,9 @@ public SecretInner create(String resourceGroupName, String profileName, String s /** * Deletes an existing Secret within profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param secretName Name of the Secret under the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -679,6 +534,10 @@ public Mono>> deleteWithResponseAsync(String resourceG 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.")); @@ -689,23 +548,18 @@ public Mono>> deleteWithResponseAsync(String resourceG if (secretName == null) { return Mono.error(new IllegalArgumentException("Parameter secretName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, profileName, - secretName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, secretName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes an existing Secret within profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param secretName Name of the Secret under the profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -720,6 +574,10 @@ private Mono>> deleteWithResponseAsync(String resource 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.")); @@ -730,22 +588,17 @@ private Mono>> deleteWithResponseAsync(String resource if (secretName == null) { return Mono.error(new IllegalArgumentException("Parameter secretName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), resourceGroupName, profileName, secretName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, secretName, context); } /** * Deletes an existing Secret within profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param secretName Name of the Secret under the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -763,9 +616,9 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN /** * Deletes an existing Secret within profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param secretName Name of the Secret under the profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -786,9 +639,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup /** * Deletes an existing Secret within profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param secretName Name of the Secret under the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -804,9 +657,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes an existing Secret within profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param secretName Name of the Secret under the profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -823,9 +676,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes an existing Secret within profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param secretName Name of the Secret under the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -841,9 +694,9 @@ public Mono deleteAsync(String resourceGroupName, String profileName, Stri /** * Deletes an existing Secret within profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param secretName Name of the Secret under the profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -860,9 +713,9 @@ private Mono deleteAsync(String resourceGroupName, String profileName, Str /** * Deletes an existing Secret within profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param secretName Name of the Secret under the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -876,9 +729,9 @@ public void delete(String resourceGroupName, String profileName, String secretNa /** * Deletes an existing Secret within profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param secretName Name of the Secret under the profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -890,6 +743,153 @@ public void delete(String resourceGroupName, String profileName, String secretNa deleteAsync(resourceGroupName, profileName, secretName, context).block(); } + /** + * Lists existing AzureFrontDoor secrets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Secret list operation 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 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())); + } + + /** + * Lists existing AzureFrontDoor secrets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Secret list operation 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 accept = "application/json"; + context = this.client.mergeContext(context); + return 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)); + } + + /** + * Lists existing AzureFrontDoor secrets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Secret list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByProfileAsync(String resourceGroupName, String profileName) { + return new PagedFlux<>(() -> listByProfileSinglePageAsync(resourceGroupName, profileName), + nextLink -> listByProfileNextSinglePageAsync(nextLink)); + } + + /** + * Lists existing AzureFrontDoor secrets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Secret list operation 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)); + } + + /** + * Lists existing AzureFrontDoor secrets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Secret list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByProfile(String resourceGroupName, String profileName) { + return new PagedIterable<>(listByProfileAsync(resourceGroupName, profileName)); + } + + /** + * Lists existing AzureFrontDoor secrets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Secret list operation 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)); + } + /** * Get the next page of items. * @@ -897,7 +897,7 @@ public void delete(String resourceGroupName, String profileName, String secretNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 secrets along with {@link PagedResponse} on successful completion of + * @return the response of a Secret list operation along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -925,7 +925,7 @@ private Mono> listByProfileNextSinglePageAsync(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 secrets along with {@link PagedResponse} on successful completion of + * @return the response of a Secret list operation along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/SecurityPoliciesClientImpl.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/SecurityPoliciesClientImpl.java index d6deb4692e2f..2db02514fed9 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/SecurityPoliciesClientImpl.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/SecurityPoliciesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.implementation; @@ -34,7 +34,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.cdn.fluent.SecurityPoliciesClient; import com.azure.resourcemanager.cdn.fluent.models.SecurityPolicyInner; -import com.azure.resourcemanager.cdn.models.SecurityPolicyListResult; +import com.azure.resourcemanager.cdn.implementation.models.SecurityPolicyListResult; import com.azure.resourcemanager.cdn.models.SecurityPolicyUpdateParameters; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -69,58 +69,56 @@ public final class SecurityPoliciesClientImpl implements SecurityPoliciesClient * The interface defining all the services for CdnManagementClientSecurityPolicies to be used by the proxy service * to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "CdnManagementClientS") + @Host("{endpoint}") + @ServiceInterface(name = "CdnManagementClientSecurityPolicies") public interface SecurityPoliciesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/securityPolicies") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByProfile(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/securityPolicies/{securityPolicyName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("securityPolicyName") String securityPolicyName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("securityPolicyName") String securityPolicyName, @HeaderParam("Accept") String accept, + Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/securityPolicies/{securityPolicyName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("securityPolicyName") String securityPolicyName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") SecurityPolicyInner securityPolicy, @HeaderParam("Accept") String accept, + @PathParam("securityPolicyName") String securityPolicyName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") SecurityPolicyInner securityPolicy, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/securityPolicies/{securityPolicyName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> patch(@HostParam("$host") String endpoint, + Mono>> patch(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("securityPolicyName") String securityPolicyName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @PathParam("securityPolicyName") String securityPolicyName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") SecurityPolicyUpdateParameters securityPolicyUpdateProperties, - @HeaderParam("Accept") String accept, Context context); + 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.Cdn/profiles/{profileName}/securityPolicies/{securityPolicyName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, + @PathParam("securityPolicyName") String securityPolicyName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/securityPolicies") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByProfile(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("securityPolicyName") String securityPolicyName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -128,165 +126,16 @@ Mono>> delete(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByProfileNext( - @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 security policies associated with the profile. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 security policies 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 (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 (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByProfile(this.client.getEndpoint(), resourceGroupName, profileName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists security policies associated with the profile. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 security policies 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 (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 (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByProfile(this.client.getEndpoint(), resourceGroupName, profileName, this.client.getSubscriptionId(), - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists security policies associated with the profile. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 security policies as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByProfileAsync(String resourceGroupName, String profileName) { - return new PagedFlux<>(() -> listByProfileSinglePageAsync(resourceGroupName, profileName), - nextLink -> listByProfileNextSinglePageAsync(nextLink)); - } - - /** - * Lists security policies associated with the profile. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 security policies 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)); - } - - /** - * Lists security policies associated with the profile. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 security policies as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByProfile(String resourceGroupName, String profileName) { - return new PagedIterable<>(listByProfileAsync(resourceGroupName, profileName)); - } - - /** - * Lists security policies associated with the profile. - * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 security policies 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)); - } - /** * Gets an existing security policy within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -301,6 +150,10 @@ public Mono> getWithResponseAsync(String resourceG 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.")); @@ -312,23 +165,19 @@ public Mono> getWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter securityPolicyName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, profileName, - securityPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, securityPolicyName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets an existing security policy within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -344,6 +193,10 @@ private Mono> getWithResponseAsync(String resource 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.")); @@ -355,22 +208,18 @@ private Mono> getWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter securityPolicyName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), resourceGroupName, profileName, securityPolicyName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, securityPolicyName, accept, context); } /** * Gets an existing security policy within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -386,9 +235,9 @@ public Mono getAsync(String resourceGroupName, String profi /** * Gets an existing security policy within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -405,9 +254,9 @@ public Response getWithResponse(String resourceGroupName, S /** * Gets an existing security policy within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -422,9 +271,9 @@ public SecurityPolicyInner get(String resourceGroupName, String profileName, Str /** * Creates a new security policy within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param securityPolicy The security policy properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -440,6 +289,10 @@ public Mono>> createWithResponseAsync(String resourceG 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.")); @@ -451,29 +304,26 @@ public Mono>> createWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter securityPolicyName 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 (securityPolicy == null) { return Mono.error(new IllegalArgumentException("Parameter securityPolicy is required and cannot be null.")); } else { securityPolicy.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.create(this.client.getEndpoint(), resourceGroupName, profileName, securityPolicyName, - this.client.getSubscriptionId(), this.client.getApiVersion(), securityPolicy, accept, context)) + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, securityPolicyName, contentType, + accept, securityPolicy, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates a new security policy within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param securityPolicy The security policy properties. * @param context The context to associate with this operation. @@ -490,6 +340,10 @@ private Mono>> createWithResponseAsync(String resource 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.")); @@ -501,27 +355,24 @@ private Mono>> createWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter securityPolicyName 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 (securityPolicy == null) { return Mono.error(new IllegalArgumentException("Parameter securityPolicy is required and cannot be null.")); } else { securityPolicy.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), resourceGroupName, profileName, securityPolicyName, - this.client.getSubscriptionId(), this.client.getApiVersion(), securityPolicy, accept, context); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, securityPolicyName, contentType, accept, securityPolicy, context); } /** * Creates a new security policy within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param securityPolicy The security policy properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -541,9 +392,9 @@ public PollerFlux, SecurityPolicyInner> beginCre /** * Creates a new security policy within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param securityPolicy The security policy properties. * @param context The context to associate with this operation. @@ -565,9 +416,9 @@ private PollerFlux, SecurityPolicyInner> beginCr /** * Creates a new security policy within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param securityPolicy The security policy properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -585,9 +436,9 @@ public SyncPoller, SecurityPolicyInner> beginCre /** * Creates a new security policy within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param securityPolicy The security policy properties. * @param context The context to associate with this operation. @@ -606,9 +457,9 @@ public SyncPoller, SecurityPolicyInner> beginCre /** * Creates a new security policy within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param securityPolicy The security policy properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -626,9 +477,9 @@ public Mono createAsync(String resourceGroupName, String pr /** * Creates a new security policy within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param securityPolicy The security policy properties. * @param context The context to associate with this operation. @@ -647,9 +498,9 @@ private Mono createAsync(String resourceGroupName, String p /** * Creates a new security policy within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param securityPolicy The security policy properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -666,9 +517,9 @@ public SecurityPolicyInner create(String resourceGroupName, String profileName, /** * Creates a new security policy within the specified profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param securityPolicy The security policy properties. * @param context The context to associate with this operation. @@ -686,9 +537,9 @@ public SecurityPolicyInner create(String resourceGroupName, String profileName, /** * Updates an existing security policy within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param securityPolicyUpdateProperties Security policy update properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -704,6 +555,10 @@ public Mono>> patchWithResponseAsync(String resourceGr 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.")); @@ -715,30 +570,27 @@ public Mono>> patchWithResponseAsync(String resourceGr return Mono .error(new IllegalArgumentException("Parameter securityPolicyName 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 (securityPolicyUpdateProperties == null) { return Mono.error(new IllegalArgumentException( "Parameter securityPolicyUpdateProperties is required and cannot be null.")); } else { securityPolicyUpdateProperties.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.patch(this.client.getEndpoint(), resourceGroupName, profileName, - securityPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), - securityPolicyUpdateProperties, accept, context)) + .withContext(context -> service.patch(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, securityPolicyName, contentType, + accept, securityPolicyUpdateProperties, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates an existing security policy within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param securityPolicyUpdateProperties Security policy update properties. * @param context The context to associate with this operation. @@ -755,6 +607,10 @@ private Mono>> patchWithResponseAsync(String resourceG 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.")); @@ -766,29 +622,26 @@ private Mono>> patchWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter securityPolicyName 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 (securityPolicyUpdateProperties == null) { return Mono.error(new IllegalArgumentException( "Parameter securityPolicyUpdateProperties is required and cannot be null.")); } else { securityPolicyUpdateProperties.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.patch(this.client.getEndpoint(), resourceGroupName, profileName, securityPolicyName, - this.client.getSubscriptionId(), this.client.getApiVersion(), securityPolicyUpdateProperties, accept, + return service.patch(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, securityPolicyName, contentType, accept, securityPolicyUpdateProperties, context); } /** * Updates an existing security policy within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param securityPolicyUpdateProperties Security policy update properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -808,9 +661,9 @@ public PollerFlux, SecurityPolicyInner> beginPat /** * Updates an existing security policy within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param securityPolicyUpdateProperties Security policy update properties. * @param context The context to associate with this operation. @@ -833,9 +686,9 @@ private PollerFlux, SecurityPolicyInner> beginPa /** * Updates an existing security policy within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param securityPolicyUpdateProperties Security policy update properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -853,9 +706,9 @@ public SyncPoller, SecurityPolicyInner> beginPat /** * Updates an existing security policy within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param securityPolicyUpdateProperties Security policy update properties. * @param context The context to associate with this operation. @@ -877,9 +730,9 @@ public SyncPoller, SecurityPolicyInner> beginPat /** * Updates an existing security policy within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param securityPolicyUpdateProperties Security policy update properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -898,9 +751,9 @@ public Mono patchAsync(String resourceGroupName, String pro /** * Updates an existing security policy within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param securityPolicyUpdateProperties Security policy update properties. * @param context The context to associate with this operation. @@ -919,9 +772,9 @@ private Mono patchAsync(String resourceGroupName, String pr /** * Updates an existing security policy within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param securityPolicyUpdateProperties Security policy update properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -938,9 +791,9 @@ public SecurityPolicyInner patch(String resourceGroupName, String profileName, S /** * Updates an existing security policy within a profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param securityPolicyUpdateProperties Security policy update properties. * @param context The context to associate with this operation. @@ -959,9 +812,9 @@ public SecurityPolicyInner patch(String resourceGroupName, String profileName, S /** * Deletes an existing security policy within profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -975,6 +828,10 @@ public Mono>> deleteWithResponseAsync(String resourceG 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.")); @@ -986,23 +843,18 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter securityPolicyName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, profileName, - securityPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, securityPolicyName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes an existing security policy within profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1017,6 +869,10 @@ private Mono>> deleteWithResponseAsync(String resource 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.")); @@ -1028,22 +884,17 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter securityPolicyName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), resourceGroupName, profileName, securityPolicyName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, securityPolicyName, context); } /** * Deletes an existing security policy within profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1062,9 +913,9 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN /** * Deletes an existing security policy within profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1085,9 +936,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup /** * Deletes an existing security policy within profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1103,9 +954,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes an existing security policy within profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1122,9 +973,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes an existing security policy within profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1140,9 +991,9 @@ public Mono deleteAsync(String resourceGroupName, String profileName, Stri /** * Deletes an existing security policy within profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1160,9 +1011,9 @@ private Mono deleteAsync(String resourceGroupName, String profileName, Str /** * Deletes an existing security policy within profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1176,9 +1027,9 @@ public void delete(String resourceGroupName, String profileName, String security /** * Deletes an existing security policy within profile. * - * @param resourceGroupName Name of the Resource group within the Azure subscription. - * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique - * within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. * @param securityPolicyName Name of the security policy under the profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1190,6 +1041,155 @@ public void delete(String resourceGroupName, String profileName, String security deleteAsync(resourceGroupName, profileName, securityPolicyName, context).block(); } + /** + * Lists security policies associated with the profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a SecurityPolicy list operation 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 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())); + } + + /** + * Lists security policies associated with the profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a SecurityPolicy list operation 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 accept = "application/json"; + context = this.client.mergeContext(context); + return 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)); + } + + /** + * Lists security policies associated with the profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a SecurityPolicy list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByProfileAsync(String resourceGroupName, String profileName) { + return new PagedFlux<>(() -> listByProfileSinglePageAsync(resourceGroupName, profileName), + nextLink -> listByProfileNextSinglePageAsync(nextLink)); + } + + /** + * Lists security policies associated with the profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a SecurityPolicy list operation 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)); + } + + /** + * Lists security policies associated with the profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a SecurityPolicy list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByProfile(String resourceGroupName, String profileName) { + return new PagedIterable<>(listByProfileAsync(resourceGroupName, profileName)); + } + + /** + * Lists security policies associated with the profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is + * unique within the resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a SecurityPolicy list operation 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)); + } + /** * Get the next page of items. * @@ -1197,7 +1197,7 @@ public void delete(String resourceGroupName, String profileName, String security * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 security policies along with {@link PagedResponse} on successful completion + * @return the response of a SecurityPolicy list operation along with {@link PagedResponse} on successful completion * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -1225,7 +1225,7 @@ private Mono> listByProfileNextSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 security policies along with {@link PagedResponse} on successful completion + * @return the response of a SecurityPolicy list operation along with {@link PagedResponse} on successful completion * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/UsageImpl.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/UsageImpl.java new file mode 100644 index 000000000000..e63eae17daf3 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/UsageImpl.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.cdn.implementation; + +import com.azure.resourcemanager.cdn.fluent.models.UsageInner; +import com.azure.resourcemanager.cdn.models.Usage; +import com.azure.resourcemanager.cdn.models.UsageName; +import com.azure.resourcemanager.cdn.models.UsageUnit; + +/** + * Default implementation of {@link Usage} backed by {@link UsageInner}. + */ +final class UsageImpl implements Usage { + private final UsageInner inner; + + UsageImpl(UsageInner inner) { + this.inner = inner; + } + + @Override + public String id() { + return this.inner.id(); + } + + @Override + public UsageUnit unit() { + return this.inner.unit(); + } + + @Override + public long currentValue() { + return this.inner.currentValue(); + } + + @Override + public long limit() { + return this.inner.limit(); + } + + @Override + public UsageName name() { + return this.inner.name(); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/WebAgentsClientImpl.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/WebAgentsClientImpl.java new file mode 100644 index 000000000000..7f9643fa25ef --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/WebAgentsClientImpl.java @@ -0,0 +1,1278 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.cdn.fluent.WebAgentsClient; +import com.azure.resourcemanager.cdn.fluent.models.WebAgentInner; +import com.azure.resourcemanager.cdn.implementation.models.WebAgentList; +import com.azure.resourcemanager.cdn.models.WebAgentUpdateParameters; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in WebAgentsClient. + */ +public final class WebAgentsClientImpl implements InnerSupportsGet, InnerSupportsListing, + InnerSupportsDelete, WebAgentsClient { + /** + * The proxy service used to perform REST calls. + */ + private final WebAgentsService service; + + /** + * The service client containing this operation class. + */ + private final CdnManagementClientImpl client; + + /** + * Initializes an instance of WebAgentsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + WebAgentsClientImpl(CdnManagementClientImpl client) { + this.service + = RestProxy.create(WebAgentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for CdnManagementClientWebAgents to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "CdnManagementClientWebAgents") + public interface WebAgentsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/webAgents/{webAgentName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("webAgentName") String webAgentName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/webAgents/{webAgentName}") + @ExpectedResponses({ 200, 201, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("webAgentName") String webAgentName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") WebAgentInner webAgent, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/webAgents/{webAgentName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("webAgentName") String webAgentName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") WebAgentUpdateParameters webAgentUpdateParameters, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/webAgents/{webAgentName}") + @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("webAgentName") String webAgentName, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/webAgents") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/webAgents") + @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}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets a web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web agent with the specified name within a resource group along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String webAgentName) { + 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 (webAgentName == null) { + return Mono.error(new IllegalArgumentException("Parameter webAgentName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, webAgentName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web agent with the specified name within a resource group along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String webAgentName, 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 (webAgentName == null) { + return Mono.error(new IllegalArgumentException("Parameter webAgentName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, webAgentName, accept, context); + } + + /** + * Gets a web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web agent with the specified name within a resource group on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getByResourceGroupAsync(String resourceGroupName, String webAgentName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, webAgentName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web agent with the specified name within a resource group along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String webAgentName, + Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, webAgentName, context).block(); + } + + /** + * Gets a web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web agent with the specified name within a resource group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WebAgentInner getByResourceGroup(String resourceGroupName, String webAgentName) { + return getByResourceGroupWithResponse(resourceGroupName, webAgentName, Context.NONE).getValue(); + } + + /** + * Creates or updates a web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param webAgent Web agent to be created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web agent resource for Azure CDN along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String webAgentName, WebAgentInner webAgent) { + 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 (webAgentName == null) { + return Mono.error(new IllegalArgumentException("Parameter webAgentName is required and cannot be null.")); + } + if (webAgent == null) { + return Mono.error(new IllegalArgumentException("Parameter webAgent is required and cannot be null.")); + } else { + webAgent.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, webAgentName, contentType, accept, webAgent, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param webAgent Web agent to be created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web agent resource for Azure CDN along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String webAgentName, WebAgentInner webAgent, 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 (webAgentName == null) { + return Mono.error(new IllegalArgumentException("Parameter webAgentName is required and cannot be null.")); + } + if (webAgent == null) { + return Mono.error(new IllegalArgumentException("Parameter webAgent is required and cannot be null.")); + } else { + webAgent.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, webAgentName, contentType, accept, webAgent, context); + } + + /** + * Creates or updates a web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param webAgent Web agent to be created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 a web agent resource for Azure CDN. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, WebAgentInner> beginCreateOrUpdateAsync(String resourceGroupName, + String webAgentName, WebAgentInner webAgent) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, webAgentName, webAgent); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + WebAgentInner.class, WebAgentInner.class, this.client.getContext()); + } + + /** + * Creates or updates a web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param webAgent Web agent to be created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 a web agent resource for Azure CDN. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WebAgentInner> beginCreateOrUpdateAsync(String resourceGroupName, + String webAgentName, WebAgentInner webAgent, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, webAgentName, webAgent, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + WebAgentInner.class, WebAgentInner.class, context); + } + + /** + * Creates or updates a web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param webAgent Web agent to be created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of defines a web agent resource for Azure CDN. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WebAgentInner> beginCreateOrUpdate(String resourceGroupName, + String webAgentName, WebAgentInner webAgent) { + return this.beginCreateOrUpdateAsync(resourceGroupName, webAgentName, webAgent).getSyncPoller(); + } + + /** + * Creates or updates a web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param webAgent Web agent to be created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of defines a web agent resource for Azure CDN. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WebAgentInner> beginCreateOrUpdate(String resourceGroupName, + String webAgentName, WebAgentInner webAgent, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, webAgentName, webAgent, context).getSyncPoller(); + } + + /** + * Creates or updates a web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param webAgent Web agent to be created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web agent resource for Azure CDN on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync(String resourceGroupName, String webAgentName, + WebAgentInner webAgent) { + return beginCreateOrUpdateAsync(resourceGroupName, webAgentName, webAgent).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param webAgent Web agent to be created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web agent resource for Azure CDN on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String webAgentName, + WebAgentInner webAgent, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, webAgentName, webAgent, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param webAgent Web agent to be created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web agent resource for Azure CDN. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WebAgentInner createOrUpdate(String resourceGroupName, String webAgentName, WebAgentInner webAgent) { + return createOrUpdateAsync(resourceGroupName, webAgentName, webAgent).block(); + } + + /** + * Creates or updates a web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param webAgent Web agent to be created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web agent resource for Azure CDN. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WebAgentInner createOrUpdate(String resourceGroupName, String webAgentName, WebAgentInner webAgent, + Context context) { + return createOrUpdateAsync(resourceGroupName, webAgentName, webAgent, context).block(); + } + + /** + * Updates an existing web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param webAgentUpdateParameters Web agent parameters to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web agent resource for Azure CDN along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> updateWithResponseAsync(String resourceGroupName, String webAgentName, + WebAgentUpdateParameters webAgentUpdateParameters) { + 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 (webAgentName == null) { + return Mono.error(new IllegalArgumentException("Parameter webAgentName is required and cannot be null.")); + } + if (webAgentUpdateParameters == null) { + return Mono.error( + new IllegalArgumentException("Parameter webAgentUpdateParameters is required and cannot be null.")); + } else { + webAgentUpdateParameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, webAgentName, contentType, accept, + webAgentUpdateParameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates an existing web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param webAgentUpdateParameters Web agent parameters to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web agent resource for Azure CDN along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String webAgentName, + WebAgentUpdateParameters webAgentUpdateParameters, 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 (webAgentName == null) { + return Mono.error(new IllegalArgumentException("Parameter webAgentName is required and cannot be null.")); + } + if (webAgentUpdateParameters == null) { + return Mono.error( + new IllegalArgumentException("Parameter webAgentUpdateParameters is required and cannot be null.")); + } else { + webAgentUpdateParameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, webAgentName, contentType, accept, webAgentUpdateParameters, context); + } + + /** + * Updates an existing web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param webAgentUpdateParameters Web agent parameters to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 a web agent resource for Azure CDN. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginUpdateAsync(String resourceGroupName, String webAgentName, + WebAgentUpdateParameters webAgentUpdateParameters) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, webAgentName, webAgentUpdateParameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Updates an existing web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param webAgentUpdateParameters Web agent parameters to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 a web agent resource for Azure CDN. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginUpdateAsync(String resourceGroupName, String webAgentName, + WebAgentUpdateParameters webAgentUpdateParameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, webAgentName, webAgentUpdateParameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Updates an existing web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param webAgentUpdateParameters Web agent parameters to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of defines a web agent resource for Azure CDN. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginUpdate(String resourceGroupName, String webAgentName, + WebAgentUpdateParameters webAgentUpdateParameters) { + return this.beginUpdateAsync(resourceGroupName, webAgentName, webAgentUpdateParameters).getSyncPoller(); + } + + /** + * Updates an existing web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param webAgentUpdateParameters Web agent parameters to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of defines a web agent resource for Azure CDN. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginUpdate(String resourceGroupName, String webAgentName, + WebAgentUpdateParameters webAgentUpdateParameters, Context context) { + return this.beginUpdateAsync(resourceGroupName, webAgentName, webAgentUpdateParameters, context) + .getSyncPoller(); + } + + /** + * Updates an existing web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param webAgentUpdateParameters Web agent parameters to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web agent resource for Azure CDN on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateAsync(String resourceGroupName, String webAgentName, + WebAgentUpdateParameters webAgentUpdateParameters) { + return beginUpdateAsync(resourceGroupName, webAgentName, webAgentUpdateParameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates an existing web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param webAgentUpdateParameters Web agent parameters to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web agent resource for Azure CDN on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String webAgentName, + WebAgentUpdateParameters webAgentUpdateParameters, Context context) { + return beginUpdateAsync(resourceGroupName, webAgentName, webAgentUpdateParameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates an existing web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param webAgentUpdateParameters Web agent parameters to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 update(String resourceGroupName, String webAgentName, + WebAgentUpdateParameters webAgentUpdateParameters) { + updateAsync(resourceGroupName, webAgentName, webAgentUpdateParameters).block(); + } + + /** + * Updates an existing web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param webAgentUpdateParameters Web agent parameters to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 update(String resourceGroupName, String webAgentName, WebAgentUpdateParameters webAgentUpdateParameters, + Context context) { + updateAsync(resourceGroupName, webAgentName, webAgentUpdateParameters, context).block(); + } + + /** + * Deletes a web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> deleteWithResponseAsync(String resourceGroupName, String webAgentName) { + 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 (webAgentName == null) { + return Mono.error(new IllegalArgumentException("Parameter webAgentName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, webAgentName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String webAgentName, + 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 (webAgentName == null) { + return Mono.error(new IllegalArgumentException("Parameter webAgentName is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, webAgentName, context); + } + + /** + * Deletes a web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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) + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String webAgentName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, webAgentName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes a web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 webAgentName, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, webAgentName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes a web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String webAgentName) { + return this.beginDeleteAsync(resourceGroupName, webAgentName).getSyncPoller(); + } + + /** + * Deletes a web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String webAgentName, + Context context) { + return this.beginDeleteAsync(resourceGroupName, webAgentName, context).getSyncPoller(); + } + + /** + * Deletes a web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String webAgentName) { + return beginDeleteAsync(resourceGroupName, webAgentName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 webAgentName, Context context) { + return beginDeleteAsync(resourceGroupName, webAgentName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 webAgentName) { + deleteAsync(resourceGroupName, webAgentName).block(); + } + + /** + * Deletes a web agent with the specified name within a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webAgentName The name of the web agent. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 webAgentName, Context context) { + deleteAsync(resourceGroupName, webAgentName, context).block(); + } + + /** + * Lists all web agents 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 web agents along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all web agents 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 web agents along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists all web agents 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 web agents as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Lists all web agents 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 web agents as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all web agents 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 web agents as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * Lists all web agents 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 web agents 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 web agents 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 web agents along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all web agents 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 web agents along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists all web agents 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 web agents as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * Lists all web agents 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 web agents 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 web agents 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 web agents as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Lists all web agents 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 web agents as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The 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 web agents along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The 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 web agents along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * 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 web agents along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The 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 web agents along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdDomainListResult.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/AFDDomainListResult.java similarity index 55% rename from sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdDomainListResult.java rename to sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/AFDDomainListResult.java index eda8377c21a9..7ef88ceee0a3 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdDomainListResult.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/AFDDomainListResult.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.cdn.models; +package com.azure.resourcemanager.cdn.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,29 +15,28 @@ import java.util.List; /** - * Result of the request to list domains. It contains a list of domain objects and a URL link to get the next set of - * results. + * The response of a AFDDomain list operation. */ -@Fluent -public final class AfdDomainListResult implements JsonSerializable { +@Immutable +public final class AFDDomainListResult implements JsonSerializable { /* - * List of AzureFrontDoor domains within a profile. + * The AFDDomain items on this page */ private List value; /* - * URL to get the next set of domain objects if there are any. + * The link to the next page of items */ private String nextLink; /** - * Creates an instance of AfdDomainListResult class. + * Creates an instance of AFDDomainListResult class. */ - public AfdDomainListResult() { + private AFDDomainListResult() { } /** - * Get the value property: List of AzureFrontDoor domains within a profile. + * Get the value property: The AFDDomain 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 domain objects if there are any. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -53,64 +53,60 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: URL to get the next set of domain objects if there are any. - * - * @param nextLink the nextLink value to set. - * @return the AfdDomainListResult object itself. - */ - public AfdDomainListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() != null) { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model AFDDomainListResult")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(AFDDomainListResult.class); + /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } /** - * Reads an instance of AfdDomainListResult from the JsonReader. + * Reads an instance of AFDDomainListResult from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of AfdDomainListResult if the JsonReader was pointing to an instance of it, or null if it was + * @return An instance of AFDDomainListResult 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 AfdDomainListResult. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AFDDomainListResult. */ - public static AfdDomainListResult fromJson(JsonReader jsonReader) throws IOException { + public static AFDDomainListResult fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - AfdDomainListResult deserializedAfdDomainListResult = new AfdDomainListResult(); + AFDDomainListResult deserializedAFDDomainListResult = new AFDDomainListResult(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> AfdDomainInner.fromJson(reader1)); - deserializedAfdDomainListResult.value = value; + deserializedAFDDomainListResult.value = value; } else if ("nextLink".equals(fieldName)) { - deserializedAfdDomainListResult.nextLink = reader.getString(); + deserializedAFDDomainListResult.nextLink = reader.getString(); } else { reader.skipChildren(); } } - return deserializedAfdDomainListResult; + return deserializedAFDDomainListResult; }); } } diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdEndpointListResult.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/AFDEndpointListResult.java similarity index 55% rename from sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdEndpointListResult.java rename to sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/AFDEndpointListResult.java index 52c9c9dc6ac5..1fef6c42d86d 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdEndpointListResult.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/AFDEndpointListResult.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.cdn.models; +package com.azure.resourcemanager.cdn.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,29 +15,28 @@ import java.util.List; /** - * Result of the request to list endpoints. It contains a list of endpoint objects and a URL link to get the next set of - * results. + * The response of a AFDEndpoint list operation. */ -@Fluent -public final class AfdEndpointListResult implements JsonSerializable { +@Immutable +public final class AFDEndpointListResult implements JsonSerializable { /* - * List of AzureFrontDoor endpoints within a profile + * The AFDEndpoint items on this page */ private List value; /* - * URL to get the next set of endpoint objects if there is any. + * The link to the next page of items */ private String nextLink; /** - * Creates an instance of AfdEndpointListResult class. + * Creates an instance of AFDEndpointListResult class. */ - public AfdEndpointListResult() { + private AFDEndpointListResult() { } /** - * Get the value property: List of AzureFrontDoor endpoints within a profile. + * Get the value property: The AFDEndpoint 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 endpoint objects if there is any. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -53,64 +53,60 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: URL to get the next set of endpoint objects if there is any. - * - * @param nextLink the nextLink value to set. - * @return the AfdEndpointListResult object itself. - */ - public AfdEndpointListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() != null) { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model AFDEndpointListResult")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(AFDEndpointListResult.class); + /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } /** - * Reads an instance of AfdEndpointListResult from the JsonReader. + * Reads an instance of AFDEndpointListResult from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of AfdEndpointListResult if the JsonReader was pointing to an instance of it, or null if it + * @return An instance of AFDEndpointListResult 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 AfdEndpointListResult. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AFDEndpointListResult. */ - public static AfdEndpointListResult fromJson(JsonReader jsonReader) throws IOException { + public static AFDEndpointListResult fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - AfdEndpointListResult deserializedAfdEndpointListResult = new AfdEndpointListResult(); + AFDEndpointListResult deserializedAFDEndpointListResult = new AFDEndpointListResult(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> AfdEndpointInner.fromJson(reader1)); - deserializedAfdEndpointListResult.value = value; + deserializedAFDEndpointListResult.value = value; } else if ("nextLink".equals(fieldName)) { - deserializedAfdEndpointListResult.nextLink = reader.getString(); + deserializedAFDEndpointListResult.nextLink = reader.getString(); } else { reader.skipChildren(); } } - return deserializedAfdEndpointListResult; + return deserializedAFDEndpointListResult; }); } } diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdOriginGroupListResult.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/AFDOriginGroupListResult.java similarity index 55% rename from sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdOriginGroupListResult.java rename to sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/AFDOriginGroupListResult.java index 1bf42e16fe74..8d88ca4b2d9c 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdOriginGroupListResult.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/AFDOriginGroupListResult.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.cdn.models; +package com.azure.resourcemanager.cdn.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,29 +15,28 @@ import java.util.List; /** - * Result of the request to list origin groups. It contains a list of origin groups objects and a URL link to get the - * next set of results. + * The response of a AFDOriginGroup list operation. */ -@Fluent -public final class AfdOriginGroupListResult implements JsonSerializable { +@Immutable +public final class AFDOriginGroupListResult implements JsonSerializable { /* - * List of Azure Front Door origin groups within an Azure Front Door endpoint + * The AFDOriginGroup items on this page */ private List value; /* - * URL to get the next set of origin objects if there are any. + * The link to the next page of items */ private String nextLink; /** - * Creates an instance of AfdOriginGroupListResult class. + * Creates an instance of AFDOriginGroupListResult class. */ - public AfdOriginGroupListResult() { + private AFDOriginGroupListResult() { } /** - * Get the value property: List of Azure Front Door origin groups within an Azure Front Door endpoint. + * Get the value property: The AFDOriginGroup 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 origin objects if there are any. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -53,49 +53,45 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: URL to get the next set of origin objects if there are any. - * - * @param nextLink the nextLink value to set. - * @return the AfdOriginGroupListResult object itself. - */ - public AfdOriginGroupListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() != null) { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model AFDOriginGroupListResult")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(AFDOriginGroupListResult.class); + /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } /** - * Reads an instance of AfdOriginGroupListResult from the JsonReader. + * Reads an instance of AFDOriginGroupListResult from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of AfdOriginGroupListResult if the JsonReader was pointing to an instance of it, or null if + * @return An instance of AFDOriginGroupListResult 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 AfdOriginGroupListResult. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AFDOriginGroupListResult. */ - public static AfdOriginGroupListResult fromJson(JsonReader jsonReader) throws IOException { + public static AFDOriginGroupListResult fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - AfdOriginGroupListResult deserializedAfdOriginGroupListResult = new AfdOriginGroupListResult(); + AFDOriginGroupListResult deserializedAFDOriginGroupListResult = new AFDOriginGroupListResult(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); @@ -103,15 +99,15 @@ public static AfdOriginGroupListResult fromJson(JsonReader jsonReader) throws IO if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> AfdOriginGroupInner.fromJson(reader1)); - deserializedAfdOriginGroupListResult.value = value; + deserializedAFDOriginGroupListResult.value = value; } else if ("nextLink".equals(fieldName)) { - deserializedAfdOriginGroupListResult.nextLink = reader.getString(); + deserializedAFDOriginGroupListResult.nextLink = reader.getString(); } else { reader.skipChildren(); } } - return deserializedAfdOriginGroupListResult; + return deserializedAFDOriginGroupListResult; }); } } diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdOriginListResult.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/AFDOriginListResult.java similarity index 55% rename from sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdOriginListResult.java rename to sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/AFDOriginListResult.java index 7a77dbb4352e..50d6c6803a73 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdOriginListResult.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/AFDOriginListResult.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.cdn.models; +package com.azure.resourcemanager.cdn.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,29 +15,28 @@ import java.util.List; /** - * Result of the request to list origins. It contains a list of origin objects and a URL link to get the next set of - * results. + * The response of a AFDOrigin list operation. */ -@Fluent -public final class AfdOriginListResult implements JsonSerializable { +@Immutable +public final class AFDOriginListResult implements JsonSerializable { /* - * List of Azure Front Door origins within an Azure Front Door endpoint + * The AFDOrigin items on this page */ private List value; /* - * URL to get the next set of origin objects if there are any. + * The link to the next page of items */ private String nextLink; /** - * Creates an instance of AfdOriginListResult class. + * Creates an instance of AFDOriginListResult class. */ - public AfdOriginListResult() { + private AFDOriginListResult() { } /** - * Get the value property: List of Azure Front Door origins within an Azure Front Door endpoint. + * Get the value property: The AFDOrigin 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 origin objects if there are any. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -53,64 +53,60 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: URL to get the next set of origin objects if there are any. - * - * @param nextLink the nextLink value to set. - * @return the AfdOriginListResult object itself. - */ - public AfdOriginListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() != null) { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model AFDOriginListResult")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(AFDOriginListResult.class); + /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } /** - * Reads an instance of AfdOriginListResult from the JsonReader. + * Reads an instance of AFDOriginListResult from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of AfdOriginListResult if the JsonReader was pointing to an instance of it, or null if it was + * @return An instance of AFDOriginListResult 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 AfdOriginListResult. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AFDOriginListResult. */ - public static AfdOriginListResult fromJson(JsonReader jsonReader) throws IOException { + public static AFDOriginListResult fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - AfdOriginListResult deserializedAfdOriginListResult = new AfdOriginListResult(); + AFDOriginListResult deserializedAFDOriginListResult = new AFDOriginListResult(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> AfdOriginInner.fromJson(reader1)); - deserializedAfdOriginListResult.value = value; + deserializedAFDOriginListResult.value = value; } else if ("nextLink".equals(fieldName)) { - deserializedAfdOriginListResult.nextLink = reader.getString(); + deserializedAFDOriginListResult.nextLink = reader.getString(); } else { reader.skipChildren(); } } - return deserializedAfdOriginListResult; + return deserializedAFDOriginListResult; }); } } diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CdnWebApplicationFirewallPolicyList.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/CdnWebApplicationFirewallPolicyList.java similarity index 74% rename from sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CdnWebApplicationFirewallPolicyList.java rename to sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/CdnWebApplicationFirewallPolicyList.java index 4ff34afa7f0a..5c47988969cb 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CdnWebApplicationFirewallPolicyList.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/CdnWebApplicationFirewallPolicyList.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.cdn.models; +package com.azure.resourcemanager.cdn.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -17,27 +18,27 @@ * Defines a list of WebApplicationFirewallPolicies for Azure CDN. It contains a list of WebApplicationFirewallPolicy * objects and a URL link to get the next set of results. */ -@Fluent +@Immutable public final class CdnWebApplicationFirewallPolicyList implements JsonSerializable { /* - * List of Azure CDN WebApplicationFirewallPolicies within a resource group. + * The CdnWebApplicationFirewallPolicy 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 CdnWebApplicationFirewallPolicyList class. */ - public CdnWebApplicationFirewallPolicyList() { + private CdnWebApplicationFirewallPolicyList() { } /** - * Get the value property: List of Azure CDN WebApplicationFirewallPolicies within a resource group. + * Get the value property: The CdnWebApplicationFirewallPolicy items on this page. * * @return the value value. */ @@ -46,7 +47,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. */ @@ -54,34 +55,30 @@ 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 CdnWebApplicationFirewallPolicyList object itself. - */ - public CdnWebApplicationFirewallPolicyList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() != null) { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model CdnWebApplicationFirewallPolicyList")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(CdnWebApplicationFirewallPolicyList.class); + /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -92,6 +89,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of CdnWebApplicationFirewallPolicyList 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 CdnWebApplicationFirewallPolicyList. */ public static CdnWebApplicationFirewallPolicyList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomDomainListResult.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/CustomDomainListResult.java similarity index 72% rename from sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomDomainListResult.java rename to sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/CustomDomainListResult.java index 4b9f11ed6474..541eb94bc81c 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomDomainListResult.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/CustomDomainListResult.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.cdn.models; +package com.azure.resourcemanager.cdn.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,29 +15,28 @@ import java.util.List; /** - * Result of the request to list custom domains. It contains a list of custom domain objects and a URL link to get the - * next set of results. + * The response of a CustomDomain list operation. */ -@Fluent +@Immutable public final class CustomDomainListResult implements JsonSerializable { /* - * List of CDN CustomDomains within an endpoint. + * The CustomDomain items on this page */ private List value; /* - * URL to get the next set of custom domain objects if there are any. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of CustomDomainListResult class. */ - public CustomDomainListResult() { + private CustomDomainListResult() { } /** - * Get the value property: List of CDN CustomDomains within an endpoint. + * Get the value property: The CustomDomain 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 custom domain objects if there are any. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -53,34 +53,29 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: URL to get the next set of custom domain objects if there are any. - * - * @param nextLink the nextLink value to set. - * @return the CustomDomainListResult object itself. - */ - public CustomDomainListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() != null) { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model CustomDomainListResult")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(CustomDomainListResult.class); + /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -91,6 +86,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of CustomDomainListResult 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 CustomDomainListResult. */ public static CustomDomainListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/DeploymentVersionListResult.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/DeploymentVersionListResult.java new file mode 100644 index 000000000000..8dfd9629265d --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/DeploymentVersionListResult.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.cdn.fluent.models.DeploymentVersionInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a DeploymentVersion list operation. + */ +@Immutable +public final class DeploymentVersionListResult implements JsonSerializable { + /* + * The DeploymentVersion items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of DeploymentVersionListResult class. + */ + private DeploymentVersionListResult() { + } + + /** + * Get the value property: The DeploymentVersion items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model DeploymentVersionListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DeploymentVersionListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentVersionListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentVersionListResult 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 DeploymentVersionListResult. + */ + public static DeploymentVersionListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentVersionListResult deserializedDeploymentVersionListResult = new DeploymentVersionListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> DeploymentVersionInner.fromJson(reader1)); + deserializedDeploymentVersionListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedDeploymentVersionListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentVersionListResult; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/EdgenodeResult.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/EdgenodeResult.java similarity index 74% rename from sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/EdgenodeResult.java rename to sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/EdgenodeResult.java index f5bbc3e64abd..7a15b0e59c66 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/EdgenodeResult.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/EdgenodeResult.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.cdn.models; +package com.azure.resourcemanager.cdn.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -17,26 +18,26 @@ * Result of the request to list CDN edgenodes. It contains a list of ip address group and a URL link to get the next * set of results. */ -@Fluent +@Immutable public final class EdgenodeResult implements JsonSerializable { /* - * Edge node of CDN service. + * The EdgeNode items on this page */ private List value; /* - * URL to get the next set of edgenode list results if there are any. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of EdgenodeResult class. */ - public EdgenodeResult() { + private EdgenodeResult() { } /** - * Get the value property: Edge node of CDN service. + * Get the value property: The EdgeNode items on this page. * * @return the value value. */ @@ -45,7 +46,7 @@ public List value() { } /** - * Get the nextLink property: URL to get the next set of edgenode list results if there are any. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -53,34 +54,29 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: URL to get the next set of edgenode list results if there are any. - * - * @param nextLink the nextLink value to set. - * @return the EdgenodeResult object itself. - */ - public EdgenodeResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() != null) { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model EdgenodeResult")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(EdgenodeResult.class); + /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -91,6 +87,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of EdgenodeResult 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 EdgenodeResult. */ public static EdgenodeResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/EndpointListResult.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/EndpointListResult.java similarity index 72% rename from sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/EndpointListResult.java rename to sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/EndpointListResult.java index b6f26f2ed550..79c97866394b 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/EndpointListResult.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/EndpointListResult.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.cdn.models; +package com.azure.resourcemanager.cdn.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,29 +15,28 @@ import java.util.List; /** - * Result of the request to list endpoints. It contains a list of endpoint objects and a URL link to get the next set of - * results. + * The response of a Endpoint list operation. */ -@Fluent +@Immutable public final class EndpointListResult implements JsonSerializable { /* - * List of CDN endpoints within a profile + * The Endpoint items on this page */ private List value; /* - * URL to get the next set of endpoint objects if there is any. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of EndpointListResult class. */ - public EndpointListResult() { + private EndpointListResult() { } /** - * Get the value property: List of CDN endpoints within a profile. + * Get the value property: The Endpoint 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 endpoint objects if there is any. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -53,34 +53,29 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: URL to get the next set of endpoint objects if there is any. - * - * @param nextLink the nextLink value to set. - * @return the EndpointListResult object itself. - */ - public EndpointListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() != null) { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model EndpointListResult")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(EndpointListResult.class); + /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -91,6 +86,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of EndpointListResult 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 EndpointListResult. */ public static EndpointListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/KeyGroupListResult.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/KeyGroupListResult.java new file mode 100644 index 000000000000..2ae314d1117d --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/KeyGroupListResult.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.cdn.fluent.models.KeyGroupInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a KeyGroup list operation. + */ +@Immutable +public final class KeyGroupListResult implements JsonSerializable { + /* + * The KeyGroup items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of KeyGroupListResult class. + */ + private KeyGroupListResult() { + } + + /** + * Get the value property: The KeyGroup items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model KeyGroupListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(KeyGroupListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of KeyGroupListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of KeyGroupListResult 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 KeyGroupListResult. + */ + public static KeyGroupListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + KeyGroupListResult deserializedKeyGroupListResult = new KeyGroupListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> KeyGroupInner.fromJson(reader1)); + deserializedKeyGroupListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedKeyGroupListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedKeyGroupListResult; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/KnowledgeSourceList.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/KnowledgeSourceList.java new file mode 100644 index 000000000000..5c54924368ad --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/KnowledgeSourceList.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.cdn.fluent.models.KnowledgeSourceInner; +import java.io.IOException; +import java.util.List; + +/** + * Defines a list of knowledge sources. It contains a list of KnowledgeSource objects and a URL link to get the next set + * of results. + */ +@Immutable +public final class KnowledgeSourceList implements JsonSerializable { + /* + * The KnowledgeSource items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of KnowledgeSourceList class. + */ + private KnowledgeSourceList() { + } + + /** + * Get the value property: The KnowledgeSource items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model KnowledgeSourceList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(KnowledgeSourceList.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of KnowledgeSourceList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of KnowledgeSourceList 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 KnowledgeSourceList. + */ + public static KnowledgeSourceList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + KnowledgeSourceList deserializedKnowledgeSourceList = new KnowledgeSourceList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> KnowledgeSourceInner.fromJson(reader1)); + deserializedKnowledgeSourceList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedKnowledgeSourceList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedKnowledgeSourceList; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleSetDefinitionList.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/ManagedRuleSetDefinitionList.java similarity index 73% rename from sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleSetDefinitionList.java rename to sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/ManagedRuleSetDefinitionList.java index 7e9355a28ced..82c62a02a03a 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleSetDefinitionList.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/ManagedRuleSetDefinitionList.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.cdn.models; +package com.azure.resourcemanager.cdn.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +17,26 @@ /** * 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 +45,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,34 +53,30 @@ 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) { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model ManagedRuleSetDefinitionList")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(ManagedRuleSetDefinitionList.class); + /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -90,6 +87,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/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OperationsListResult.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/OperationsListResult.java similarity index 78% rename from sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OperationsListResult.java rename to sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/OperationsListResult.java index 6baa98988daa..2ce0c71c8207 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OperationsListResult.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/OperationsListResult.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.cdn.models; +package com.azure.resourcemanager.cdn.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -17,7 +18,7 @@ * Result of the request to list CDN operations. It contains a list of operations and a URL link to get the next set of * results. */ -@Fluent +@Immutable public final class OperationsListResult implements JsonSerializable { /* * List of CDN operations supported by the CDN resource provider. @@ -32,7 +33,7 @@ public final class OperationsListResult implements JsonSerializable value() { return this.value; } - /** - * Set the value property: List of CDN operations supported by the CDN resource provider. - * - * @param value the value value to set. - * @return the OperationsListResult object itself. - */ - public OperationsListResult withValue(List value) { - this.value = value; - return this; - } - /** * Get the nextLink property: URL to get the next set of operation list results if there are any. * @@ -64,28 +54,22 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: URL to get the next set of operation list results if there are any. - * - * @param nextLink the nextLink value to set. - * @return the OperationsListResult object itself. - */ - public OperationsListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() != null) { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model OperationsListResult")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(OperationsListResult.class); + /** * {@inheritDoc} */ @@ -103,6 +87,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of OperationsListResult 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 OperationsListResult. */ public static OperationsListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginGroupListResult.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/OriginGroupListResult.java similarity index 72% rename from sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginGroupListResult.java rename to sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/OriginGroupListResult.java index 48e356e70bac..15b656341f3c 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginGroupListResult.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/OriginGroupListResult.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.cdn.models; +package com.azure.resourcemanager.cdn.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,29 +15,28 @@ import java.util.List; /** - * Result of the request to list origin groups. It contains a list of origin groups objects and a URL link to get the - * next set of results. + * The response of a OriginGroup list operation. */ -@Fluent +@Immutable public final class OriginGroupListResult implements JsonSerializable { /* - * List of CDN origin groups within an endpoint + * The OriginGroup items on this page */ private List value; /* - * URL to get the next set of origin objects if there are any. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of OriginGroupListResult class. */ - public OriginGroupListResult() { + private OriginGroupListResult() { } /** - * Get the value property: List of CDN origin groups within an endpoint. + * Get the value property: The OriginGroup 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 origin objects if there are any. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -53,34 +53,29 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: URL to get the next set of origin objects if there are any. - * - * @param nextLink the nextLink value to set. - * @return the OriginGroupListResult object itself. - */ - public OriginGroupListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() != null) { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model OriginGroupListResult")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(OriginGroupListResult.class); + /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -91,6 +86,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of OriginGroupListResult 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 OriginGroupListResult. */ public static OriginGroupListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginListResult.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/OriginListResult.java similarity index 72% rename from sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginListResult.java rename to sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/OriginListResult.java index 7460360ecdb2..36520c4f9c15 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginListResult.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/OriginListResult.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.cdn.models; +package com.azure.resourcemanager.cdn.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,29 +15,28 @@ import java.util.List; /** - * Result of the request to list origins. It contains a list of origin objects and a URL link to get the next set of - * results. + * The response of a Origin list operation. */ -@Fluent +@Immutable public final class OriginListResult implements JsonSerializable { /* - * List of CDN origins within an endpoint + * The Origin items on this page */ private List value; /* - * URL to get the next set of origin objects if there are any. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of OriginListResult class. */ - public OriginListResult() { + private OriginListResult() { } /** - * Get the value property: List of CDN origins within an endpoint. + * Get the value property: The Origin 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 origin objects if there are any. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -53,34 +53,29 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: URL to get the next set of origin objects if there are any. - * - * @param nextLink the nextLink value to set. - * @return the OriginListResult object itself. - */ - public OriginListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() != null) { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model OriginListResult")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(OriginListResult.class); + /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -91,6 +86,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of OriginListResult 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 OriginListResult. */ public static OriginListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/ProfileAgentListResult.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/ProfileAgentListResult.java new file mode 100644 index 000000000000..1ea6bd47fa99 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/ProfileAgentListResult.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.cdn.fluent.models.ProfileAgentInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ProfileAgent list operation. + */ +@Immutable +public final class ProfileAgentListResult implements JsonSerializable { + /* + * The ProfileAgent items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ProfileAgentListResult class. + */ + private ProfileAgentListResult() { + } + + /** + * Get the value property: The ProfileAgent items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model ProfileAgentListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ProfileAgentListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ProfileAgentListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ProfileAgentListResult 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 ProfileAgentListResult. + */ + public static ProfileAgentListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ProfileAgentListResult deserializedProfileAgentListResult = new ProfileAgentListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> ProfileAgentInner.fromJson(reader1)); + deserializedProfileAgentListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedProfileAgentListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedProfileAgentListResult; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProfileListResult.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/ProfileListResult.java similarity index 72% rename from sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProfileListResult.java rename to sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/ProfileListResult.java index 24f762f88e8a..4c1b13c2e933 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProfileListResult.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/ProfileListResult.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.cdn.models; +package com.azure.resourcemanager.cdn.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,29 +15,28 @@ import java.util.List; /** - * Result of the request to list profiles. It contains a list of profile objects and a URL link to get the next set of - * results. + * The response of a Profile list operation. */ -@Fluent +@Immutable public final class ProfileListResult implements JsonSerializable { /* - * List of CDN 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 ProfileListResult class. */ - public ProfileListResult() { + private ProfileListResult() { } /** - * Get the value property: List of CDN profiles within a resource group. + * Get the value property: The Profile 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 profile objects if there are any. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -53,34 +53,29 @@ 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 ProfileListResult object itself. - */ - public ProfileListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() != null) { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model ProfileListResult")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(ProfileListResult.class); + /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -91,6 +86,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ProfileListResult 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 ProfileListResult. */ public static ProfileListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ResourceUsageListResult.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/ResourceUsageListResult.java similarity index 73% rename from sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ResourceUsageListResult.java rename to sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/ResourceUsageListResult.java index 5e3f53ad21e3..6b200692b428 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ResourceUsageListResult.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/ResourceUsageListResult.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.cdn.models; +package com.azure.resourcemanager.cdn.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +17,26 @@ /** * Output of check resource usage API. */ -@Fluent +@Immutable public final class ResourceUsageListResult implements JsonSerializable { /* - * List of resource usages. + * The ResourceUsage items on this page */ private List value; /* - * URL to get the next set of custom domain objects if there are any. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of ResourceUsageListResult class. */ - public ResourceUsageListResult() { + private ResourceUsageListResult() { } /** - * Get the value property: List of resource usages. + * Get the value property: The ResourceUsage items on this page. * * @return the value value. */ @@ -44,7 +45,7 @@ public List value() { } /** - * Get the nextLink property: URL to get the next set of custom domain objects if there are any. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -52,34 +53,29 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: URL to get the next set of custom domain objects if there are any. - * - * @param nextLink the nextLink value to set. - * @return the ResourceUsageListResult object itself. - */ - public ResourceUsageListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() != null) { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model ResourceUsageListResult")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(ResourceUsageListResult.class); + /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -90,6 +86,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ResourceUsageListResult 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 ResourceUsageListResult. */ public static ResourceUsageListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RouteListResult.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/RouteListResult.java similarity index 72% rename from sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RouteListResult.java rename to sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/RouteListResult.java index b4ebc912f614..e310ae23641a 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RouteListResult.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/RouteListResult.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.cdn.models; +package com.azure.resourcemanager.cdn.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,29 +15,28 @@ import java.util.List; /** - * Result of the request to list routes. It contains a list of route objects and a URL link to get the next set of - * results. + * The response of a Route list operation. */ -@Fluent +@Immutable public final class RouteListResult implements JsonSerializable { /* - * List of AzureFrontDoor routes within a profile. + * The Route items on this page */ private List value; /* - * URL to get the next set of route objects if there are any. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of RouteListResult class. */ - public RouteListResult() { + private RouteListResult() { } /** - * Get the value property: List of AzureFrontDoor routes within a profile. + * Get the value property: The Route 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 route objects if there are any. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -53,34 +53,29 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: URL to get the next set of route objects if there are any. - * - * @param nextLink the nextLink value to set. - * @return the RouteListResult object itself. - */ - public RouteListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() != null) { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model RouteListResult")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(RouteListResult.class); + /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -91,6 +86,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of RouteListResult 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 RouteListResult. */ public static RouteListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RuleListResult.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/RuleListResult.java similarity index 72% rename from sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RuleListResult.java rename to sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/RuleListResult.java index 9f5ca790a742..e4daf083c62e 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RuleListResult.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/RuleListResult.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.cdn.models; +package com.azure.resourcemanager.cdn.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,29 +15,28 @@ import java.util.List; /** - * Result of the request to list rules. It contains a list of rule objects and a URL link to get the next set of - * results. + * The response of a Rule list operation. */ -@Fluent +@Immutable public final class RuleListResult implements JsonSerializable { /* - * List of AzureFrontDoor rules within a rule set. + * The Rule items on this page */ private List value; /* - * URL to get the next set of rule objects if there are any. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of RuleListResult class. */ - public RuleListResult() { + private RuleListResult() { } /** - * Get the value property: List of AzureFrontDoor rules within a rule set. + * Get the value property: The Rule 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 rule objects if there are any. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -53,34 +53,29 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: URL to get the next set of rule objects if there are any. - * - * @param nextLink the nextLink value to set. - * @return the RuleListResult object itself. - */ - public RuleListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() != null) { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model RuleListResult")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(RuleListResult.class); + /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -91,6 +86,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of RuleListResult 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 RuleListResult. */ public static RuleListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RuleSetListResult.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/RuleSetListResult.java similarity index 72% rename from sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RuleSetListResult.java rename to sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/RuleSetListResult.java index 42db3724cd72..cceece94c647 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RuleSetListResult.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/RuleSetListResult.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.cdn.models; +package com.azure.resourcemanager.cdn.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,29 +15,28 @@ import java.util.List; /** - * Result of the request to list rule sets. It contains a list of rule set objects and a URL link to get the next set of - * results. + * The response of a RuleSet list operation. */ -@Fluent +@Immutable public final class RuleSetListResult implements JsonSerializable { /* - * List of AzureFrontDoor rule sets within a profile. + * The RuleSet items on this page */ private List value; /* - * URL to get the next set of rule set objects if there are any. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of RuleSetListResult class. */ - public RuleSetListResult() { + private RuleSetListResult() { } /** - * Get the value property: List of AzureFrontDoor rule sets within a profile. + * Get the value property: The RuleSet 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 rule set objects if there are any. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -53,34 +53,29 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: URL to get the next set of rule set objects if there are any. - * - * @param nextLink the nextLink value to set. - * @return the RuleSetListResult object itself. - */ - public RuleSetListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() != null) { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model RuleSetListResult")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(RuleSetListResult.class); + /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -91,6 +86,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of RuleSetListResult 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 RuleSetListResult. */ public static RuleSetListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SecretListResult.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/SecretListResult.java similarity index 72% rename from sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SecretListResult.java rename to sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/SecretListResult.java index 1e6cf83fa542..f17505a6f56a 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SecretListResult.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/SecretListResult.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.cdn.models; +package com.azure.resourcemanager.cdn.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,29 +15,28 @@ import java.util.List; /** - * Result of the request to list secrets. It contains a list of Secret objects and a URL link to get the next set of - * results. + * The response of a Secret list operation. */ -@Fluent +@Immutable public final class SecretListResult implements JsonSerializable { /* - * List of AzureFrontDoor secrets within a profile. + * The Secret items on this page */ private List value; /* - * URL to get the next set of Secret objects if there are any. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of SecretListResult class. */ - public SecretListResult() { + private SecretListResult() { } /** - * Get the value property: List of AzureFrontDoor secrets within a profile. + * Get the value property: The Secret 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 Secret objects if there are any. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -53,34 +53,29 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: URL to get the next set of Secret objects if there are any. - * - * @param nextLink the nextLink value to set. - * @return the SecretListResult object itself. - */ - public SecretListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() != null) { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model SecretListResult")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(SecretListResult.class); + /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -91,6 +86,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of SecretListResult 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 SecretListResult. */ public static SecretListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SecurityPolicyListResult.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/SecurityPolicyListResult.java similarity index 72% rename from sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SecurityPolicyListResult.java rename to sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/SecurityPolicyListResult.java index 0714fc18bf97..6ad73b01ddb5 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SecurityPolicyListResult.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/SecurityPolicyListResult.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.cdn.models; +package com.azure.resourcemanager.cdn.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,29 +15,28 @@ import java.util.List; /** - * Result of the request to list security policies. It contains a list of security policy objects and a URL link to get - * the next set of results. + * The response of a SecurityPolicy list operation. */ -@Fluent +@Immutable public final class SecurityPolicyListResult implements JsonSerializable { /* - * List of Security policies within a profile + * The SecurityPolicy items on this page */ private List value; /* - * URL to get the next set of security policy objects if there is any. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of SecurityPolicyListResult class. */ - public SecurityPolicyListResult() { + private SecurityPolicyListResult() { } /** - * Get the value property: List of Security policies within a profile. + * Get the value property: The SecurityPolicy 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 security policy objects if there is any. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -53,34 +53,29 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: URL to get the next set of security policy objects if there is any. - * - * @param nextLink the nextLink value to set. - * @return the SecurityPolicyListResult object itself. - */ - public SecurityPolicyListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() != null) { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model SecurityPolicyListResult")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(SecurityPolicyListResult.class); + /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -91,6 +86,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of SecurityPolicyListResult 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 SecurityPolicyListResult. */ public static SecurityPolicyListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UsagesListResult.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/UsagesListResult.java similarity index 72% rename from sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UsagesListResult.java rename to sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/UsagesListResult.java index 30790fb57129..aabaaedb7b6b 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UsagesListResult.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/UsagesListResult.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.cdn.models; +package com.azure.resourcemanager.cdn.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +17,26 @@ /** * The list usages operation response. */ -@Fluent +@Immutable public final class UsagesListResult implements JsonSerializable { /* - * The list of resource usages. + * The Usage items on this page */ private List value; /* - * URL to get the next set of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of UsagesListResult class. */ - public UsagesListResult() { + private UsagesListResult() { } /** - * Get the value property: The list of resource usages. + * Get the value property: The Usage items on this page. * * @return the value value. */ @@ -44,18 +45,7 @@ public List value() { } /** - * Set the value property: The list of resource usages. - * - * @param value the value value to set. - * @return the UsagesListResult object itself. - */ - public UsagesListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: URL to get the next set of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +53,22 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: URL to get the next set of results. - * - * @param nextLink the nextLink value to set. - * @return the UsagesListResult object itself. - */ - public UsagesListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() != null) { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model UsagesListResult")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(UsagesListResult.class); + /** * {@inheritDoc} */ @@ -102,6 +86,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of UsagesListResult 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 UsagesListResult. */ public static UsagesListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/WebAgentList.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/WebAgentList.java new file mode 100644 index 000000000000..a8c0ad6dea52 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/models/WebAgentList.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.cdn.fluent.models.WebAgentInner; +import java.io.IOException; +import java.util.List; + +/** + * Defines a list of web agents. It contains a list of WebAgent objects and a URL link to get the next set of results. + */ +@Immutable +public final class WebAgentList implements JsonSerializable { + /* + * The WebAgent items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of WebAgentList class. + */ + private WebAgentList() { + } + + /** + * Get the value property: The WebAgent items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model WebAgentList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WebAgentList.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WebAgentList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WebAgentList 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 WebAgentList. + */ + public static WebAgentList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WebAgentList deserializedWebAgentList = new WebAgentList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> WebAgentInner.fromJson(reader1)); + deserializedWebAgentList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedWebAgentList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedWebAgentList; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ActionType.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ActionType.java index 2e07fe1e45fa..40b1fb086b3e 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ActionType.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/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.cdn.models; @@ -31,6 +31,21 @@ public final class ActionType extends ExpandableStringEnum { */ public static final ActionType REDIRECT = fromString("Redirect"); + /** + * Static value AnomalyScoring for ActionType. + */ + public static final ActionType ANOMALY_SCORING = fromString("AnomalyScoring"); + + /** + * Static value JSChallenge for ActionType. + */ + public static final ActionType JSCHALLENGE = fromString("JSChallenge"); + + /** + * Static value CAPTCHA for ActionType. + */ + public static final ActionType CAPTCHA = fromString("CAPTCHA"); + /** * Creates a new instance of ActionType value. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ActivatedResourceReference.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ActivatedResourceReference.java index 561455141109..0506626295dd 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ActivatedResourceReference.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ActivatedResourceReference.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdCertificateType.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdCertificateType.java index 6a7976f431d0..840636b2deb0 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdCertificateType.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdCertificateType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdCipherSuiteSetType.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdCipherSuiteSetType.java new file mode 100644 index 000000000000..7243f1e07f02 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdCipherSuiteSetType.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.cdn.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * cipher suite set type that will be used for Https. + */ +public final class AfdCipherSuiteSetType extends ExpandableStringEnum { + /** + * Static value Customized for AfdCipherSuiteSetType. + */ + public static final AfdCipherSuiteSetType CUSTOMIZED = fromString("Customized"); + + /** + * Static value TLS10_2019 for AfdCipherSuiteSetType. + */ + public static final AfdCipherSuiteSetType TLS10_2019 = fromString("TLS10_2019"); + + /** + * Static value TLS12_2022 for AfdCipherSuiteSetType. + */ + public static final AfdCipherSuiteSetType TLS12_2022 = fromString("TLS12_2022"); + + /** + * Static value TLS12_2023 for AfdCipherSuiteSetType. + */ + public static final AfdCipherSuiteSetType TLS12_2023 = fromString("TLS12_2023"); + + /** + * Creates a new instance of AfdCipherSuiteSetType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AfdCipherSuiteSetType() { + } + + /** + * Creates or finds a AfdCipherSuiteSetType from its string representation. + * + * @param name a name to look for. + * @return the corresponding AfdCipherSuiteSetType. + */ + public static AfdCipherSuiteSetType fromString(String name) { + return fromString(name, AfdCipherSuiteSetType.class); + } + + /** + * Gets known AfdCipherSuiteSetType values. + * + * @return known AfdCipherSuiteSetType values. + */ + public static Collection values() { + return values(AfdCipherSuiteSetType.class); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdCustomizedCipherSuiteForTls12.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdCustomizedCipherSuiteForTls12.java new file mode 100644 index 000000000000..da8ceef22368 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdCustomizedCipherSuiteForTls12.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for AfdCustomizedCipherSuiteForTls12. + */ +public final class AfdCustomizedCipherSuiteForTls12 extends ExpandableStringEnum { + /** + * Static value ECDHE_RSA_AES128_GCM_SHA256 for AfdCustomizedCipherSuiteForTls12. + */ + public static final AfdCustomizedCipherSuiteForTls12 ECDHE_RSA_AES128_GCM_SHA256 + = fromString("ECDHE_RSA_AES128_GCM_SHA256"); + + /** + * Static value ECDHE_RSA_AES256_GCM_SHA384 for AfdCustomizedCipherSuiteForTls12. + */ + public static final AfdCustomizedCipherSuiteForTls12 ECDHE_RSA_AES256_GCM_SHA384 + = fromString("ECDHE_RSA_AES256_GCM_SHA384"); + + /** + * Static value DHE_RSA_AES256_GCM_SHA384 for AfdCustomizedCipherSuiteForTls12. + */ + public static final AfdCustomizedCipherSuiteForTls12 DHE_RSA_AES256_GCM_SHA384 + = fromString("DHE_RSA_AES256_GCM_SHA384"); + + /** + * Static value DHE_RSA_AES128_GCM_SHA256 for AfdCustomizedCipherSuiteForTls12. + */ + public static final AfdCustomizedCipherSuiteForTls12 DHE_RSA_AES128_GCM_SHA256 + = fromString("DHE_RSA_AES128_GCM_SHA256"); + + /** + * Static value ECDHE_RSA_AES128_SHA256 for AfdCustomizedCipherSuiteForTls12. + */ + public static final AfdCustomizedCipherSuiteForTls12 ECDHE_RSA_AES128_SHA256 + = fromString("ECDHE_RSA_AES128_SHA256"); + + /** + * Static value ECDHE_RSA_AES256_SHA384 for AfdCustomizedCipherSuiteForTls12. + */ + public static final AfdCustomizedCipherSuiteForTls12 ECDHE_RSA_AES256_SHA384 + = fromString("ECDHE_RSA_AES256_SHA384"); + + /** + * Creates a new instance of AfdCustomizedCipherSuiteForTls12 value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AfdCustomizedCipherSuiteForTls12() { + } + + /** + * Creates or finds a AfdCustomizedCipherSuiteForTls12 from its string representation. + * + * @param name a name to look for. + * @return the corresponding AfdCustomizedCipherSuiteForTls12. + */ + public static AfdCustomizedCipherSuiteForTls12 fromString(String name) { + return fromString(name, AfdCustomizedCipherSuiteForTls12.class); + } + + /** + * Gets known AfdCustomizedCipherSuiteForTls12 values. + * + * @return known AfdCustomizedCipherSuiteForTls12 values. + */ + public static Collection values() { + return values(AfdCustomizedCipherSuiteForTls12.class); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdCustomizedCipherSuiteForTls13.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdCustomizedCipherSuiteForTls13.java new file mode 100644 index 000000000000..3ec567a63dd0 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdCustomizedCipherSuiteForTls13.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for AfdCustomizedCipherSuiteForTls13. + */ +public final class AfdCustomizedCipherSuiteForTls13 extends ExpandableStringEnum { + /** + * Static value TLS_AES_128_GCM_SHA256 for AfdCustomizedCipherSuiteForTls13. + */ + public static final AfdCustomizedCipherSuiteForTls13 TLS_AES_128_GCM_SHA256 = fromString("TLS_AES_128_GCM_SHA256"); + + /** + * Static value TLS_AES_256_GCM_SHA384 for AfdCustomizedCipherSuiteForTls13. + */ + public static final AfdCustomizedCipherSuiteForTls13 TLS_AES_256_GCM_SHA384 = fromString("TLS_AES_256_GCM_SHA384"); + + /** + * Creates a new instance of AfdCustomizedCipherSuiteForTls13 value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AfdCustomizedCipherSuiteForTls13() { + } + + /** + * Creates or finds a AfdCustomizedCipherSuiteForTls13 from its string representation. + * + * @param name a name to look for. + * @return the corresponding AfdCustomizedCipherSuiteForTls13. + */ + public static AfdCustomizedCipherSuiteForTls13 fromString(String name) { + return fromString(name, AfdCustomizedCipherSuiteForTls13.class); + } + + /** + * Gets known AfdCustomizedCipherSuiteForTls13 values. + * + * @return known AfdCustomizedCipherSuiteForTls13 values. + */ + public static Collection values() { + return values(AfdCustomizedCipherSuiteForTls13.class); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdDomainHttpsCustomizedCipherSuiteSet.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdDomainHttpsCustomizedCipherSuiteSet.java new file mode 100644 index 000000000000..8c2e6dff7f8e --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdDomainHttpsCustomizedCipherSuiteSet.java @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.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; + +/** + * Customized cipher suite set object that will be used for Https when cipherSuiteSetType is Customized. + */ +@Fluent +public final class AfdDomainHttpsCustomizedCipherSuiteSet + implements JsonSerializable { + /* + * Cipher suites for TLS 1.2. Required at least one in minimumTlsVersion TLS 1.2. + */ + private List cipherSuiteSetForTls12; + + /* + * Cipher suites for TLS 1.3. Required at least one in minimumTlsVersion TLS 1.2, TLS 1.3. + */ + private List cipherSuiteSetForTls13; + + /** + * Creates an instance of AfdDomainHttpsCustomizedCipherSuiteSet class. + */ + public AfdDomainHttpsCustomizedCipherSuiteSet() { + } + + /** + * Get the cipherSuiteSetForTls12 property: Cipher suites for TLS 1.2. Required at least one in minimumTlsVersion + * TLS 1.2. + * + * @return the cipherSuiteSetForTls12 value. + */ + public List cipherSuiteSetForTls12() { + return this.cipherSuiteSetForTls12; + } + + /** + * Set the cipherSuiteSetForTls12 property: Cipher suites for TLS 1.2. Required at least one in minimumTlsVersion + * TLS 1.2. + * + * @param cipherSuiteSetForTls12 the cipherSuiteSetForTls12 value to set. + * @return the AfdDomainHttpsCustomizedCipherSuiteSet object itself. + */ + public AfdDomainHttpsCustomizedCipherSuiteSet + withCipherSuiteSetForTls12(List cipherSuiteSetForTls12) { + this.cipherSuiteSetForTls12 = cipherSuiteSetForTls12; + return this; + } + + /** + * Get the cipherSuiteSetForTls13 property: Cipher suites for TLS 1.3. Required at least one in minimumTlsVersion + * TLS 1.2, TLS 1.3. + * + * @return the cipherSuiteSetForTls13 value. + */ + public List cipherSuiteSetForTls13() { + return this.cipherSuiteSetForTls13; + } + + /** + * Set the cipherSuiteSetForTls13 property: Cipher suites for TLS 1.3. Required at least one in minimumTlsVersion + * TLS 1.2, TLS 1.3. + * + * @param cipherSuiteSetForTls13 the cipherSuiteSetForTls13 value to set. + * @return the AfdDomainHttpsCustomizedCipherSuiteSet object itself. + */ + public AfdDomainHttpsCustomizedCipherSuiteSet + withCipherSuiteSetForTls13(List cipherSuiteSetForTls13) { + this.cipherSuiteSetForTls13 = cipherSuiteSetForTls13; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("cipherSuiteSetForTls12", this.cipherSuiteSetForTls12, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeArrayField("cipherSuiteSetForTls13", this.cipherSuiteSetForTls13, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AfdDomainHttpsCustomizedCipherSuiteSet from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AfdDomainHttpsCustomizedCipherSuiteSet 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 AfdDomainHttpsCustomizedCipherSuiteSet. + */ + public static AfdDomainHttpsCustomizedCipherSuiteSet fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AfdDomainHttpsCustomizedCipherSuiteSet deserializedAfdDomainHttpsCustomizedCipherSuiteSet + = new AfdDomainHttpsCustomizedCipherSuiteSet(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("cipherSuiteSetForTls12".equals(fieldName)) { + List cipherSuiteSetForTls12 + = reader.readArray(reader1 -> AfdCustomizedCipherSuiteForTls12.fromString(reader1.getString())); + deserializedAfdDomainHttpsCustomizedCipherSuiteSet.cipherSuiteSetForTls12 = cipherSuiteSetForTls12; + } else if ("cipherSuiteSetForTls13".equals(fieldName)) { + List cipherSuiteSetForTls13 + = reader.readArray(reader1 -> AfdCustomizedCipherSuiteForTls13.fromString(reader1.getString())); + deserializedAfdDomainHttpsCustomizedCipherSuiteSet.cipherSuiteSetForTls13 = cipherSuiteSetForTls13; + } else { + reader.skipChildren(); + } + } + + return deserializedAfdDomainHttpsCustomizedCipherSuiteSet; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdDomainHttpsParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdDomainHttpsParameters.java index 92a63b6a597a..74627d5f0f43 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdDomainHttpsParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdDomainHttpsParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -23,10 +23,20 @@ public final class AfdDomainHttpsParameters implements JsonSerializable { + /* + * Supported scenarios for establishing mTLS connection. + */ + private MtlsScenarioType scenario = MtlsScenarioType.fromString("AfdDomainMtlsParameters"); + + /** + * Creates an instance of AfdDomainMtlsParameters class. + */ + public AfdDomainMtlsParameters() { + } + + /** + * Get the scenario property: Supported scenarios for establishing mTLS connection. + * + * @return the scenario value. + */ + public MtlsScenarioType scenario() { + return this.scenario; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("scenario", this.scenario == null ? null : this.scenario.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AfdDomainMtlsParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AfdDomainMtlsParameters 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 AfdDomainMtlsParameters. + */ + public static AfdDomainMtlsParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String discriminatorValue = null; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("scenario".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("ClientCertificateRequiredAndValidated".equals(discriminatorValue)) { + return ClientCertificateRequiredAndValidatedAdvancedSettings.fromJson(readerToUse.reset()); + } else if ("ClientCertificateRequiredAndOriginValidates".equals(discriminatorValue)) { + return ClientCertificateRequiredAndOriginValidatesAdvancedSettings.fromJson(readerToUse.reset()); + } else if ("ClientCertificateValidatedIfPresented".equals(discriminatorValue)) { + return ClientCertificateValidatedIfPresentedAdvancedSettings.fromJson(readerToUse.reset()); + } else if ("CompleteMtlsPassthroughToOrigin".equals(discriminatorValue)) { + return CompleteMtlsPassthroughToOriginAdvancedSettings.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static AfdDomainMtlsParameters fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AfdDomainMtlsParameters deserializedAfdDomainMtlsParameters = new AfdDomainMtlsParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("scenario".equals(fieldName)) { + deserializedAfdDomainMtlsParameters.scenario = MtlsScenarioType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedAfdDomainMtlsParameters; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdDomainUpdateParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdDomainUpdateParameters.java index 5efa99c6e3a3..3d2224121adc 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdDomainUpdateParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdDomainUpdateParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -73,6 +73,31 @@ public AfdDomainUpdateParameters withTlsSettings(AfdDomainHttpsParameters tlsSet return this; } + /** + * Get the mtlsSettings property: The configuration specifying how to enable mutual TLS for the domain, including + * specifying allowed FQDNs and which server certificate(s) to use. + * + * @return the mtlsSettings value. + */ + public AfdDomainMtlsParameters mtlsSettings() { + return this.innerProperties() == null ? null : this.innerProperties().mtlsSettings(); + } + + /** + * Set the mtlsSettings property: The configuration specifying how to enable mutual TLS for the domain, including + * specifying allowed FQDNs and which server certificate(s) to use. + * + * @param mtlsSettings the mtlsSettings value to set. + * @return the AfdDomainUpdateParameters object itself. + */ + public AfdDomainUpdateParameters withMtlsSettings(AfdDomainMtlsParameters mtlsSettings) { + if (this.innerProperties() == null) { + this.innerProperties = new AfdDomainUpdatePropertiesParameters(); + } + this.innerProperties().withMtlsSettings(mtlsSettings); + return this; + } + /** * Get the azureDnsZone property: Resource reference to the Azure DNS zone. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdEndpoint.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdEndpoint.java new file mode 100644 index 000000000000..2a11132d09fa --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdEndpoint.java @@ -0,0 +1,255 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.http.rest.PagedIterable; +import com.azure.resourcemanager.cdn.fluent.models.AfdEndpointInner; +import com.azure.resourcemanager.resources.fluentcore.arm.models.ExternalChildResource; +import com.azure.resourcemanager.resources.fluentcore.model.HasInnerModel; +import com.azure.resourcemanager.resources.fluentcore.model.Settable; +import reactor.core.publisher.Mono; + +import java.util.List; + +/** + * An immutable client-side representation of an Azure Front Door (AFD) endpoint that lives under a {@link CdnProfile}. + */ +@Fluent +public interface AfdEndpoint extends ExternalChildResource, HasInnerModel { + + /** + * Gets the enablement state of the endpoint. + * + * @return the enablement state of the endpoint + */ + EnabledState enabledState(); + + /** + * Gets the current mTLS enforcement configuration. + * + * @return the current mTLS enforcement configuration + */ + EnforceMtlsEnabledState enforceMtls(); + + /** + * Gets the scope that determines whether a generated host name can be reused. + * + * @return the scope that determines whether a generated host name can be reused + */ + AutoGeneratedDomainNameLabelScope autoGeneratedDomainNameLabelScope(); + + /** + * Gets the provisioning state reported by the service. + * + * @return the provisioning state reported by the service + */ + AfdProvisioningState provisioningState(); + + /** + * Gets the deployment status for the endpoint. + * + * @return the deployment status for the endpoint + */ + DeploymentStatus deploymentStatus(); + + /** + * Gets the host name assigned to the endpoint. + * + * @return the host name assigned to the endpoint + */ + String hostname(); + + /** + * Purges cached content for the endpoint. + * + * @param contentPaths paths that should be removed from the cache + */ + void purgeContent(List contentPaths); + + /** + * Purges cached content for the endpoint. + * + * @param contentPaths paths that should be removed from the cache + * @param domains optional list of linked domains to scope the purge to + */ + void purgeContent(List contentPaths, List domains); + + /** + * Purges cached content for the endpoint asynchronously. + * + * @param contentPaths paths that should be removed from the cache + * @return a representation of the deferred computation of this call + */ + Mono purgeContentAsync(List contentPaths); + + /** + * Purges cached content for the endpoint asynchronously. + * + * @param contentPaths paths that should be removed from the cache + * @param domains optional list of linked domains to scope the purge to + * @return a representation of the deferred computation of this call + */ + Mono purgeContentAsync(List contentPaths, List domains); + + /** + * Validates that the provided custom domain maps correctly to this endpoint. + * + * @param hostName the host name that should point to this endpoint + * @return the validation result + */ + CustomDomainValidationResult validateCustomDomain(String hostName); + + /** + * Validates that the provided custom domain maps correctly to this endpoint asynchronously. + * + * @param hostName the host name that should point to this endpoint + * @return a representation of the deferred computation of this call + */ + Mono validateCustomDomainAsync(String hostName); + + /** + * Lists usage information for the endpoint. + * + * @return usage information for the endpoint + */ + PagedIterable listResourceUsage(); + + /** + * Grouping of AFD endpoint definition stages as part of a parent {@link CdnProfile} definition. + */ + interface DefinitionStages { + /** + * The first stage of an AFD endpoint definition. + * + * @param the stage of the parent CDN profile definition to return to after attaching this definition + */ + interface Blank extends WithAttach { + /** + * Specifies whether the endpoint should be enabled when created. + * + * @param enabledState the desired enablement state + * @return the next stage of the definition + */ + Blank withEnabledState(EnabledState enabledState); + + /** + * Specifies whether mTLS must be enforced for child routes. + * + * @param enforceMtls the mTLS enforcement configuration + * @return the next stage of the definition + */ + Blank withEnforceMtls(EnforceMtlsEnabledState enforceMtls); + + /** + * Sets the reuse scope for the auto-generated domain label. + * + * @param scope the label reuse scope + * @return the next stage of the definition + */ + Blank withAutoGeneratedDomainNameLabelScope(AutoGeneratedDomainNameLabelScope scope); + } + + /** + * The stage of the definition containing all optional settings prior to attachment. + * + * @param the stage of the parent CDN profile definition to return to after attaching this definition + */ + interface WithAttach extends Attachable { + } + + /** + * The final stage of an AFD endpoint definition. + * + * @param the stage of the parent CDN profile definition to return to after attaching this definition + */ + interface Attachable { + /** + * Attaches the defined endpoint to the parent CDN profile. + * + * @return the next stage of the parent definition + */ + ParentT attach(); + } + } + + /** + * The entirety of an AFD endpoint definition. + * + * @param the stage of the parent CDN profile definition to return to after attaching this definition + */ + interface Definition extends DefinitionStages.Blank { + } + + /** + * Grouping of AFD endpoint definition stages that run as part of a {@link CdnProfile#update()} flow. + */ + interface UpdateDefinitionStages { + /** + * The first stage of an AFD endpoint definition inside a profile update. + * + * @param the stage of the parent CDN profile definition to return to after attaching this definition + */ + interface Blank extends WithAttach { + /** + * Specifies whether the endpoint should be enabled when created. + * + * @param enabledState the desired enablement state + * @return the next stage of the definition + */ + Blank withEnabledState(EnabledState enabledState); + + /** + * Specifies whether mTLS must be enforced for child routes. + * + * @param enforceMtls the mTLS enforcement configuration + * @return the next stage of the definition + */ + Blank withEnforceMtls(EnforceMtlsEnabledState enforceMtls); + } + + /** + * The stage of the definition containing all optional settings prior to attachment. + * + * @param the stage of the parent CDN profile definition to return to after attaching this definition + */ + interface WithAttach extends Attachable { + } + + /** + * The final stage of an AFD endpoint definition inside a profile update. + * + * @param the stage of the parent CDN profile definition to return to after attaching this definition + */ + interface Attachable { + /** + * Attaches the defined endpoint to the parent CDN profile update. + * + * @return the next stage of the parent update + */ + ParentT attach(); + } + } + + /** + * The entirety of an AFD endpoint update inside a {@link CdnProfile#update()} flow. + */ + interface Update extends Settable { + /** + * Specifies whether the endpoint should be enabled. + * + * @param enabledState the desired enablement state + * @return the next stage of the update + */ + Update withEnabledState(EnabledState enabledState); + + /** + * Specifies whether mTLS must be enforced for child routes. + * + * @param enforceMtls the mTLS enforcement configuration + * @return the next stage of the update + */ + Update withEnforceMtls(EnforceMtlsEnabledState enforceMtls); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdEndpointProtocols.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdEndpointProtocols.java index 104aec43b6d0..56b46b539e60 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdEndpointProtocols.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdEndpointProtocols.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdEndpointUpdateParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdEndpointUpdateParameters.java index ec1e17c10e31..5da80a4943d2 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdEndpointUpdateParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdEndpointUpdateParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -95,6 +95,31 @@ public AfdEndpointUpdateParameters withEnabledState(EnabledState enabledState) { return this; } + /** + * Get the enforceMtls property: Set to Disabled by default. If set to Enabled, only custom domains with mTLS + * enabled can be added to child Route resources. + * + * @return the enforceMtls value. + */ + public EnforceMtlsEnabledState enforceMtls() { + return this.innerProperties() == null ? null : this.innerProperties().enforceMtls(); + } + + /** + * Set the enforceMtls property: Set to Disabled by default. If set to Enabled, only custom domains with mTLS + * enabled can be added to child Route resources. + * + * @param enforceMtls the enforceMtls value to set. + * @return the AfdEndpointUpdateParameters object itself. + */ + public AfdEndpointUpdateParameters withEnforceMtls(EnforceMtlsEnabledState enforceMtls) { + if (this.innerProperties() == null) { + this.innerProperties = new AfdEndpointPropertiesUpdateParameters(); + } + this.innerProperties().withEnforceMtls(enforceMtls); + return this; + } + /** * Validates the instance. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdMinimumTlsVersion.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdMinimumTlsVersion.java index 3167d7b8b322..b892b8f5e8fa 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdMinimumTlsVersion.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdMinimumTlsVersion.java @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; /** - * TLS protocol version that will be used for Https. + * TLS protocol version that will be used for Https when cipherSuiteSetType is Customized. */ public enum AfdMinimumTlsVersion { /** @@ -16,7 +16,12 @@ public enum AfdMinimumTlsVersion { /** * Enum value TLS12. */ - TLS12("TLS12"); + TLS12("TLS12"), + + /** + * Enum value TLS13. + */ + TLS13("TLS13"); /** * The actual serialized value for a AfdMinimumTlsVersion instance. diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdOrigin.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdOrigin.java new file mode 100644 index 000000000000..e83ec6722475 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdOrigin.java @@ -0,0 +1,478 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.cdn.fluent.models.AfdOriginInner; +import com.azure.resourcemanager.resources.fluentcore.arm.models.ExternalChildResource; +import com.azure.resourcemanager.resources.fluentcore.model.HasInnerModel; +import com.azure.resourcemanager.resources.fluentcore.model.Settable; + +/** + * An immutable client-side representation of an Azure Front Door (AFD) origin that lives under an + * {@link AfdOriginGroup}. + */ +@Fluent +public interface AfdOrigin extends ExternalChildResource, HasInnerModel { + + /** + * Gets the name of the origin group which contains this origin. + * + * @return the origin group name + */ + String originGroupName(); + + /** + * Gets the resource reference to the Azure origin resource. + * + * @return the Azure origin resource reference + */ + ResourceReference azureOrigin(); + + /** + * Gets the address of the origin. + * + * @return the hostname + */ + String hostname(); + + /** + * Gets the HTTP port for the origin. + * + * @return the HTTP port + */ + Integer httpPort(); + + /** + * Gets the HTTPS port for the origin. + * + * @return the HTTPS port + */ + Integer httpsPort(); + + /** + * Gets the host header value sent to the origin with each request. + * + * @return the origin host header + */ + String originHostHeader(); + + /** + * Gets the priority of this origin in the origin group for load balancing. + * + * @return the priority (1–5) + */ + Integer priority(); + + /** + * Gets the weight of this origin in the origin group for load balancing. + * + * @return the weight (1–1000) + */ + Integer weight(); + + /** + * Gets the shared private link resource properties for this private origin. + * + * @return the shared private link resource properties + */ + SharedPrivateLinkResourceProperties sharedPrivateLinkResource(); + + /** + * Gets the capacity resource properties for this origin. + * + * @return the origin capacity resource properties + */ + OriginCapacityResourceProperties originCapacityResource(); + + /** + * Gets whether health probes are enabled for this origin. + * + * @return the enabled state + */ + EnabledState enabledState(); + + /** + * Gets whether certificate name check is enforced at origin level. + * + * @return true if certificate name check is enforced + */ + Boolean enforceCertificateNameCheck(); + + /** + * Gets the provisioning state reported by the service. + * + * @return the provisioning state + */ + AfdProvisioningState provisioningState(); + + /** + * Gets the deployment status for the origin. + * + * @return the deployment status + */ + DeploymentStatus deploymentStatus(); + + /** + * Grouping of AFD origin definition stages as part of a parent {@link AfdOriginGroup} definition. + */ + interface DefinitionStages { + /** + * The first stage of an AFD origin definition. + * + * @param the stage of the parent AFD origin group definition to return to after attaching + */ + interface Blank extends WithHostname { + } + + /** + * The stage of an AFD origin definition requiring the hostname to be specified. + * + * @param the stage of the parent AFD origin group definition to return to after attaching + */ + interface WithHostname { + /** + * Specifies the hostname (address) of the origin. + * + * @param hostname the hostname of the origin + * @return the next stage of the definition + */ + WithAttach withHostname(String hostname); + } + + /** + * The stage of the definition containing optional settings prior to attachment. + * + * @param the stage of the parent AFD origin group definition to return to after attaching + */ + interface WithAttach extends Attachable { + /** + * Specifies a resource reference to an Azure origin resource. + * + * @param azureOrigin the Azure origin resource reference + * @return the next stage of the definition + */ + WithAttach withAzureOrigin(ResourceReference azureOrigin); + + /** + * Specifies the HTTP port for the origin. + * + * @param httpPort the HTTP port (1–65535) + * @return the next stage of the definition + */ + WithAttach withHttpPort(Integer httpPort); + + /** + * Specifies the HTTPS port for the origin. + * + * @param httpsPort the HTTPS port (1–65535) + * @return the next stage of the definition + */ + WithAttach withHttpsPort(Integer httpsPort); + + /** + * Specifies the host header value sent to the origin with each request. + * + * @param originHostHeader the origin host header + * @return the next stage of the definition + */ + WithAttach withOriginHostHeader(String originHostHeader); + + /** + * Specifies the priority of this origin in the origin group for load balancing. + * + * @param priority the priority (1–5) + * @return the next stage of the definition + */ + WithAttach withPriority(Integer priority); + + /** + * Specifies the weight of this origin in the origin group for load balancing. + * + * @param weight the weight (1–1000) + * @return the next stage of the definition + */ + WithAttach withWeight(Integer weight); + + /** + * Specifies the shared private link resource properties for a private origin. + * + * @param sharedPrivateLinkResource the shared private link resource properties + * @return the next stage of the definition + */ + WithAttach + withSharedPrivateLinkResource(SharedPrivateLinkResourceProperties sharedPrivateLinkResource); + + /** + * Specifies the capacity resource properties for the origin. + * + * @param originCapacityResource the origin capacity resource properties + * @return the next stage of the definition + */ + WithAttach withOriginCapacityResource(OriginCapacityResourceProperties originCapacityResource); + + /** + * Specifies whether health probes should be enabled for this origin. + * + * @param enabledState the enabled state + * @return the next stage of the definition + */ + WithAttach withEnabledState(EnabledState enabledState); + + /** + * Specifies whether certificate name check should be enforced at origin level. + * + * @param enforce true to enforce certificate name check + * @return the next stage of the definition + */ + WithAttach withEnforceCertificateNameCheck(Boolean enforce); + } + + /** + * The final stage of an AFD origin definition. + * + * @param the stage of the parent AFD origin group definition to return to after attaching + */ + interface Attachable { + /** + * Attaches the defined origin to the parent AFD origin group. + * + * @return the next stage of the parent definition + */ + ParentT attach(); + } + } + + /** + * The entirety of an AFD origin definition. + * + * @param the stage of the parent AFD origin group definition to return to after attaching + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithHostname, + DefinitionStages.WithAttach { + } + + /** + * Grouping of AFD origin definition stages that run as part of an {@link AfdOriginGroup.Update} flow. + */ + interface UpdateDefinitionStages { + /** + * The first stage of an AFD origin definition inside an origin group update. + * + * @param the stage of the parent AFD origin group update to return to after attaching + */ + interface Blank extends WithHostname { + } + + /** + * The stage of an AFD origin update-definition requiring the hostname to be specified. + * + * @param the stage of the parent AFD origin group update to return to after attaching + */ + interface WithHostname { + /** + * Specifies the hostname (address) of the origin. + * + * @param hostname the hostname of the origin + * @return the next stage of the definition + */ + WithAttach withHostname(String hostname); + } + + /** + * The stage of the definition containing optional settings prior to attachment. + * + * @param the stage of the parent AFD origin group update to return to after attaching + */ + interface WithAttach extends Attachable { + /** + * Specifies a resource reference to an Azure origin resource. + * + * @param azureOrigin the Azure origin resource reference + * @return the next stage of the definition + */ + WithAttach withAzureOrigin(ResourceReference azureOrigin); + + /** + * Specifies the HTTP port for the origin. + * + * @param httpPort the HTTP port (1–65535) + * @return the next stage of the definition + */ + WithAttach withHttpPort(Integer httpPort); + + /** + * Specifies the HTTPS port for the origin. + * + * @param httpsPort the HTTPS port (1–65535) + * @return the next stage of the definition + */ + WithAttach withHttpsPort(Integer httpsPort); + + /** + * Specifies the host header value sent to the origin with each request. + * + * @param originHostHeader the origin host header + * @return the next stage of the definition + */ + WithAttach withOriginHostHeader(String originHostHeader); + + /** + * Specifies the priority of this origin in the origin group for load balancing. + * + * @param priority the priority (1–5) + * @return the next stage of the definition + */ + WithAttach withPriority(Integer priority); + + /** + * Specifies the weight of this origin in the origin group for load balancing. + * + * @param weight the weight (1–1000) + * @return the next stage of the definition + */ + WithAttach withWeight(Integer weight); + + /** + * Specifies the shared private link resource properties for a private origin. + * + * @param sharedPrivateLinkResource the shared private link resource properties + * @return the next stage of the definition + */ + WithAttach + withSharedPrivateLinkResource(SharedPrivateLinkResourceProperties sharedPrivateLinkResource); + + /** + * Specifies the capacity resource properties for the origin. + * + * @param originCapacityResource the origin capacity resource properties + * @return the next stage of the definition + */ + WithAttach withOriginCapacityResource(OriginCapacityResourceProperties originCapacityResource); + + /** + * Specifies whether health probes should be enabled for this origin. + * + * @param enabledState the enabled state + * @return the next stage of the definition + */ + WithAttach withEnabledState(EnabledState enabledState); + + /** + * Specifies whether certificate name check should be enforced at origin level. + * + * @param enforce true to enforce certificate name check + * @return the next stage of the definition + */ + WithAttach withEnforceCertificateNameCheck(Boolean enforce); + } + + /** + * The final stage of an AFD origin definition inside an origin group update. + * + * @param the stage of the parent AFD origin group update to return to after attaching + */ + interface Attachable { + /** + * Attaches the defined origin to the parent AFD origin group update. + * + * @return the next stage of the parent update + */ + ParentT attach(); + } + } + + /** + * The entirety of an AFD origin update inside an {@link AfdOriginGroup.Update} flow. + */ + interface Update extends Settable { + /** + * Specifies the hostname (address) of the origin. + * + * @param hostname the hostname of the origin + * @return the next stage of the update + */ + Update withHostname(String hostname); + + /** + * Specifies a resource reference to an Azure origin resource. + * + * @param azureOrigin the Azure origin resource reference + * @return the next stage of the update + */ + Update withAzureOrigin(ResourceReference azureOrigin); + + /** + * Specifies the HTTP port for the origin. + * + * @param httpPort the HTTP port (1–65535) + * @return the next stage of the update + */ + Update withHttpPort(Integer httpPort); + + /** + * Specifies the HTTPS port for the origin. + * + * @param httpsPort the HTTPS port (1–65535) + * @return the next stage of the update + */ + Update withHttpsPort(Integer httpsPort); + + /** + * Specifies the host header value sent to the origin with each request. + * + * @param originHostHeader the origin host header + * @return the next stage of the update + */ + Update withOriginHostHeader(String originHostHeader); + + /** + * Specifies the priority of this origin in the origin group for load balancing. + * + * @param priority the priority (1–5) + * @return the next stage of the update + */ + Update withPriority(Integer priority); + + /** + * Specifies the weight of this origin in the origin group for load balancing. + * + * @param weight the weight (1–1000) + * @return the next stage of the update + */ + Update withWeight(Integer weight); + + /** + * Specifies the shared private link resource properties for a private origin. + * + * @param sharedPrivateLinkResource the shared private link resource properties + * @return the next stage of the update + */ + Update withSharedPrivateLinkResource(SharedPrivateLinkResourceProperties sharedPrivateLinkResource); + + /** + * Specifies the capacity resource properties for the origin. + * + * @param originCapacityResource the origin capacity resource properties + * @return the next stage of the update + */ + Update withOriginCapacityResource(OriginCapacityResourceProperties originCapacityResource); + + /** + * Specifies whether health probes should be enabled for this origin. + * + * @param enabledState the enabled state + * @return the next stage of the update + */ + Update withEnabledState(EnabledState enabledState); + + /** + * Specifies whether certificate name check should be enforced at origin level. + * + * @param enforce true to enforce certificate name check + * @return the next stage of the update + */ + Update withEnforceCertificateNameCheck(Boolean enforce); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdOriginGroup.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdOriginGroup.java new file mode 100644 index 000000000000..8a538bcbac49 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdOriginGroup.java @@ -0,0 +1,300 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.cdn.fluent.models.AfdOriginGroupInner; +import com.azure.resourcemanager.resources.fluentcore.arm.models.ExternalChildResource; +import com.azure.resourcemanager.resources.fluentcore.model.HasInnerModel; +import com.azure.resourcemanager.resources.fluentcore.model.Settable; + +import java.util.Map; + +/** + * An immutable client-side representation of an Azure Front Door (AFD) origin group that lives under a + * {@link CdnProfile}. + */ +@Fluent +public interface AfdOriginGroup + extends ExternalChildResource, HasInnerModel { + + /** + * Gets the name of the profile which holds the origin group. + * + * @return the profile name + */ + String profileName(); + + /** + * Gets the load balancing settings for the origin group. + * + * @return the load balancing settings + */ + LoadBalancingSettingsParameters loadBalancingSettings(); + + /** + * Gets the health probe settings for the origin group. + * + * @return the health probe settings + */ + HealthProbeParameters healthProbeSettings(); + + /** + * Gets the time in minutes to shift traffic to the endpoint gradually when an unhealthy endpoint + * comes healthy or a new endpoint is added. + * + * @return the traffic restoration time in minutes + */ + Integer trafficRestorationTimeToHealedOrNewEndpointsInMinutes(); + + /** + * Gets the session affinity state for this origin group. + * + * @return the session affinity state + */ + EnabledState sessionAffinityState(); + + /** + * Gets the authentication settings for origins in this origin group. + * + * @return the origin authentication properties + */ + OriginAuthenticationProperties authentication(); + + /** + * Gets the provisioning state reported by the service. + * + * @return the provisioning state + */ + AfdProvisioningState provisioningState(); + + /** + * Gets the deployment status for the origin group. + * + * @return the deployment status + */ + DeploymentStatus deploymentStatus(); + + /** + * Gets the origins in this origin group, indexed by name. + * + * @return origins in this origin group, indexed by name + */ + Map origins(); + + /** + * Grouping of AFD origin group definition stages as part of a parent {@link CdnProfile} definition. + */ + interface DefinitionStages { + /** + * The first stage of an AFD origin group definition. + * Load balancing settings must be specified before any other configuration. + * + * @param the stage of the parent CDN profile definition to return to after attaching this definition + */ + interface Blank { + /** + * Specifies the load balancing settings for this origin group (required). + *

+ * Property {@link LoadBalancingSettingsParameters#withSampleSize(Integer)} and + * {@link LoadBalancingSettingsParameters#withSuccessfulSamplesRequired(Integer)} is required to be set. + * + * @param loadBalancingSettings the load balancing settings + * @return the next stage of the definition + */ + WithAttach withLoadBalancingSettings(LoadBalancingSettingsParameters loadBalancingSettings); + } + + /** + * The stage of the definition containing all optional settings prior to attachment. + * + * @param the stage of the parent CDN profile definition to return to after attaching this definition + */ + interface WithAttach extends Attachable { + /** + * Specifies the health probe settings for this origin group. + * + * @param healthProbeSettings the health probe settings + * @return the next stage of the definition + */ + WithAttach withHealthProbeSettings(HealthProbeParameters healthProbeSettings); + + /** + * Specifies the time in minutes to shift traffic gradually to a healed or new endpoint. + * + * @param minutes the traffic restoration time in minutes + * @return the next stage of the definition + */ + WithAttach withTrafficRestorationTimeToHealedOrNewEndpointsInMinutes(Integer minutes); + + /** + * Specifies the session affinity state for this origin group. + * + * @param sessionAffinityState the session affinity state + * @return the next stage of the definition + */ + WithAttach withSessionAffinityState(EnabledState sessionAffinityState); + + /** + * Starts the definition of a new AFD origin to be attached to this origin group. + * + * @param name a new origin name + * @return the first stage of a new AFD origin definition + */ + AfdOrigin.DefinitionStages.Blank> defineAfdOrigin(String name); + } + + /** + * The final stage of an AFD origin group definition. + * + * @param the stage of the parent CDN profile definition to return to after attaching this definition + */ + interface Attachable { + /** + * Attaches the defined origin group to the parent CDN profile. + * + * @return the next stage of the parent definition + */ + ParentT attach(); + } + } + + /** + * The entirety of an AFD origin group definition. + * + * @param the stage of the parent CDN profile definition to return to after attaching this definition + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAttach { + } + + /** + * Grouping of AFD origin group definition stages that run as part of a {@link CdnProfile#update()} flow. + */ + interface UpdateDefinitionStages { + /** + * The first stage of an AFD origin group definition inside a profile update. + * Load balancing settings must be specified before any other configuration. + * + * @param the stage of the parent CDN profile update to return to after attaching this definition + */ + interface Blank { + /** + * Specifies the load balancing settings for this origin group (required). + *

+ * Property {@link LoadBalancingSettingsParameters#withSampleSize(Integer)} and + * {@link LoadBalancingSettingsParameters#withSuccessfulSamplesRequired(Integer)} is required to be set. + * + * @param loadBalancingSettings the load balancing settings + * @return the next stage of the definition + */ + WithAttach withLoadBalancingSettings(LoadBalancingSettingsParameters loadBalancingSettings); + } + + /** + * The stage of the definition containing all optional settings prior to attachment. + * + * @param the stage of the parent CDN profile update to return to after attaching this definition + */ + interface WithAttach extends Attachable { + /** + * Specifies the health probe settings for this origin group. + * + * @param healthProbeSettings the health probe settings + * @return the next stage of the definition + */ + WithAttach withHealthProbeSettings(HealthProbeParameters healthProbeSettings); + + /** + * Specifies the time in minutes to shift traffic gradually to a healed or new endpoint. + * + * @param minutes the traffic restoration time in minutes + * @return the next stage of the definition + */ + WithAttach withTrafficRestorationTimeToHealedOrNewEndpointsInMinutes(Integer minutes); + + /** + * Specifies the session affinity state for this origin group. + * + * @param sessionAffinityState the session affinity state + * @return the next stage of the definition + */ + WithAttach withSessionAffinityState(EnabledState sessionAffinityState); + + /** + * Starts the definition of a new AFD origin to be attached to this origin group. + * + * @param name a new origin name + * @return the first stage of a new AFD origin definition + */ + AfdOrigin.UpdateDefinitionStages.Blank> defineAfdOrigin(String name); + } + + /** + * The final stage of an AFD origin group definition inside a profile update. + * + * @param the stage of the parent CDN profile update to return to after attaching this definition + */ + interface Attachable { + /** + * Attaches the defined origin group to the parent CDN profile update. + * + * @return the next stage of the parent update + */ + ParentT attach(); + } + } + + /** + * The entirety of an AFD origin group update inside a {@link CdnProfile#update()} flow. + */ + interface Update extends Settable { + /** + * Specifies the load balancing settings for this origin group. + * + * @param loadBalancingSettings the load balancing settings + * @return the next stage of the update + */ + Update withLoadBalancingSettings(LoadBalancingSettingsParameters loadBalancingSettings); + + /** + * Specifies the health probe settings for this origin group. + * + * @param healthProbeSettings the health probe settings + * @return the next stage of the update + */ + Update withHealthProbeSettings(HealthProbeParameters healthProbeSettings); + + /** + * Specifies the time in minutes to shift traffic gradually to a healed or new endpoint. + * + * @param minutes the traffic restoration time in minutes + * @return the next stage of the update + */ + Update withTrafficRestorationTimeToHealedOrNewEndpointsInMinutes(Integer minutes); + + /** + * Specifies the session affinity state for this origin group. + * + * @param sessionAffinityState the session affinity state + * @return the next stage of the update + */ + Update withSessionAffinityState(EnabledState sessionAffinityState); + + /** + * Begins the update of an existing AFD origin in this origin group. + * + * @param name the name of an existing origin + * @return the first stage of the origin update + */ + AfdOrigin.Update updateAfdOrigin(String name); + + /** + * Removes an AFD origin from this origin group. + * + * @param name the name of an existing origin + * @return the next stage of the origin group update + */ + Update withoutAfdOrigin(String name); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdOriginGroupUpdateParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdOriginGroupUpdateParameters.java index ec80f728ff6e..e9c8cf6b0441 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdOriginGroupUpdateParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdOriginGroupUpdateParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -153,6 +153,29 @@ public AfdOriginGroupUpdateParameters withSessionAffinityState(EnabledState sess return this; } + /** + * Get the authentication property: Authentication settings for origin in origin group. + * + * @return the authentication value. + */ + public OriginAuthenticationProperties authentication() { + return this.innerProperties() == null ? null : this.innerProperties().authentication(); + } + + /** + * Set the authentication property: Authentication settings for origin in origin group. + * + * @param authentication the authentication value to set. + * @return the AfdOriginGroupUpdateParameters object itself. + */ + public AfdOriginGroupUpdateParameters withAuthentication(OriginAuthenticationProperties authentication) { + if (this.innerProperties() == null) { + this.innerProperties = new AfdOriginGroupUpdatePropertiesParameters(); + } + this.innerProperties().withAuthentication(authentication); + return this; + } + /** * Validates the instance. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdOriginUpdateParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdOriginUpdateParameters.java index 9cd84d4ac0d7..8ba630cbd017 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdOriginUpdateParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdOriginUpdateParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -243,6 +243,30 @@ public SharedPrivateLinkResourceProperties sharedPrivateLinkResource() { return this; } + /** + * Get the originCapacityResource property: Origin capacity settings for an origin. + * + * @return the originCapacityResource value. + */ + public OriginCapacityResourceProperties originCapacityResource() { + return this.innerProperties() == null ? null : this.innerProperties().originCapacityResource(); + } + + /** + * Set the originCapacityResource property: Origin capacity settings for an origin. + * + * @param originCapacityResource the originCapacityResource value to set. + * @return the AfdOriginUpdateParameters object itself. + */ + public AfdOriginUpdateParameters + withOriginCapacityResource(OriginCapacityResourceProperties originCapacityResource) { + if (this.innerProperties() == null) { + this.innerProperties = new AfdOriginUpdatePropertiesParameters(); + } + this.innerProperties().withOriginCapacityResource(originCapacityResource); + return this; + } + /** * Get the enabledState property: Whether to enable health probes to be made against backends defined under * backendPools. Health probes can only be disabled if there is a single enabled backend in single enabled backend diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdProvisioningState.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdProvisioningState.java index f809542880a8..3a351f2767ee 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdProvisioningState.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdPurgeParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdPurgeParameters.java index f031af40bb75..1f2363a9c277 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdPurgeParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdPurgeParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdQueryStringCachingBehavior.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdQueryStringCachingBehavior.java index 49e28a980a20..7eb310b896f1 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdQueryStringCachingBehavior.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdQueryStringCachingBehavior.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdRouteCacheConfiguration.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdRouteCacheConfiguration.java index ce4c43ee0f04..9f07746c2123 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdRouteCacheConfiguration.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdRouteCacheConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdRouteGrpcState.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdRouteGrpcState.java new file mode 100644 index 000000000000..09a1a7f3a390 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdRouteGrpcState.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Whether or not gRPC is enabled on this route. Permitted values are 'Enabled' or 'Disabled'. + */ +public final class AfdRouteGrpcState extends ExpandableStringEnum { + /** + * Static value Enabled for AfdRouteGrpcState. + */ + public static final AfdRouteGrpcState ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for AfdRouteGrpcState. + */ + public static final AfdRouteGrpcState DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of AfdRouteGrpcState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AfdRouteGrpcState() { + } + + /** + * Creates or finds a AfdRouteGrpcState from its string representation. + * + * @param name a name to look for. + * @return the corresponding AfdRouteGrpcState. + */ + public static AfdRouteGrpcState fromString(String name) { + return fromString(name, AfdRouteGrpcState.class); + } + + /** + * Gets known AfdRouteGrpcState values. + * + * @return known AfdRouteGrpcState values. + */ + public static Collection values() { + return values(AfdRouteGrpcState.class); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdSecretMtlsCertificateChain.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdSecretMtlsCertificateChain.java new file mode 100644 index 000000000000..2652d944488a --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdSecretMtlsCertificateChain.java @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * Server-side certificate used for mTLS validation. + */ +@Fluent +public final class AfdSecretMtlsCertificateChain extends SecretParameters { + /* + * The type of the secret resource. + */ + private SecretType type = SecretType.MTLS_CERTIFICATE_CHAIN; + + /* + * Resource reference to the Azure Key Vault secret. Expected to be in format of + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName + * }/secrets/{secretName} + */ + private ResourceReference secretSource; + + /* + * Version of the secret to be used + */ + private String secretVersion; + + /* + * Soonest expiration date among certificates in customer's certificate chain in ISO 8601 compliant format + * yyyy-MM-ddTHH:mm:ss.fffffffK in UTC + */ + private OffsetDateTime expirationDate; + + /** + * Creates an instance of AfdSecretMtlsCertificateChain class. + */ + public AfdSecretMtlsCertificateChain() { + } + + /** + * Get the type property: The type of the secret resource. + * + * @return the type value. + */ + @Override + public SecretType type() { + return this.type; + } + + /** + * Get the secretSource property: Resource reference to the Azure Key Vault secret. Expected to be in format of + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets/{secretName}. + * + * @return the secretSource value. + */ + public ResourceReference secretSource() { + return this.secretSource; + } + + /** + * Set the secretSource property: Resource reference to the Azure Key Vault secret. Expected to be in format of + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets/{secretName}. + * + * @param secretSource the secretSource value to set. + * @return the AfdSecretMtlsCertificateChain object itself. + */ + public AfdSecretMtlsCertificateChain withSecretSource(ResourceReference secretSource) { + this.secretSource = secretSource; + return this; + } + + /** + * Get the secretVersion property: Version of the secret to be used. + * + * @return the secretVersion value. + */ + public String secretVersion() { + return this.secretVersion; + } + + /** + * Set the secretVersion property: Version of the secret to be used. + * + * @param secretVersion the secretVersion value to set. + * @return the AfdSecretMtlsCertificateChain object itself. + */ + public AfdSecretMtlsCertificateChain withSecretVersion(String secretVersion) { + this.secretVersion = secretVersion; + return this; + } + + /** + * Get the expirationDate property: Soonest expiration date among certificates in customer's certificate chain in + * ISO 8601 compliant format yyyy-MM-ddTHH:mm:ss.fffffffK in UTC. + * + * @return the expirationDate value. + */ + public OffsetDateTime expirationDate() { + return this.expirationDate; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (secretSource() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property secretSource in model AfdSecretMtlsCertificateChain")); + } else { + secretSource().validate(); + } + if (secretVersion() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property secretVersion in model AfdSecretMtlsCertificateChain")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AfdSecretMtlsCertificateChain.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("secretSource", this.secretSource); + jsonWriter.writeStringField("secretVersion", this.secretVersion); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AfdSecretMtlsCertificateChain from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AfdSecretMtlsCertificateChain 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 AfdSecretMtlsCertificateChain. + */ + public static AfdSecretMtlsCertificateChain fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AfdSecretMtlsCertificateChain deserializedAfdSecretMtlsCertificateChain + = new AfdSecretMtlsCertificateChain(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("secretSource".equals(fieldName)) { + deserializedAfdSecretMtlsCertificateChain.secretSource = ResourceReference.fromJson(reader); + } else if ("secretVersion".equals(fieldName)) { + deserializedAfdSecretMtlsCertificateChain.secretVersion = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedAfdSecretMtlsCertificateChain.type = SecretType.fromString(reader.getString()); + } else if ("expirationDate".equals(fieldName)) { + deserializedAfdSecretMtlsCertificateChain.expirationDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedAfdSecretMtlsCertificateChain; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdStateProperties.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdStateProperties.java index 236f7f95b79b..470f9d8adc1a 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdStateProperties.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdStateProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdUrlSigningAction.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdUrlSigningAction.java new file mode 100644 index 000000000000..3d6d33808a5b --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdUrlSigningAction.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Defines the url signing action for the delivery rule. + */ +@Fluent +public final class AfdUrlSigningAction extends DeliveryRuleAction { + /* + * The name of the action for the delivery rule. + */ + private DeliveryRuleActionValue name = DeliveryRuleActionValue.AFD_URL_SIGNING; + + /* + * Defines the parameters for the action. + */ + private AfdUrlSigningActionParameters parameters; + + /** + * Creates an instance of AfdUrlSigningAction class. + */ + public AfdUrlSigningAction() { + } + + /** + * Get the name property: The name of the action for the delivery rule. + * + * @return the name value. + */ + @Override + public DeliveryRuleActionValue name() { + return this.name; + } + + /** + * Get the parameters property: Defines the parameters for the action. + * + * @return the parameters value. + */ + public AfdUrlSigningActionParameters parameters() { + return this.parameters; + } + + /** + * Set the parameters property: Defines the parameters for the action. + * + * @param parameters the parameters value to set. + * @return the AfdUrlSigningAction object itself. + */ + public AfdUrlSigningAction withParameters(AfdUrlSigningActionParameters parameters) { + this.parameters = parameters; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (parameters() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property parameters in model AfdUrlSigningAction")); + } else { + parameters().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AfdUrlSigningAction.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("parameters", this.parameters); + jsonWriter.writeStringField("name", this.name == null ? null : this.name.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AfdUrlSigningAction from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AfdUrlSigningAction 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 AfdUrlSigningAction. + */ + public static AfdUrlSigningAction fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AfdUrlSigningAction deserializedAfdUrlSigningAction = new AfdUrlSigningAction(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("parameters".equals(fieldName)) { + deserializedAfdUrlSigningAction.parameters = AfdUrlSigningActionParameters.fromJson(reader); + } else if ("name".equals(fieldName)) { + deserializedAfdUrlSigningAction.name = DeliveryRuleActionValue.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedAfdUrlSigningAction; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdUrlSigningActionParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdUrlSigningActionParameters.java new file mode 100644 index 000000000000..934113a2d550 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AfdUrlSigningActionParameters.java @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Defines the parameters for the Url Signing action. + */ +@Fluent +public final class AfdUrlSigningActionParameters implements JsonSerializable { + /* + * The typeName property. + */ + private TypeName typeName; + + /* + * Resource reference to the Azure Key Vault secret. Expected to be in format of + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName} + * /keyGroups/{keyGroupName} + */ + private ResourceReference keyGroupReference; + + /* + * Algorithm to use for URL signing + */ + private Algorithm algorithm; + + /* + * Defines which query string parameters in the url to be considered for expires, key id etc. + */ + private List parameterNameOverride; + + /** + * Creates an instance of AfdUrlSigningActionParameters class. + */ + public AfdUrlSigningActionParameters() { + } + + /** + * Get the typeName property: The typeName property. + * + * @return the typeName value. + */ + public TypeName typeName() { + return this.typeName; + } + + /** + * Set the typeName property: The typeName property. + * + * @param typeName the typeName value to set. + * @return the AfdUrlSigningActionParameters object itself. + */ + public AfdUrlSigningActionParameters withTypeName(TypeName typeName) { + this.typeName = typeName; + return this; + } + + /** + * Get the keyGroupReference property: Resource reference to the Azure Key Vault secret. Expected to be in format of + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/keyGroups/{keyGroupName}. + * + * @return the keyGroupReference value. + */ + public ResourceReference keyGroupReference() { + return this.keyGroupReference; + } + + /** + * Set the keyGroupReference property: Resource reference to the Azure Key Vault secret. Expected to be in format of + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/keyGroups/{keyGroupName}. + * + * @param keyGroupReference the keyGroupReference value to set. + * @return the AfdUrlSigningActionParameters object itself. + */ + public AfdUrlSigningActionParameters withKeyGroupReference(ResourceReference keyGroupReference) { + this.keyGroupReference = keyGroupReference; + return this; + } + + /** + * Get the algorithm property: Algorithm to use for URL signing. + * + * @return the algorithm value. + */ + public Algorithm algorithm() { + return this.algorithm; + } + + /** + * Set the algorithm property: Algorithm to use for URL signing. + * + * @param algorithm the algorithm value to set. + * @return the AfdUrlSigningActionParameters object itself. + */ + public AfdUrlSigningActionParameters withAlgorithm(Algorithm algorithm) { + this.algorithm = algorithm; + return this; + } + + /** + * Get the parameterNameOverride property: Defines which query string parameters in the url to be considered for + * expires, key id etc. + * + * @return the parameterNameOverride value. + */ + public List parameterNameOverride() { + return this.parameterNameOverride; + } + + /** + * Set the parameterNameOverride property: Defines which query string parameters in the url to be considered for + * expires, key id etc. + * + * @param parameterNameOverride the parameterNameOverride value to set. + * @return the AfdUrlSigningActionParameters object itself. + */ + public AfdUrlSigningActionParameters + withParameterNameOverride(List parameterNameOverride) { + this.parameterNameOverride = parameterNameOverride; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (typeName() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property typeName in model AfdUrlSigningActionParameters")); + } + if (keyGroupReference() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property keyGroupReference in model AfdUrlSigningActionParameters")); + } else { + keyGroupReference().validate(); + } + if (parameterNameOverride() != null) { + parameterNameOverride().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AfdUrlSigningActionParameters.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("typeName", this.typeName == null ? null : this.typeName.toString()); + jsonWriter.writeJsonField("keyGroupReference", this.keyGroupReference); + jsonWriter.writeStringField("algorithm", this.algorithm == null ? null : this.algorithm.toString()); + jsonWriter.writeArrayField("parameterNameOverride", this.parameterNameOverride, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AfdUrlSigningActionParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AfdUrlSigningActionParameters 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 AfdUrlSigningActionParameters. + */ + public static AfdUrlSigningActionParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AfdUrlSigningActionParameters deserializedAfdUrlSigningActionParameters + = new AfdUrlSigningActionParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("typeName".equals(fieldName)) { + deserializedAfdUrlSigningActionParameters.typeName = TypeName.fromString(reader.getString()); + } else if ("keyGroupReference".equals(fieldName)) { + deserializedAfdUrlSigningActionParameters.keyGroupReference = ResourceReference.fromJson(reader); + } else if ("algorithm".equals(fieldName)) { + deserializedAfdUrlSigningActionParameters.algorithm = Algorithm.fromString(reader.getString()); + } else if ("parameterNameOverride".equals(fieldName)) { + List parameterNameOverride + = reader.readArray(reader1 -> UrlSigningParamIdentifier.fromJson(reader1)); + deserializedAfdUrlSigningActionParameters.parameterNameOverride = parameterNameOverride; + } else { + reader.skipChildren(); + } + } + + return deserializedAfdUrlSigningActionParameters; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AgentPath.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AgentPath.java new file mode 100644 index 000000000000..79fcce5e6e0b --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AgentPath.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Defines a path configuration for a web agent. + */ +@Fluent +public final class AgentPath implements JsonSerializable { + /* + * The type of the path. + */ + private AgentPathType type; + + /* + * The actual path value. + */ + private String path; + + /** + * Creates an instance of AgentPath class. + */ + public AgentPath() { + } + + /** + * Get the type property: The type of the path. + * + * @return the type value. + */ + public AgentPathType type() { + return this.type; + } + + /** + * Set the type property: The type of the path. + * + * @param type the type value to set. + * @return the AgentPath object itself. + */ + public AgentPath withType(AgentPathType type) { + this.type = type; + return this; + } + + /** + * Get the path property: The actual path value. + * + * @return the path value. + */ + public String path() { + return this.path; + } + + /** + * Set the path property: The actual path value. + * + * @param path the path value to set. + * @return the AgentPath object itself. + */ + public AgentPath withPath(String path) { + this.path = path; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (type() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property type in model AgentPath")); + } + if (path() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property path in model AgentPath")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AgentPath.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("path", this.path); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AgentPath from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AgentPath 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 AgentPath. + */ + public static AgentPath fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AgentPath deserializedAgentPath = new AgentPath(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedAgentPath.type = AgentPathType.fromString(reader.getString()); + } else if ("path".equals(fieldName)) { + deserializedAgentPath.path = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAgentPath; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AgentPathType.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AgentPathType.java new file mode 100644 index 000000000000..45833d58a12a --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AgentPathType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The type of the path. + */ +public final class AgentPathType extends ExpandableStringEnum { + /** + * Static value Chat for AgentPathType. + */ + public static final AgentPathType CHAT = fromString("Chat"); + + /** + * Static value McpServer for AgentPathType. + */ + public static final AgentPathType MCP_SERVER = fromString("McpServer"); + + /** + * Creates a new instance of AgentPathType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AgentPathType() { + } + + /** + * Creates or finds a AgentPathType from its string representation. + * + * @param name a name to look for. + * @return the corresponding AgentPathType. + */ + public static AgentPathType fromString(String name) { + return fromString(name, AgentPathType.class); + } + + /** + * Gets known AgentPathType values. + * + * @return known AgentPathType values. + */ + public static Collection values() { + return values(AgentPathType.class); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/Algorithm.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/Algorithm.java index 23efab7d48b9..f97da09c4710 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/Algorithm.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/Algorithm.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ApprovalStatus.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ApprovalStatus.java new file mode 100644 index 000000000000..19a6c1bec8db --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ApprovalStatus.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for ApprovalStatus. + */ +public final class ApprovalStatus extends ExpandableStringEnum { + /** + * Static value NotApproved for ApprovalStatus. + */ + public static final ApprovalStatus NOT_APPROVED = fromString("NotApproved"); + + /** + * Static value Approved for ApprovalStatus. + */ + public static final ApprovalStatus APPROVED = fromString("Approved"); + + /** + * Creates a new instance of ApprovalStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ApprovalStatus() { + } + + /** + * Creates or finds a ApprovalStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding ApprovalStatus. + */ + public static ApprovalStatus fromString(String name) { + return fromString(name, ApprovalStatus.class); + } + + /** + * Gets known ApprovalStatus values. + * + * @return known ApprovalStatus values. + */ + public static Collection values() { + return values(ApprovalStatus.class); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AutoGeneratedDomainNameLabelScope.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AutoGeneratedDomainNameLabelScope.java index 7464d3a0fe3c..436c06a998b9 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AutoGeneratedDomainNameLabelScope.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AutoGeneratedDomainNameLabelScope.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AzureFirstPartyManagedCertificate.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AzureFirstPartyManagedCertificate.java index 6e469e9075d7..d511fbbfc4ba 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AzureFirstPartyManagedCertificate.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AzureFirstPartyManagedCertificate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -67,7 +67,6 @@ public AzureFirstPartyManagedCertificate withType(SecretType type) { */ @Override public void validate() { - super.validate(); } /** diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AzureFirstPartyManagedCertificateParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AzureFirstPartyManagedCertificateParameters.java index dc715e19c59b..6e8d107560d6 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AzureFirstPartyManagedCertificateParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/AzureFirstPartyManagedCertificateParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -23,7 +23,8 @@ public final class AzureFirstPartyManagedCertificateParameters extends SecretPar /* * Resource reference to the Azure Key Vault certificate. Expected to be in format of - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets/{certificateName} + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName + * }/secrets/{certificateName} */ private ResourceReference secretSource; @@ -60,7 +61,7 @@ public AzureFirstPartyManagedCertificateParameters() { /** * Get the type property: The type of the secret resource. - * + * * @return the type value. */ @Override @@ -71,7 +72,7 @@ public SecretType type() { /** * Get the secretSource property: Resource reference to the Azure Key Vault certificate. Expected to be in format of * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets/{certificateName}. - * + * * @return the secretSource value. */ public ResourceReference secretSource() { @@ -80,7 +81,7 @@ public ResourceReference secretSource() { /** * Get the subject property: Subject name in the certificate. - * + * * @return the subject value. */ public String subject() { @@ -89,7 +90,7 @@ public String subject() { /** * Get the expirationDate property: Certificate expiration date. - * + * * @return the expirationDate value. */ public String expirationDate() { @@ -98,7 +99,7 @@ public String expirationDate() { /** * Get the certificateAuthority property: Certificate issuing authority. - * + * * @return the certificateAuthority value. */ public String certificateAuthority() { @@ -107,7 +108,7 @@ public String certificateAuthority() { /** * Get the subjectAlternativeNames property: The list of SANs. - * + * * @return the subjectAlternativeNames value. */ public List subjectAlternativeNames() { @@ -116,7 +117,7 @@ public List subjectAlternativeNames() { /** * Set the subjectAlternativeNames property: The list of SANs. - * + * * @param subjectAlternativeNames the subjectAlternativeNames value to set. * @return the AzureFirstPartyManagedCertificateParameters object itself. */ @@ -128,7 +129,7 @@ public List subjectAlternativeNames() { /** * Get the thumbprint property: Certificate thumbprint. - * + * * @return the thumbprint value. */ public String thumbprint() { @@ -137,12 +138,11 @@ public String thumbprint() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { - super.validate(); if (secretSource() != null) { secretSource().validate(); } @@ -162,7 +162,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of AzureFirstPartyManagedCertificateParameters from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of AzureFirstPartyManagedCertificateParameters if the JsonReader was pointing to an instance * of it, or null if it was pointing to JSON null. diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CacheBehavior.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CacheBehavior.java index e6336d6b8bfe..6a97d156dbc7 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CacheBehavior.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CacheBehavior.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CacheConfiguration.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CacheConfiguration.java index 236f79ae9143..b5220b1b67d5 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CacheConfiguration.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/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.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CacheExpirationActionParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CacheExpirationActionParameters.java index 5b4bdae54e42..096d306d00e6 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CacheExpirationActionParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CacheExpirationActionParameters.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.cdn.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -16,11 +15,12 @@ * Defines the parameters for the cache expiration action. */ @Fluent -public final class CacheExpirationActionParameters implements JsonSerializable { +public final class CacheExpirationActionParameters extends DeliveryRuleActionParameters { /* * The typeName property. */ - private String typeName = "DeliveryRuleCacheExpirationActionParameters"; + private DeliveryRuleActionParametersType typeName + = DeliveryRuleActionParametersType.DELIVERY_RULE_CACHE_EXPIRATION_ACTION_PARAMETERS; /* * Caching behavior for the requests @@ -48,21 +48,11 @@ public CacheExpirationActionParameters() { * * @return the typeName value. */ - public String typeName() { + @Override + public DeliveryRuleActionParametersType typeName() { return this.typeName; } - /** - * Set the typeName property: The typeName property. - * - * @param typeName the typeName value to set. - * @return the CacheExpirationActionParameters object itself. - */ - public CacheExpirationActionParameters withTypeName(String typeName) { - this.typeName = typeName; - return this; - } - /** * Get the cacheBehavior property: Caching behavior for the requests. * @@ -130,6 +120,7 @@ public CacheExpirationActionParameters withCacheDuration(String cacheDuration) { * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { if (cacheBehavior() == null) { throw LOGGER.atError() @@ -151,9 +142,9 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("typeName", this.typeName); jsonWriter.writeStringField("cacheBehavior", this.cacheBehavior == null ? null : this.cacheBehavior.toString()); jsonWriter.writeStringField("cacheType", this.cacheType == null ? null : this.cacheType.toString()); + jsonWriter.writeStringField("typeName", this.typeName == null ? null : this.typeName.toString()); jsonWriter.writeStringField("cacheDuration", this.cacheDuration); return jsonWriter.writeEndObject(); } @@ -180,6 +171,9 @@ public static CacheExpirationActionParameters fromJson(JsonReader jsonReader) th = CacheBehavior.fromString(reader.getString()); } else if ("cacheType".equals(fieldName)) { deserializedCacheExpirationActionParameters.cacheType = CacheType.fromString(reader.getString()); + } else if ("typeName".equals(fieldName)) { + deserializedCacheExpirationActionParameters.typeName + = DeliveryRuleActionParametersType.fromString(reader.getString()); } else if ("cacheDuration".equals(fieldName)) { deserializedCacheExpirationActionParameters.cacheDuration = reader.getString(); } else { diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CacheKeyQueryStringActionParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CacheKeyQueryStringActionParameters.java index 9732e218b28f..e840e5779f13 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CacheKeyQueryStringActionParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CacheKeyQueryStringActionParameters.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.cdn.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -16,12 +15,12 @@ * Defines the parameters for the cache-key query string action. */ @Fluent -public final class CacheKeyQueryStringActionParameters - implements JsonSerializable { +public final class CacheKeyQueryStringActionParameters extends DeliveryRuleActionParameters { /* * The typeName property. */ - private String typeName = "DeliveryRuleCacheKeyQueryStringBehaviorActionParameters"; + private DeliveryRuleActionParametersType typeName + = DeliveryRuleActionParametersType.DELIVERY_RULE_CACHE_KEY_QUERY_STRING_BEHAVIOR_ACTION_PARAMETERS; /* * Caching behavior for the requests @@ -44,21 +43,11 @@ public CacheKeyQueryStringActionParameters() { * * @return the typeName value. */ - public String typeName() { + @Override + public DeliveryRuleActionParametersType typeName() { return this.typeName; } - /** - * Set the typeName property: The typeName property. - * - * @param typeName the typeName value to set. - * @return the CacheKeyQueryStringActionParameters object itself. - */ - public CacheKeyQueryStringActionParameters withTypeName(String typeName) { - this.typeName = typeName; - return this; - } - /** * Get the queryStringBehavior property: Caching behavior for the requests. * @@ -104,6 +93,7 @@ public CacheKeyQueryStringActionParameters withQueryParameters(String queryParam * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { if (queryStringBehavior() == null) { throw LOGGER.atError() @@ -120,9 +110,9 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("typeName", this.typeName); jsonWriter.writeStringField("queryStringBehavior", this.queryStringBehavior == null ? null : this.queryStringBehavior.toString()); + jsonWriter.writeStringField("typeName", this.typeName == null ? null : this.typeName.toString()); jsonWriter.writeStringField("queryParameters", this.queryParameters); return jsonWriter.writeEndObject(); } @@ -147,6 +137,9 @@ public static CacheKeyQueryStringActionParameters fromJson(JsonReader jsonReader if ("queryStringBehavior".equals(fieldName)) { deserializedCacheKeyQueryStringActionParameters.queryStringBehavior = QueryStringBehavior.fromString(reader.getString()); + } else if ("typeName".equals(fieldName)) { + deserializedCacheKeyQueryStringActionParameters.typeName + = DeliveryRuleActionParametersType.fromString(reader.getString()); } else if ("queryParameters".equals(fieldName)) { deserializedCacheKeyQueryStringActionParameters.queryParameters = reader.getString(); } else { diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CacheType.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CacheType.java index 86b07e449674..55d7cc526dd4 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CacheType.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CacheType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CanMigrateDefaultSku.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CanMigrateDefaultSku.java index 9084bf971268..d4a5afa4f7b8 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CanMigrateDefaultSku.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CanMigrateDefaultSku.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CanMigrateParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CanMigrateParameters.java index 244e8cc77b35..60de76acb77a 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CanMigrateParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CanMigrateParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CdnCertificateSourceParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CdnCertificateSourceParameters.java index 2f285f83fd9a..71801136b590 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CdnCertificateSourceParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CdnCertificateSourceParameters.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.cdn.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -16,11 +15,12 @@ * Defines the parameters for using CDN managed certificate for securing custom domain. */ @Fluent -public final class CdnCertificateSourceParameters implements JsonSerializable { +public final class CdnCertificateSourceParameters extends CertificateSourceParameters { /* * The typeName property. */ - private String typeName = "CdnCertificateSourceParameters"; + private CertificateSourceParametersType typeName + = CertificateSourceParametersType.CDN_CERTIFICATE_SOURCE_PARAMETERS; /* * Type of certificate used @@ -38,21 +38,11 @@ public CdnCertificateSourceParameters() { * * @return the typeName value. */ - public String typeName() { + @Override + public CertificateSourceParametersType typeName() { return this.typeName; } - /** - * Set the typeName property: The typeName property. - * - * @param typeName the typeName value to set. - * @return the CdnCertificateSourceParameters object itself. - */ - public CdnCertificateSourceParameters withTypeName(String typeName) { - this.typeName = typeName; - return this; - } - /** * Get the certificateType property: Type of certificate used. * @@ -78,6 +68,7 @@ public CdnCertificateSourceParameters withCertificateType(CertificateType certif * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { if (certificateType() == null) { throw LOGGER.atError() @@ -94,9 +85,9 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("typeName", this.typeName); jsonWriter.writeStringField("certificateType", this.certificateType == null ? null : this.certificateType.toString()); + jsonWriter.writeStringField("typeName", this.typeName == null ? null : this.typeName.toString()); return jsonWriter.writeEndObject(); } @@ -120,6 +111,9 @@ public static CdnCertificateSourceParameters fromJson(JsonReader jsonReader) thr if ("certificateType".equals(fieldName)) { deserializedCdnCertificateSourceParameters.certificateType = CertificateType.fromString(reader.getString()); + } else if ("typeName".equals(fieldName)) { + deserializedCdnCertificateSourceParameters.typeName + = CertificateSourceParametersType.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CdnManagedHttpsParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CdnManagedHttpsParameters.java index 123e5fbe5284..cd907e9db54f 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CdnManagedHttpsParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CdnManagedHttpsParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -90,7 +90,6 @@ public CdnManagedHttpsParameters withMinimumTlsVersion(MinimumTlsVersion minimum */ @Override public void validate() { - super.validate(); if (certificateSourceParameters() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -98,6 +97,11 @@ public void validate() { } else { certificateSourceParameters().validate(); } + if (protocolType() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property protocolType in model CdnManagedHttpsParameters")); + } } private static final ClientLogger LOGGER = new ClientLogger(CdnManagedHttpsParameters.class); diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CdnMigrationToAfdParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CdnMigrationToAfdParameters.java new file mode 100644 index 000000000000..037e54428c51 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CdnMigrationToAfdParameters.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Request body for Migrate operation. + */ +@Fluent +public final class CdnMigrationToAfdParameters implements JsonSerializable { + /* + * Sku for the migration + */ + private Sku sku; + + /* + * A name map between classic CDN endpoints and AFD Premium/Standard endpoints. + */ + private List migrationEndpointMappings; + + /** + * Creates an instance of CdnMigrationToAfdParameters class. + */ + public CdnMigrationToAfdParameters() { + } + + /** + * Get the sku property: Sku for the migration. + * + * @return the sku value. + */ + public Sku sku() { + return this.sku; + } + + /** + * Set the sku property: Sku for the migration. + * + * @param sku the sku value to set. + * @return the CdnMigrationToAfdParameters object itself. + */ + public CdnMigrationToAfdParameters withSku(Sku sku) { + this.sku = sku; + return this; + } + + /** + * Get the migrationEndpointMappings property: A name map between classic CDN endpoints and AFD Premium/Standard + * endpoints. + * + * @return the migrationEndpointMappings value. + */ + public List migrationEndpointMappings() { + return this.migrationEndpointMappings; + } + + /** + * Set the migrationEndpointMappings property: A name map between classic CDN endpoints and AFD Premium/Standard + * endpoints. + * + * @param migrationEndpointMappings the migrationEndpointMappings value to set. + * @return the CdnMigrationToAfdParameters object itself. + */ + public CdnMigrationToAfdParameters + withMigrationEndpointMappings(List migrationEndpointMappings) { + this.migrationEndpointMappings = migrationEndpointMappings; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sku() == null) { + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property sku in model CdnMigrationToAfdParameters")); + } else { + sku().validate(); + } + if (migrationEndpointMappings() != null) { + migrationEndpointMappings().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CdnMigrationToAfdParameters.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeArrayField("migrationEndpointMappings", this.migrationEndpointMappings, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CdnMigrationToAfdParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CdnMigrationToAfdParameters 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 CdnMigrationToAfdParameters. + */ + public static CdnMigrationToAfdParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CdnMigrationToAfdParameters deserializedCdnMigrationToAfdParameters = new CdnMigrationToAfdParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("sku".equals(fieldName)) { + deserializedCdnMigrationToAfdParameters.sku = Sku.fromJson(reader); + } else if ("migrationEndpointMappings".equals(fieldName)) { + List migrationEndpointMappings + = reader.readArray(reader1 -> MigrationEndpointMapping.fromJson(reader1)); + deserializedCdnMigrationToAfdParameters.migrationEndpointMappings = migrationEndpointMappings; + } else { + reader.skipChildren(); + } + } + + return deserializedCdnMigrationToAfdParameters; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CdnProfile.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CdnProfile.java index 64c7c5555785..a38338b777df 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CdnProfile.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CdnProfile.java @@ -46,6 +46,24 @@ public interface CdnProfile */ Map endpoints(); + /** + * Gets latest Azure Front Door endpoints by sending http request. + * + * @return AFD endpoints in the CDN manager profile, indexed by name + */ + default Map afdEndpoints() { + throw new UnsupportedOperationException("[afdEndpoints] is not supported in " + getClass()); + } + + /** + * Gets latest Azure Front Door origin groups by sending http request. + * + * @return AFD origin groups in the CDN manager profile, indexed by name + */ + default Map afdOriginGroups() { + throw new UnsupportedOperationException("[afdOriginGroups] is not supported in " + getClass()); + } + /** * Generates a dynamic SSO URI used to sign in to the CDN supplemental portal used for advanced management tasks. * @@ -193,6 +211,14 @@ interface DefinitionStages { * The first stage of a CDN profile definition. */ interface Blank extends DefinitionWithRegion { + /** + * Specifies that the resource is global/non-regional. + * + * @return the next stage of the definition. + */ + default WithGroup withGlobal() { + throw new UnsupportedOperationException("[withGlobal] is not supported in " + getClass()); + } } /** @@ -214,8 +240,7 @@ interface WithSku { * Azure CDN Standard from Akamai profiles still active on 31 October 2023 will be migrated * by Azure CDN product engineering to another Azure CDN profile with feature and pricing parity * beginning 1 November 2023. - * Use {@link WithSku#withStandardVerizonSku()} , {@link WithSku#withSku(SkuName)} or - * {@link WithSku#withStandardMicrosoftSku()} instead. + * Use {@link WithSku#withSku(SkuName)} with {@link SkuName#STANDARD_AZURE_FRONT_DOOR} or {@link SkuName#PREMIUM_AZURE_FRONT_DOOR}.Use {@link WithSku#withSku(SkuName)} with {@link SkuName#STANDARD_AZURE_FRONT_DOOR} or {@link SkuName#PREMIUM_AZURE_FRONT_DOOR}. */ @Deprecated WithStandardCreate withStandardAkamaiSku(); @@ -224,21 +249,29 @@ interface WithSku { * Selects the Standard Verizon SKU. * * @return the next stage of the definition. + * @deprecated Use {@link WithSku#withSku(SkuName)} with {@link SkuName#STANDARD_AZURE_FRONT_DOOR} or {@link SkuName#PREMIUM_AZURE_FRONT_DOOR}. */ + @Deprecated WithStandardCreate withStandardVerizonSku(); /** * Selects the Premium Verizon SKU. * * @return the next stage of the definition. + * @deprecated Use {@link WithSku#withSku(SkuName)} with {@link SkuName#STANDARD_AZURE_FRONT_DOOR} or {@link SkuName#PREMIUM_AZURE_FRONT_DOOR}. */ + @Deprecated WithPremiumVerizonCreate withPremiumVerizonSku(); /** * Selects the Standard Microsoft SKU. * * @return the next stage of the definition + * @deprecated On September 30th, 2027, Azure CDN Standard from Microsoft (classic) will be retired. To avoid service disruptions, you’ll need to migrate to Azure Front Door Standard or Premium by that date.   + * As a result of this retirement, you’ll no longer be able to create new Azure CDN Standard from Microsoft (classic) resources via the Azure portal, Terraform, or command line tools starting October 1st, 2025. After that date, all new resources will need to be created using Azure Front Door Standard or Premium.  + * Use {@link WithSku#withSku(SkuName)} with {@link SkuName#STANDARD_AZURE_FRONT_DOOR} or {@link SkuName#PREMIUM_AZURE_FRONT_DOOR}. */ + @Deprecated WithStandardCreate withStandardMicrosoftSku(); /** @@ -289,6 +322,26 @@ interface WithStandardCreate extends WithCreate { // Why is define() taking more than just the name? CdnEndpoint.DefinitionStages.WithStandardAttach defineNewEndpoint(String name, String endpointOriginHostname); + + /** + * Starts the definition of a new Azure Front Door endpoint to be attached to the CDN profile. + * + * @param name a new endpoint name + * @return the first stage of a new AFD endpoint definition + */ + default AfdEndpoint.DefinitionStages.Blank defineNewAfdEndpoint(String name) { + throw new UnsupportedOperationException("[defineNewAfdEndpoint] is not supported in " + getClass()); + } + + /** + * Starts the definition of a new Azure Front Door origin group to be attached to the CDN profile. + * + * @param name a new origin group name + * @return the first stage of a new AFD origin group definition + */ + default AfdOriginGroup.DefinitionStages.Blank defineAfdOriginGroup(String name) { + throw new UnsupportedOperationException("[defineAfdOriginGroup] is not supported in " + getClass()); + } } /** @@ -384,6 +437,26 @@ interface WithEndpoint { CdnEndpoint.UpdateDefinitionStages.WithStandardAttach defineNewEndpoint(String name, String endpointOriginHostname); + /** + * Starts the definition of a new Azure Front Door endpoint to be attached to the CDN profile. + * + * @param name the name for the endpoint + * @return the first stage of an endpoint definition + */ + default AfdEndpoint.UpdateDefinitionStages.Blank defineNewAfdEndpoint(String name) { + throw new UnsupportedOperationException("[defineNewAfdEndpoint] is not supported in " + getClass()); + } + + /** + * Starts the definition of a new Azure Front Door origin group to be attached to the CDN profile. + * + * @param name the name for the origin group + * @return the first stage of an origin group definition + */ + default AfdOriginGroup.UpdateDefinitionStages.Blank defineAfdOriginGroup(String name) { + throw new UnsupportedOperationException("[defineAfdOriginGroup] is not supported in " + getClass()); + } + /** * Adds new endpoint to current Premium Verizon CDN profile. * @@ -427,6 +500,26 @@ CdnEndpoint.UpdateDefinitionStages.WithPremiumAttach defineNewPremiumEnd */ CdnEndpoint.UpdateStandardEndpoint updateEndpoint(String name); + /** + * Begins the description of an update of an existing Azure Front Door endpoint in current profile. + * + * @param name the name of an existing endpoint + * @return the first stage of the update of the endpoint + */ + default AfdEndpoint.Update updateAfdEndpoint(String name) { + throw new UnsupportedOperationException("[updateAfdEndpoint] is not supported in " + getClass()); + } + + /** + * Begins the description of an update of an existing Azure Front Door origin group in current profile. + * + * @param name the name of an existing origin group + * @return the first stage of the update of the origin group + */ + default AfdOriginGroup.Update updateAfdOriginGroup(String name) { + throw new UnsupportedOperationException("[updateAfdOriginGroup] is not supported in " + getClass()); + } + /** * Begins the description of an update of an existing endpoint in current Premium Verizon profile. * @@ -442,6 +535,26 @@ CdnEndpoint.UpdateDefinitionStages.WithPremiumAttach defineNewPremiumEnd * @return the next stage of the CDN profile update */ Update withoutEndpoint(String name); + + /** + * Removes an Azure Front Door endpoint from the profile. + * + * @param name the name of an existing endpoint + * @return the next stage of the CDN profile update + */ + default Update withoutAfdEndpoint(String name) { + throw new UnsupportedOperationException("[withoutAfdEndpoint] is not supported in " + getClass()); + } + + /** + * Removes an Azure Front Door origin group from the profile. + * + * @param name the name of an existing origin group + * @return the next stage of the CDN profile update + */ + default Update withoutAfdOriginGroup(String name) { + throw new UnsupportedOperationException("[withoutAfdOriginGroup] is not supported in " + getClass()); + } } } diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CdnWebApplicationFirewallPolicyPatchParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CdnWebApplicationFirewallPolicyPatchParameters.java index 0d864cea9138..21beb039700c 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CdnWebApplicationFirewallPolicyPatchParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CdnWebApplicationFirewallPolicyPatchParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/Certificate.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/Certificate.java index 18b281864635..81f398b5d716 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/Certificate.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/Certificate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CertificateRevocationCheckEnabledState.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CertificateRevocationCheckEnabledState.java new file mode 100644 index 000000000000..60f93866e12f --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CertificateRevocationCheckEnabledState.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Set to Enabled by default. If set to Disabled, revocation status of client certificate chain will be checked before + * establishing mutual TLS connection. + */ +public final class CertificateRevocationCheckEnabledState + extends ExpandableStringEnum { + /** + * Static value Enabled for CertificateRevocationCheckEnabledState. + */ + public static final CertificateRevocationCheckEnabledState ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for CertificateRevocationCheckEnabledState. + */ + public static final CertificateRevocationCheckEnabledState DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of CertificateRevocationCheckEnabledState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CertificateRevocationCheckEnabledState() { + } + + /** + * Creates or finds a CertificateRevocationCheckEnabledState from its string representation. + * + * @param name a name to look for. + * @return the corresponding CertificateRevocationCheckEnabledState. + */ + public static CertificateRevocationCheckEnabledState fromString(String name) { + return fromString(name, CertificateRevocationCheckEnabledState.class); + } + + /** + * Gets known CertificateRevocationCheckEnabledState values. + * + * @return known CertificateRevocationCheckEnabledState values. + */ + public static Collection values() { + return values(CertificateRevocationCheckEnabledState.class); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CertificateSource.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CertificateSource.java index 6e83052fd268..8099ce0bc70a 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CertificateSource.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CertificateSource.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CertificateSourceParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CertificateSourceParameters.java new file mode 100644 index 000000000000..3486aa0893ce --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CertificateSourceParameters.java @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.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; + +/** + * Defines the parameters for certificate source. + */ +@Immutable +public class CertificateSourceParameters implements JsonSerializable { + /* + * The typeName property. + */ + private CertificateSourceParametersType typeName + = CertificateSourceParametersType.fromString("CertificateSourceParameters"); + + /** + * Creates an instance of CertificateSourceParameters class. + */ + public CertificateSourceParameters() { + } + + /** + * Get the typeName property: The typeName property. + * + * @return the typeName value. + */ + public CertificateSourceParametersType typeName() { + return this.typeName; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("typeName", this.typeName == null ? null : this.typeName.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CertificateSourceParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CertificateSourceParameters 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 CertificateSourceParameters. + */ + public static CertificateSourceParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String discriminatorValue = null; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("typeName".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("KeyVaultCertificateSourceParameters".equals(discriminatorValue)) { + return KeyVaultCertificateSourceParameters.fromJson(readerToUse.reset()); + } else if ("CdnCertificateSourceParameters".equals(discriminatorValue)) { + return CdnCertificateSourceParameters.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static CertificateSourceParameters fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CertificateSourceParameters deserializedCertificateSourceParameters = new CertificateSourceParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("typeName".equals(fieldName)) { + deserializedCertificateSourceParameters.typeName + = CertificateSourceParametersType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedCertificateSourceParameters; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CertificateSourceParametersType.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CertificateSourceParametersType.java new file mode 100644 index 000000000000..fcd22f3ca174 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CertificateSourceParametersType.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for CertificateSourceParametersType. + */ +public final class CertificateSourceParametersType extends ExpandableStringEnum { + /** + * Static value CdnCertificateSourceParameters for CertificateSourceParametersType. + */ + public static final CertificateSourceParametersType CDN_CERTIFICATE_SOURCE_PARAMETERS + = fromString("CdnCertificateSourceParameters"); + + /** + * Static value KeyVaultCertificateSourceParameters for CertificateSourceParametersType. + */ + public static final CertificateSourceParametersType KEY_VAULT_CERTIFICATE_SOURCE_PARAMETERS + = fromString("KeyVaultCertificateSourceParameters"); + + /** + * Creates a new instance of CertificateSourceParametersType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CertificateSourceParametersType() { + } + + /** + * Creates or finds a CertificateSourceParametersType from its string representation. + * + * @param name a name to look for. + * @return the corresponding CertificateSourceParametersType. + */ + public static CertificateSourceParametersType fromString(String name) { + return fromString(name, CertificateSourceParametersType.class); + } + + /** + * Gets known CertificateSourceParametersType values. + * + * @return known CertificateSourceParametersType values. + */ + public static Collection values() { + return values(CertificateSourceParametersType.class); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CertificateType.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CertificateType.java index 2bbe8844bedb..f540dc178e30 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CertificateType.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CertificateType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CheckEndpointNameAvailabilityInput.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CheckEndpointNameAvailabilityInput.java index df2610deebde..4da4bf44145a 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CheckEndpointNameAvailabilityInput.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CheckEndpointNameAvailabilityInput.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CheckHostnameAvailabilityInput.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CheckHostnameAvailabilityInput.java index a2421fd229f3..d794157f656e 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CheckHostnameAvailabilityInput.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CheckHostnameAvailabilityInput.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CheckNameAvailabilityInput.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CheckNameAvailabilityInput.java index 9ce0c7f1c2d3..d234a87b61bd 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CheckNameAvailabilityInput.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CheckNameAvailabilityInput.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CidrIpAddress.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CidrIpAddress.java index 9452ae5b8348..c1548cc78e24 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CidrIpAddress.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CidrIpAddress.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.cdn.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 @@ /** * CIDR Ip address. */ -@Fluent +@Immutable public final class CidrIpAddress implements JsonSerializable { /* * Ip address itself. @@ -29,7 +29,7 @@ public final class CidrIpAddress implements JsonSerializable { /** * Creates an instance of CidrIpAddress class. */ - public CidrIpAddress() { + private CidrIpAddress() { } /** @@ -41,17 +41,6 @@ public String baseIpAddress() { return this.baseIpAddress; } - /** - * Set the baseIpAddress property: Ip address itself. - * - * @param baseIpAddress the baseIpAddress value to set. - * @return the CidrIpAddress object itself. - */ - public CidrIpAddress withBaseIpAddress(String baseIpAddress) { - this.baseIpAddress = baseIpAddress; - return this; - } - /** * Get the prefixLength property: The length of the prefix of the ip address. * @@ -61,17 +50,6 @@ public Integer prefixLength() { return this.prefixLength; } - /** - * Set the prefixLength property: The length of the prefix of the ip address. - * - * @param prefixLength the prefixLength value to set. - * @return the CidrIpAddress object itself. - */ - public CidrIpAddress withPrefixLength(Integer prefixLength) { - this.prefixLength = prefixLength; - return this; - } - /** * Validates the instance. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ClientCertificateRequiredAndOriginValidatesAdvancedSettings.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ClientCertificateRequiredAndOriginValidatesAdvancedSettings.java new file mode 100644 index 000000000000..27f92e2dd04d --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ClientCertificateRequiredAndOriginValidatesAdvancedSettings.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Advanced settings for MtlsScenarioType enum value: ClientCertificateRequiredAndOriginValidates. + */ +@Immutable +public final class ClientCertificateRequiredAndOriginValidatesAdvancedSettings extends AfdDomainMtlsParameters { + /* + * Supported scenarios for establishing mTLS connection. + */ + private MtlsScenarioType scenario = MtlsScenarioType.CLIENT_CERTIFICATE_REQUIRED_AND_ORIGIN_VALIDATES; + + /** + * Creates an instance of ClientCertificateRequiredAndOriginValidatesAdvancedSettings class. + */ + public ClientCertificateRequiredAndOriginValidatesAdvancedSettings() { + } + + /** + * Get the scenario property: Supported scenarios for establishing mTLS connection. + * + * @return the scenario value. + */ + @Override + public MtlsScenarioType scenario() { + return this.scenario; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("scenario", this.scenario == null ? null : this.scenario.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ClientCertificateRequiredAndOriginValidatesAdvancedSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClientCertificateRequiredAndOriginValidatesAdvancedSettings 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 + * ClientCertificateRequiredAndOriginValidatesAdvancedSettings. + */ + public static ClientCertificateRequiredAndOriginValidatesAdvancedSettings fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ClientCertificateRequiredAndOriginValidatesAdvancedSettings deserializedClientCertificateRequiredAndOriginValidatesAdvancedSettings + = new ClientCertificateRequiredAndOriginValidatesAdvancedSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("scenario".equals(fieldName)) { + deserializedClientCertificateRequiredAndOriginValidatesAdvancedSettings.scenario + = MtlsScenarioType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedClientCertificateRequiredAndOriginValidatesAdvancedSettings; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ClientCertificateRequiredAndValidatedAdvancedSettings.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ClientCertificateRequiredAndValidatedAdvancedSettings.java new file mode 100644 index 000000000000..c58520676bb0 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ClientCertificateRequiredAndValidatedAdvancedSettings.java @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Advanced settings for MtlsScenarioType enum value: ClientCertificateRequiredAndValidated. + */ +@Fluent +public final class ClientCertificateRequiredAndValidatedAdvancedSettings extends AfdDomainMtlsParameters { + /* + * Supported scenarios for establishing mTLS connection. + */ + private MtlsScenarioType scenario = MtlsScenarioType.CLIENT_CERTIFICATE_REQUIRED_AND_VALIDATED; + + /* + * List of one or two of Resource References (ie. subs/rg/profile/secret) to Secrets of type MtlsCertificateChain to + * use in mutual TLS handshake as the trusted issuer certificate chain. + */ + private List secrets; + + /* + * List of FQDNs that will be accepted for mutual TLS validation. + */ + private List allowedFqdns; + + /* + * Set to Enabled by default. If set to Disabled, revocation status of client certificate chain will be checked + * before establishing mutual TLS connection. + */ + private CertificateRevocationCheckEnabledState certificateRevocationCheck; + + /** + * Creates an instance of ClientCertificateRequiredAndValidatedAdvancedSettings class. + */ + public ClientCertificateRequiredAndValidatedAdvancedSettings() { + } + + /** + * Get the scenario property: Supported scenarios for establishing mTLS connection. + * + * @return the scenario value. + */ + @Override + public MtlsScenarioType scenario() { + return this.scenario; + } + + /** + * Get the secrets property: List of one or two of Resource References (ie. subs/rg/profile/secret) to Secrets of + * type MtlsCertificateChain to use in mutual TLS handshake as the trusted issuer certificate chain. + * + * @return the secrets value. + */ + public List secrets() { + return this.secrets; + } + + /** + * Set the secrets property: List of one or two of Resource References (ie. subs/rg/profile/secret) to Secrets of + * type MtlsCertificateChain to use in mutual TLS handshake as the trusted issuer certificate chain. + * + * @param secrets the secrets value to set. + * @return the ClientCertificateRequiredAndValidatedAdvancedSettings object itself. + */ + public ClientCertificateRequiredAndValidatedAdvancedSettings withSecrets(List secrets) { + this.secrets = secrets; + return this; + } + + /** + * Get the allowedFqdns property: List of FQDNs that will be accepted for mutual TLS validation. + * + * @return the allowedFqdns value. + */ + public List allowedFqdns() { + return this.allowedFqdns; + } + + /** + * Set the allowedFqdns property: List of FQDNs that will be accepted for mutual TLS validation. + * + * @param allowedFqdns the allowedFqdns value to set. + * @return the ClientCertificateRequiredAndValidatedAdvancedSettings object itself. + */ + public ClientCertificateRequiredAndValidatedAdvancedSettings withAllowedFqdns(List allowedFqdns) { + this.allowedFqdns = allowedFqdns; + return this; + } + + /** + * Get the certificateRevocationCheck property: Set to Enabled by default. If set to Disabled, revocation status of + * client certificate chain will be checked before establishing mutual TLS connection. + * + * @return the certificateRevocationCheck value. + */ + public CertificateRevocationCheckEnabledState certificateRevocationCheck() { + return this.certificateRevocationCheck; + } + + /** + * Set the certificateRevocationCheck property: Set to Enabled by default. If set to Disabled, revocation status of + * client certificate chain will be checked before establishing mutual TLS connection. + * + * @param certificateRevocationCheck the certificateRevocationCheck value to set. + * @return the ClientCertificateRequiredAndValidatedAdvancedSettings object itself. + */ + public ClientCertificateRequiredAndValidatedAdvancedSettings + withCertificateRevocationCheck(CertificateRevocationCheckEnabledState certificateRevocationCheck) { + this.certificateRevocationCheck = certificateRevocationCheck; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (secrets() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property secrets in model ClientCertificateRequiredAndValidatedAdvancedSettings")); + } else { + secrets().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER + = new ClientLogger(ClientCertificateRequiredAndValidatedAdvancedSettings.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("secrets", this.secrets, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("scenario", this.scenario == null ? null : this.scenario.toString()); + jsonWriter.writeArrayField("allowedFqdns", this.allowedFqdns, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("certificateRevocationCheck", + this.certificateRevocationCheck == null ? null : this.certificateRevocationCheck.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ClientCertificateRequiredAndValidatedAdvancedSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClientCertificateRequiredAndValidatedAdvancedSettings 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 ClientCertificateRequiredAndValidatedAdvancedSettings. + */ + public static ClientCertificateRequiredAndValidatedAdvancedSettings fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ClientCertificateRequiredAndValidatedAdvancedSettings deserializedClientCertificateRequiredAndValidatedAdvancedSettings + = new ClientCertificateRequiredAndValidatedAdvancedSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("secrets".equals(fieldName)) { + List secrets = reader.readArray(reader1 -> ResourceReference.fromJson(reader1)); + deserializedClientCertificateRequiredAndValidatedAdvancedSettings.secrets = secrets; + } else if ("scenario".equals(fieldName)) { + deserializedClientCertificateRequiredAndValidatedAdvancedSettings.scenario + = MtlsScenarioType.fromString(reader.getString()); + } else if ("allowedFqdns".equals(fieldName)) { + List allowedFqdns = reader.readArray(reader1 -> reader1.getString()); + deserializedClientCertificateRequiredAndValidatedAdvancedSettings.allowedFqdns = allowedFqdns; + } else if ("certificateRevocationCheck".equals(fieldName)) { + deserializedClientCertificateRequiredAndValidatedAdvancedSettings.certificateRevocationCheck + = CertificateRevocationCheckEnabledState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedClientCertificateRequiredAndValidatedAdvancedSettings; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ClientCertificateValidatedIfPresentedAdvancedSettings.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ClientCertificateValidatedIfPresentedAdvancedSettings.java new file mode 100644 index 000000000000..51847912fe40 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ClientCertificateValidatedIfPresentedAdvancedSettings.java @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Advanced settings for MtlsScenarioType enum value: ClientCertificateValidatedIfPresented. + */ +@Fluent +public final class ClientCertificateValidatedIfPresentedAdvancedSettings extends AfdDomainMtlsParameters { + /* + * Supported scenarios for establishing mTLS connection. + */ + private MtlsScenarioType scenario = MtlsScenarioType.CLIENT_CERTIFICATE_VALIDATED_IF_PRESENTED; + + /* + * List of one or two of Resource References (ie. subs/rg/profile/secret) to Secrets of type MtlsCertificateChain to + * use in mutual TLS handshake as the trusted issuer certificate chain. + */ + private List secrets; + + /* + * List of FQDNs that will be accepted for mutual TLS validation. + */ + private List allowedFqdns; + + /* + * Set to Enabled by default. If set to Disabled, revocation status of client certificate chain will be checked + * before establishing mutual TLS connection. + */ + private CertificateRevocationCheckEnabledState certificateRevocationCheck; + + /** + * Creates an instance of ClientCertificateValidatedIfPresentedAdvancedSettings class. + */ + public ClientCertificateValidatedIfPresentedAdvancedSettings() { + } + + /** + * Get the scenario property: Supported scenarios for establishing mTLS connection. + * + * @return the scenario value. + */ + @Override + public MtlsScenarioType scenario() { + return this.scenario; + } + + /** + * Get the secrets property: List of one or two of Resource References (ie. subs/rg/profile/secret) to Secrets of + * type MtlsCertificateChain to use in mutual TLS handshake as the trusted issuer certificate chain. + * + * @return the secrets value. + */ + public List secrets() { + return this.secrets; + } + + /** + * Set the secrets property: List of one or two of Resource References (ie. subs/rg/profile/secret) to Secrets of + * type MtlsCertificateChain to use in mutual TLS handshake as the trusted issuer certificate chain. + * + * @param secrets the secrets value to set. + * @return the ClientCertificateValidatedIfPresentedAdvancedSettings object itself. + */ + public ClientCertificateValidatedIfPresentedAdvancedSettings withSecrets(List secrets) { + this.secrets = secrets; + return this; + } + + /** + * Get the allowedFqdns property: List of FQDNs that will be accepted for mutual TLS validation. + * + * @return the allowedFqdns value. + */ + public List allowedFqdns() { + return this.allowedFqdns; + } + + /** + * Set the allowedFqdns property: List of FQDNs that will be accepted for mutual TLS validation. + * + * @param allowedFqdns the allowedFqdns value to set. + * @return the ClientCertificateValidatedIfPresentedAdvancedSettings object itself. + */ + public ClientCertificateValidatedIfPresentedAdvancedSettings withAllowedFqdns(List allowedFqdns) { + this.allowedFqdns = allowedFqdns; + return this; + } + + /** + * Get the certificateRevocationCheck property: Set to Enabled by default. If set to Disabled, revocation status of + * client certificate chain will be checked before establishing mutual TLS connection. + * + * @return the certificateRevocationCheck value. + */ + public CertificateRevocationCheckEnabledState certificateRevocationCheck() { + return this.certificateRevocationCheck; + } + + /** + * Set the certificateRevocationCheck property: Set to Enabled by default. If set to Disabled, revocation status of + * client certificate chain will be checked before establishing mutual TLS connection. + * + * @param certificateRevocationCheck the certificateRevocationCheck value to set. + * @return the ClientCertificateValidatedIfPresentedAdvancedSettings object itself. + */ + public ClientCertificateValidatedIfPresentedAdvancedSettings + withCertificateRevocationCheck(CertificateRevocationCheckEnabledState certificateRevocationCheck) { + this.certificateRevocationCheck = certificateRevocationCheck; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (secrets() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property secrets in model ClientCertificateValidatedIfPresentedAdvancedSettings")); + } else { + secrets().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER + = new ClientLogger(ClientCertificateValidatedIfPresentedAdvancedSettings.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("secrets", this.secrets, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("scenario", this.scenario == null ? null : this.scenario.toString()); + jsonWriter.writeArrayField("allowedFqdns", this.allowedFqdns, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("certificateRevocationCheck", + this.certificateRevocationCheck == null ? null : this.certificateRevocationCheck.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ClientCertificateValidatedIfPresentedAdvancedSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClientCertificateValidatedIfPresentedAdvancedSettings 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 ClientCertificateValidatedIfPresentedAdvancedSettings. + */ + public static ClientCertificateValidatedIfPresentedAdvancedSettings fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ClientCertificateValidatedIfPresentedAdvancedSettings deserializedClientCertificateValidatedIfPresentedAdvancedSettings + = new ClientCertificateValidatedIfPresentedAdvancedSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("secrets".equals(fieldName)) { + List secrets = reader.readArray(reader1 -> ResourceReference.fromJson(reader1)); + deserializedClientCertificateValidatedIfPresentedAdvancedSettings.secrets = secrets; + } else if ("scenario".equals(fieldName)) { + deserializedClientCertificateValidatedIfPresentedAdvancedSettings.scenario + = MtlsScenarioType.fromString(reader.getString()); + } else if ("allowedFqdns".equals(fieldName)) { + List allowedFqdns = reader.readArray(reader1 -> reader1.getString()); + deserializedClientCertificateValidatedIfPresentedAdvancedSettings.allowedFqdns = allowedFqdns; + } else if ("certificateRevocationCheck".equals(fieldName)) { + deserializedClientCertificateValidatedIfPresentedAdvancedSettings.certificateRevocationCheck + = CertificateRevocationCheckEnabledState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedClientCertificateValidatedIfPresentedAdvancedSettings; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ClientPortMatchConditionParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ClientPortMatchConditionParameters.java index a0480f0ab8d1..d8a4e445473c 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ClientPortMatchConditionParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ClientPortMatchConditionParameters.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.cdn.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -17,11 +16,12 @@ * Defines the parameters for ClientPort match conditions. */ @Fluent -public final class ClientPortMatchConditionParameters implements JsonSerializable { +public final class ClientPortMatchConditionParameters extends DeliveryRuleConditionParameters { /* * The typeName property. */ - private String typeName = "DeliveryRuleClientPortConditionParameters"; + private DeliveryRuleConditionParametersType typeName + = DeliveryRuleConditionParametersType.DELIVERY_RULE_CLIENT_PORT_CONDITION_PARAMETERS; /* * Describes operator to be matched @@ -54,21 +54,11 @@ public ClientPortMatchConditionParameters() { * * @return the typeName value. */ - public String typeName() { + @Override + public DeliveryRuleConditionParametersType typeName() { return this.typeName; } - /** - * Set the typeName property: The typeName property. - * - * @param typeName the typeName value to set. - * @return the ClientPortMatchConditionParameters object itself. - */ - public ClientPortMatchConditionParameters withTypeName(String typeName) { - this.typeName = typeName; - return this; - } - /** * Get the operator property: Describes operator to be matched. * @@ -154,6 +144,7 @@ public ClientPortMatchConditionParameters withTransforms(List transfo * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { if (operator() == null) { throw LOGGER.atError() @@ -170,8 +161,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("typeName", this.typeName); jsonWriter.writeStringField("operator", this.operator == null ? null : this.operator.toString()); + jsonWriter.writeStringField("typeName", this.typeName == null ? null : this.typeName.toString()); jsonWriter.writeBooleanField("negateCondition", this.negateCondition); jsonWriter.writeArrayField("matchValues", this.matchValues, (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("transforms", this.transforms, @@ -199,6 +190,9 @@ public static ClientPortMatchConditionParameters fromJson(JsonReader jsonReader) if ("operator".equals(fieldName)) { deserializedClientPortMatchConditionParameters.operator = ClientPortOperator.fromString(reader.getString()); + } else if ("typeName".equals(fieldName)) { + deserializedClientPortMatchConditionParameters.typeName + = DeliveryRuleConditionParametersType.fromString(reader.getString()); } else if ("negateCondition".equals(fieldName)) { deserializedClientPortMatchConditionParameters.negateCondition = reader.getNullable(JsonReader::getBoolean); diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ClientPortOperator.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ClientPortOperator.java index cd11447a2430..7d0143cc1c29 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ClientPortOperator.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ClientPortOperator.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CompareDeploymentVersionsParameter.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CompareDeploymentVersionsParameter.java new file mode 100644 index 000000000000..1e26b4004387 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CompareDeploymentVersionsParameter.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * compare deployment versions request parameter. + */ +@Fluent +public final class CompareDeploymentVersionsParameter implements JsonSerializable { + /* + * the deployment version name to be compared to + */ + private String compareTo; + + /** + * Creates an instance of CompareDeploymentVersionsParameter class. + */ + public CompareDeploymentVersionsParameter() { + } + + /** + * Get the compareTo property: the deployment version name to be compared to. + * + * @return the compareTo value. + */ + public String compareTo() { + return this.compareTo; + } + + /** + * Set the compareTo property: the deployment version name to be compared to. + * + * @param compareTo the compareTo value to set. + * @return the CompareDeploymentVersionsParameter object itself. + */ + public CompareDeploymentVersionsParameter withCompareTo(String compareTo) { + this.compareTo = compareTo; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (compareTo() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property compareTo in model CompareDeploymentVersionsParameter")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CompareDeploymentVersionsParameter.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("compareTo", this.compareTo); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CompareDeploymentVersionsParameter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CompareDeploymentVersionsParameter 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 CompareDeploymentVersionsParameter. + */ + public static CompareDeploymentVersionsParameter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CompareDeploymentVersionsParameter deserializedCompareDeploymentVersionsParameter + = new CompareDeploymentVersionsParameter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("compareTo".equals(fieldName)) { + deserializedCompareDeploymentVersionsParameter.compareTo = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCompareDeploymentVersionsParameter; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CompleteMtlsPassthroughToOriginAdvancedSettings.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CompleteMtlsPassthroughToOriginAdvancedSettings.java new file mode 100644 index 000000000000..fa1f498c2e63 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CompleteMtlsPassthroughToOriginAdvancedSettings.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Advanced settings for MtlsScenarioType enum value: CompleteMtlsPassthroughToOrigin. + */ +@Immutable +public final class CompleteMtlsPassthroughToOriginAdvancedSettings extends AfdDomainMtlsParameters { + /* + * Supported scenarios for establishing mTLS connection. + */ + private MtlsScenarioType scenario = MtlsScenarioType.COMPLETE_MTLS_PASSTHROUGH_TO_ORIGIN; + + /** + * Creates an instance of CompleteMtlsPassthroughToOriginAdvancedSettings class. + */ + public CompleteMtlsPassthroughToOriginAdvancedSettings() { + } + + /** + * Get the scenario property: Supported scenarios for establishing mTLS connection. + * + * @return the scenario value. + */ + @Override + public MtlsScenarioType scenario() { + return this.scenario; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("scenario", this.scenario == null ? null : this.scenario.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CompleteMtlsPassthroughToOriginAdvancedSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CompleteMtlsPassthroughToOriginAdvancedSettings 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 CompleteMtlsPassthroughToOriginAdvancedSettings. + */ + public static CompleteMtlsPassthroughToOriginAdvancedSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CompleteMtlsPassthroughToOriginAdvancedSettings deserializedCompleteMtlsPassthroughToOriginAdvancedSettings + = new CompleteMtlsPassthroughToOriginAdvancedSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("scenario".equals(fieldName)) { + deserializedCompleteMtlsPassthroughToOriginAdvancedSettings.scenario + = MtlsScenarioType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedCompleteMtlsPassthroughToOriginAdvancedSettings; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CompressionSettings.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CompressionSettings.java index 78bde835b6eb..d65927b9927f 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CompressionSettings.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CompressionSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ContinentsResponseContinentsItem.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ContinentsResponseContinentsItem.java index ee564bff8b3a..8d659015b76e 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ContinentsResponseContinentsItem.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ContinentsResponseContinentsItem.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.cdn.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 @@ /** * The ContinentsResponseContinentsItem model. */ -@Fluent +@Immutable public final class ContinentsResponseContinentsItem implements JsonSerializable { /* * The id property. @@ -24,7 +24,7 @@ public final class ContinentsResponseContinentsItem implements JsonSerializable< /** * Creates an instance of ContinentsResponseContinentsItem class. */ - public ContinentsResponseContinentsItem() { + private ContinentsResponseContinentsItem() { } /** @@ -36,17 +36,6 @@ public String id() { return this.id; } - /** - * Set the id property: The id property. - * - * @param id the id value to set. - * @return the ContinentsResponseContinentsItem object itself. - */ - public ContinentsResponseContinentsItem withId(String id) { - this.id = id; - return this; - } - /** * Validates the instance. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ContinentsResponseCountryOrRegionsItem.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ContinentsResponseCountryOrRegionsItem.java index 06127f1c2ec9..cbd07589587d 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ContinentsResponseCountryOrRegionsItem.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ContinentsResponseCountryOrRegionsItem.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.cdn.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 @@ /** * The ContinentsResponseCountryOrRegionsItem model. */ -@Fluent +@Immutable public final class ContinentsResponseCountryOrRegionsItem implements JsonSerializable { /* @@ -30,7 +30,7 @@ public final class ContinentsResponseCountryOrRegionsItem /** * Creates an instance of ContinentsResponseCountryOrRegionsItem class. */ - public ContinentsResponseCountryOrRegionsItem() { + private ContinentsResponseCountryOrRegionsItem() { } /** @@ -42,17 +42,6 @@ public String id() { return this.id; } - /** - * Set the id property: The id property. - * - * @param id the id value to set. - * @return the ContinentsResponseCountryOrRegionsItem object itself. - */ - public ContinentsResponseCountryOrRegionsItem withId(String id) { - this.id = id; - return this; - } - /** * Get the continentId property: The continentId property. * @@ -62,17 +51,6 @@ public String continentId() { return this.continentId; } - /** - * Set the continentId property: The continentId property. - * - * @param continentId the continentId value to set. - * @return the ContinentsResponseCountryOrRegionsItem object itself. - */ - public ContinentsResponseCountryOrRegionsItem withContinentId(String continentId) { - this.continentId = continentId; - return this; - } - /** * Validates the instance. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CookiesMatchConditionParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CookiesMatchConditionParameters.java index 98f41db0ce5c..cd9d70079174 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CookiesMatchConditionParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CookiesMatchConditionParameters.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.cdn.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -17,11 +16,12 @@ * Defines the parameters for Cookies match conditions. */ @Fluent -public final class CookiesMatchConditionParameters implements JsonSerializable { +public final class CookiesMatchConditionParameters extends DeliveryRuleConditionParameters { /* * The typeName property. */ - private String typeName = "DeliveryRuleCookiesConditionParameters"; + private DeliveryRuleConditionParametersType typeName + = DeliveryRuleConditionParametersType.DELIVERY_RULE_COOKIES_CONDITION_PARAMETERS; /* * Name of Cookies to be matched @@ -59,21 +59,11 @@ public CookiesMatchConditionParameters() { * * @return the typeName value. */ - public String typeName() { + @Override + public DeliveryRuleConditionParametersType typeName() { return this.typeName; } - /** - * Set the typeName property: The typeName property. - * - * @param typeName the typeName value to set. - * @return the CookiesMatchConditionParameters object itself. - */ - public CookiesMatchConditionParameters withTypeName(String typeName) { - this.typeName = typeName; - return this; - } - /** * Get the selector property: Name of Cookies to be matched. * @@ -179,6 +169,7 @@ public CookiesMatchConditionParameters withTransforms(List transforms * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { if (operator() == null) { throw LOGGER.atError() @@ -195,8 +186,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("typeName", this.typeName); jsonWriter.writeStringField("operator", this.operator == null ? null : this.operator.toString()); + jsonWriter.writeStringField("typeName", this.typeName == null ? null : this.typeName.toString()); jsonWriter.writeStringField("selector", this.selector); jsonWriter.writeBooleanField("negateCondition", this.negateCondition); jsonWriter.writeArrayField("matchValues", this.matchValues, (writer, element) -> writer.writeString(element)); @@ -225,6 +216,9 @@ public static CookiesMatchConditionParameters fromJson(JsonReader jsonReader) th if ("operator".equals(fieldName)) { deserializedCookiesMatchConditionParameters.operator = CookiesOperator.fromString(reader.getString()); + } else if ("typeName".equals(fieldName)) { + deserializedCookiesMatchConditionParameters.typeName + = DeliveryRuleConditionParametersType.fromString(reader.getString()); } else if ("selector".equals(fieldName)) { deserializedCookiesMatchConditionParameters.selector = reader.getString(); } else if ("negateCondition".equals(fieldName)) { diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CookiesOperator.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CookiesOperator.java index 31dd9d1275a4..396c9908b96c 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CookiesOperator.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CookiesOperator.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomDomainHttpsParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomDomainHttpsParameters.java index cd393d3d5a14..82de5d3297b2 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomDomainHttpsParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomDomainHttpsParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomDomainParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomDomainParameters.java index 7c83dcb3475d..865ab2d28f40 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomDomainParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomDomainParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomDomainResourceState.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomDomainResourceState.java index ecfdc61117fa..edcd50b3d475 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomDomainResourceState.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomDomainResourceState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomHttpsProvisioningState.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomHttpsProvisioningState.java index 08286de6ad44..a8d341df7aeb 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomHttpsProvisioningState.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/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.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomHttpsProvisioningSubstate.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomHttpsProvisioningSubstate.java index f6e33cbf159c..212f88a98215 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomHttpsProvisioningSubstate.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/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.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomRule.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomRule.java index 58d28f9ca3a6..1f383f2f5ce0 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomRule.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomRule.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomRuleAfd.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomRuleAfd.java new file mode 100644 index 000000000000..5267fa36d10f --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomRuleAfd.java @@ -0,0 +1,347 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Defines contents of a web application rule. + */ +@Fluent +public final class CustomRuleAfd implements JsonSerializable { + /* + * Describes the name of the rule. + */ + private String name; + + /* + * Describes priority of the rule. Rules with a lower value will be evaluated before rules with a higher value. + */ + private int priority; + + /* + * Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified. + */ + private CustomRuleEnabledState enabledState; + + /* + * Describes type of rule. + */ + private RuleType ruleType; + + /* + * Time window for resetting the rate limit count. Default is 1 minute. + */ + private Integer rateLimitDurationInMinutes; + + /* + * Number of allowed requests per client within the time window. + */ + private Integer rateLimitThreshold; + + /* + * Describes the list of variables to group the rate limit requests + */ + private List groupBy; + + /* + * List of match conditions. + */ + private List matchConditions; + + /* + * Describes what action to be applied when rule matches. + */ + private ActionType action; + + /** + * Creates an instance of CustomRuleAfd class. + */ + public CustomRuleAfd() { + } + + /** + * Get the name property: Describes the name of the rule. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Describes the name of the rule. + * + * @param name the name value to set. + * @return the CustomRuleAfd object itself. + */ + public CustomRuleAfd withName(String name) { + this.name = name; + return this; + } + + /** + * Get the priority property: Describes priority of the rule. Rules with a lower value will be evaluated before + * rules with a higher value. + * + * @return the priority value. + */ + public int priority() { + return this.priority; + } + + /** + * Set the priority property: Describes priority of the rule. Rules with a lower value will be evaluated before + * rules with a higher value. + * + * @param priority the priority value to set. + * @return the CustomRuleAfd object itself. + */ + public CustomRuleAfd withPriority(int priority) { + this.priority = priority; + return this; + } + + /** + * Get the enabledState property: Describes if the custom rule is in enabled or disabled state. Defaults to Enabled + * if not specified. + * + * @return the enabledState value. + */ + public CustomRuleEnabledState enabledState() { + return this.enabledState; + } + + /** + * Set the enabledState property: Describes if the custom rule is in enabled or disabled state. Defaults to Enabled + * if not specified. + * + * @param enabledState the enabledState value to set. + * @return the CustomRuleAfd object itself. + */ + public CustomRuleAfd withEnabledState(CustomRuleEnabledState enabledState) { + this.enabledState = enabledState; + return this; + } + + /** + * Get the ruleType property: Describes type of rule. + * + * @return the ruleType value. + */ + public RuleType ruleType() { + return this.ruleType; + } + + /** + * Set the ruleType property: Describes type of rule. + * + * @param ruleType the ruleType value to set. + * @return the CustomRuleAfd object itself. + */ + public CustomRuleAfd withRuleType(RuleType ruleType) { + this.ruleType = ruleType; + return this; + } + + /** + * Get the rateLimitDurationInMinutes property: Time window for resetting the rate limit count. Default is 1 minute. + * + * @return the rateLimitDurationInMinutes value. + */ + public Integer rateLimitDurationInMinutes() { + return this.rateLimitDurationInMinutes; + } + + /** + * Set the rateLimitDurationInMinutes property: Time window for resetting the rate limit count. Default is 1 minute. + * + * @param rateLimitDurationInMinutes the rateLimitDurationInMinutes value to set. + * @return the CustomRuleAfd object itself. + */ + public CustomRuleAfd withRateLimitDurationInMinutes(Integer rateLimitDurationInMinutes) { + this.rateLimitDurationInMinutes = rateLimitDurationInMinutes; + return this; + } + + /** + * Get the rateLimitThreshold property: Number of allowed requests per client within the time window. + * + * @return the rateLimitThreshold value. + */ + public Integer rateLimitThreshold() { + return this.rateLimitThreshold; + } + + /** + * Set the rateLimitThreshold property: Number of allowed requests per client within the time window. + * + * @param rateLimitThreshold the rateLimitThreshold value to set. + * @return the CustomRuleAfd object itself. + */ + public CustomRuleAfd withRateLimitThreshold(Integer rateLimitThreshold) { + this.rateLimitThreshold = rateLimitThreshold; + return this; + } + + /** + * Get the groupBy property: Describes the list of variables to group the rate limit requests. + * + * @return the groupBy value. + */ + public List groupBy() { + return this.groupBy; + } + + /** + * Set the groupBy property: Describes the list of variables to group the rate limit requests. + * + * @param groupBy the groupBy value to set. + * @return the CustomRuleAfd object itself. + */ + public CustomRuleAfd withGroupBy(List groupBy) { + this.groupBy = groupBy; + return this; + } + + /** + * Get the matchConditions property: List of match conditions. + * + * @return the matchConditions value. + */ + public List matchConditions() { + return this.matchConditions; + } + + /** + * Set the matchConditions property: List of match conditions. + * + * @param matchConditions the matchConditions value to set. + * @return the CustomRuleAfd object itself. + */ + public CustomRuleAfd withMatchConditions(List matchConditions) { + this.matchConditions = matchConditions; + return this; + } + + /** + * Get the action property: Describes what action to be applied when rule matches. + * + * @return the action value. + */ + public ActionType action() { + return this.action; + } + + /** + * Set the action property: Describes what action to be applied when rule matches. + * + * @param action the action value to set. + * @return the CustomRuleAfd object itself. + */ + public CustomRuleAfd withAction(ActionType action) { + this.action = 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 CustomRuleAfd")); + } + if (groupBy() != null) { + groupBy().forEach(e -> e.validate()); + } + if (matchConditions() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property matchConditions in model CustomRuleAfd")); + } else { + matchConditions().forEach(e -> e.validate()); + } + if (action() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property action in model CustomRuleAfd")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CustomRuleAfd.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeIntField("priority", this.priority); + jsonWriter.writeStringField("ruleType", this.ruleType == null ? null : this.ruleType.toString()); + jsonWriter.writeArrayField("matchConditions", this.matchConditions, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("action", this.action == null ? null : this.action.toString()); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("enabledState", this.enabledState == null ? null : this.enabledState.toString()); + jsonWriter.writeNumberField("rateLimitDurationInMinutes", this.rateLimitDurationInMinutes); + jsonWriter.writeNumberField("rateLimitThreshold", this.rateLimitThreshold); + jsonWriter.writeArrayField("groupBy", this.groupBy, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CustomRuleAfd from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CustomRuleAfd 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 CustomRuleAfd. + */ + public static CustomRuleAfd fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CustomRuleAfd deserializedCustomRuleAfd = new CustomRuleAfd(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("priority".equals(fieldName)) { + deserializedCustomRuleAfd.priority = reader.getInt(); + } else if ("ruleType".equals(fieldName)) { + deserializedCustomRuleAfd.ruleType = RuleType.fromString(reader.getString()); + } else if ("matchConditions".equals(fieldName)) { + List matchConditions + = reader.readArray(reader1 -> MatchConditionAfd.fromJson(reader1)); + deserializedCustomRuleAfd.matchConditions = matchConditions; + } else if ("action".equals(fieldName)) { + deserializedCustomRuleAfd.action = ActionType.fromString(reader.getString()); + } else if ("name".equals(fieldName)) { + deserializedCustomRuleAfd.name = reader.getString(); + } else if ("enabledState".equals(fieldName)) { + deserializedCustomRuleAfd.enabledState = CustomRuleEnabledState.fromString(reader.getString()); + } else if ("rateLimitDurationInMinutes".equals(fieldName)) { + deserializedCustomRuleAfd.rateLimitDurationInMinutes = reader.getNullable(JsonReader::getInt); + } else if ("rateLimitThreshold".equals(fieldName)) { + deserializedCustomRuleAfd.rateLimitThreshold = reader.getNullable(JsonReader::getInt); + } else if ("groupBy".equals(fieldName)) { + List groupBy = reader.readArray(reader1 -> GroupByVariable.fromJson(reader1)); + deserializedCustomRuleAfd.groupBy = groupBy; + } else { + reader.skipChildren(); + } + } + + return deserializedCustomRuleAfd; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomRuleEnabledState.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomRuleEnabledState.java index 646b0d0d85c3..689ed7b5d16e 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomRuleEnabledState.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/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.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomRuleList.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomRuleList.java index 1355a9469c41..54ee05e5b9ca 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomRuleList.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/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.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomRuleListAfd.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomRuleListAfd.java new file mode 100644 index 000000000000..c9f3224c17d2 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomRuleListAfd.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.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 contents of custom rules. + */ +@Fluent +public final class CustomRuleListAfd implements JsonSerializable { + /* + * List of rules + */ + private List rules; + + /** + * Creates an instance of CustomRuleListAfd class. + */ + public CustomRuleListAfd() { + } + + /** + * Get the rules property: List of rules. + * + * @return the rules value. + */ + public List rules() { + return this.rules; + } + + /** + * Set the rules property: List of rules. + * + * @param rules the rules value to set. + * @return the CustomRuleListAfd object itself. + */ + public CustomRuleListAfd withRules(List rules) { + this.rules = 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} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("rules", this.rules, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CustomRuleListAfd from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CustomRuleListAfd 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 CustomRuleListAfd. + */ + public static CustomRuleListAfd fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CustomRuleListAfd deserializedCustomRuleListAfd = new CustomRuleListAfd(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("rules".equals(fieldName)) { + List rules = reader.readArray(reader1 -> CustomRuleAfd.fromJson(reader1)); + deserializedCustomRuleListAfd.rules = rules; + } else { + reader.skipChildren(); + } + } + + return deserializedCustomRuleListAfd; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomerCertificate.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomerCertificate.java index 8bb4afc3c74c..be7566240cc4 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomerCertificate.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomerCertificate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -18,7 +18,10 @@ public final class CustomerCertificate extends Certificate { /* * Resource reference to the Azure Key Vault certificate. Expected to be in format of - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets/{certificateName} + * /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName} + * ​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName} + * ​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName} + * ​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ */ private ResourceReference secretSource; @@ -65,8 +68,8 @@ public CustomerCertificate() { /** * Get the secretSource property: Resource reference to the Azure Key Vault certificate. Expected to be in format of - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets/{certificateName}. - * + * /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. + * * @return the secretSource value. */ public ResourceReference secretSource() { @@ -75,8 +78,8 @@ public ResourceReference secretSource() { /** * Set the secretSource property: Resource reference to the Azure Key Vault certificate. Expected to be in format of - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets/{certificateName}. - * + * /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. + * * @param secretSource the secretSource value to set. * @return the CustomerCertificate object itself. */ @@ -87,7 +90,7 @@ public CustomerCertificate withSecretSource(ResourceReference secretSource) { /** * Get the secretVersion property: Certificate version. - * + * * @return the secretVersion value. */ public String secretVersion() { @@ -96,7 +99,7 @@ public String secretVersion() { /** * Set the secretVersion property: Certificate version. - * + * * @param secretVersion the secretVersion value to set. * @return the CustomerCertificate object itself. */ @@ -107,7 +110,7 @@ public CustomerCertificate withSecretVersion(String secretVersion) { /** * Get the certificateAuthority property: Certificate issuing authority. - * + * * @return the certificateAuthority value. */ public String certificateAuthority() { @@ -116,7 +119,7 @@ public String certificateAuthority() { /** * Get the useLatestVersion property: Whether to use the latest version for the certificate. - * + * * @return the useLatestVersion value. */ public Boolean useLatestVersion() { @@ -125,7 +128,7 @@ public Boolean useLatestVersion() { /** * Set the useLatestVersion property: Whether to use the latest version for the certificate. - * + * * @param useLatestVersion the useLatestVersion value to set. * @return the CustomerCertificate object itself. */ @@ -136,7 +139,7 @@ public CustomerCertificate withUseLatestVersion(Boolean useLatestVersion) { /** * Get the subjectAlternativeNames property: The list of SANs. - * + * * @return the subjectAlternativeNames value. */ public List subjectAlternativeNames() { @@ -145,7 +148,7 @@ public List subjectAlternativeNames() { /** * Set the subjectAlternativeNames property: The list of SANs. - * + * * @param subjectAlternativeNames the subjectAlternativeNames value to set. * @return the CustomerCertificate object itself. */ @@ -156,7 +159,7 @@ public CustomerCertificate withSubjectAlternativeNames(List subjectAlter /** * Get the thumbprint property: Certificate thumbprint. - * + * * @return the thumbprint value. */ public String thumbprint() { @@ -165,7 +168,7 @@ public String thumbprint() { /** * Get the expirationDate property: Certificate expiration date. - * + * * @return the expirationDate value. */ @Override @@ -175,7 +178,7 @@ public String expirationDate() { /** * Get the subject property: Subject name in the certificate. - * + * * @return the subject value. */ @Override @@ -194,12 +197,11 @@ public CustomerCertificate withType(SecretType type) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { - super.validate(); if (secretSource() != null) { secretSource().validate(); } @@ -222,7 +224,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of CustomerCertificate from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of CustomerCertificate if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomerCertificateParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomerCertificateParameters.java index 8257c96605e4..d91257b8eaf0 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomerCertificateParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomerCertificateParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -24,7 +24,10 @@ public final class CustomerCertificateParameters extends SecretParameters { /* * Resource reference to the Azure Key Vault certificate. Expected to be in format of - * /subscriptions/{subscriptionId}/resourceGroups/{sourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets/{certificateName} + * /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName} + * ​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName} + * ​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName} + * ​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ */ private ResourceReference secretSource; @@ -71,7 +74,7 @@ public CustomerCertificateParameters() { /** * Get the type property: The type of the secret resource. - * + * * @return the type value. */ @Override @@ -81,8 +84,8 @@ public SecretType type() { /** * Get the secretSource property: Resource reference to the Azure Key Vault certificate. Expected to be in format of - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets/{certificateName}. - * + * /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. + * * @return the secretSource value. */ public ResourceReference secretSource() { @@ -91,8 +94,8 @@ public ResourceReference secretSource() { /** * Set the secretSource property: Resource reference to the Azure Key Vault certificate. Expected to be in format of - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets/{certificateName}. - * + * /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. + * * @param secretSource the secretSource value to set. * @return the CustomerCertificateParameters object itself. */ @@ -103,7 +106,7 @@ public CustomerCertificateParameters withSecretSource(ResourceReference secretSo /** * Get the secretVersion property: Version of the secret to be used. - * + * * @return the secretVersion value. */ public String secretVersion() { @@ -112,7 +115,7 @@ public String secretVersion() { /** * Set the secretVersion property: Version of the secret to be used. - * + * * @param secretVersion the secretVersion value to set. * @return the CustomerCertificateParameters object itself. */ @@ -123,7 +126,7 @@ public CustomerCertificateParameters withSecretVersion(String secretVersion) { /** * Get the useLatestVersion property: Whether to use the latest version for the certificate. - * + * * @return the useLatestVersion value. */ public Boolean useLatestVersion() { @@ -132,7 +135,7 @@ public Boolean useLatestVersion() { /** * Set the useLatestVersion property: Whether to use the latest version for the certificate. - * + * * @param useLatestVersion the useLatestVersion value to set. * @return the CustomerCertificateParameters object itself. */ @@ -143,7 +146,7 @@ public CustomerCertificateParameters withUseLatestVersion(Boolean useLatestVersi /** * Get the subject property: Subject name in the certificate. - * + * * @return the subject value. */ public String subject() { @@ -152,7 +155,7 @@ public String subject() { /** * Get the expirationDate property: Certificate expiration date. - * + * * @return the expirationDate value. */ public String expirationDate() { @@ -161,7 +164,7 @@ public String expirationDate() { /** * Get the certificateAuthority property: Certificate issuing authority. - * + * * @return the certificateAuthority value. */ public String certificateAuthority() { @@ -170,27 +173,16 @@ public String certificateAuthority() { /** * Get the subjectAlternativeNames property: The list of SANs. - * + * * @return the subjectAlternativeNames value. */ public List subjectAlternativeNames() { return this.subjectAlternativeNames; } - /** - * Set the subjectAlternativeNames property: The list of SANs. - * - * @param subjectAlternativeNames the subjectAlternativeNames value to set. - * @return the CustomerCertificateParameters object itself. - */ - public CustomerCertificateParameters withSubjectAlternativeNames(List subjectAlternativeNames) { - this.subjectAlternativeNames = subjectAlternativeNames; - return this; - } - /** * Get the thumbprint property: Certificate thumbprint. - * + * * @return the thumbprint value. */ public String thumbprint() { @@ -199,12 +191,11 @@ public String thumbprint() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { - super.validate(); if (secretSource() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -226,14 +217,12 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); jsonWriter.writeStringField("secretVersion", this.secretVersion); jsonWriter.writeBooleanField("useLatestVersion", this.useLatestVersion); - jsonWriter.writeArrayField("subjectAlternativeNames", this.subjectAlternativeNames, - (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } /** * Reads an instance of CustomerCertificateParameters from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of CustomerCertificateParameters if the JsonReader was pointing to an instance of it, or null * if it was pointing to JSON null. diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeepCreatedCustomDomain.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeepCreatedCustomDomain.java index 04954cf7b049..32db96b1b6dd 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeepCreatedCustomDomain.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeepCreatedCustomDomain.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.cdn.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -16,7 +16,7 @@ /** * Custom domains created on the CDN endpoint. */ -@Fluent +@Immutable public final class DeepCreatedCustomDomain implements JsonSerializable { /* * Custom domain name. @@ -31,7 +31,7 @@ public final class DeepCreatedCustomDomain implements JsonSerializable { + /* + * The typeName property. + */ + private DeliveryRuleActionParametersType typeName + = DeliveryRuleActionParametersType.fromString("DeliveryRuleActionParameters"); + + /** + * Creates an instance of DeliveryRuleActionParameters class. + */ + public DeliveryRuleActionParameters() { + } + + /** + * Get the typeName property: The typeName property. + * + * @return the typeName value. + */ + public DeliveryRuleActionParametersType typeName() { + return this.typeName; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("typeName", this.typeName == null ? null : this.typeName.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeliveryRuleActionParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeliveryRuleActionParameters 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 DeliveryRuleActionParameters. + */ + public static DeliveryRuleActionParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String discriminatorValue = null; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("typeName".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("DeliveryRuleUrlSigningActionParameters".equals(discriminatorValue)) { + return UrlSigningActionParameters.fromJson(readerToUse.reset()); + } else if ("DeliveryRuleOriginGroupOverrideActionParameters".equals(discriminatorValue)) { + return OriginGroupOverrideActionParameters.fromJson(readerToUse.reset()); + } else if ("DeliveryRuleEdgeActionParameters".equals(discriminatorValue)) { + return DeliveryRuleEdgeActionParameters.fromJson(readerToUse.reset()); + } else if ("DeliveryRuleUrlRewriteActionParameters".equals(discriminatorValue)) { + return UrlRewriteActionParameters.fromJson(readerToUse.reset()); + } else if ("DeliveryRuleHeaderActionParameters".equals(discriminatorValue)) { + return HeaderActionParameters.fromJson(readerToUse.reset()); + } else if ("DeliveryRuleCacheExpirationActionParameters".equals(discriminatorValue)) { + return CacheExpirationActionParameters.fromJson(readerToUse.reset()); + } else if ("DeliveryRuleCacheKeyQueryStringBehaviorActionParameters".equals(discriminatorValue)) { + return CacheKeyQueryStringActionParameters.fromJson(readerToUse.reset()); + } else if ("DeliveryRuleRouteConfigurationOverrideActionParameters".equals(discriminatorValue)) { + return RouteConfigurationOverrideActionParameters.fromJson(readerToUse.reset()); + } else if ("DeliveryRuleUrlRedirectActionParameters".equals(discriminatorValue)) { + return UrlRedirectActionParameters.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static DeliveryRuleActionParameters fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeliveryRuleActionParameters deserializedDeliveryRuleActionParameters = new DeliveryRuleActionParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("typeName".equals(fieldName)) { + deserializedDeliveryRuleActionParameters.typeName + = DeliveryRuleActionParametersType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedDeliveryRuleActionParameters; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleActionParametersType.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleActionParametersType.java new file mode 100644 index 000000000000..f915a6e72bc1 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleActionParametersType.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for DeliveryRuleActionParametersType. + */ +public final class DeliveryRuleActionParametersType extends ExpandableStringEnum { + /** + * Static value DeliveryRuleUrlRedirectActionParameters for DeliveryRuleActionParametersType. + */ + public static final DeliveryRuleActionParametersType DELIVERY_RULE_URL_REDIRECT_ACTION_PARAMETERS + = fromString("DeliveryRuleUrlRedirectActionParameters"); + + /** + * Static value DeliveryRuleUrlSigningActionParameters for DeliveryRuleActionParametersType. + */ + public static final DeliveryRuleActionParametersType DELIVERY_RULE_URL_SIGNING_ACTION_PARAMETERS + = fromString("DeliveryRuleUrlSigningActionParameters"); + + /** + * Static value DeliveryRuleOriginGroupOverrideActionParameters for DeliveryRuleActionParametersType. + */ + public static final DeliveryRuleActionParametersType DELIVERY_RULE_ORIGIN_GROUP_OVERRIDE_ACTION_PARAMETERS + = fromString("DeliveryRuleOriginGroupOverrideActionParameters"); + + /** + * Static value DeliveryRuleUrlRewriteActionParameters for DeliveryRuleActionParametersType. + */ + public static final DeliveryRuleActionParametersType DELIVERY_RULE_URL_REWRITE_ACTION_PARAMETERS + = fromString("DeliveryRuleUrlRewriteActionParameters"); + + /** + * Static value DeliveryRuleHeaderActionParameters for DeliveryRuleActionParametersType. + */ + public static final DeliveryRuleActionParametersType DELIVERY_RULE_HEADER_ACTION_PARAMETERS + = fromString("DeliveryRuleHeaderActionParameters"); + + /** + * Static value DeliveryRuleCacheExpirationActionParameters for DeliveryRuleActionParametersType. + */ + public static final DeliveryRuleActionParametersType DELIVERY_RULE_CACHE_EXPIRATION_ACTION_PARAMETERS + = fromString("DeliveryRuleCacheExpirationActionParameters"); + + /** + * Static value DeliveryRuleCacheKeyQueryStringBehaviorActionParameters for DeliveryRuleActionParametersType. + */ + public static final DeliveryRuleActionParametersType DELIVERY_RULE_CACHE_KEY_QUERY_STRING_BEHAVIOR_ACTION_PARAMETERS + = fromString("DeliveryRuleCacheKeyQueryStringBehaviorActionParameters"); + + /** + * Static value DeliveryRuleRouteConfigurationOverrideActionParameters for DeliveryRuleActionParametersType. + */ + public static final DeliveryRuleActionParametersType DELIVERY_RULE_ROUTE_CONFIGURATION_OVERRIDE_ACTION_PARAMETERS + = fromString("DeliveryRuleRouteConfigurationOverrideActionParameters"); + + /** + * Static value DeliveryRuleEdgeActionParameters for DeliveryRuleActionParametersType. + */ + public static final DeliveryRuleActionParametersType DELIVERY_RULE_EDGE_ACTION_PARAMETERS + = fromString("DeliveryRuleEdgeActionParameters"); + + /** + * Creates a new instance of DeliveryRuleActionParametersType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DeliveryRuleActionParametersType() { + } + + /** + * Creates or finds a DeliveryRuleActionParametersType from its string representation. + * + * @param name a name to look for. + * @return the corresponding DeliveryRuleActionParametersType. + */ + public static DeliveryRuleActionParametersType fromString(String name) { + return fromString(name, DeliveryRuleActionParametersType.class); + } + + /** + * Gets known DeliveryRuleActionParametersType values. + * + * @return known DeliveryRuleActionParametersType values. + */ + public static Collection values() { + return values(DeliveryRuleActionParametersType.class); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleActionValue.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleActionValue.java index fc5fd89a5605..2192df7785ac 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleActionValue.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleActionValue.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -56,6 +56,16 @@ public final class DeliveryRuleActionValue extends ExpandableStringEnum { + /* + * The typeName property. + */ + private DeliveryRuleConditionParametersType typeName + = DeliveryRuleConditionParametersType.fromString("DeliveryRuleConditionParameters"); + + /** + * Creates an instance of DeliveryRuleConditionParameters class. + */ + public DeliveryRuleConditionParameters() { + } + + /** + * Get the typeName property: The typeName property. + * + * @return the typeName value. + */ + public DeliveryRuleConditionParametersType typeName() { + return this.typeName; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("typeName", this.typeName == null ? null : this.typeName.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeliveryRuleConditionParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeliveryRuleConditionParameters 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 DeliveryRuleConditionParameters. + */ + public static DeliveryRuleConditionParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String discriminatorValue = null; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("typeName".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("DeliveryRuleRequestMethodConditionParameters".equals(discriminatorValue)) { + return RequestMethodMatchConditionParameters.fromJson(readerToUse.reset()); + } else if ("DeliveryRuleQueryStringConditionParameters".equals(discriminatorValue)) { + return QueryStringMatchConditionParameters.fromJson(readerToUse.reset()); + } else if ("DeliveryRulePostArgsConditionParameters".equals(discriminatorValue)) { + return PostArgsMatchConditionParameters.fromJson(readerToUse.reset()); + } else if ("DeliveryRuleRequestUriConditionParameters".equals(discriminatorValue)) { + return RequestUriMatchConditionParameters.fromJson(readerToUse.reset()); + } else if ("DeliveryRuleRequestHeaderConditionParameters".equals(discriminatorValue)) { + return RequestHeaderMatchConditionParameters.fromJson(readerToUse.reset()); + } else if ("DeliveryRuleRequestBodyConditionParameters".equals(discriminatorValue)) { + return RequestBodyMatchConditionParameters.fromJson(readerToUse.reset()); + } else if ("DeliveryRuleRequestSchemeConditionParameters".equals(discriminatorValue)) { + return RequestSchemeMatchConditionParameters.fromJson(readerToUse.reset()); + } else if ("DeliveryRuleUrlPathMatchConditionParameters".equals(discriminatorValue)) { + return UrlPathMatchConditionParameters.fromJson(readerToUse.reset()); + } else if ("DeliveryRuleUrlFileExtensionMatchConditionParameters".equals(discriminatorValue)) { + return UrlFileExtensionMatchConditionParameters.fromJson(readerToUse.reset()); + } else if ("DeliveryRuleUrlFilenameConditionParameters".equals(discriminatorValue)) { + return UrlFileNameMatchConditionParameters.fromJson(readerToUse.reset()); + } else if ("DeliveryRuleHttpVersionConditionParameters".equals(discriminatorValue)) { + return HttpVersionMatchConditionParameters.fromJson(readerToUse.reset()); + } else if ("DeliveryRuleCookiesConditionParameters".equals(discriminatorValue)) { + return CookiesMatchConditionParameters.fromJson(readerToUse.reset()); + } else if ("DeliveryRuleIsDeviceConditionParameters".equals(discriminatorValue)) { + return IsDeviceMatchConditionParameters.fromJson(readerToUse.reset()); + } else if ("DeliveryRuleSocketAddrConditionParameters".equals(discriminatorValue)) { + return SocketAddrMatchConditionParameters.fromJson(readerToUse.reset()); + } else if ("DeliveryRuleClientPortConditionParameters".equals(discriminatorValue)) { + return ClientPortMatchConditionParameters.fromJson(readerToUse.reset()); + } else if ("DeliveryRuleServerPortConditionParameters".equals(discriminatorValue)) { + return ServerPortMatchConditionParameters.fromJson(readerToUse.reset()); + } else if ("DeliveryRuleHostNameConditionParameters".equals(discriminatorValue)) { + return HostnameMatchConditionParameters.fromJson(readerToUse.reset()); + } else if ("DeliveryRuleSslProtocolConditionParameters".equals(discriminatorValue)) { + return SslProtocolMatchConditionParameters.fromJson(readerToUse.reset()); + } else if ("DeliveryRuleRemoteAddressConditionParameters".equals(discriminatorValue)) { + return RemoteAddressMatchConditionParameters.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static DeliveryRuleConditionParameters fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeliveryRuleConditionParameters deserializedDeliveryRuleConditionParameters + = new DeliveryRuleConditionParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("typeName".equals(fieldName)) { + deserializedDeliveryRuleConditionParameters.typeName + = DeliveryRuleConditionParametersType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedDeliveryRuleConditionParameters; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleConditionParametersType.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleConditionParametersType.java new file mode 100644 index 000000000000..b9ab0aec3fa8 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleConditionParametersType.java @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for DeliveryRuleConditionParametersType. + */ +public final class DeliveryRuleConditionParametersType + extends ExpandableStringEnum { + /** + * Static value DeliveryRuleRemoteAddressConditionParameters for DeliveryRuleConditionParametersType. + */ + public static final DeliveryRuleConditionParametersType DELIVERY_RULE_REMOTE_ADDRESS_CONDITION_PARAMETERS + = fromString("DeliveryRuleRemoteAddressConditionParameters"); + + /** + * Static value DeliveryRuleRequestMethodConditionParameters for DeliveryRuleConditionParametersType. + */ + public static final DeliveryRuleConditionParametersType DELIVERY_RULE_REQUEST_METHOD_CONDITION_PARAMETERS + = fromString("DeliveryRuleRequestMethodConditionParameters"); + + /** + * Static value DeliveryRuleQueryStringConditionParameters for DeliveryRuleConditionParametersType. + */ + public static final DeliveryRuleConditionParametersType DELIVERY_RULE_QUERY_STRING_CONDITION_PARAMETERS + = fromString("DeliveryRuleQueryStringConditionParameters"); + + /** + * Static value DeliveryRulePostArgsConditionParameters for DeliveryRuleConditionParametersType. + */ + public static final DeliveryRuleConditionParametersType DELIVERY_RULE_POST_ARGS_CONDITION_PARAMETERS + = fromString("DeliveryRulePostArgsConditionParameters"); + + /** + * Static value DeliveryRuleRequestUriConditionParameters for DeliveryRuleConditionParametersType. + */ + public static final DeliveryRuleConditionParametersType DELIVERY_RULE_REQUEST_URI_CONDITION_PARAMETERS + = fromString("DeliveryRuleRequestUriConditionParameters"); + + /** + * Static value DeliveryRuleRequestHeaderConditionParameters for DeliveryRuleConditionParametersType. + */ + public static final DeliveryRuleConditionParametersType DELIVERY_RULE_REQUEST_HEADER_CONDITION_PARAMETERS + = fromString("DeliveryRuleRequestHeaderConditionParameters"); + + /** + * Static value DeliveryRuleRequestBodyConditionParameters for DeliveryRuleConditionParametersType. + */ + public static final DeliveryRuleConditionParametersType DELIVERY_RULE_REQUEST_BODY_CONDITION_PARAMETERS + = fromString("DeliveryRuleRequestBodyConditionParameters"); + + /** + * Static value DeliveryRuleRequestSchemeConditionParameters for DeliveryRuleConditionParametersType. + */ + public static final DeliveryRuleConditionParametersType DELIVERY_RULE_REQUEST_SCHEME_CONDITION_PARAMETERS + = fromString("DeliveryRuleRequestSchemeConditionParameters"); + + /** + * Static value DeliveryRuleUrlPathMatchConditionParameters for DeliveryRuleConditionParametersType. + */ + public static final DeliveryRuleConditionParametersType DELIVERY_RULE_URL_PATH_MATCH_CONDITION_PARAMETERS + = fromString("DeliveryRuleUrlPathMatchConditionParameters"); + + /** + * Static value DeliveryRuleUrlFileExtensionMatchConditionParameters for DeliveryRuleConditionParametersType. + */ + public static final DeliveryRuleConditionParametersType DELIVERY_RULE_URL_FILE_EXTENSION_MATCH_CONDITION_PARAMETERS + = fromString("DeliveryRuleUrlFileExtensionMatchConditionParameters"); + + /** + * Static value DeliveryRuleUrlFilenameConditionParameters for DeliveryRuleConditionParametersType. + */ + public static final DeliveryRuleConditionParametersType DELIVERY_RULE_URL_FILENAME_CONDITION_PARAMETERS + = fromString("DeliveryRuleUrlFilenameConditionParameters"); + + /** + * Static value DeliveryRuleHttpVersionConditionParameters for DeliveryRuleConditionParametersType. + */ + public static final DeliveryRuleConditionParametersType DELIVERY_RULE_HTTP_VERSION_CONDITION_PARAMETERS + = fromString("DeliveryRuleHttpVersionConditionParameters"); + + /** + * Static value DeliveryRuleCookiesConditionParameters for DeliveryRuleConditionParametersType. + */ + public static final DeliveryRuleConditionParametersType DELIVERY_RULE_COOKIES_CONDITION_PARAMETERS + = fromString("DeliveryRuleCookiesConditionParameters"); + + /** + * Static value DeliveryRuleIsDeviceConditionParameters for DeliveryRuleConditionParametersType. + */ + public static final DeliveryRuleConditionParametersType DELIVERY_RULE_IS_DEVICE_CONDITION_PARAMETERS + = fromString("DeliveryRuleIsDeviceConditionParameters"); + + /** + * Static value DeliveryRuleSocketAddrConditionParameters for DeliveryRuleConditionParametersType. + */ + public static final DeliveryRuleConditionParametersType DELIVERY_RULE_SOCKET_ADDR_CONDITION_PARAMETERS + = fromString("DeliveryRuleSocketAddrConditionParameters"); + + /** + * Static value DeliveryRuleClientPortConditionParameters for DeliveryRuleConditionParametersType. + */ + public static final DeliveryRuleConditionParametersType DELIVERY_RULE_CLIENT_PORT_CONDITION_PARAMETERS + = fromString("DeliveryRuleClientPortConditionParameters"); + + /** + * Static value DeliveryRuleServerPortConditionParameters for DeliveryRuleConditionParametersType. + */ + public static final DeliveryRuleConditionParametersType DELIVERY_RULE_SERVER_PORT_CONDITION_PARAMETERS + = fromString("DeliveryRuleServerPortConditionParameters"); + + /** + * Static value DeliveryRuleHostNameConditionParameters for DeliveryRuleConditionParametersType. + */ + public static final DeliveryRuleConditionParametersType DELIVERY_RULE_HOST_NAME_CONDITION_PARAMETERS + = fromString("DeliveryRuleHostNameConditionParameters"); + + /** + * Static value DeliveryRuleSslProtocolConditionParameters for DeliveryRuleConditionParametersType. + */ + public static final DeliveryRuleConditionParametersType DELIVERY_RULE_SSL_PROTOCOL_CONDITION_PARAMETERS + = fromString("DeliveryRuleSslProtocolConditionParameters"); + + /** + * Creates a new instance of DeliveryRuleConditionParametersType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DeliveryRuleConditionParametersType() { + } + + /** + * Creates or finds a DeliveryRuleConditionParametersType from its string representation. + * + * @param name a name to look for. + * @return the corresponding DeliveryRuleConditionParametersType. + */ + public static DeliveryRuleConditionParametersType fromString(String name) { + return fromString(name, DeliveryRuleConditionParametersType.class); + } + + /** + * Gets known DeliveryRuleConditionParametersType values. + * + * @return known DeliveryRuleConditionParametersType values. + */ + public static Collection values() { + return values(DeliveryRuleConditionParametersType.class); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleCookiesCondition.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleCookiesCondition.java index 41c9d420db1d..c1396db74d0f 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleCookiesCondition.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleCookiesCondition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -69,7 +69,6 @@ public DeliveryRuleCookiesCondition withParameters(CookiesMatchConditionParamete */ @Override public void validate() { - super.validate(); if (parameters() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleEdgeActionParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleEdgeActionParameters.java new file mode 100644 index 000000000000..91c1514c7f1d --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleEdgeActionParameters.java @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Defines the parameters for the edge action. + */ +@Fluent +public final class DeliveryRuleEdgeActionParameters extends DeliveryRuleActionParameters { + /* + * The typeName property. + */ + private DeliveryRuleActionParametersType typeName + = DeliveryRuleActionParametersType.DELIVERY_RULE_EDGE_ACTION_PARAMETERS; + + /* + * defines the edge action that will be invoked. + */ + private ResourceReference edgeActionReference; + + /* + * Defines at which point in the request processing pipeline the edge action will be invoked. + */ + private InvocationPoint invocationPoint; + + /** + * Creates an instance of DeliveryRuleEdgeActionParameters class. + */ + public DeliveryRuleEdgeActionParameters() { + } + + /** + * Get the typeName property: The typeName property. + * + * @return the typeName value. + */ + @Override + public DeliveryRuleActionParametersType typeName() { + return this.typeName; + } + + /** + * Get the edgeActionReference property: defines the edge action that will be invoked. + * + * @return the edgeActionReference value. + */ + public ResourceReference edgeActionReference() { + return this.edgeActionReference; + } + + /** + * Set the edgeActionReference property: defines the edge action that will be invoked. + * + * @param edgeActionReference the edgeActionReference value to set. + * @return the DeliveryRuleEdgeActionParameters object itself. + */ + public DeliveryRuleEdgeActionParameters withEdgeActionReference(ResourceReference edgeActionReference) { + this.edgeActionReference = edgeActionReference; + return this; + } + + /** + * Get the invocationPoint property: Defines at which point in the request processing pipeline the edge action will + * be invoked. + * + * @return the invocationPoint value. + */ + public InvocationPoint invocationPoint() { + return this.invocationPoint; + } + + /** + * Set the invocationPoint property: Defines at which point in the request processing pipeline the edge action will + * be invoked. + * + * @param invocationPoint the invocationPoint value to set. + * @return the DeliveryRuleEdgeActionParameters object itself. + */ + public DeliveryRuleEdgeActionParameters withInvocationPoint(InvocationPoint invocationPoint) { + this.invocationPoint = invocationPoint; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (edgeActionReference() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property edgeActionReference in model DeliveryRuleEdgeActionParameters")); + } else { + edgeActionReference().validate(); + } + if (invocationPoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property invocationPoint in model DeliveryRuleEdgeActionParameters")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DeliveryRuleEdgeActionParameters.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("edgeActionReference", this.edgeActionReference); + jsonWriter.writeStringField("invocationPoint", + this.invocationPoint == null ? null : this.invocationPoint.toString()); + jsonWriter.writeStringField("typeName", this.typeName == null ? null : this.typeName.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeliveryRuleEdgeActionParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeliveryRuleEdgeActionParameters 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 DeliveryRuleEdgeActionParameters. + */ + public static DeliveryRuleEdgeActionParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeliveryRuleEdgeActionParameters deserializedDeliveryRuleEdgeActionParameters + = new DeliveryRuleEdgeActionParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("edgeActionReference".equals(fieldName)) { + deserializedDeliveryRuleEdgeActionParameters.edgeActionReference + = ResourceReference.fromJson(reader); + } else if ("invocationPoint".equals(fieldName)) { + deserializedDeliveryRuleEdgeActionParameters.invocationPoint + = InvocationPoint.fromString(reader.getString()); + } else if ("typeName".equals(fieldName)) { + deserializedDeliveryRuleEdgeActionParameters.typeName + = DeliveryRuleActionParametersType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedDeliveryRuleEdgeActionParameters; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleHostnameCondition.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleHostnameCondition.java index de9f11f19f46..89ec50daed40 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleHostnameCondition.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleHostnameCondition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -69,7 +69,6 @@ public DeliveryRuleHostnameCondition withParameters(HostnameMatchConditionParame */ @Override public void validate() { - super.validate(); if (parameters() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleHttpVersionCondition.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleHttpVersionCondition.java index 5a482d9bab2e..ed81cfd56310 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleHttpVersionCondition.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleHttpVersionCondition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -69,7 +69,6 @@ public DeliveryRuleHttpVersionCondition withParameters(HttpVersionMatchCondition */ @Override public void validate() { - super.validate(); if (parameters() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleIsDeviceCondition.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleIsDeviceCondition.java index cb33c23571dd..6d04028cc84d 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleIsDeviceCondition.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleIsDeviceCondition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -69,7 +69,6 @@ public DeliveryRuleIsDeviceCondition withParameters(IsDeviceMatchConditionParame */ @Override public void validate() { - super.validate(); if (parameters() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRulePostArgsCondition.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRulePostArgsCondition.java index 8e77395065e6..c85e013801e3 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRulePostArgsCondition.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRulePostArgsCondition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -69,7 +69,6 @@ public DeliveryRulePostArgsCondition withParameters(PostArgsMatchConditionParame */ @Override public void validate() { - super.validate(); if (parameters() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleQueryStringCondition.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleQueryStringCondition.java index 82ad60d05c58..a2232bff034d 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleQueryStringCondition.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleQueryStringCondition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -69,7 +69,6 @@ public DeliveryRuleQueryStringCondition withParameters(QueryStringMatchCondition */ @Override public void validate() { - super.validate(); if (parameters() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleRemoteAddressCondition.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleRemoteAddressCondition.java index 2538223d62d4..5d67fb04b01b 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleRemoteAddressCondition.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleRemoteAddressCondition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -69,7 +69,6 @@ public DeliveryRuleRemoteAddressCondition withParameters(RemoteAddressMatchCondi */ @Override public void validate() { - super.validate(); if (parameters() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleRequestBodyCondition.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleRequestBodyCondition.java index 09f423e1926c..594f5dc2481c 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleRequestBodyCondition.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleRequestBodyCondition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -69,7 +69,6 @@ public DeliveryRuleRequestBodyCondition withParameters(RequestBodyMatchCondition */ @Override public void validate() { - super.validate(); if (parameters() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleRequestHeaderAction.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleRequestHeaderAction.java index 682be377e027..a169c4ed4891 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleRequestHeaderAction.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleRequestHeaderAction.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -69,7 +69,6 @@ public DeliveryRuleRequestHeaderAction withParameters(HeaderActionParameters par */ @Override public void validate() { - super.validate(); if (parameters() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleRequestHeaderCondition.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleRequestHeaderCondition.java index c331631f16a3..25352118537f 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleRequestHeaderCondition.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleRequestHeaderCondition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -69,7 +69,6 @@ public DeliveryRuleRequestHeaderCondition withParameters(RequestHeaderMatchCondi */ @Override public void validate() { - super.validate(); if (parameters() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleRequestMethodCondition.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleRequestMethodCondition.java index 8ab92d22dae5..89009342961a 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleRequestMethodCondition.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleRequestMethodCondition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -69,7 +69,6 @@ public DeliveryRuleRequestMethodCondition withParameters(RequestMethodMatchCondi */ @Override public void validate() { - super.validate(); if (parameters() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleRequestSchemeCondition.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleRequestSchemeCondition.java index 5c33e8d6bad0..30a7b6f1fbf0 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleRequestSchemeCondition.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleRequestSchemeCondition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -69,7 +69,6 @@ public DeliveryRuleRequestSchemeCondition withParameters(RequestSchemeMatchCondi */ @Override public void validate() { - super.validate(); if (parameters() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleRequestUriCondition.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleRequestUriCondition.java index f5da3c37cdb5..cb769b1f4233 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleRequestUriCondition.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleRequestUriCondition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -69,7 +69,6 @@ public DeliveryRuleRequestUriCondition withParameters(RequestUriMatchConditionPa */ @Override public void validate() { - super.validate(); if (parameters() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleResponseHeaderAction.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleResponseHeaderAction.java index c59b46be9a73..05c03c52128d 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleResponseHeaderAction.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleResponseHeaderAction.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -69,7 +69,6 @@ public DeliveryRuleResponseHeaderAction withParameters(HeaderActionParameters pa */ @Override public void validate() { - super.validate(); if (parameters() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleRouteConfigurationOverrideAction.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleRouteConfigurationOverrideAction.java index 1ff2683af7b8..fd1aed2a4d0b 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleRouteConfigurationOverrideAction.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleRouteConfigurationOverrideAction.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -71,7 +71,6 @@ public RouteConfigurationOverrideActionParameters parameters() { */ @Override public void validate() { - super.validate(); if (parameters() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleServerPortCondition.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleServerPortCondition.java index e41f336dd96a..5f1690786d81 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleServerPortCondition.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleServerPortCondition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -69,7 +69,6 @@ public DeliveryRuleServerPortCondition withParameters(ServerPortMatchConditionPa */ @Override public void validate() { - super.validate(); if (parameters() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleSocketAddrCondition.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleSocketAddrCondition.java index f9aed69e5941..605f40983015 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleSocketAddrCondition.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleSocketAddrCondition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -69,7 +69,6 @@ public DeliveryRuleSocketAddrCondition withParameters(SocketAddrMatchConditionPa */ @Override public void validate() { - super.validate(); if (parameters() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleSslProtocolCondition.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleSslProtocolCondition.java index fc4b149a6cd7..a3d28ea7747d 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleSslProtocolCondition.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleSslProtocolCondition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -69,7 +69,6 @@ public DeliveryRuleSslProtocolCondition withParameters(SslProtocolMatchCondition */ @Override public void validate() { - super.validate(); if (parameters() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleUrlFileExtensionCondition.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleUrlFileExtensionCondition.java index bf044e461c79..296401783d8b 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleUrlFileExtensionCondition.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleUrlFileExtensionCondition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -69,7 +69,6 @@ public DeliveryRuleUrlFileExtensionCondition withParameters(UrlFileExtensionMatc */ @Override public void validate() { - super.validate(); if (parameters() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleUrlFileNameCondition.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleUrlFileNameCondition.java index 439604720b5a..368903439b58 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleUrlFileNameCondition.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleUrlFileNameCondition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -69,7 +69,6 @@ public DeliveryRuleUrlFileNameCondition withParameters(UrlFileNameMatchCondition */ @Override public void validate() { - super.validate(); if (parameters() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleUrlPathCondition.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleUrlPathCondition.java index 51c35dff1575..66d043df4df2 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleUrlPathCondition.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleUrlPathCondition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -69,7 +69,6 @@ public DeliveryRuleUrlPathCondition withParameters(UrlPathMatchConditionParamete */ @Override public void validate() { - super.validate(); if (parameters() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeploymentRolloutStatus.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeploymentRolloutStatus.java new file mode 100644 index 000000000000..62c6f9f4e304 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeploymentRolloutStatus.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.cdn.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Deployment status of preview stage. + */ +public final class DeploymentRolloutStatus extends ExpandableStringEnum { + /** + * Static value NotStarted for DeploymentRolloutStatus. + */ + public static final DeploymentRolloutStatus NOT_STARTED = fromString("NotStarted"); + + /** + * Static value InProgress for DeploymentRolloutStatus. + */ + public static final DeploymentRolloutStatus IN_PROGRESS = fromString("InProgress"); + + /** + * Static value Succeeded for DeploymentRolloutStatus. + */ + public static final DeploymentRolloutStatus SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for DeploymentRolloutStatus. + */ + public static final DeploymentRolloutStatus FAILED = fromString("Failed"); + + /** + * Creates a new instance of DeploymentRolloutStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DeploymentRolloutStatus() { + } + + /** + * Creates or finds a DeploymentRolloutStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding DeploymentRolloutStatus. + */ + public static DeploymentRolloutStatus fromString(String name) { + return fromString(name, DeploymentRolloutStatus.class); + } + + /** + * Gets known DeploymentRolloutStatus values. + * + * @return known DeploymentRolloutStatus values. + */ + public static Collection values() { + return values(DeploymentRolloutStatus.class); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeploymentStages.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeploymentStages.java new file mode 100644 index 000000000000..5b40dc7e408b --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeploymentStages.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The preview and production deployment status of the deployment version under the profile. + */ +@Immutable +public final class DeploymentStages implements JsonSerializable { + /* + * Deployment status of preview stage. + */ + private DeploymentRolloutStatus preview; + + /* + * Deployment status of production stage. + */ + private DeploymentRolloutStatus production; + + /** + * Creates an instance of DeploymentStages class. + */ + private DeploymentStages() { + } + + /** + * Get the preview property: Deployment status of preview stage. + * + * @return the preview value. + */ + public DeploymentRolloutStatus preview() { + return this.preview; + } + + /** + * Get the production property: Deployment status of production stage. + * + * @return the production value. + */ + public DeploymentRolloutStatus production() { + return this.production; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentStages from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentStages 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 DeploymentStages. + */ + public static DeploymentStages fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentStages deserializedDeploymentStages = new DeploymentStages(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("preview".equals(fieldName)) { + deserializedDeploymentStages.preview = DeploymentRolloutStatus.fromString(reader.getString()); + } else if ("production".equals(fieldName)) { + deserializedDeploymentStages.production = DeploymentRolloutStatus.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentStages; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeploymentStatus.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeploymentStatus.java index ed5276ad8281..80d9e7088267 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeploymentStatus.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeploymentStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeploymentVersionAfdOriginChange.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeploymentVersionAfdOriginChange.java new file mode 100644 index 000000000000..61c9b0b07749 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeploymentVersionAfdOriginChange.java @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +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.cdn.fluent.models.AfdOriginProperties; +import java.io.IOException; + +/** + * Deployment change of the origin group under the profile. + */ +@Immutable +public final class DeploymentVersionAfdOriginChange extends DeploymentVersionChange { + /* + * Resource type supported by preview. + */ + private PreviewSupportedResourceType resourceType + = PreviewSupportedResourceType.MICROSOFT_CDN_PROFILES_ORIGIN_GROUPS_ORIGINS; + + /* + * The JSON object that contains the properties of the origin. + */ + private AfdOriginProperties previousProperties; + + /* + * The JSON object that contains the properties of the origin. + */ + private AfdOriginProperties currentProperties; + + /** + * Creates an instance of DeploymentVersionAfdOriginChange class. + */ + private DeploymentVersionAfdOriginChange() { + } + + /** + * Get the resourceType property: Resource type supported by preview. + * + * @return the resourceType value. + */ + @Override + public PreviewSupportedResourceType resourceType() { + return this.resourceType; + } + + /** + * Get the previousProperties property: The JSON object that contains the properties of the origin. + * + * @return the previousProperties value. + */ + public AfdOriginProperties previousProperties() { + return this.previousProperties; + } + + /** + * Get the currentProperties property: The JSON object that contains the properties of the origin. + * + * @return the currentProperties value. + */ + public AfdOriginProperties currentProperties() { + return this.currentProperties; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (previousProperties() != null) { + previousProperties().validate(); + } + if (currentProperties() != null) { + currentProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("resourceId", resourceId()); + jsonWriter.writeStringField("resourceName", resourceName()); + jsonWriter.writeStringField("resourceType", this.resourceType == null ? null : this.resourceType.toString()); + jsonWriter.writeJsonField("previousProperties", this.previousProperties); + jsonWriter.writeJsonField("currentProperties", this.currentProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentVersionAfdOriginChange from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentVersionAfdOriginChange 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 DeploymentVersionAfdOriginChange. + */ + public static DeploymentVersionAfdOriginChange fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentVersionAfdOriginChange deserializedDeploymentVersionAfdOriginChange + = new DeploymentVersionAfdOriginChange(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceId".equals(fieldName)) { + deserializedDeploymentVersionAfdOriginChange.withResourceId(reader.getString()); + } else if ("resourceName".equals(fieldName)) { + deserializedDeploymentVersionAfdOriginChange.withResourceName(reader.getString()); + } else if ("resourceType".equals(fieldName)) { + deserializedDeploymentVersionAfdOriginChange.resourceType + = PreviewSupportedResourceType.fromString(reader.getString()); + } else if ("previousProperties".equals(fieldName)) { + deserializedDeploymentVersionAfdOriginChange.previousProperties + = AfdOriginProperties.fromJson(reader); + } else if ("currentProperties".equals(fieldName)) { + deserializedDeploymentVersionAfdOriginChange.currentProperties + = AfdOriginProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentVersionAfdOriginChange; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeploymentVersionAfdOriginGroupChange.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeploymentVersionAfdOriginGroupChange.java new file mode 100644 index 000000000000..a4cb3516961b --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeploymentVersionAfdOriginGroupChange.java @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +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.cdn.fluent.models.AfdOriginGroupProperties; +import java.io.IOException; + +/** + * Deployment change of the origin group under the profile. + */ +@Immutable +public final class DeploymentVersionAfdOriginGroupChange extends DeploymentVersionChange { + /* + * Resource type supported by preview. + */ + private PreviewSupportedResourceType resourceType + = PreviewSupportedResourceType.MICROSOFT_CDN_PROFILES_ORIGIN_GROUPS; + + /* + * The JSON object that contains the properties of the origin group. + */ + private AfdOriginGroupProperties previousProperties; + + /* + * The JSON object that contains the properties of the origin group. + */ + private AfdOriginGroupProperties currentProperties; + + /** + * Creates an instance of DeploymentVersionAfdOriginGroupChange class. + */ + private DeploymentVersionAfdOriginGroupChange() { + } + + /** + * Get the resourceType property: Resource type supported by preview. + * + * @return the resourceType value. + */ + @Override + public PreviewSupportedResourceType resourceType() { + return this.resourceType; + } + + /** + * Get the previousProperties property: The JSON object that contains the properties of the origin group. + * + * @return the previousProperties value. + */ + public AfdOriginGroupProperties previousProperties() { + return this.previousProperties; + } + + /** + * Get the currentProperties property: The JSON object that contains the properties of the origin group. + * + * @return the currentProperties value. + */ + public AfdOriginGroupProperties currentProperties() { + return this.currentProperties; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (previousProperties() != null) { + previousProperties().validate(); + } + if (currentProperties() != null) { + currentProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("resourceId", resourceId()); + jsonWriter.writeStringField("resourceName", resourceName()); + jsonWriter.writeStringField("resourceType", this.resourceType == null ? null : this.resourceType.toString()); + jsonWriter.writeJsonField("previousProperties", this.previousProperties); + jsonWriter.writeJsonField("currentProperties", this.currentProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentVersionAfdOriginGroupChange from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentVersionAfdOriginGroupChange 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 DeploymentVersionAfdOriginGroupChange. + */ + public static DeploymentVersionAfdOriginGroupChange fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentVersionAfdOriginGroupChange deserializedDeploymentVersionAfdOriginGroupChange + = new DeploymentVersionAfdOriginGroupChange(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceId".equals(fieldName)) { + deserializedDeploymentVersionAfdOriginGroupChange.withResourceId(reader.getString()); + } else if ("resourceName".equals(fieldName)) { + deserializedDeploymentVersionAfdOriginGroupChange.withResourceName(reader.getString()); + } else if ("resourceType".equals(fieldName)) { + deserializedDeploymentVersionAfdOriginGroupChange.resourceType + = PreviewSupportedResourceType.fromString(reader.getString()); + } else if ("previousProperties".equals(fieldName)) { + deserializedDeploymentVersionAfdOriginGroupChange.previousProperties + = AfdOriginGroupProperties.fromJson(reader); + } else if ("currentProperties".equals(fieldName)) { + deserializedDeploymentVersionAfdOriginGroupChange.currentProperties + = AfdOriginGroupProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentVersionAfdOriginGroupChange; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeploymentVersionChange.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeploymentVersionChange.java new file mode 100644 index 000000000000..3029522d61a7 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeploymentVersionChange.java @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.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; + +/** + * Deployment change under the profile. + */ +@Immutable +public class DeploymentVersionChange implements JsonSerializable { + /* + * Resource type supported by preview. + */ + private PreviewSupportedResourceType resourceType + = PreviewSupportedResourceType.fromString("DeploymentVersionChange"); + + /* + * The resourceId property. + */ + private String resourceId; + + /* + * The resourceName property. + */ + private String resourceName; + + /** + * Creates an instance of DeploymentVersionChange class. + */ + protected DeploymentVersionChange() { + } + + /** + * Get the resourceType property: Resource type supported by preview. + * + * @return the resourceType value. + */ + public PreviewSupportedResourceType resourceType() { + return this.resourceType; + } + + /** + * Get the resourceId property: The resourceId property. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: The resourceId property. + * + * @param resourceId the resourceId value to set. + * @return the DeploymentVersionChange object itself. + */ + DeploymentVersionChange withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get the resourceName property: The resourceName property. + * + * @return the resourceName value. + */ + public String resourceName() { + return this.resourceName; + } + + /** + * Set the resourceName property: The resourceName property. + * + * @param resourceName the resourceName value to set. + * @return the DeploymentVersionChange object itself. + */ + DeploymentVersionChange withResourceName(String resourceName) { + this.resourceName = resourceName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("resourceType", this.resourceType == null ? null : this.resourceType.toString()); + jsonWriter.writeStringField("resourceId", this.resourceId); + jsonWriter.writeStringField("resourceName", this.resourceName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentVersionChange from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentVersionChange 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 DeploymentVersionChange. + */ + public static DeploymentVersionChange fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String discriminatorValue = null; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("resourceType".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("Microsoft.Cdn/profiles/afdEndpoints/routes".equals(discriminatorValue)) { + return DeploymentVersionRouteChange.fromJson(readerToUse.reset()); + } else if ("Microsoft.Cdn/profiles/originGroups".equals(discriminatorValue)) { + return DeploymentVersionAfdOriginGroupChange.fromJson(readerToUse.reset()); + } else if ("Microsoft.Cdn/profiles/originGroups/origins".equals(discriminatorValue)) { + return DeploymentVersionAfdOriginChange.fromJson(readerToUse.reset()); + } else if ("Microsoft.Cdn/profiles/ruleSets".equals(discriminatorValue)) { + return DeploymentVersionRuleSetChange.fromJson(readerToUse.reset()); + } else if ("Microsoft.Cdn/profiles/ruleSets/rules".equals(discriminatorValue)) { + return DeploymentVersionRuleChange.fromJson(readerToUse.reset()); + } else if ("Microsoft.Cdn/profiles/securityPolicies".equals(discriminatorValue)) { + return DeploymentVersionSecurityPolicyChange.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static DeploymentVersionChange fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentVersionChange deserializedDeploymentVersionChange = new DeploymentVersionChange(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceType".equals(fieldName)) { + deserializedDeploymentVersionChange.resourceType + = PreviewSupportedResourceType.fromString(reader.getString()); + } else if ("resourceId".equals(fieldName)) { + deserializedDeploymentVersionChange.resourceId = reader.getString(); + } else if ("resourceName".equals(fieldName)) { + deserializedDeploymentVersionChange.resourceName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentVersionChange; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeploymentVersionRouteChange.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeploymentVersionRouteChange.java new file mode 100644 index 000000000000..4a4c78426498 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeploymentVersionRouteChange.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +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.cdn.fluent.models.RouteProperties; +import java.io.IOException; + +/** + * Deployment change of the route under the profile. + */ +@Immutable +public final class DeploymentVersionRouteChange extends DeploymentVersionChange { + /* + * Resource type supported by preview. + */ + private PreviewSupportedResourceType resourceType + = PreviewSupportedResourceType.MICROSOFT_CDN_PROFILES_AFD_ENDPOINTS_ROUTE; + + /* + * The JSON object that contains the properties of the Routes to create. + */ + private RouteProperties previousProperties; + + /* + * The JSON object that contains the properties of the Routes to create. + */ + private RouteProperties currentProperties; + + /** + * Creates an instance of DeploymentVersionRouteChange class. + */ + private DeploymentVersionRouteChange() { + } + + /** + * Get the resourceType property: Resource type supported by preview. + * + * @return the resourceType value. + */ + @Override + public PreviewSupportedResourceType resourceType() { + return this.resourceType; + } + + /** + * Get the previousProperties property: The JSON object that contains the properties of the Routes to create. + * + * @return the previousProperties value. + */ + public RouteProperties previousProperties() { + return this.previousProperties; + } + + /** + * Get the currentProperties property: The JSON object that contains the properties of the Routes to create. + * + * @return the currentProperties value. + */ + public RouteProperties currentProperties() { + return this.currentProperties; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (previousProperties() != null) { + previousProperties().validate(); + } + if (currentProperties() != null) { + currentProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("resourceId", resourceId()); + jsonWriter.writeStringField("resourceName", resourceName()); + jsonWriter.writeStringField("resourceType", this.resourceType == null ? null : this.resourceType.toString()); + jsonWriter.writeJsonField("previousProperties", this.previousProperties); + jsonWriter.writeJsonField("currentProperties", this.currentProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentVersionRouteChange from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentVersionRouteChange 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 DeploymentVersionRouteChange. + */ + public static DeploymentVersionRouteChange fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentVersionRouteChange deserializedDeploymentVersionRouteChange = new DeploymentVersionRouteChange(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceId".equals(fieldName)) { + deserializedDeploymentVersionRouteChange.withResourceId(reader.getString()); + } else if ("resourceName".equals(fieldName)) { + deserializedDeploymentVersionRouteChange.withResourceName(reader.getString()); + } else if ("resourceType".equals(fieldName)) { + deserializedDeploymentVersionRouteChange.resourceType + = PreviewSupportedResourceType.fromString(reader.getString()); + } else if ("previousProperties".equals(fieldName)) { + deserializedDeploymentVersionRouteChange.previousProperties = RouteProperties.fromJson(reader); + } else if ("currentProperties".equals(fieldName)) { + deserializedDeploymentVersionRouteChange.currentProperties = RouteProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentVersionRouteChange; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeploymentVersionRuleChange.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeploymentVersionRuleChange.java new file mode 100644 index 000000000000..23e8cbcc2659 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeploymentVersionRuleChange.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +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.cdn.fluent.models.RuleProperties; +import java.io.IOException; + +/** + * Deployment change of the rule under the profile. + */ +@Immutable +public final class DeploymentVersionRuleChange extends DeploymentVersionChange { + /* + * Resource type supported by preview. + */ + private PreviewSupportedResourceType resourceType + = PreviewSupportedResourceType.MICROSOFT_CDN_PROFILES_RULE_SETS_RULES; + + /* + * The JSON object that contains the properties of the Rules to create. + */ + private RuleProperties previousProperties; + + /* + * The JSON object that contains the properties of the Rules to create. + */ + private RuleProperties currentProperties; + + /** + * Creates an instance of DeploymentVersionRuleChange class. + */ + private DeploymentVersionRuleChange() { + } + + /** + * Get the resourceType property: Resource type supported by preview. + * + * @return the resourceType value. + */ + @Override + public PreviewSupportedResourceType resourceType() { + return this.resourceType; + } + + /** + * Get the previousProperties property: The JSON object that contains the properties of the Rules to create. + * + * @return the previousProperties value. + */ + public RuleProperties previousProperties() { + return this.previousProperties; + } + + /** + * Get the currentProperties property: The JSON object that contains the properties of the Rules to create. + * + * @return the currentProperties value. + */ + public RuleProperties currentProperties() { + return this.currentProperties; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (previousProperties() != null) { + previousProperties().validate(); + } + if (currentProperties() != null) { + currentProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("resourceId", resourceId()); + jsonWriter.writeStringField("resourceName", resourceName()); + jsonWriter.writeStringField("resourceType", this.resourceType == null ? null : this.resourceType.toString()); + jsonWriter.writeJsonField("previousProperties", this.previousProperties); + jsonWriter.writeJsonField("currentProperties", this.currentProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentVersionRuleChange from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentVersionRuleChange 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 DeploymentVersionRuleChange. + */ + public static DeploymentVersionRuleChange fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentVersionRuleChange deserializedDeploymentVersionRuleChange = new DeploymentVersionRuleChange(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceId".equals(fieldName)) { + deserializedDeploymentVersionRuleChange.withResourceId(reader.getString()); + } else if ("resourceName".equals(fieldName)) { + deserializedDeploymentVersionRuleChange.withResourceName(reader.getString()); + } else if ("resourceType".equals(fieldName)) { + deserializedDeploymentVersionRuleChange.resourceType + = PreviewSupportedResourceType.fromString(reader.getString()); + } else if ("previousProperties".equals(fieldName)) { + deserializedDeploymentVersionRuleChange.previousProperties = RuleProperties.fromJson(reader); + } else if ("currentProperties".equals(fieldName)) { + deserializedDeploymentVersionRuleChange.currentProperties = RuleProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentVersionRuleChange; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeploymentVersionRuleSetChange.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeploymentVersionRuleSetChange.java new file mode 100644 index 000000000000..4339cf0e74c3 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeploymentVersionRuleSetChange.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +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.cdn.fluent.models.RuleSetProperties; +import java.io.IOException; + +/** + * Deployment change of the rule set under the profile. + */ +@Immutable +public final class DeploymentVersionRuleSetChange extends DeploymentVersionChange { + /* + * Resource type supported by preview. + */ + private PreviewSupportedResourceType resourceType = PreviewSupportedResourceType.MICROSOFT_CDN_PROFILES_RULE_SETS; + + /* + * The JSON object that contains the properties of the Rule Set to create. + */ + private RuleSetProperties previousProperties; + + /* + * The JSON object that contains the properties of the Rule Set to create. + */ + private RuleSetProperties currentProperties; + + /** + * Creates an instance of DeploymentVersionRuleSetChange class. + */ + private DeploymentVersionRuleSetChange() { + } + + /** + * Get the resourceType property: Resource type supported by preview. + * + * @return the resourceType value. + */ + @Override + public PreviewSupportedResourceType resourceType() { + return this.resourceType; + } + + /** + * Get the previousProperties property: The JSON object that contains the properties of the Rule Set to create. + * + * @return the previousProperties value. + */ + public RuleSetProperties previousProperties() { + return this.previousProperties; + } + + /** + * Get the currentProperties property: The JSON object that contains the properties of the Rule Set to create. + * + * @return the currentProperties value. + */ + public RuleSetProperties currentProperties() { + return this.currentProperties; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (previousProperties() != null) { + previousProperties().validate(); + } + if (currentProperties() != null) { + currentProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("resourceId", resourceId()); + jsonWriter.writeStringField("resourceName", resourceName()); + jsonWriter.writeStringField("resourceType", this.resourceType == null ? null : this.resourceType.toString()); + jsonWriter.writeJsonField("previousProperties", this.previousProperties); + jsonWriter.writeJsonField("currentProperties", this.currentProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentVersionRuleSetChange from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentVersionRuleSetChange 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 DeploymentVersionRuleSetChange. + */ + public static DeploymentVersionRuleSetChange fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentVersionRuleSetChange deserializedDeploymentVersionRuleSetChange + = new DeploymentVersionRuleSetChange(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceId".equals(fieldName)) { + deserializedDeploymentVersionRuleSetChange.withResourceId(reader.getString()); + } else if ("resourceName".equals(fieldName)) { + deserializedDeploymentVersionRuleSetChange.withResourceName(reader.getString()); + } else if ("resourceType".equals(fieldName)) { + deserializedDeploymentVersionRuleSetChange.resourceType + = PreviewSupportedResourceType.fromString(reader.getString()); + } else if ("previousProperties".equals(fieldName)) { + deserializedDeploymentVersionRuleSetChange.previousProperties = RuleSetProperties.fromJson(reader); + } else if ("currentProperties".equals(fieldName)) { + deserializedDeploymentVersionRuleSetChange.currentProperties = RuleSetProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentVersionRuleSetChange; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeploymentVersionSecurityPolicyChange.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeploymentVersionSecurityPolicyChange.java new file mode 100644 index 000000000000..fd742dd85ad9 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeploymentVersionSecurityPolicyChange.java @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Deployment change of the security policy under the profile. + */ +@Immutable +public final class DeploymentVersionSecurityPolicyChange extends DeploymentVersionChange { + /* + * Resource type supported by preview. + */ + private PreviewSupportedResourceType resourceType + = PreviewSupportedResourceType.MICROSOFT_CDN_PROFILES_SECURITY_POLICIES; + + /* + * Contains properties required to create a security policy + */ + private SecurityPolicyPropertiesWithEmbeddedWafPolicy previousProperties; + + /* + * Contains properties required to create a security policy + */ + private SecurityPolicyPropertiesWithEmbeddedWafPolicy currentProperties; + + /** + * Creates an instance of DeploymentVersionSecurityPolicyChange class. + */ + private DeploymentVersionSecurityPolicyChange() { + } + + /** + * Get the resourceType property: Resource type supported by preview. + * + * @return the resourceType value. + */ + @Override + public PreviewSupportedResourceType resourceType() { + return this.resourceType; + } + + /** + * Get the previousProperties property: Contains properties required to create a security policy. + * + * @return the previousProperties value. + */ + public SecurityPolicyPropertiesWithEmbeddedWafPolicy previousProperties() { + return this.previousProperties; + } + + /** + * Get the currentProperties property: Contains properties required to create a security policy. + * + * @return the currentProperties value. + */ + public SecurityPolicyPropertiesWithEmbeddedWafPolicy currentProperties() { + return this.currentProperties; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (previousProperties() != null) { + previousProperties().validate(); + } + if (currentProperties() != null) { + currentProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("resourceId", resourceId()); + jsonWriter.writeStringField("resourceName", resourceName()); + jsonWriter.writeStringField("resourceType", this.resourceType == null ? null : this.resourceType.toString()); + jsonWriter.writeJsonField("previousProperties", this.previousProperties); + jsonWriter.writeJsonField("currentProperties", this.currentProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentVersionSecurityPolicyChange from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentVersionSecurityPolicyChange 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 DeploymentVersionSecurityPolicyChange. + */ + public static DeploymentVersionSecurityPolicyChange fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentVersionSecurityPolicyChange deserializedDeploymentVersionSecurityPolicyChange + = new DeploymentVersionSecurityPolicyChange(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceId".equals(fieldName)) { + deserializedDeploymentVersionSecurityPolicyChange.withResourceId(reader.getString()); + } else if ("resourceName".equals(fieldName)) { + deserializedDeploymentVersionSecurityPolicyChange.withResourceName(reader.getString()); + } else if ("resourceType".equals(fieldName)) { + deserializedDeploymentVersionSecurityPolicyChange.resourceType + = PreviewSupportedResourceType.fromString(reader.getString()); + } else if ("previousProperties".equals(fieldName)) { + deserializedDeploymentVersionSecurityPolicyChange.previousProperties + = SecurityPolicyPropertiesWithEmbeddedWafPolicy.fromJson(reader); + } else if ("currentProperties".equals(fieldName)) { + deserializedDeploymentVersionSecurityPolicyChange.currentProperties + = SecurityPolicyPropertiesWithEmbeddedWafPolicy.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentVersionSecurityPolicyChange; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeploymentVersionUpdate.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeploymentVersionUpdate.java new file mode 100644 index 000000000000..8cf3c84d3060 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DeploymentVersionUpdate.java @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.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 com.azure.resourcemanager.cdn.fluent.models.DeploymentVersionUpdateProperties; +import java.io.IOException; + +/** + * Contains deployment version for creation or update. + */ +@Fluent +public final class DeploymentVersionUpdate implements JsonSerializable { + /* + * Contains the properties of the deployment version. + */ + private DeploymentVersionUpdateProperties innerProperties; + + /** + * Creates an instance of DeploymentVersionUpdate class. + */ + public DeploymentVersionUpdate() { + } + + /** + * Get the innerProperties property: Contains the properties of the deployment version. + * + * @return the innerProperties value. + */ + private DeploymentVersionUpdateProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the description property: The description property. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: The description property. + * + * @param description the description value to set. + * @return the DeploymentVersionUpdate object itself. + */ + public DeploymentVersionUpdate withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new DeploymentVersionUpdateProperties(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeploymentVersionUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeploymentVersionUpdate 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 DeploymentVersionUpdate. + */ + public static DeploymentVersionUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeploymentVersionUpdate deserializedDeploymentVersionUpdate = new DeploymentVersionUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedDeploymentVersionUpdate.innerProperties + = DeploymentVersionUpdateProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDeploymentVersionUpdate; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DestinationProtocol.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DestinationProtocol.java index 6c73514d9747..7db4f116b0a5 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DestinationProtocol.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DestinationProtocol.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DimensionProperties.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DimensionProperties.java index 1a29d43f5384..336520346f59 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DimensionProperties.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/DimensionProperties.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.cdn.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 @@ /** * Type of operation: get, read, delete, etc. */ -@Fluent +@Immutable public final class DimensionProperties implements JsonSerializable { /* * Name of dimension. @@ -34,7 +34,7 @@ public final class DimensionProperties implements JsonSerializable { + EdgeAction deserializedEdgeAction = new EdgeAction(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("parameters".equals(fieldName)) { + deserializedEdgeAction.parameters = DeliveryRuleEdgeActionParameters.fromJson(reader); + } else if ("name".equals(fieldName)) { + deserializedEdgeAction.name = DeliveryRuleActionValue.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedEdgeAction; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/EnabledState.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/EnabledState.java index ab412444887f..28ce9ff42d67 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/EnabledState.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/EnabledState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/EndpointPropertiesUpdateParametersDeliveryPolicy.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/EndpointPropertiesUpdateParametersDeliveryPolicy.java index 82dccfdf1208..83a5541abeef 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/EndpointPropertiesUpdateParametersDeliveryPolicy.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/EndpointPropertiesUpdateParametersDeliveryPolicy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink.java index 96e35caf92ac..f0fb3ebf6b79 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/EndpointProvisioningState.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/EndpointProvisioningState.java index a7ff233a5062..7ff767e19f01 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/EndpointProvisioningState.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/EndpointProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/EndpointResource.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/EndpointResource.java index 203e8cb402c6..ed7f4afb4555 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/EndpointResource.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/EndpointResource.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.cdn.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 ARM Resource ID for the linked endpoints. */ -@Fluent +@Immutable public final class EndpointResource implements JsonSerializable { /* * ARM Resource ID string. @@ -24,7 +24,7 @@ public final class EndpointResource implements JsonSerializable { + /** + * Static value Enabled for EnforceMtlsEnabledState. + */ + public static final EnforceMtlsEnabledState ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for EnforceMtlsEnabledState. + */ + public static final EnforceMtlsEnabledState DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of EnforceMtlsEnabledState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EnforceMtlsEnabledState() { + } + + /** + * Creates or finds a EnforceMtlsEnabledState from its string representation. + * + * @param name a name to look for. + * @return the corresponding EnforceMtlsEnabledState. + */ + public static EnforceMtlsEnabledState fromString(String name) { + return fromString(name, EnforceMtlsEnabledState.class); + } + + /** + * Gets known EnforceMtlsEnabledState values. + * + * @return known EnforceMtlsEnabledState values. + */ + public static Collection values() { + return values(EnforceMtlsEnabledState.class); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ForwardingProtocol.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ForwardingProtocol.java index b1e99b38d826..d95e3db70538 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ForwardingProtocol.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ForwardingProtocol.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/FrontendEndpointLink.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/FrontendEndpointLink.java new file mode 100644 index 000000000000..dc324b09a6cb --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/FrontendEndpointLink.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.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; + +/** + * Defines the Resource ID for a Frontend Endpoint. + */ +@Immutable +public final class FrontendEndpointLink implements JsonSerializable { + /* + * Resource ID. + */ + private String id; + + /** + * Creates an instance of FrontendEndpointLink class. + */ + private FrontendEndpointLink() { + } + + /** + * Get the id property: Resource ID. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FrontendEndpointLink from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FrontendEndpointLink 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 FrontendEndpointLink. + */ + public static FrontendEndpointLink fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FrontendEndpointLink deserializedFrontendEndpointLink = new FrontendEndpointLink(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedFrontendEndpointLink.id = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedFrontendEndpointLink; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/GeoFilter.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/GeoFilter.java index 62bf8ebce5d6..3187b7fdd538 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/GeoFilter.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/GeoFilter.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/GeoFilterActions.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/GeoFilterActions.java index 98687b73061c..296749945819 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/GeoFilterActions.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/GeoFilterActions.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/GroupByVariable.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/GroupByVariable.java new file mode 100644 index 000000000000..ea87f94841bb --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/GroupByVariable.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Describes the variables available to group the rate limit requests. + */ +@Fluent +public final class GroupByVariable implements JsonSerializable { + /* + * Describes the supported variable for group by + */ + private VariableName variableName; + + /** + * Creates an instance of GroupByVariable class. + */ + public GroupByVariable() { + } + + /** + * Get the variableName property: Describes the supported variable for group by. + * + * @return the variableName value. + */ + public VariableName variableName() { + return this.variableName; + } + + /** + * Set the variableName property: Describes the supported variable for group by. + * + * @param variableName the variableName value to set. + * @return the GroupByVariable object itself. + */ + public GroupByVariable withVariableName(VariableName variableName) { + this.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} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("variableName", this.variableName == null ? null : this.variableName.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GroupByVariable from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GroupByVariable 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 GroupByVariable. + */ + public static GroupByVariable fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GroupByVariable deserializedGroupByVariable = new GroupByVariable(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("variableName".equals(fieldName)) { + deserializedGroupByVariable.variableName = VariableName.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedGroupByVariable; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/HeaderAction.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/HeaderAction.java index 1315e0e9d28d..3696fcc5e1db 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/HeaderAction.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/HeaderAction.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/HeaderActionParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/HeaderActionParameters.java index 5dc15f823bb4..adf771bae494 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/HeaderActionParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/HeaderActionParameters.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.cdn.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -16,11 +15,12 @@ * Defines the parameters for the request header action. */ @Fluent -public final class HeaderActionParameters implements JsonSerializable { +public final class HeaderActionParameters extends DeliveryRuleActionParameters { /* * The typeName property. */ - private String typeName = "DeliveryRuleHeaderActionParameters"; + private DeliveryRuleActionParametersType typeName + = DeliveryRuleActionParametersType.DELIVERY_RULE_HEADER_ACTION_PARAMETERS; /* * Action to perform @@ -48,21 +48,11 @@ public HeaderActionParameters() { * * @return the typeName value. */ - public String typeName() { + @Override + public DeliveryRuleActionParametersType typeName() { return this.typeName; } - /** - * Set the typeName property: The typeName property. - * - * @param typeName the typeName value to set. - * @return the HeaderActionParameters object itself. - */ - public HeaderActionParameters withTypeName(String typeName) { - this.typeName = typeName; - return this; - } - /** * Get the headerAction property: Action to perform. * @@ -128,6 +118,7 @@ public HeaderActionParameters withValue(String value) { * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { if (headerAction() == null) { throw LOGGER.atError() @@ -149,9 +140,9 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("typeName", this.typeName); jsonWriter.writeStringField("headerAction", this.headerAction == null ? null : this.headerAction.toString()); jsonWriter.writeStringField("headerName", this.headerName); + jsonWriter.writeStringField("typeName", this.typeName == null ? null : this.typeName.toString()); jsonWriter.writeStringField("value", this.value); return jsonWriter.writeEndObject(); } @@ -176,6 +167,9 @@ public static HeaderActionParameters fromJson(JsonReader jsonReader) throws IOEx deserializedHeaderActionParameters.headerAction = HeaderAction.fromString(reader.getString()); } else if ("headerName".equals(fieldName)) { deserializedHeaderActionParameters.headerName = reader.getString(); + } else if ("typeName".equals(fieldName)) { + deserializedHeaderActionParameters.typeName + = DeliveryRuleActionParametersType.fromString(reader.getString()); } else if ("value".equals(fieldName)) { deserializedHeaderActionParameters.value = reader.getString(); } else { diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/HealthProbeParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/HealthProbeParameters.java index 72af3274a692..e9106c8ede0b 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/HealthProbeParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/HealthProbeParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/HealthProbeRequestType.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/HealthProbeRequestType.java index 64a9aa4f566f..e598869213e3 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/HealthProbeRequestType.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/HealthProbeRequestType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/HostnameMatchConditionParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/HostnameMatchConditionParameters.java index 0c08824867ed..485ac68acc50 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/HostnameMatchConditionParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/HostnameMatchConditionParameters.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.cdn.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -17,11 +16,12 @@ * Defines the parameters for HostName match conditions. */ @Fluent -public final class HostnameMatchConditionParameters implements JsonSerializable { +public final class HostnameMatchConditionParameters extends DeliveryRuleConditionParameters { /* * The typeName property. */ - private String typeName = "DeliveryRuleHostNameConditionParameters"; + private DeliveryRuleConditionParametersType typeName + = DeliveryRuleConditionParametersType.DELIVERY_RULE_HOST_NAME_CONDITION_PARAMETERS; /* * Describes operator to be matched @@ -54,21 +54,11 @@ public HostnameMatchConditionParameters() { * * @return the typeName value. */ - public String typeName() { + @Override + public DeliveryRuleConditionParametersType typeName() { return this.typeName; } - /** - * Set the typeName property: The typeName property. - * - * @param typeName the typeName value to set. - * @return the HostnameMatchConditionParameters object itself. - */ - public HostnameMatchConditionParameters withTypeName(String typeName) { - this.typeName = typeName; - return this; - } - /** * Get the operator property: Describes operator to be matched. * @@ -154,6 +144,7 @@ public HostnameMatchConditionParameters withTransforms(List transform * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { if (operator() == null) { throw LOGGER.atError() @@ -170,8 +161,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("typeName", this.typeName); jsonWriter.writeStringField("operator", this.operator == null ? null : this.operator.toString()); + jsonWriter.writeStringField("typeName", this.typeName == null ? null : this.typeName.toString()); jsonWriter.writeBooleanField("negateCondition", this.negateCondition); jsonWriter.writeArrayField("matchValues", this.matchValues, (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("transforms", this.transforms, @@ -199,6 +190,9 @@ public static HostnameMatchConditionParameters fromJson(JsonReader jsonReader) t if ("operator".equals(fieldName)) { deserializedHostnameMatchConditionParameters.operator = HostnameOperator.fromString(reader.getString()); + } else if ("typeName".equals(fieldName)) { + deserializedHostnameMatchConditionParameters.typeName + = DeliveryRuleConditionParametersType.fromString(reader.getString()); } else if ("negateCondition".equals(fieldName)) { deserializedHostnameMatchConditionParameters.negateCondition = reader.getNullable(JsonReader::getBoolean); diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/HostnameOperator.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/HostnameOperator.java index 3d5bb3a16de5..488c93e68a9c 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/HostnameOperator.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/HostnameOperator.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/HttpErrorRangeParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/HttpErrorRangeParameters.java index ab42a2a8ed63..49bc9b2582b4 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/HttpErrorRangeParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/HttpErrorRangeParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/HttpVersionMatchConditionParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/HttpVersionMatchConditionParameters.java index 22596013aaf4..9e86a8084d9d 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/HttpVersionMatchConditionParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/HttpVersionMatchConditionParameters.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.cdn.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -17,12 +16,12 @@ * Defines the parameters for HttpVersion match conditions. */ @Fluent -public final class HttpVersionMatchConditionParameters - implements JsonSerializable { +public final class HttpVersionMatchConditionParameters extends DeliveryRuleConditionParameters { /* * The typeName property. */ - private String typeName = "DeliveryRuleHttpVersionConditionParameters"; + private DeliveryRuleConditionParametersType typeName + = DeliveryRuleConditionParametersType.DELIVERY_RULE_HTTP_VERSION_CONDITION_PARAMETERS; /* * Describes operator to be matched @@ -55,21 +54,11 @@ public HttpVersionMatchConditionParameters() { * * @return the typeName value. */ - public String typeName() { + @Override + public DeliveryRuleConditionParametersType typeName() { return this.typeName; } - /** - * Set the typeName property: The typeName property. - * - * @param typeName the typeName value to set. - * @return the HttpVersionMatchConditionParameters object itself. - */ - public HttpVersionMatchConditionParameters withTypeName(String typeName) { - this.typeName = typeName; - return this; - } - /** * Get the operator property: Describes operator to be matched. * @@ -155,6 +144,7 @@ public HttpVersionMatchConditionParameters withTransforms(List transf * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { if (operator() == null) { throw LOGGER.atError() @@ -171,8 +161,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("typeName", this.typeName); jsonWriter.writeStringField("operator", this.operator == null ? null : this.operator.toString()); + jsonWriter.writeStringField("typeName", this.typeName == null ? null : this.typeName.toString()); jsonWriter.writeBooleanField("negateCondition", this.negateCondition); jsonWriter.writeArrayField("matchValues", this.matchValues, (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("transforms", this.transforms, @@ -200,6 +190,9 @@ public static HttpVersionMatchConditionParameters fromJson(JsonReader jsonReader if ("operator".equals(fieldName)) { deserializedHttpVersionMatchConditionParameters.operator = HttpVersionOperator.fromString(reader.getString()); + } else if ("typeName".equals(fieldName)) { + deserializedHttpVersionMatchConditionParameters.typeName + = DeliveryRuleConditionParametersType.fromString(reader.getString()); } else if ("negateCondition".equals(fieldName)) { deserializedHttpVersionMatchConditionParameters.negateCondition = reader.getNullable(JsonReader::getBoolean); diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/HttpVersionOperator.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/HttpVersionOperator.java index e1a385564825..47078e603acd 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/HttpVersionOperator.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/HttpVersionOperator.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/HttpsRedirect.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/HttpsRedirect.java index ff85c17128f6..5d4f387d008c 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/HttpsRedirect.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/HttpsRedirect.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/InvocationPoint.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/InvocationPoint.java new file mode 100644 index 000000000000..ca36ad4c0ec9 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/InvocationPoint.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines at which point in the request processing pipeline the edge action will be invoked. + */ +public final class InvocationPoint extends ExpandableStringEnum { + /** + * Static value ClientRequest for InvocationPoint. + */ + public static final InvocationPoint CLIENT_REQUEST = fromString("ClientRequest"); + + /** + * Static value OriginRequest for InvocationPoint. + */ + public static final InvocationPoint ORIGIN_REQUEST = fromString("OriginRequest"); + + /** + * Creates a new instance of InvocationPoint value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public InvocationPoint() { + } + + /** + * Creates or finds a InvocationPoint from its string representation. + * + * @param name a name to look for. + * @return the corresponding InvocationPoint. + */ + public static InvocationPoint fromString(String name) { + return fromString(name, InvocationPoint.class); + } + + /** + * Gets known InvocationPoint values. + * + * @return known InvocationPoint values. + */ + public static Collection values() { + return values(InvocationPoint.class); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/IpAddressGroup.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/IpAddressGroup.java index b2b84d1402b3..249ac90a103e 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/IpAddressGroup.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/IpAddressGroup.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.cdn.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 @@ /** * CDN Ip address group. */ -@Fluent +@Immutable public final class IpAddressGroup implements JsonSerializable { /* * The delivery region of the ip address group @@ -35,7 +35,7 @@ public final class IpAddressGroup implements JsonSerializable { /** * Creates an instance of IpAddressGroup class. */ - public IpAddressGroup() { + private IpAddressGroup() { } /** @@ -47,17 +47,6 @@ public String deliveryRegion() { return this.deliveryRegion; } - /** - * Set the deliveryRegion property: The delivery region of the ip address group. - * - * @param deliveryRegion the deliveryRegion value to set. - * @return the IpAddressGroup object itself. - */ - public IpAddressGroup withDeliveryRegion(String deliveryRegion) { - this.deliveryRegion = deliveryRegion; - return this; - } - /** * Get the ipv4Addresses property: The list of ip v4 addresses. * @@ -67,17 +56,6 @@ public List ipv4Addresses() { return this.ipv4Addresses; } - /** - * Set the ipv4Addresses property: The list of ip v4 addresses. - * - * @param ipv4Addresses the ipv4Addresses value to set. - * @return the IpAddressGroup object itself. - */ - public IpAddressGroup withIpv4Addresses(List ipv4Addresses) { - this.ipv4Addresses = ipv4Addresses; - return this; - } - /** * Get the ipv6Addresses property: The list of ip v6 addresses. * @@ -87,17 +65,6 @@ public List ipv6Addresses() { return this.ipv6Addresses; } - /** - * Set the ipv6Addresses property: The list of ip v6 addresses. - * - * @param ipv6Addresses the ipv6Addresses value to set. - * @return the IpAddressGroup object itself. - */ - public IpAddressGroup withIpv6Addresses(List ipv6Addresses) { - this.ipv6Addresses = ipv6Addresses; - return this; - } - /** * Validates the instance. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/IsDeviceMatchConditionParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/IsDeviceMatchConditionParameters.java index c937c2990943..f479a258ce0d 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/IsDeviceMatchConditionParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/IsDeviceMatchConditionParameters.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.cdn.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -17,11 +16,12 @@ * Defines the parameters for IsDevice match conditions. */ @Fluent -public final class IsDeviceMatchConditionParameters implements JsonSerializable { +public final class IsDeviceMatchConditionParameters extends DeliveryRuleConditionParameters { /* * The typeName property. */ - private String typeName = "DeliveryRuleIsDeviceConditionParameters"; + private DeliveryRuleConditionParametersType typeName + = DeliveryRuleConditionParametersType.DELIVERY_RULE_IS_DEVICE_CONDITION_PARAMETERS; /* * Describes operator to be matched @@ -54,21 +54,11 @@ public IsDeviceMatchConditionParameters() { * * @return the typeName value. */ - public String typeName() { + @Override + public DeliveryRuleConditionParametersType typeName() { return this.typeName; } - /** - * Set the typeName property: The typeName property. - * - * @param typeName the typeName value to set. - * @return the IsDeviceMatchConditionParameters object itself. - */ - public IsDeviceMatchConditionParameters withTypeName(String typeName) { - this.typeName = typeName; - return this; - } - /** * Get the operator property: Describes operator to be matched. * @@ -155,6 +145,7 @@ public IsDeviceMatchConditionParameters withTransforms(List transform * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { if (operator() == null) { throw LOGGER.atError() @@ -171,8 +162,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("typeName", this.typeName); jsonWriter.writeStringField("operator", this.operator == null ? null : this.operator.toString()); + jsonWriter.writeStringField("typeName", this.typeName == null ? null : this.typeName.toString()); jsonWriter.writeBooleanField("negateCondition", this.negateCondition); jsonWriter.writeArrayField("matchValues", this.matchValues, (writer, element) -> writer.writeString(element == null ? null : element.toString())); @@ -201,6 +192,9 @@ public static IsDeviceMatchConditionParameters fromJson(JsonReader jsonReader) t if ("operator".equals(fieldName)) { deserializedIsDeviceMatchConditionParameters.operator = IsDeviceOperator.fromString(reader.getString()); + } else if ("typeName".equals(fieldName)) { + deserializedIsDeviceMatchConditionParameters.typeName + = DeliveryRuleConditionParametersType.fromString(reader.getString()); } else if ("negateCondition".equals(fieldName)) { deserializedIsDeviceMatchConditionParameters.negateCondition = reader.getNullable(JsonReader::getBoolean); diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/IsDeviceMatchConditionParametersMatchValuesItem.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/IsDeviceMatchConditionParametersMatchValuesItem.java index 098d384e8659..93e9b16ac85d 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/IsDeviceMatchConditionParametersMatchValuesItem.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/IsDeviceMatchConditionParametersMatchValuesItem.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/IsDeviceOperator.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/IsDeviceOperator.java index 72b7b2110a4b..7ba01e9c19f7 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/IsDeviceOperator.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/IsDeviceOperator.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/KeyGroupUpdatePropertiesParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/KeyGroupUpdatePropertiesParameters.java new file mode 100644 index 000000000000..89777b7832fa --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/KeyGroupUpdatePropertiesParameters.java @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.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; + +/** + * The JSON object containing properties of key group to create or update. + */ +@Fluent +public final class KeyGroupUpdatePropertiesParameters implements JsonSerializable { + /* + * Names of UrlSigningKey type secret objects + */ + private List keyReferences; + + /** + * Creates an instance of KeyGroupUpdatePropertiesParameters class. + */ + public KeyGroupUpdatePropertiesParameters() { + } + + /** + * Get the keyReferences property: Names of UrlSigningKey type secret objects. + * + * @return the keyReferences value. + */ + public List keyReferences() { + return this.keyReferences; + } + + /** + * Set the keyReferences property: Names of UrlSigningKey type secret objects. + * + * @param keyReferences the keyReferences value to set. + * @return the KeyGroupUpdatePropertiesParameters object itself. + */ + public KeyGroupUpdatePropertiesParameters withKeyReferences(List keyReferences) { + this.keyReferences = keyReferences; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (keyReferences() != null) { + keyReferences().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("keyReferences", this.keyReferences, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of KeyGroupUpdatePropertiesParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of KeyGroupUpdatePropertiesParameters 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 KeyGroupUpdatePropertiesParameters. + */ + public static KeyGroupUpdatePropertiesParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + KeyGroupUpdatePropertiesParameters deserializedKeyGroupUpdatePropertiesParameters + = new KeyGroupUpdatePropertiesParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keyReferences".equals(fieldName)) { + List keyReferences + = reader.readArray(reader1 -> ResourceReference.fromJson(reader1)); + deserializedKeyGroupUpdatePropertiesParameters.keyReferences = keyReferences; + } else { + reader.skipChildren(); + } + } + + return deserializedKeyGroupUpdatePropertiesParameters; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/KeyVaultCertificateSourceParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/KeyVaultCertificateSourceParameters.java index b1fb8fcc0f26..ee5114f671a7 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/KeyVaultCertificateSourceParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/KeyVaultCertificateSourceParameters.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.cdn.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -16,12 +15,12 @@ * Describes the parameters for using a user's KeyVault certificate for securing custom domain. */ @Fluent -public final class KeyVaultCertificateSourceParameters - implements JsonSerializable { +public final class KeyVaultCertificateSourceParameters extends CertificateSourceParameters { /* * The typeName property. */ - private String typeName = "KeyVaultCertificateSourceParameters"; + private CertificateSourceParametersType typeName + = CertificateSourceParametersType.KEY_VAULT_CERTIFICATE_SOURCE_PARAMETERS; /* * Subscription Id of the user's Key Vault containing the SSL certificate @@ -69,21 +68,11 @@ public KeyVaultCertificateSourceParameters() { * * @return the typeName value. */ - public String typeName() { + @Override + public CertificateSourceParametersType typeName() { return this.typeName; } - /** - * Set the typeName property: The typeName property. - * - * @param typeName the typeName value to set. - * @return the KeyVaultCertificateSourceParameters object itself. - */ - public KeyVaultCertificateSourceParameters withTypeName(String typeName) { - this.typeName = typeName; - return this; - } - /** * Get the subscriptionId property: Subscription Id of the user's Key Vault containing the SSL certificate. * @@ -233,6 +222,7 @@ public KeyVaultCertificateSourceParameters withDeleteRule(DeleteRule deleteRule) * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { if (subscriptionId() == null) { throw LOGGER.atError() @@ -274,13 +264,13 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("typeName", this.typeName); jsonWriter.writeStringField("subscriptionId", this.subscriptionId); jsonWriter.writeStringField("resourceGroupName", this.resourceGroupName); jsonWriter.writeStringField("vaultName", this.vaultName); jsonWriter.writeStringField("secretName", this.secretName); jsonWriter.writeStringField("updateRule", this.updateRule == null ? null : this.updateRule.toString()); jsonWriter.writeStringField("deleteRule", this.deleteRule == null ? null : this.deleteRule.toString()); + jsonWriter.writeStringField("typeName", this.typeName == null ? null : this.typeName.toString()); jsonWriter.writeStringField("secretVersion", this.secretVersion); return jsonWriter.writeEndObject(); } @@ -316,6 +306,9 @@ public static KeyVaultCertificateSourceParameters fromJson(JsonReader jsonReader } else if ("deleteRule".equals(fieldName)) { deserializedKeyVaultCertificateSourceParameters.deleteRule = DeleteRule.fromString(reader.getString()); + } else if ("typeName".equals(fieldName)) { + deserializedKeyVaultCertificateSourceParameters.typeName + = CertificateSourceParametersType.fromString(reader.getString()); } else if ("secretVersion".equals(fieldName)) { deserializedKeyVaultCertificateSourceParameters.secretVersion = reader.getString(); } else { diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/KeyVaultSigningKeyParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/KeyVaultSigningKeyParameters.java index 69dfeceb01b3..c294b257f0e0 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/KeyVaultSigningKeyParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/KeyVaultSigningKeyParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -20,7 +20,7 @@ public final class KeyVaultSigningKeyParameters implements JsonSerializable { + /** + * Static value KeyVaultSigningKeyParameters for KeyVaultSigningKeyParametersType. + */ + public static final KeyVaultSigningKeyParametersType KEY_VAULT_SIGNING_KEY_PARAMETERS + = fromString("KeyVaultSigningKeyParameters"); + + /** + * Creates a new instance of KeyVaultSigningKeyParametersType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public KeyVaultSigningKeyParametersType() { + } + + /** + * Creates or finds a KeyVaultSigningKeyParametersType from its string representation. + * + * @param name a name to look for. + * @return the corresponding KeyVaultSigningKeyParametersType. + */ + public static KeyVaultSigningKeyParametersType fromString(String name) { + return fromString(name, KeyVaultSigningKeyParametersType.class); + } + + /** + * Gets known KeyVaultSigningKeyParametersType values. + * + * @return known KeyVaultSigningKeyParametersType values. + */ + public static Collection values() { + return values(KeyVaultSigningKeyParametersType.class); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/KnowledgeSourceProvisioningState.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/KnowledgeSourceProvisioningState.java new file mode 100644 index 000000000000..6116e0064e20 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/KnowledgeSourceProvisioningState.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Provisioning status of the knowledge source. + */ +public final class KnowledgeSourceProvisioningState extends ExpandableStringEnum { + /** + * Static value Creating for KnowledgeSourceProvisioningState. + */ + public static final KnowledgeSourceProvisioningState CREATING = fromString("Creating"); + + /** + * Static value Succeeded for KnowledgeSourceProvisioningState. + */ + public static final KnowledgeSourceProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for KnowledgeSourceProvisioningState. + */ + public static final KnowledgeSourceProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Updating for KnowledgeSourceProvisioningState. + */ + public static final KnowledgeSourceProvisioningState UPDATING = fromString("Updating"); + + /** + * Static value Deleting for KnowledgeSourceProvisioningState. + */ + public static final KnowledgeSourceProvisioningState DELETING = fromString("Deleting"); + + /** + * Creates a new instance of KnowledgeSourceProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public KnowledgeSourceProvisioningState() { + } + + /** + * Creates or finds a KnowledgeSourceProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding KnowledgeSourceProvisioningState. + */ + public static KnowledgeSourceProvisioningState fromString(String name) { + return fromString(name, KnowledgeSourceProvisioningState.class); + } + + /** + * Gets known KnowledgeSourceProvisioningState values. + * + * @return known KnowledgeSourceProvisioningState values. + */ + public static Collection values() { + return values(KnowledgeSourceProvisioningState.class); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/KnowledgeSourceType.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/KnowledgeSourceType.java new file mode 100644 index 000000000000..85aca9eda8c6 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/KnowledgeSourceType.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.cdn.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Format or origin of the knowledge source. + */ +public final class KnowledgeSourceType extends ExpandableStringEnum { + /** + * Static value SchemaOrgMarkup for KnowledgeSourceType. + */ + public static final KnowledgeSourceType SCHEMA_ORG_MARKUP = fromString("SchemaOrgMarkup"); + + /** + * Static value RssFeeds for KnowledgeSourceType. + */ + public static final KnowledgeSourceType RSS_FEEDS = fromString("RssFeeds"); + + /** + * Static value Sitemap for KnowledgeSourceType. + */ + public static final KnowledgeSourceType SITEMAP = fromString("Sitemap"); + + /** + * Creates a new instance of KnowledgeSourceType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public KnowledgeSourceType() { + } + + /** + * Creates or finds a KnowledgeSourceType from its string representation. + * + * @param name a name to look for. + * @return the corresponding KnowledgeSourceType. + */ + public static KnowledgeSourceType fromString(String name) { + return fromString(name, KnowledgeSourceType.class); + } + + /** + * Gets known KnowledgeSourceType values. + * + * @return known KnowledgeSourceType values. + */ + public static Collection values() { + return values(KnowledgeSourceType.class); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/KnowledgeSourceUpdateFrequency.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/KnowledgeSourceUpdateFrequency.java new file mode 100644 index 000000000000..1602687a9e1d --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/KnowledgeSourceUpdateFrequency.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.cdn.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies the units of time for scheduling update intervals for the knowledge source. + */ +public final class KnowledgeSourceUpdateFrequency extends ExpandableStringEnum { + /** + * Static value EverySixHours for KnowledgeSourceUpdateFrequency. + */ + public static final KnowledgeSourceUpdateFrequency EVERY_SIX_HOURS = fromString("EverySixHours"); + + /** + * Static value Daily for KnowledgeSourceUpdateFrequency. + */ + public static final KnowledgeSourceUpdateFrequency DAILY = fromString("Daily"); + + /** + * Static value Weekly for KnowledgeSourceUpdateFrequency. + */ + public static final KnowledgeSourceUpdateFrequency WEEKLY = fromString("Weekly"); + + /** + * Static value Monthly for KnowledgeSourceUpdateFrequency. + */ + public static final KnowledgeSourceUpdateFrequency MONTHLY = fromString("Monthly"); + + /** + * Creates a new instance of KnowledgeSourceUpdateFrequency value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public KnowledgeSourceUpdateFrequency() { + } + + /** + * Creates or finds a KnowledgeSourceUpdateFrequency from its string representation. + * + * @param name a name to look for. + * @return the corresponding KnowledgeSourceUpdateFrequency. + */ + public static KnowledgeSourceUpdateFrequency fromString(String name) { + return fromString(name, KnowledgeSourceUpdateFrequency.class); + } + + /** + * Gets known KnowledgeSourceUpdateFrequency values. + * + * @return known KnowledgeSourceUpdateFrequency values. + */ + public static Collection values() { + return values(KnowledgeSourceUpdateFrequency.class); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/KnowledgeSourceUpdateParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/KnowledgeSourceUpdateParameters.java new file mode 100644 index 000000000000..7aced718732d --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/KnowledgeSourceUpdateParameters.java @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.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 com.azure.resourcemanager.cdn.fluent.models.KnowledgeSourcePropertiesUpdateParameters; +import java.io.IOException; + +/** + * Properties required to update a knowledge source. + */ +@Fluent +public final class KnowledgeSourceUpdateParameters implements JsonSerializable { + /* + * Properties of the knowledge source to be updated. + */ + private KnowledgeSourcePropertiesUpdateParameters innerProperties; + + /** + * Creates an instance of KnowledgeSourceUpdateParameters class. + */ + public KnowledgeSourceUpdateParameters() { + } + + /** + * Get the innerProperties property: Properties of the knowledge source to be updated. + * + * @return the innerProperties value. + */ + private KnowledgeSourcePropertiesUpdateParameters innerProperties() { + return this.innerProperties; + } + + /** + * Get the description property: Description of the knowledge source. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: Description of the knowledge source. + * + * @param description the description value to set. + * @return the KnowledgeSourceUpdateParameters object itself. + */ + public KnowledgeSourceUpdateParameters withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new KnowledgeSourcePropertiesUpdateParameters(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Get the url property: Endpoint or location of the knowledge source. + * + * @return the url value. + */ + public String url() { + return this.innerProperties() == null ? null : this.innerProperties().url(); + } + + /** + * Set the url property: Endpoint or location of the knowledge source. + * + * @param url the url value to set. + * @return the KnowledgeSourceUpdateParameters object itself. + */ + public KnowledgeSourceUpdateParameters withUrl(String url) { + if (this.innerProperties() == null) { + this.innerProperties = new KnowledgeSourcePropertiesUpdateParameters(); + } + this.innerProperties().withUrl(url); + return this; + } + + /** + * Get the updateFrequency property: Specifies the units of time for scheduling update intervals for the knowledge + * source. + * + * @return the updateFrequency value. + */ + public KnowledgeSourceUpdateFrequency updateFrequency() { + return this.innerProperties() == null ? null : this.innerProperties().updateFrequency(); + } + + /** + * Set the updateFrequency property: Specifies the units of time for scheduling update intervals for the knowledge + * source. + * + * @param updateFrequency the updateFrequency value to set. + * @return the KnowledgeSourceUpdateParameters object itself. + */ + public KnowledgeSourceUpdateParameters withUpdateFrequency(KnowledgeSourceUpdateFrequency updateFrequency) { + if (this.innerProperties() == null) { + this.innerProperties = new KnowledgeSourcePropertiesUpdateParameters(); + } + this.innerProperties().withUpdateFrequency(updateFrequency); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of KnowledgeSourceUpdateParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of KnowledgeSourceUpdateParameters 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 KnowledgeSourceUpdateParameters. + */ + public static KnowledgeSourceUpdateParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + KnowledgeSourceUpdateParameters deserializedKnowledgeSourceUpdateParameters + = new KnowledgeSourceUpdateParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedKnowledgeSourceUpdateParameters.innerProperties + = KnowledgeSourcePropertiesUpdateParameters.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedKnowledgeSourceUpdateParameters; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/LinkToDefaultDomain.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/LinkToDefaultDomain.java index c24cc76af343..781d6abb692c 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/LinkToDefaultDomain.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/LinkToDefaultDomain.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/LoadBalancingSettingsParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/LoadBalancingSettingsParameters.java index 8ed22e5a21c4..33f54d1f5823 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/LoadBalancingSettingsParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/LoadBalancingSettingsParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/LoadParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/LoadParameters.java index 949f447ea601..1a3ec5afdbfa 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/LoadParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/LoadParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/LogMetric.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/LogMetric.java index 9bb4779b4650..ee608b606a97 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/LogMetric.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/LogMetric.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/LogMetricsGranularity.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/LogMetricsGranularity.java index 9ab688925e39..d16e6a069710 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/LogMetricsGranularity.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/LogMetricsGranularity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/LogMetricsGroupBy.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/LogMetricsGroupBy.java index fb78d85b2805..b216f4a2d08a 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/LogMetricsGroupBy.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/LogMetricsGroupBy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/LogRanking.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/LogRanking.java index 0b0c5abe7841..ac4d17cea76b 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/LogRanking.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/LogRanking.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/LogRankingMetric.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/LogRankingMetric.java index 1fc8afbc64c5..e47cc9e00710 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/LogRankingMetric.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/LogRankingMetric.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/LogSpecification.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/LogSpecification.java index 326a56705a08..0e1139329ebe 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/LogSpecification.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/LogSpecification.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.cdn.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 @@ /** * Log specification of operation. */ -@Fluent +@Immutable public final class LogSpecification implements JsonSerializable { /* * Name of log specification. @@ -39,7 +39,7 @@ public final class LogSpecification implements JsonSerializable { /** diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleExclusion.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleExclusion.java new file mode 100644 index 000000000000..ae9aec936a7b --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleExclusion.java @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Exclude variables from managed rule evaluation. + */ +@Fluent +public final class ManagedRuleExclusion implements JsonSerializable { + /* + * The variable type to be excluded. + */ + private ManagedRuleExclusionMatchVariable matchVariable; + + /* + * Comparison operator to apply to the selector when specifying which elements in the collection this exclusion + * applies to. + */ + private ManagedRuleExclusionSelectorMatchOperator selectorMatchOperator; + + /* + * Selector value for which elements in the collection this exclusion applies to. + */ + private String selector; + + /** + * Creates an instance of ManagedRuleExclusion class. + */ + public ManagedRuleExclusion() { + } + + /** + * Get the matchVariable property: The variable type to be excluded. + * + * @return the matchVariable value. + */ + public ManagedRuleExclusionMatchVariable matchVariable() { + return this.matchVariable; + } + + /** + * Set the matchVariable property: The variable type to be excluded. + * + * @param matchVariable the matchVariable value to set. + * @return the ManagedRuleExclusion object itself. + */ + public ManagedRuleExclusion withMatchVariable(ManagedRuleExclusionMatchVariable 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 exclusion applies to. + * + * @return the selectorMatchOperator value. + */ + public ManagedRuleExclusionSelectorMatchOperator selectorMatchOperator() { + return this.selectorMatchOperator; + } + + /** + * Set the selectorMatchOperator property: Comparison operator to apply to the selector when specifying which + * elements in the collection this exclusion applies to. + * + * @param selectorMatchOperator the selectorMatchOperator value to set. + * @return the ManagedRuleExclusion object itself. + */ + public ManagedRuleExclusion + withSelectorMatchOperator(ManagedRuleExclusionSelectorMatchOperator selectorMatchOperator) { + this.selectorMatchOperator = selectorMatchOperator; + return this; + } + + /** + * Get the selector property: Selector value for which elements in the collection this exclusion applies to. + * + * @return the selector value. + */ + public String selector() { + return this.selector; + } + + /** + * Set the selector property: Selector value for which elements in the collection this exclusion applies to. + * + * @param selector the selector value to set. + * @return the ManagedRuleExclusion object itself. + */ + public ManagedRuleExclusion withSelector(String selector) { + this.selector = 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} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("matchVariable", this.matchVariable == null ? null : this.matchVariable.toString()); + jsonWriter.writeStringField("selectorMatchOperator", + this.selectorMatchOperator == null ? null : this.selectorMatchOperator.toString()); + jsonWriter.writeStringField("selector", this.selector); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedRuleExclusion from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedRuleExclusion 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 ManagedRuleExclusion. + */ + public static ManagedRuleExclusion fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedRuleExclusion deserializedManagedRuleExclusion = new ManagedRuleExclusion(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("matchVariable".equals(fieldName)) { + deserializedManagedRuleExclusion.matchVariable + = ManagedRuleExclusionMatchVariable.fromString(reader.getString()); + } else if ("selectorMatchOperator".equals(fieldName)) { + deserializedManagedRuleExclusion.selectorMatchOperator + = ManagedRuleExclusionSelectorMatchOperator.fromString(reader.getString()); + } else if ("selector".equals(fieldName)) { + deserializedManagedRuleExclusion.selector = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedRuleExclusion; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleExclusionMatchVariable.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleExclusionMatchVariable.java new file mode 100644 index 000000000000..04bf9f7e9447 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleExclusionMatchVariable.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The variable type to be excluded. + */ +public final class ManagedRuleExclusionMatchVariable extends ExpandableStringEnum { + /** + * Static value RequestHeaderNames for ManagedRuleExclusionMatchVariable. + */ + public static final ManagedRuleExclusionMatchVariable REQUEST_HEADER_NAMES = fromString("RequestHeaderNames"); + + /** + * Static value RequestCookieNames for ManagedRuleExclusionMatchVariable. + */ + public static final ManagedRuleExclusionMatchVariable REQUEST_COOKIE_NAMES = fromString("RequestCookieNames"); + + /** + * Static value QueryStringArgNames for ManagedRuleExclusionMatchVariable. + */ + public static final ManagedRuleExclusionMatchVariable QUERY_STRING_ARG_NAMES = fromString("QueryStringArgNames"); + + /** + * Static value RequestBodyPostArgNames for ManagedRuleExclusionMatchVariable. + */ + public static final ManagedRuleExclusionMatchVariable REQUEST_BODY_POST_ARG_NAMES + = fromString("RequestBodyPostArgNames"); + + /** + * Static value RequestBodyJsonArgNames for ManagedRuleExclusionMatchVariable. + */ + public static final ManagedRuleExclusionMatchVariable REQUEST_BODY_JSON_ARG_NAMES + = fromString("RequestBodyJsonArgNames"); + + /** + * Creates a new instance of ManagedRuleExclusionMatchVariable value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ManagedRuleExclusionMatchVariable() { + } + + /** + * Creates or finds a ManagedRuleExclusionMatchVariable from its string representation. + * + * @param name a name to look for. + * @return the corresponding ManagedRuleExclusionMatchVariable. + */ + public static ManagedRuleExclusionMatchVariable fromString(String name) { + return fromString(name, ManagedRuleExclusionMatchVariable.class); + } + + /** + * Gets known ManagedRuleExclusionMatchVariable values. + * + * @return known ManagedRuleExclusionMatchVariable values. + */ + public static Collection values() { + return values(ManagedRuleExclusionMatchVariable.class); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleExclusionSelectorMatchOperator.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleExclusionSelectorMatchOperator.java new file mode 100644 index 000000000000..37a9410fe542 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleExclusionSelectorMatchOperator.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.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 exclusion applies + * to. + */ +public final class ManagedRuleExclusionSelectorMatchOperator + extends ExpandableStringEnum { + /** + * Static value Equals for ManagedRuleExclusionSelectorMatchOperator. + */ + public static final ManagedRuleExclusionSelectorMatchOperator EQUALS = fromString("Equals"); + + /** + * Static value Contains for ManagedRuleExclusionSelectorMatchOperator. + */ + public static final ManagedRuleExclusionSelectorMatchOperator CONTAINS = fromString("Contains"); + + /** + * Static value StartsWith for ManagedRuleExclusionSelectorMatchOperator. + */ + public static final ManagedRuleExclusionSelectorMatchOperator STARTS_WITH = fromString("StartsWith"); + + /** + * Static value EndsWith for ManagedRuleExclusionSelectorMatchOperator. + */ + public static final ManagedRuleExclusionSelectorMatchOperator ENDS_WITH = fromString("EndsWith"); + + /** + * Static value EqualsAny for ManagedRuleExclusionSelectorMatchOperator. + */ + public static final ManagedRuleExclusionSelectorMatchOperator EQUALS_ANY = fromString("EqualsAny"); + + /** + * Creates a new instance of ManagedRuleExclusionSelectorMatchOperator value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ManagedRuleExclusionSelectorMatchOperator() { + } + + /** + * Creates or finds a ManagedRuleExclusionSelectorMatchOperator from its string representation. + * + * @param name a name to look for. + * @return the corresponding ManagedRuleExclusionSelectorMatchOperator. + */ + public static ManagedRuleExclusionSelectorMatchOperator fromString(String name) { + return fromString(name, ManagedRuleExclusionSelectorMatchOperator.class); + } + + /** + * Gets known ManagedRuleExclusionSelectorMatchOperator values. + * + * @return known ManagedRuleExclusionSelectorMatchOperator values. + */ + public static Collection values() { + return values(ManagedRuleExclusionSelectorMatchOperator.class); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleGroupDefinition.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleGroupDefinition.java index 13ddbd332ade..d61f5d705968 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleGroupDefinition.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/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.cdn.models; @@ -35,7 +35,7 @@ public final class ManagedRuleGroupDefinition implements JsonSerializable { + /* + * Describes the managed rule group to override. + */ + private String ruleGroupName; + + /* + * Describes the exclusions that are applied to all rules in the group. + */ + private List exclusions; + + /* + * List of rules that will be disabled. If none specified, all rules in the group will be disabled. + */ + private List rules; + + /** + * Creates an instance of ManagedRuleGroupOverrideAfd class. + */ + public ManagedRuleGroupOverrideAfd() { + } + + /** + * Get the ruleGroupName property: Describes the managed rule group to override. + * + * @return the ruleGroupName value. + */ + public String ruleGroupName() { + return this.ruleGroupName; + } + + /** + * Set the ruleGroupName property: Describes the managed rule group to override. + * + * @param ruleGroupName the ruleGroupName value to set. + * @return the ManagedRuleGroupOverrideAfd object itself. + */ + public ManagedRuleGroupOverrideAfd withRuleGroupName(String ruleGroupName) { + this.ruleGroupName = ruleGroupName; + return this; + } + + /** + * Get the exclusions property: Describes the exclusions that are applied to all rules in the group. + * + * @return the exclusions value. + */ + public List exclusions() { + return this.exclusions; + } + + /** + * Set the exclusions property: Describes the exclusions that are applied to all rules in the group. + * + * @param exclusions the exclusions value to set. + * @return the ManagedRuleGroupOverrideAfd object itself. + */ + public ManagedRuleGroupOverrideAfd withExclusions(List exclusions) { + this.exclusions = exclusions; + return this; + } + + /** + * Get the rules property: List of rules that will be disabled. If none specified, all rules in the group will be + * disabled. + * + * @return the rules value. + */ + public List rules() { + return this.rules; + } + + /** + * Set the rules property: List of rules that will be disabled. If none specified, all rules in the group will be + * disabled. + * + * @param rules the rules value to set. + * @return the ManagedRuleGroupOverrideAfd object itself. + */ + public ManagedRuleGroupOverrideAfd withRules(List rules) { + this.rules = 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 ManagedRuleGroupOverrideAfd")); + } + if (exclusions() != null) { + exclusions().forEach(e -> e.validate()); + } + if (rules() != null) { + rules().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ManagedRuleGroupOverrideAfd.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("ruleGroupName", this.ruleGroupName); + jsonWriter.writeArrayField("exclusions", this.exclusions, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("rules", this.rules, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedRuleGroupOverrideAfd from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedRuleGroupOverrideAfd 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 ManagedRuleGroupOverrideAfd. + */ + public static ManagedRuleGroupOverrideAfd fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedRuleGroupOverrideAfd deserializedManagedRuleGroupOverrideAfd = new ManagedRuleGroupOverrideAfd(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ruleGroupName".equals(fieldName)) { + deserializedManagedRuleGroupOverrideAfd.ruleGroupName = reader.getString(); + } else if ("exclusions".equals(fieldName)) { + List exclusions + = reader.readArray(reader1 -> ManagedRuleExclusion.fromJson(reader1)); + deserializedManagedRuleGroupOverrideAfd.exclusions = exclusions; + } else if ("rules".equals(fieldName)) { + List rules + = reader.readArray(reader1 -> ManagedRuleOverrideAfd.fromJson(reader1)); + deserializedManagedRuleGroupOverrideAfd.rules = rules; + } else { + reader.skipChildren(); + } + } + + return deserializedManagedRuleGroupOverrideAfd; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleOverride.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleOverride.java index fa576cbe8379..8dddb5efb7d1 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleOverride.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleOverride.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleOverrideAfd.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleOverrideAfd.java new file mode 100644 index 000000000000..f203105d18e7 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleOverrideAfd.java @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Defines a managed rule group override setting. + */ +@Fluent +public final class ManagedRuleOverrideAfd implements JsonSerializable { + /* + * Identifier for the managed rule. + */ + private String ruleId; + + /* + * Describes if the managed rule is in enabled or disabled state. Defaults to Disabled if not specified. + */ + private ManagedRuleEnabledState enabledState; + + /* + * Describes the override action to be applied when rule matches. + */ + private ActionType action; + + /* + * Describes the exclusions that are applied to this specific rule. + */ + private List exclusions; + + /** + * Creates an instance of ManagedRuleOverrideAfd class. + */ + public ManagedRuleOverrideAfd() { + } + + /** + * Get the ruleId property: Identifier for the managed rule. + * + * @return the ruleId value. + */ + public String ruleId() { + return this.ruleId; + } + + /** + * Set the ruleId property: Identifier for the managed rule. + * + * @param ruleId the ruleId value to set. + * @return the ManagedRuleOverrideAfd object itself. + */ + public ManagedRuleOverrideAfd withRuleId(String ruleId) { + this.ruleId = ruleId; + return this; + } + + /** + * Get the enabledState property: Describes if the managed rule is in enabled or disabled state. Defaults to + * Disabled if not specified. + * + * @return the enabledState value. + */ + public ManagedRuleEnabledState enabledState() { + return this.enabledState; + } + + /** + * Set the enabledState property: Describes if the managed rule is in enabled or disabled state. Defaults to + * Disabled if not specified. + * + * @param enabledState the enabledState value to set. + * @return the ManagedRuleOverrideAfd object itself. + */ + public ManagedRuleOverrideAfd withEnabledState(ManagedRuleEnabledState enabledState) { + this.enabledState = enabledState; + return this; + } + + /** + * Get the action property: Describes the override action to be applied when rule matches. + * + * @return the action value. + */ + public ActionType action() { + return this.action; + } + + /** + * Set the action property: Describes the override action to be applied when rule matches. + * + * @param action the action value to set. + * @return the ManagedRuleOverrideAfd object itself. + */ + public ManagedRuleOverrideAfd withAction(ActionType action) { + this.action = action; + return this; + } + + /** + * Get the exclusions property: Describes the exclusions that are applied to this specific rule. + * + * @return the exclusions value. + */ + public List exclusions() { + return this.exclusions; + } + + /** + * Set the exclusions property: Describes the exclusions that are applied to this specific rule. + * + * @param exclusions the exclusions value to set. + * @return the ManagedRuleOverrideAfd object itself. + */ + public ManagedRuleOverrideAfd withExclusions(List exclusions) { + this.exclusions = 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 ManagedRuleOverrideAfd")); + } + if (exclusions() != null) { + exclusions().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ManagedRuleOverrideAfd.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + 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.writeArrayField("exclusions", this.exclusions, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedRuleOverrideAfd from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedRuleOverrideAfd 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 ManagedRuleOverrideAfd. + */ + public static ManagedRuleOverrideAfd fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedRuleOverrideAfd deserializedManagedRuleOverrideAfd = new ManagedRuleOverrideAfd(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ruleId".equals(fieldName)) { + deserializedManagedRuleOverrideAfd.ruleId = reader.getString(); + } else if ("enabledState".equals(fieldName)) { + deserializedManagedRuleOverrideAfd.enabledState + = ManagedRuleEnabledState.fromString(reader.getString()); + } else if ("action".equals(fieldName)) { + deserializedManagedRuleOverrideAfd.action = ActionType.fromString(reader.getString()); + } else if ("exclusions".equals(fieldName)) { + List exclusions + = reader.readArray(reader1 -> ManagedRuleExclusion.fromJson(reader1)); + deserializedManagedRuleOverrideAfd.exclusions = exclusions; + } else { + reader.skipChildren(); + } + } + + return deserializedManagedRuleOverrideAfd; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleSet.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleSet.java index 74d87b892895..232723f6a624 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleSet.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleSet.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleSetActionType.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleSetActionType.java new file mode 100644 index 000000000000..b6b51da97530 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleSetActionType.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.cdn.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines the action to take when a managed rule set score threshold is met. + */ +public final class ManagedRuleSetActionType extends ExpandableStringEnum { + /** + * Static value Block for ManagedRuleSetActionType. + */ + public static final ManagedRuleSetActionType BLOCK = fromString("Block"); + + /** + * Static value Log for ManagedRuleSetActionType. + */ + public static final ManagedRuleSetActionType LOG = fromString("Log"); + + /** + * Static value Redirect for ManagedRuleSetActionType. + */ + public static final ManagedRuleSetActionType REDIRECT = fromString("Redirect"); + + /** + * Creates a new instance of ManagedRuleSetActionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ManagedRuleSetActionType() { + } + + /** + * Creates or finds a ManagedRuleSetActionType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ManagedRuleSetActionType. + */ + public static ManagedRuleSetActionType fromString(String name) { + return fromString(name, ManagedRuleSetActionType.class); + } + + /** + * Gets known ManagedRuleSetActionType values. + * + * @return known ManagedRuleSetActionType values. + */ + public static Collection values() { + return values(ManagedRuleSetActionType.class); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleSetAfd.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleSetAfd.java new file mode 100644 index 000000000000..a4bb4028aed6 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleSetAfd.java @@ -0,0 +1,231 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Defines a managed rule set. + */ +@Fluent +public final class ManagedRuleSetAfd implements JsonSerializable { + /* + * Defines the rule set type to use. + */ + private String ruleSetType; + + /* + * Defines the version of the rule set to use. + */ + private String ruleSetVersion; + + /* + * Defines the rule set action. + */ + private ManagedRuleSetActionType ruleSetAction; + + /* + * Describes the exclusions that are applied to all rules in the set. + */ + private List exclusions; + + /* + * Defines the rule group overrides to apply to the rule set. + */ + private List ruleGroupOverrides; + + /** + * Creates an instance of ManagedRuleSetAfd class. + */ + public ManagedRuleSetAfd() { + } + + /** + * Get the ruleSetType property: Defines the rule set type to use. + * + * @return the ruleSetType value. + */ + public String ruleSetType() { + return this.ruleSetType; + } + + /** + * Set the ruleSetType property: Defines the rule set type to use. + * + * @param ruleSetType the ruleSetType value to set. + * @return the ManagedRuleSetAfd object itself. + */ + public ManagedRuleSetAfd withRuleSetType(String ruleSetType) { + this.ruleSetType = ruleSetType; + return this; + } + + /** + * Get the ruleSetVersion property: Defines the version of the rule set to use. + * + * @return the ruleSetVersion value. + */ + public String ruleSetVersion() { + return this.ruleSetVersion; + } + + /** + * Set the ruleSetVersion property: Defines the version of the rule set to use. + * + * @param ruleSetVersion the ruleSetVersion value to set. + * @return the ManagedRuleSetAfd object itself. + */ + public ManagedRuleSetAfd withRuleSetVersion(String ruleSetVersion) { + this.ruleSetVersion = ruleSetVersion; + return this; + } + + /** + * Get the ruleSetAction property: Defines the rule set action. + * + * @return the ruleSetAction value. + */ + public ManagedRuleSetActionType ruleSetAction() { + return this.ruleSetAction; + } + + /** + * Set the ruleSetAction property: Defines the rule set action. + * + * @param ruleSetAction the ruleSetAction value to set. + * @return the ManagedRuleSetAfd object itself. + */ + public ManagedRuleSetAfd withRuleSetAction(ManagedRuleSetActionType ruleSetAction) { + this.ruleSetAction = ruleSetAction; + return this; + } + + /** + * Get the exclusions property: Describes the exclusions that are applied to all rules in the set. + * + * @return the exclusions value. + */ + public List exclusions() { + return this.exclusions; + } + + /** + * Set the exclusions property: Describes the exclusions that are applied to all rules in the set. + * + * @param exclusions the exclusions value to set. + * @return the ManagedRuleSetAfd object itself. + */ + public ManagedRuleSetAfd withExclusions(List exclusions) { + this.exclusions = exclusions; + return this; + } + + /** + * Get the ruleGroupOverrides property: Defines the rule group overrides to apply to the rule set. + * + * @return the ruleGroupOverrides value. + */ + public List ruleGroupOverrides() { + return this.ruleGroupOverrides; + } + + /** + * Set the ruleGroupOverrides property: Defines the rule group overrides to apply to the rule set. + * + * @param ruleGroupOverrides the ruleGroupOverrides value to set. + * @return the ManagedRuleSetAfd object itself. + */ + public ManagedRuleSetAfd withRuleGroupOverrides(List ruleGroupOverrides) { + this.ruleGroupOverrides = ruleGroupOverrides; + 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 ManagedRuleSetAfd")); + } + if (ruleSetVersion() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property ruleSetVersion in model ManagedRuleSetAfd")); + } + if (exclusions() != null) { + exclusions().forEach(e -> e.validate()); + } + if (ruleGroupOverrides() != null) { + ruleGroupOverrides().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ManagedRuleSetAfd.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("ruleSetType", this.ruleSetType); + jsonWriter.writeStringField("ruleSetVersion", this.ruleSetVersion); + jsonWriter.writeStringField("ruleSetAction", this.ruleSetAction == null ? null : this.ruleSetAction.toString()); + jsonWriter.writeArrayField("exclusions", this.exclusions, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("ruleGroupOverrides", this.ruleGroupOverrides, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedRuleSetAfd from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedRuleSetAfd 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 ManagedRuleSetAfd. + */ + public static ManagedRuleSetAfd fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedRuleSetAfd deserializedManagedRuleSetAfd = new ManagedRuleSetAfd(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ruleSetType".equals(fieldName)) { + deserializedManagedRuleSetAfd.ruleSetType = reader.getString(); + } else if ("ruleSetVersion".equals(fieldName)) { + deserializedManagedRuleSetAfd.ruleSetVersion = reader.getString(); + } else if ("ruleSetAction".equals(fieldName)) { + deserializedManagedRuleSetAfd.ruleSetAction + = ManagedRuleSetActionType.fromString(reader.getString()); + } else if ("exclusions".equals(fieldName)) { + List exclusions + = reader.readArray(reader1 -> ManagedRuleExclusion.fromJson(reader1)); + deserializedManagedRuleSetAfd.exclusions = exclusions; + } else if ("ruleGroupOverrides".equals(fieldName)) { + List ruleGroupOverrides + = reader.readArray(reader1 -> ManagedRuleGroupOverrideAfd.fromJson(reader1)); + deserializedManagedRuleSetAfd.ruleGroupOverrides = ruleGroupOverrides; + } else { + reader.skipChildren(); + } + } + + return deserializedManagedRuleSetAfd; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleSetList.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleSetList.java index 4f11237c4be4..6a7f8204e543 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleSetList.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/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.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleSetListAfd.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleSetListAfd.java new file mode 100644 index 000000000000..ab31f69675ee --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleSetListAfd.java @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.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 managed rule sets for the policy. + */ +@Fluent +public final class ManagedRuleSetListAfd implements JsonSerializable { + /* + * List of rule sets. + */ + private List managedRuleSets; + + /** + * Creates an instance of ManagedRuleSetListAfd class. + */ + public ManagedRuleSetListAfd() { + } + + /** + * Get the managedRuleSets property: List of rule sets. + * + * @return the managedRuleSets value. + */ + public List managedRuleSets() { + return this.managedRuleSets; + } + + /** + * Set the managedRuleSets property: List of rule sets. + * + * @param managedRuleSets the managedRuleSets value to set. + * @return the ManagedRuleSetListAfd object itself. + */ + public ManagedRuleSetListAfd withManagedRuleSets(List managedRuleSets) { + this.managedRuleSets = managedRuleSets; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (managedRuleSets() != null) { + managedRuleSets().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("managedRuleSets", this.managedRuleSets, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedRuleSetListAfd from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedRuleSetListAfd 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 ManagedRuleSetListAfd. + */ + public static ManagedRuleSetListAfd fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedRuleSetListAfd deserializedManagedRuleSetListAfd = new ManagedRuleSetListAfd(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("managedRuleSets".equals(fieldName)) { + List managedRuleSets + = reader.readArray(reader1 -> ManagedRuleSetAfd.fromJson(reader1)); + deserializedManagedRuleSetListAfd.managedRuleSets = managedRuleSets; + } else { + reader.skipChildren(); + } + } + + return deserializedManagedRuleSetListAfd; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedServiceIdentity.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedServiceIdentity.java index 418c865c1058..7bfb4bc1e1d0 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedServiceIdentity.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedServiceIdentity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -32,15 +32,12 @@ public final class ManagedServiceIdentity implements JsonSerializable userAssignedIdentities; @@ -71,8 +68,7 @@ public UUID tenantId() { } /** - * Get the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are - * allowed). + * Get the type property: The type of managed identity assigned to this resource. * * @return the type value. */ @@ -81,8 +77,7 @@ public ManagedServiceIdentityType type() { } /** - * Set the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are - * allowed). + * Set the type property: The type of managed identity assigned to this resource. * * @param type the type value to set. * @return the ManagedServiceIdentity object itself. @@ -93,10 +88,7 @@ public ManagedServiceIdentity withType(ManagedServiceIdentityType type) { } /** - * Get the userAssignedIdentities property: The set of user assigned identities associated with the resource. The - * userAssignedIdentities dictionary keys will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - * The dictionary values can be empty objects ({}) in requests. + * Get the userAssignedIdentities property: The identities assigned to this resource by the user. * * @return the userAssignedIdentities value. */ @@ -105,10 +97,7 @@ public Map userAssignedIdentities() { } /** - * Set the userAssignedIdentities property: The set of user assigned identities associated with the resource. The - * userAssignedIdentities dictionary keys will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - * The dictionary values can be empty objects ({}) in requests. + * Set the userAssignedIdentities property: The identities assigned to this resource by the user. * * @param userAssignedIdentities the userAssignedIdentities value to set. * @return the ManagedServiceIdentity object itself. diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedServiceIdentityType.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedServiceIdentityType.java index f77f400ec5cb..9b5c0a3bc5d0 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedServiceIdentityType.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ManagedServiceIdentityType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -12,25 +12,25 @@ */ public final class ManagedServiceIdentityType extends ExpandableStringEnum { /** - * Static value None for ManagedServiceIdentityType. + * No managed identity. */ public static final ManagedServiceIdentityType NONE = fromString("None"); /** - * Static value SystemAssigned for ManagedServiceIdentityType. + * System assigned managed identity. */ public static final ManagedServiceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); /** - * Static value UserAssigned for ManagedServiceIdentityType. + * User assigned managed identity. */ public static final ManagedServiceIdentityType USER_ASSIGNED = fromString("UserAssigned"); /** - * Static value SystemAssigned, UserAssigned for ManagedServiceIdentityType. + * System and user assigned managed identity. */ public static final ManagedServiceIdentityType SYSTEM_ASSIGNED_USER_ASSIGNED - = fromString("SystemAssigned, UserAssigned"); + = fromString("SystemAssigned,UserAssigned"); /** * Creates a new instance of ManagedServiceIdentityType value. diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/MatchCondition.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/MatchCondition.java index 524788dbf5d9..a7386cc41cbd 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/MatchCondition.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/MatchCondition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/MatchConditionAfd.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/MatchConditionAfd.java new file mode 100644 index 000000000000..678f6cedd73d --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/MatchConditionAfd.java @@ -0,0 +1,257 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Define a match condition. + */ +@Fluent +public final class MatchConditionAfd implements JsonSerializable { + /* + * Request variable to compare with. + */ + private MatchVariable matchVariable; + + /* + * Match against a specific key from the QueryString, PostArgs, RequestHeader or Cookies variables. Default is null. + */ + private String selector; + + /* + * Comparison type to use for matching with the variable value. + */ + private Operator operator; + + /* + * Describes if the result of this condition should be negated. + */ + private Boolean negateCondition; + + /* + * List of possible match values. + */ + private List matchValue; + + /* + * List of transforms. + */ + private List transforms; + + /** + * Creates an instance of MatchConditionAfd class. + */ + public MatchConditionAfd() { + } + + /** + * Get the matchVariable property: Request variable to compare with. + * + * @return the matchVariable value. + */ + public MatchVariable matchVariable() { + return this.matchVariable; + } + + /** + * Set the matchVariable property: Request variable to compare with. + * + * @param matchVariable the matchVariable value to set. + * @return the MatchConditionAfd object itself. + */ + public MatchConditionAfd withMatchVariable(MatchVariable matchVariable) { + this.matchVariable = matchVariable; + return this; + } + + /** + * Get the selector property: Match against a specific key from the QueryString, PostArgs, RequestHeader or Cookies + * variables. Default is null. + * + * @return the selector value. + */ + public String selector() { + return this.selector; + } + + /** + * Set the selector property: Match against a specific key from the QueryString, PostArgs, RequestHeader or Cookies + * variables. Default is null. + * + * @param selector the selector value to set. + * @return the MatchConditionAfd object itself. + */ + public MatchConditionAfd withSelector(String selector) { + this.selector = selector; + return this; + } + + /** + * Get the operator property: Comparison type to use for matching with the variable value. + * + * @return the operator value. + */ + public Operator operator() { + return this.operator; + } + + /** + * Set the operator property: Comparison type to use for matching with the variable value. + * + * @param operator the operator value to set. + * @return the MatchConditionAfd object itself. + */ + public MatchConditionAfd withOperator(Operator operator) { + this.operator = operator; + return this; + } + + /** + * Get the negateCondition property: Describes if the result of this condition should be negated. + * + * @return the negateCondition value. + */ + public Boolean negateCondition() { + return this.negateCondition; + } + + /** + * Set the negateCondition property: Describes if the result of this condition should be negated. + * + * @param negateCondition the negateCondition value to set. + * @return the MatchConditionAfd object itself. + */ + public MatchConditionAfd withNegateCondition(Boolean negateCondition) { + this.negateCondition = negateCondition; + return this; + } + + /** + * Get the matchValue property: List of possible match values. + * + * @return the matchValue value. + */ + public List matchValue() { + return this.matchValue; + } + + /** + * Set the matchValue property: List of possible match values. + * + * @param matchValue the matchValue value to set. + * @return the MatchConditionAfd object itself. + */ + public MatchConditionAfd withMatchValue(List matchValue) { + this.matchValue = matchValue; + return this; + } + + /** + * Get the transforms property: List of transforms. + * + * @return the transforms value. + */ + public List transforms() { + return this.transforms; + } + + /** + * Set the transforms property: List of transforms. + * + * @param transforms the transforms value to set. + * @return the MatchConditionAfd object itself. + */ + public MatchConditionAfd withTransforms(List transforms) { + this.transforms = 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 MatchConditionAfd")); + } + if (operator() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property operator in model MatchConditionAfd")); + } + if (matchValue() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property matchValue in model MatchConditionAfd")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MatchConditionAfd.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("matchVariable", this.matchVariable == null ? null : this.matchVariable.toString()); + jsonWriter.writeStringField("operator", this.operator == null ? null : this.operator.toString()); + jsonWriter.writeArrayField("matchValue", this.matchValue, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("selector", this.selector); + jsonWriter.writeBooleanField("negateCondition", this.negateCondition); + jsonWriter.writeArrayField("transforms", this.transforms, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MatchConditionAfd from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MatchConditionAfd 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 MatchConditionAfd. + */ + public static MatchConditionAfd fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MatchConditionAfd deserializedMatchConditionAfd = new MatchConditionAfd(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("matchVariable".equals(fieldName)) { + deserializedMatchConditionAfd.matchVariable = MatchVariable.fromString(reader.getString()); + } else if ("operator".equals(fieldName)) { + deserializedMatchConditionAfd.operator = Operator.fromString(reader.getString()); + } else if ("matchValue".equals(fieldName)) { + List matchValue = reader.readArray(reader1 -> reader1.getString()); + deserializedMatchConditionAfd.matchValue = matchValue; + } else if ("selector".equals(fieldName)) { + deserializedMatchConditionAfd.selector = reader.getString(); + } else if ("negateCondition".equals(fieldName)) { + deserializedMatchConditionAfd.negateCondition = reader.getNullable(JsonReader::getBoolean); + } else if ("transforms".equals(fieldName)) { + List transforms + = reader.readArray(reader1 -> TransformType.fromString(reader1.getString())); + deserializedMatchConditionAfd.transforms = transforms; + } else { + reader.skipChildren(); + } + } + + return deserializedMatchConditionAfd; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/MatchProcessingBehavior.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/MatchProcessingBehavior.java index 57f821c12d47..acad2d263113 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/MatchProcessingBehavior.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/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.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/MatchVariable.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/MatchVariable.java index e1c40a51fb34..20434fc90c52 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/MatchVariable.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/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.cdn.models; @@ -8,7 +8,7 @@ import java.util.Collection; /** - * The name of the condition for the delivery rule. + * Request variable to compare with. */ public final class MatchVariable extends ExpandableStringEnum { /** diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/MetricAvailability.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/MetricAvailability.java index 87efabd89986..f372697c2b82 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/MetricAvailability.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/MetricAvailability.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.cdn.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 @@ /** * Retention policy of a resource metric. */ -@Fluent +@Immutable public final class MetricAvailability implements JsonSerializable { /* * The timeGrain property. @@ -29,7 +29,7 @@ public final class MetricAvailability implements JsonSerializable { /* * Name of metric specification. @@ -75,7 +75,7 @@ public final class MetricSpecification implements JsonSerializable availabilities() { return this.availabilities; } - /** - * Set the availabilities property: Retention policies of a resource metric. - * - * @param availabilities the availabilities value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withAvailabilities(List availabilities) { - this.availabilities = availabilities; - return this; - } - /** * Get the supportedTimeGrainTypes property: The supported time grain types for the metrics. * @@ -209,17 +142,6 @@ public List supportedTimeGrainTypes() { return this.supportedTimeGrainTypes; } - /** - * Set the supportedTimeGrainTypes property: The supported time grain types for the metrics. - * - * @param supportedTimeGrainTypes the supportedTimeGrainTypes value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withSupportedTimeGrainTypes(List supportedTimeGrainTypes) { - this.supportedTimeGrainTypes = supportedTimeGrainTypes; - return this; - } - /** * Get the dimensions property: The dimensions of metric. * @@ -229,17 +151,6 @@ public List dimensions() { return this.dimensions; } - /** - * Set the dimensions property: The dimensions of metric. - * - * @param dimensions the dimensions value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withDimensions(List dimensions) { - this.dimensions = dimensions; - return this; - } - /** * Get the fillGapWithZero property: Property to specify whether to fill gap with zero. * @@ -249,17 +160,6 @@ public Boolean fillGapWithZero() { return this.fillGapWithZero; } - /** - * Set the fillGapWithZero property: Property to specify whether to fill gap with zero. - * - * @param fillGapWithZero the fillGapWithZero value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withFillGapWithZero(Boolean fillGapWithZero) { - this.fillGapWithZero = fillGapWithZero; - return this; - } - /** * Get the metricFilterPattern property: Pattern to filter based on name. * @@ -269,17 +169,6 @@ public String metricFilterPattern() { return this.metricFilterPattern; } - /** - * Set the metricFilterPattern property: Pattern to filter based on name. - * - * @param metricFilterPattern the metricFilterPattern value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withMetricFilterPattern(String metricFilterPattern) { - this.metricFilterPattern = metricFilterPattern; - return this; - } - /** * Get the isInternal property: Property to specify metric is internal or not. * @@ -289,17 +178,6 @@ public Boolean isInternal() { return this.isInternal; } - /** - * Set the isInternal property: Property to specify metric is internal or not. - * - * @param isInternal the isInternal value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withIsInternal(Boolean isInternal) { - this.isInternal = isInternal; - return this; - } - /** * Validates the instance. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/MetricsGranularity.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/MetricsGranularity.java index 096b7bddc65b..b8f1b49334f4 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/MetricsGranularity.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/MetricsGranularity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/MetricsResponseSeriesItem.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/MetricsResponseSeriesItem.java index e36b343f363d..81f030fdd6a5 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/MetricsResponseSeriesItem.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/MetricsResponseSeriesItem.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.cdn.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 @@ /** * The MetricsResponseSeriesItem model. */ -@Fluent +@Immutable public final class MetricsResponseSeriesItem implements JsonSerializable { /* * The metric property. @@ -40,7 +40,7 @@ public final class MetricsResponseSeriesItem implements JsonSerializable groups() { return this.groups; } - /** - * Set the groups property: The groups property. - * - * @param groups the groups value to set. - * @return the MetricsResponseSeriesItem object itself. - */ - public MetricsResponseSeriesItem withGroups(List groups) { - this.groups = groups; - return this; - } - /** * Get the data property: The data property. * @@ -112,17 +79,6 @@ public List data() { return this.data; } - /** - * Set the data property: The data property. - * - * @param data the data value to set. - * @return the MetricsResponseSeriesItem object itself. - */ - public MetricsResponseSeriesItem withData(List data) { - this.data = data; - return this; - } - /** * Validates the instance. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/MetricsResponseSeriesItemData.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/MetricsResponseSeriesItemData.java index 9d6145ae754c..f4a36ce7df39 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/MetricsResponseSeriesItemData.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/MetricsResponseSeriesItemData.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.cdn.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; @@ -17,7 +17,7 @@ /** * The MetricsResponseSeriesItemData model. */ -@Fluent +@Immutable public final class MetricsResponseSeriesItemData implements JsonSerializable { /* * The dateTime property. @@ -32,7 +32,7 @@ public final class MetricsResponseSeriesItemData implements JsonSerializable { /* @@ -30,7 +30,7 @@ public final class MetricsResponseSeriesPropertiesItemsItem /** * Creates an instance of MetricsResponseSeriesPropertiesItemsItem class. */ - public MetricsResponseSeriesPropertiesItemsItem() { + private MetricsResponseSeriesPropertiesItemsItem() { } /** @@ -42,17 +42,6 @@ public String name() { return this.name; } - /** - * Set the name property: The name property. - * - * @param name the name value to set. - * @return the MetricsResponseSeriesPropertiesItemsItem object itself. - */ - public MetricsResponseSeriesPropertiesItemsItem withName(String name) { - this.name = name; - return this; - } - /** * Get the value property: The value property. * @@ -62,17 +51,6 @@ public String value() { return this.value; } - /** - * Set the value property: The value property. - * - * @param value the value value to set. - * @return the MetricsResponseSeriesPropertiesItemsItem object itself. - */ - public MetricsResponseSeriesPropertiesItemsItem withValue(String value) { - this.value = value; - return this; - } - /** * Validates the instance. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/MetricsSeriesUnit.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/MetricsSeriesUnit.java index 43980b666d8b..e988b3f38a07 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/MetricsSeriesUnit.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/MetricsSeriesUnit.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/MigrationEndpointMapping.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/MigrationEndpointMapping.java new file mode 100644 index 000000000000..354dce2c9c56 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/MigrationEndpointMapping.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.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; + +/** + * CDN Endpoint Mapping. + */ +@Fluent +public final class MigrationEndpointMapping implements JsonSerializable { + /* + * Name of the classic CDN profile endpoint. + */ + private String migratedFrom; + + /* + * Name of the newly created migrated Azure Frontdoor Standard/Premium profile endpoint. This name will replace the + * name of the classic CDN endpoint resource. + */ + private String migratedTo; + + /** + * Creates an instance of MigrationEndpointMapping class. + */ + public MigrationEndpointMapping() { + } + + /** + * Get the migratedFrom property: Name of the classic CDN profile endpoint. + * + * @return the migratedFrom value. + */ + public String migratedFrom() { + return this.migratedFrom; + } + + /** + * Set the migratedFrom property: Name of the classic CDN profile endpoint. + * + * @param migratedFrom the migratedFrom value to set. + * @return the MigrationEndpointMapping object itself. + */ + public MigrationEndpointMapping withMigratedFrom(String migratedFrom) { + this.migratedFrom = migratedFrom; + return this; + } + + /** + * Get the migratedTo property: Name of the newly created migrated Azure Frontdoor Standard/Premium profile + * endpoint. This name will replace the name of the classic CDN endpoint resource. + * + * @return the migratedTo value. + */ + public String migratedTo() { + return this.migratedTo; + } + + /** + * Set the migratedTo property: Name of the newly created migrated Azure Frontdoor Standard/Premium profile + * endpoint. This name will replace the name of the classic CDN endpoint resource. + * + * @param migratedTo the migratedTo value to set. + * @return the MigrationEndpointMapping object itself. + */ + public MigrationEndpointMapping withMigratedTo(String migratedTo) { + this.migratedTo = migratedTo; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("migratedFrom", this.migratedFrom); + jsonWriter.writeStringField("migratedTo", this.migratedTo); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MigrationEndpointMapping from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MigrationEndpointMapping 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 MigrationEndpointMapping. + */ + public static MigrationEndpointMapping fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MigrationEndpointMapping deserializedMigrationEndpointMapping = new MigrationEndpointMapping(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("migratedFrom".equals(fieldName)) { + deserializedMigrationEndpointMapping.migratedFrom = reader.getString(); + } else if ("migratedTo".equals(fieldName)) { + deserializedMigrationEndpointMapping.migratedTo = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedMigrationEndpointMapping; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/MigrationErrorType.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/MigrationErrorType.java index ac8b9260c9c7..41ab7352fd98 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/MigrationErrorType.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/MigrationErrorType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -40,7 +40,7 @@ public final class MigrationErrorType implements JsonSerializable { + /** + * Static value ClientCertificateRequiredAndValidated for MtlsScenarioType. + */ + public static final MtlsScenarioType CLIENT_CERTIFICATE_REQUIRED_AND_VALIDATED + = fromString("ClientCertificateRequiredAndValidated"); + + /** + * Static value ClientCertificateRequiredAndOriginValidates for MtlsScenarioType. + */ + public static final MtlsScenarioType CLIENT_CERTIFICATE_REQUIRED_AND_ORIGIN_VALIDATES + = fromString("ClientCertificateRequiredAndOriginValidates"); + + /** + * Static value ClientCertificateValidatedIfPresented for MtlsScenarioType. + */ + public static final MtlsScenarioType CLIENT_CERTIFICATE_VALIDATED_IF_PRESENTED + = fromString("ClientCertificateValidatedIfPresented"); + + /** + * Static value CompleteMtlsPassthroughToOrigin for MtlsScenarioType. + */ + public static final MtlsScenarioType COMPLETE_MTLS_PASSTHROUGH_TO_ORIGIN + = fromString("CompleteMtlsPassthroughToOrigin"); + + /** + * Creates a new instance of MtlsScenarioType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MtlsScenarioType() { + } + + /** + * Creates or finds a MtlsScenarioType from its string representation. + * + * @param name a name to look for. + * @return the corresponding MtlsScenarioType. + */ + public static MtlsScenarioType fromString(String name) { + return fromString(name, MtlsScenarioType.class); + } + + /** + * Gets known MtlsScenarioType values. + * + * @return known MtlsScenarioType values. + */ + public static Collection values() { + return values(MtlsScenarioType.class); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OperationDisplay.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OperationDisplay.java index e7fd58da6735..d9456beb0028 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OperationDisplay.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OperationDisplay.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -39,7 +39,7 @@ public final class OperationDisplay implements JsonSerializable { + /* + * The type of the authentication for the origin. + */ + private OriginAuthenticationType type; + + /* + * The user assigned managed identity to use for the origin authentication if type is UserAssignedIdentity. + */ + private ResourceReference userAssignedIdentity; + + /* + * The scope used when requesting token from Microsoft Entra. For example, for Azure Blob Storage, scope could be + * "https://storage.azure.com/.default". + */ + private String scope; + + /** + * Creates an instance of OriginAuthenticationProperties class. + */ + public OriginAuthenticationProperties() { + } + + /** + * Get the type property: The type of the authentication for the origin. + * + * @return the type value. + */ + public OriginAuthenticationType type() { + return this.type; + } + + /** + * Set the type property: The type of the authentication for the origin. + * + * @param type the type value to set. + * @return the OriginAuthenticationProperties object itself. + */ + public OriginAuthenticationProperties withType(OriginAuthenticationType type) { + this.type = type; + return this; + } + + /** + * Get the userAssignedIdentity property: The user assigned managed identity to use for the origin authentication if + * type is UserAssignedIdentity. + * + * @return the userAssignedIdentity value. + */ + public ResourceReference userAssignedIdentity() { + return this.userAssignedIdentity; + } + + /** + * Set the userAssignedIdentity property: The user assigned managed identity to use for the origin authentication if + * type is UserAssignedIdentity. + * + * @param userAssignedIdentity the userAssignedIdentity value to set. + * @return the OriginAuthenticationProperties object itself. + */ + public OriginAuthenticationProperties withUserAssignedIdentity(ResourceReference userAssignedIdentity) { + this.userAssignedIdentity = userAssignedIdentity; + return this; + } + + /** + * Get the scope property: The scope used when requesting token from Microsoft Entra. For example, for Azure Blob + * Storage, scope could be "https://storage.azure.com/.default". + * + * @return the scope value. + */ + public String scope() { + return this.scope; + } + + /** + * Set the scope property: The scope used when requesting token from Microsoft Entra. For example, for Azure Blob + * Storage, scope could be "https://storage.azure.com/.default". + * + * @param scope the scope value to set. + * @return the OriginAuthenticationProperties object itself. + */ + public OriginAuthenticationProperties withScope(String scope) { + this.scope = scope; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (userAssignedIdentity() != null) { + userAssignedIdentity().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeJsonField("userAssignedIdentity", this.userAssignedIdentity); + jsonWriter.writeStringField("scope", this.scope); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OriginAuthenticationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OriginAuthenticationProperties 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 OriginAuthenticationProperties. + */ + public static OriginAuthenticationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OriginAuthenticationProperties deserializedOriginAuthenticationProperties + = new OriginAuthenticationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedOriginAuthenticationProperties.type + = OriginAuthenticationType.fromString(reader.getString()); + } else if ("userAssignedIdentity".equals(fieldName)) { + deserializedOriginAuthenticationProperties.userAssignedIdentity + = ResourceReference.fromJson(reader); + } else if ("scope".equals(fieldName)) { + deserializedOriginAuthenticationProperties.scope = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOriginAuthenticationProperties; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginAuthenticationType.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginAuthenticationType.java new file mode 100644 index 000000000000..a1831c1d0e77 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginAuthenticationType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The type of the authentication for the origin. + */ +public final class OriginAuthenticationType extends ExpandableStringEnum { + /** + * Static value SystemAssignedIdentity for OriginAuthenticationType. + */ + public static final OriginAuthenticationType SYSTEM_ASSIGNED_IDENTITY = fromString("SystemAssignedIdentity"); + + /** + * Static value UserAssignedIdentity for OriginAuthenticationType. + */ + public static final OriginAuthenticationType USER_ASSIGNED_IDENTITY = fromString("UserAssignedIdentity"); + + /** + * Creates a new instance of OriginAuthenticationType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OriginAuthenticationType() { + } + + /** + * Creates or finds a OriginAuthenticationType from its string representation. + * + * @param name a name to look for. + * @return the corresponding OriginAuthenticationType. + */ + public static OriginAuthenticationType fromString(String name) { + return fromString(name, OriginAuthenticationType.class); + } + + /** + * Gets known OriginAuthenticationType values. + * + * @return known OriginAuthenticationType values. + */ + public static Collection values() { + return values(OriginAuthenticationType.class); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginCapacityResourceProperties.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginCapacityResourceProperties.java new file mode 100644 index 000000000000..424917e7f1dc --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginCapacityResourceProperties.java @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.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; + +/** + * Origin capacity settings for an origin. + */ +@Fluent +public final class OriginCapacityResourceProperties implements JsonSerializable { + /* + * Whether to enable origin capacity for a specific origin + */ + private EnabledState enabled; + + /* + * The nearest origin capacity pop region for an origin + */ + private String region; + + /* + * The request rate limit threshold for an origin per minute + */ + private Long originRequestRateThreshold; + + /* + * The ingress rate limit threshold for an origin per minute in bytes + */ + private Long originIngressRateThreshold; + + /** + * Creates an instance of OriginCapacityResourceProperties class. + */ + public OriginCapacityResourceProperties() { + } + + /** + * Get the enabled property: Whether to enable origin capacity for a specific origin. + * + * @return the enabled value. + */ + public EnabledState enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable origin capacity for a specific origin. + * + * @param enabled the enabled value to set. + * @return the OriginCapacityResourceProperties object itself. + */ + public OriginCapacityResourceProperties withEnabled(EnabledState enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the region property: The nearest origin capacity pop region for an origin. + * + * @return the region value. + */ + public String region() { + return this.region; + } + + /** + * Set the region property: The nearest origin capacity pop region for an origin. + * + * @param region the region value to set. + * @return the OriginCapacityResourceProperties object itself. + */ + public OriginCapacityResourceProperties withRegion(String region) { + this.region = region; + return this; + } + + /** + * Get the originRequestRateThreshold property: The request rate limit threshold for an origin per minute. + * + * @return the originRequestRateThreshold value. + */ + public Long originRequestRateThreshold() { + return this.originRequestRateThreshold; + } + + /** + * Set the originRequestRateThreshold property: The request rate limit threshold for an origin per minute. + * + * @param originRequestRateThreshold the originRequestRateThreshold value to set. + * @return the OriginCapacityResourceProperties object itself. + */ + public OriginCapacityResourceProperties withOriginRequestRateThreshold(Long originRequestRateThreshold) { + this.originRequestRateThreshold = originRequestRateThreshold; + return this; + } + + /** + * Get the originIngressRateThreshold property: The ingress rate limit threshold for an origin per minute in bytes. + * + * @return the originIngressRateThreshold value. + */ + public Long originIngressRateThreshold() { + return this.originIngressRateThreshold; + } + + /** + * Set the originIngressRateThreshold property: The ingress rate limit threshold for an origin per minute in bytes. + * + * @param originIngressRateThreshold the originIngressRateThreshold value to set. + * @return the OriginCapacityResourceProperties object itself. + */ + public OriginCapacityResourceProperties withOriginIngressRateThreshold(Long originIngressRateThreshold) { + this.originIngressRateThreshold = originIngressRateThreshold; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("enabled", this.enabled == null ? null : this.enabled.toString()); + jsonWriter.writeStringField("region", this.region); + jsonWriter.writeNumberField("originRequestRateThreshold", this.originRequestRateThreshold); + jsonWriter.writeNumberField("originIngressRateThreshold", this.originIngressRateThreshold); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OriginCapacityResourceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OriginCapacityResourceProperties 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 OriginCapacityResourceProperties. + */ + public static OriginCapacityResourceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OriginCapacityResourceProperties deserializedOriginCapacityResourceProperties + = new OriginCapacityResourceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedOriginCapacityResourceProperties.enabled = EnabledState.fromString(reader.getString()); + } else if ("region".equals(fieldName)) { + deserializedOriginCapacityResourceProperties.region = reader.getString(); + } else if ("originRequestRateThreshold".equals(fieldName)) { + deserializedOriginCapacityResourceProperties.originRequestRateThreshold + = reader.getNullable(JsonReader::getLong); + } else if ("originIngressRateThreshold".equals(fieldName)) { + deserializedOriginCapacityResourceProperties.originIngressRateThreshold + = reader.getNullable(JsonReader::getLong); + } else { + reader.skipChildren(); + } + } + + return deserializedOriginCapacityResourceProperties; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginGroupOverride.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginGroupOverride.java index 9b864d663732..d9e89aee4be7 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginGroupOverride.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginGroupOverride.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginGroupOverrideAction.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginGroupOverrideAction.java index 06fdb54b9100..1453cf274ccd 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginGroupOverrideAction.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginGroupOverrideAction.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -69,7 +69,6 @@ public OriginGroupOverrideAction withParameters(OriginGroupOverrideActionParamet */ @Override public void validate() { - super.validate(); if (parameters() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginGroupOverrideActionParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginGroupOverrideActionParameters.java index 366a94a0cabb..a39c586f7c0d 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginGroupOverrideActionParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginGroupOverrideActionParameters.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.cdn.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -16,12 +15,12 @@ * Defines the parameters for the origin group override action. */ @Fluent -public final class OriginGroupOverrideActionParameters - implements JsonSerializable { +public final class OriginGroupOverrideActionParameters extends DeliveryRuleActionParameters { /* * The typeName property. */ - private String typeName = "DeliveryRuleOriginGroupOverrideActionParameters"; + private DeliveryRuleActionParametersType typeName + = DeliveryRuleActionParametersType.DELIVERY_RULE_ORIGIN_GROUP_OVERRIDE_ACTION_PARAMETERS; /* * defines the OriginGroup that would override the DefaultOriginGroup. @@ -39,21 +38,11 @@ public OriginGroupOverrideActionParameters() { * * @return the typeName value. */ - public String typeName() { + @Override + public DeliveryRuleActionParametersType typeName() { return this.typeName; } - /** - * Set the typeName property: The typeName property. - * - * @param typeName the typeName value to set. - * @return the OriginGroupOverrideActionParameters object itself. - */ - public OriginGroupOverrideActionParameters withTypeName(String typeName) { - this.typeName = typeName; - return this; - } - /** * Get the originGroup property: defines the OriginGroup that would override the DefaultOriginGroup. * @@ -79,6 +68,7 @@ public OriginGroupOverrideActionParameters withOriginGroup(ResourceReference ori * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { if (originGroup() == null) { throw LOGGER.atError() @@ -97,8 +87,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("typeName", this.typeName); jsonWriter.writeJsonField("originGroup", this.originGroup); + jsonWriter.writeStringField("typeName", this.typeName == null ? null : this.typeName.toString()); return jsonWriter.writeEndObject(); } @@ -121,6 +111,9 @@ public static OriginGroupOverrideActionParameters fromJson(JsonReader jsonReader if ("originGroup".equals(fieldName)) { deserializedOriginGroupOverrideActionParameters.originGroup = ResourceReference.fromJson(reader); + } else if ("typeName".equals(fieldName)) { + deserializedOriginGroupOverrideActionParameters.typeName + = DeliveryRuleActionParametersType.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginGroupProvisioningState.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginGroupProvisioningState.java index a48d339c9e9a..832dff2fe112 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginGroupProvisioningState.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginGroupProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginGroupResourceState.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginGroupResourceState.java index ccc696ef622c..384039214db4 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginGroupResourceState.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginGroupResourceState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginGroupUpdateParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginGroupUpdateParameters.java index 0fc7294546ee..bf7f0e4e4bdf 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginGroupUpdateParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginGroupUpdateParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginProvisioningState.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginProvisioningState.java index 4e0d4d16ed1e..be2ab58b2b35 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginProvisioningState.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginResourceState.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginResourceState.java index 35852d5df76e..30bec1096015 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginResourceState.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginResourceState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginUpdateParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginUpdateParameters.java index b0fdb409973f..de9fa6b4396d 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginUpdateParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/OriginUpdateParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ParamIndicator.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ParamIndicator.java index 2056450651d4..9cd738c675fe 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ParamIndicator.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ParamIndicator.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/PolicyEnabledState.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/PolicyEnabledState.java index 68ad9c4b7012..f3cf23d33a28 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/PolicyEnabledState.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/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.cdn.models; @@ -8,7 +8,7 @@ import java.util.Collection; /** - * describes if the policy is in enabled state or disabled state. + * Describes if the policy is in enabled or disabled state. Defaults to Enabled if not specified. */ public final class PolicyEnabledState extends ExpandableStringEnum { /** diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/PolicyMode.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/PolicyMode.java index 9bfcbe0bd449..993af77d9864 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/PolicyMode.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/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.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/PolicyRequestBodyCheck.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/PolicyRequestBodyCheck.java new file mode 100644 index 000000000000..a264258ef9c4 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/PolicyRequestBodyCheck.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Describes if policy managed rules will inspect the request body content. + */ +public final class PolicyRequestBodyCheck extends ExpandableStringEnum { + /** + * Static value Disabled for PolicyRequestBodyCheck. + */ + public static final PolicyRequestBodyCheck DISABLED = fromString("Disabled"); + + /** + * Static value Enabled for PolicyRequestBodyCheck. + */ + public static final PolicyRequestBodyCheck ENABLED = fromString("Enabled"); + + /** + * Creates a new instance of PolicyRequestBodyCheck value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PolicyRequestBodyCheck() { + } + + /** + * Creates or finds a PolicyRequestBodyCheck from its string representation. + * + * @param name a name to look for. + * @return the corresponding PolicyRequestBodyCheck. + */ + public static PolicyRequestBodyCheck fromString(String name) { + return fromString(name, PolicyRequestBodyCheck.class); + } + + /** + * Gets known PolicyRequestBodyCheck values. + * + * @return known PolicyRequestBodyCheck values. + */ + public static Collection values() { + return values(PolicyRequestBodyCheck.class); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/PolicyResourceState.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/PolicyResourceState.java index e6d6ebb9f704..36f6965ef9a6 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/PolicyResourceState.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/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.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/PolicySettings.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/PolicySettings.java index cf341a1292e7..1353371d6bd0 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/PolicySettings.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/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.cdn.models; @@ -172,10 +172,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("enabledState", this.enabledState == null ? null : this.enabledState.toString()); jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); jsonWriter.writeStringField("defaultRedirectUrl", this.defaultRedirectUrl); - jsonWriter.writeStringField("defaultCustomBlockResponseStatusCode", + jsonWriter.writeNumberField("defaultCustomBlockResponseStatusCode", this.defaultCustomBlockResponseStatusCode == null ? null - : this.defaultCustomBlockResponseStatusCode.toString()); + : this.defaultCustomBlockResponseStatusCode.getValue()); jsonWriter.writeStringField("defaultCustomBlockResponseBody", this.defaultCustomBlockResponseBody); return jsonWriter.writeEndObject(); } @@ -203,7 +203,7 @@ public static PolicySettings fromJson(JsonReader jsonReader) throws IOException deserializedPolicySettings.defaultRedirectUrl = reader.getString(); } else if ("defaultCustomBlockResponseStatusCode".equals(fieldName)) { deserializedPolicySettings.defaultCustomBlockResponseStatusCode - = PolicySettingsDefaultCustomBlockResponseStatusCode.fromInt(reader.getInt()); + = PolicySettingsDefaultCustomBlockResponseStatusCode.fromValue(reader.getInt()); } else if ("defaultCustomBlockResponseBody".equals(fieldName)) { deserializedPolicySettings.defaultCustomBlockResponseBody = reader.getString(); } else { diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/PolicySettingsAfd.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/PolicySettingsAfd.java new file mode 100644 index 000000000000..a7181026cd17 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/PolicySettingsAfd.java @@ -0,0 +1,381 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.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 com.azure.resourcemanager.cdn.fluent.models.PolicySettingsLogScrubbing; +import java.io.IOException; +import java.util.List; + +/** + * Defines top-level WebApplicationFirewallPolicy configuration settings. + */ +@Fluent +public final class PolicySettingsAfd implements JsonSerializable { + /* + * Describes if the policy is in enabled or disabled state. Defaults to Enabled if not specified. + */ + private PolicyEnabledState enabledState; + + /* + * Describes if it is in detection mode or prevention mode at policy level. + */ + private PolicyMode mode; + + /* + * If action type is redirect, this field represents redirect URL for the client. + */ + private String redirectUrl; + + /* + * If the action type is block, customer can override the response status code. + */ + private Integer customBlockResponseStatusCode; + + /* + * If the action type is block, customer can override the response body. The body must be specified in base64 + * encoding. + */ + private String customBlockResponseBody; + + /* + * Describes if policy managed rules will inspect the request body content. + */ + private PolicyRequestBodyCheck requestBodyCheck; + + /* + * Defines the JavaScript challenge 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 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. + */ + private PolicySettingsLogScrubbing innerLogScrubbing; + + /** + * Creates an instance of PolicySettingsAfd class. + */ + public PolicySettingsAfd() { + } + + /** + * Get the enabledState property: Describes if the policy is in enabled or disabled state. Defaults to Enabled if + * not specified. + * + * @return the enabledState value. + */ + public PolicyEnabledState enabledState() { + return this.enabledState; + } + + /** + * Set the enabledState property: Describes if the policy is in enabled or disabled state. Defaults to Enabled if + * not specified. + * + * @param enabledState the enabledState value to set. + * @return the PolicySettingsAfd object itself. + */ + public PolicySettingsAfd withEnabledState(PolicyEnabledState enabledState) { + this.enabledState = enabledState; + return this; + } + + /** + * Get the mode property: Describes if it is in detection mode or prevention mode at policy level. + * + * @return the mode value. + */ + public PolicyMode mode() { + return this.mode; + } + + /** + * Set the mode property: Describes if it is in detection mode or prevention mode at policy level. + * + * @param mode the mode value to set. + * @return the PolicySettingsAfd object itself. + */ + public PolicySettingsAfd withMode(PolicyMode mode) { + this.mode = mode; + return this; + } + + /** + * Get the redirectUrl property: If action type is redirect, this field represents redirect URL for the client. + * + * @return the redirectUrl value. + */ + public String redirectUrl() { + return this.redirectUrl; + } + + /** + * Set the redirectUrl property: If action type is redirect, this field represents redirect URL for the client. + * + * @param redirectUrl the redirectUrl value to set. + * @return the PolicySettingsAfd object itself. + */ + public PolicySettingsAfd withRedirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + return this; + } + + /** + * Get the customBlockResponseStatusCode property: If the action type is block, customer can override the response + * status code. + * + * @return the customBlockResponseStatusCode value. + */ + public Integer customBlockResponseStatusCode() { + return this.customBlockResponseStatusCode; + } + + /** + * Set the customBlockResponseStatusCode property: If the action type is block, customer can override the response + * status code. + * + * @param customBlockResponseStatusCode the customBlockResponseStatusCode value to set. + * @return the PolicySettingsAfd object itself. + */ + public PolicySettingsAfd withCustomBlockResponseStatusCode(Integer customBlockResponseStatusCode) { + this.customBlockResponseStatusCode = customBlockResponseStatusCode; + return this; + } + + /** + * Get the customBlockResponseBody property: If the action type is block, customer can override the response body. + * The body must be specified in base64 encoding. + * + * @return the customBlockResponseBody value. + */ + public String customBlockResponseBody() { + return this.customBlockResponseBody; + } + + /** + * Set the customBlockResponseBody property: If the action type is block, customer can override the response body. + * The body must be specified in base64 encoding. + * + * @param customBlockResponseBody the customBlockResponseBody value to set. + * @return the PolicySettingsAfd object itself. + */ + public PolicySettingsAfd withCustomBlockResponseBody(String customBlockResponseBody) { + this.customBlockResponseBody = customBlockResponseBody; + return this; + } + + /** + * Get the requestBodyCheck property: Describes if policy managed rules will inspect the request body content. + * + * @return the requestBodyCheck value. + */ + public PolicyRequestBodyCheck requestBodyCheck() { + return this.requestBodyCheck; + } + + /** + * Set the requestBodyCheck property: Describes if policy managed rules will inspect the request body content. + * + * @param requestBodyCheck the requestBodyCheck value to set. + * @return the PolicySettingsAfd object itself. + */ + public PolicySettingsAfd withRequestBodyCheck(PolicyRequestBodyCheck requestBodyCheck) { + this.requestBodyCheck = requestBodyCheck; + return this; + } + + /** + * Get the javascriptChallengeExpirationInMinutes property: Defines the JavaScript challenge 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 javascriptChallengeExpirationInMinutes value. + */ + public Integer javascriptChallengeExpirationInMinutes() { + return this.javascriptChallengeExpirationInMinutes; + } + + /** + * Set the javascriptChallengeExpirationInMinutes property: Defines the JavaScript challenge 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 javascriptChallengeExpirationInMinutes the javascriptChallengeExpirationInMinutes value to set. + * @return the PolicySettingsAfd object itself. + */ + public PolicySettingsAfd + withJavascriptChallengeExpirationInMinutes(Integer javascriptChallengeExpirationInMinutes) { + this.javascriptChallengeExpirationInMinutes = javascriptChallengeExpirationInMinutes; + 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 PolicySettingsAfd object itself. + */ + public PolicySettingsAfd withCaptchaExpirationInMinutes(Integer captchaExpirationInMinutes) { + this.captchaExpirationInMinutes = captchaExpirationInMinutes; + return this; + } + + /** + * Get the innerLogScrubbing property: Defines rules that scrub sensitive fields in the Web Application Firewall + * logs. + * + * @return the innerLogScrubbing value. + */ + private PolicySettingsLogScrubbing innerLogScrubbing() { + return this.innerLogScrubbing; + } + + /** + * Get the state property: State of the log scrubbing config. Default value is Enabled. + * + * @return the state value. + */ + public WebApplicationFirewallScrubbingState state() { + return this.innerLogScrubbing() == null ? null : this.innerLogScrubbing().state(); + } + + /** + * Set the state property: State of the log scrubbing config. Default value is Enabled. + * + * @param state the state value to set. + * @return the PolicySettingsAfd object itself. + */ + public PolicySettingsAfd withState(WebApplicationFirewallScrubbingState state) { + if (this.innerLogScrubbing() == null) { + this.innerLogScrubbing = new PolicySettingsLogScrubbing(); + } + this.innerLogScrubbing().withState(state); + return this; + } + + /** + * Get the scrubbingRules property: List of log scrubbing rules applied to the Web Application Firewall logs. + * + * @return the scrubbingRules value. + */ + public List scrubbingRules() { + return this.innerLogScrubbing() == null ? null : this.innerLogScrubbing().scrubbingRules(); + } + + /** + * Set the scrubbingRules property: List of log scrubbing rules applied to the Web Application Firewall logs. + * + * @param scrubbingRules the scrubbingRules value to set. + * @return the PolicySettingsAfd object itself. + */ + public PolicySettingsAfd withScrubbingRules(List scrubbingRules) { + if (this.innerLogScrubbing() == null) { + this.innerLogScrubbing = new PolicySettingsLogScrubbing(); + } + this.innerLogScrubbing().withScrubbingRules(scrubbingRules); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerLogScrubbing() != null) { + innerLogScrubbing().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("enabledState", this.enabledState == null ? null : this.enabledState.toString()); + jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); + jsonWriter.writeStringField("redirectUrl", this.redirectUrl); + jsonWriter.writeNumberField("customBlockResponseStatusCode", this.customBlockResponseStatusCode); + jsonWriter.writeStringField("customBlockResponseBody", this.customBlockResponseBody); + jsonWriter.writeStringField("requestBodyCheck", + this.requestBodyCheck == null ? null : this.requestBodyCheck.toString()); + jsonWriter.writeNumberField("javascriptChallengeExpirationInMinutes", + this.javascriptChallengeExpirationInMinutes); + jsonWriter.writeNumberField("captchaExpirationInMinutes", this.captchaExpirationInMinutes); + jsonWriter.writeJsonField("logScrubbing", this.innerLogScrubbing); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PolicySettingsAfd from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PolicySettingsAfd 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 PolicySettingsAfd. + */ + public static PolicySettingsAfd fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PolicySettingsAfd deserializedPolicySettingsAfd = new PolicySettingsAfd(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabledState".equals(fieldName)) { + deserializedPolicySettingsAfd.enabledState = PolicyEnabledState.fromString(reader.getString()); + } else if ("mode".equals(fieldName)) { + deserializedPolicySettingsAfd.mode = PolicyMode.fromString(reader.getString()); + } else if ("redirectUrl".equals(fieldName)) { + deserializedPolicySettingsAfd.redirectUrl = reader.getString(); + } else if ("customBlockResponseStatusCode".equals(fieldName)) { + deserializedPolicySettingsAfd.customBlockResponseStatusCode + = reader.getNullable(JsonReader::getInt); + } else if ("customBlockResponseBody".equals(fieldName)) { + deserializedPolicySettingsAfd.customBlockResponseBody = reader.getString(); + } else if ("requestBodyCheck".equals(fieldName)) { + deserializedPolicySettingsAfd.requestBodyCheck + = PolicyRequestBodyCheck.fromString(reader.getString()); + } else if ("javascriptChallengeExpirationInMinutes".equals(fieldName)) { + deserializedPolicySettingsAfd.javascriptChallengeExpirationInMinutes + = reader.getNullable(JsonReader::getInt); + } else if ("captchaExpirationInMinutes".equals(fieldName)) { + deserializedPolicySettingsAfd.captchaExpirationInMinutes = reader.getNullable(JsonReader::getInt); + } else if ("logScrubbing".equals(fieldName)) { + deserializedPolicySettingsAfd.innerLogScrubbing = PolicySettingsLogScrubbing.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPolicySettingsAfd; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/PolicySettingsDefaultCustomBlockResponseStatusCode.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/PolicySettingsDefaultCustomBlockResponseStatusCode.java index 95e84b182938..5b62c93084dd 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/PolicySettingsDefaultCustomBlockResponseStatusCode.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/PolicySettingsDefaultCustomBlockResponseStatusCode.java @@ -1,67 +1,139 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; -import com.azure.core.util.ExpandableStringEnum; +import com.azure.core.util.ExpandableEnum; +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.ArrayList; import java.util.Collection; +import java.util.Map; +import java.util.Objects; +import java.util.concurrent.ConcurrentHashMap; +import java.util.function.Function; /** * If the action type is block, this field defines the default customer overridable http response status code. */ public final class PolicySettingsDefaultCustomBlockResponseStatusCode - extends ExpandableStringEnum { + implements ExpandableEnum, JsonSerializable { + private static final Map VALUES + = new ConcurrentHashMap<>(); + + private static final Function NEW_INSTANCE + = PolicySettingsDefaultCustomBlockResponseStatusCode::new; + /** * Static value 200 for PolicySettingsDefaultCustomBlockResponseStatusCode. */ - public static final PolicySettingsDefaultCustomBlockResponseStatusCode TWO_ZERO_ZERO = fromInt(200); + public static final PolicySettingsDefaultCustomBlockResponseStatusCode TWO_ZERO_ZERO = fromValue(200); /** * Static value 403 for PolicySettingsDefaultCustomBlockResponseStatusCode. */ - public static final PolicySettingsDefaultCustomBlockResponseStatusCode FOUR_ZERO_THREE = fromInt(403); + public static final PolicySettingsDefaultCustomBlockResponseStatusCode FOUR_ZERO_THREE = fromValue(403); /** * Static value 405 for PolicySettingsDefaultCustomBlockResponseStatusCode. */ - public static final PolicySettingsDefaultCustomBlockResponseStatusCode FOUR_ZERO_FIVE = fromInt(405); + public static final PolicySettingsDefaultCustomBlockResponseStatusCode FOUR_ZERO_FIVE = fromValue(405); /** * Static value 406 for PolicySettingsDefaultCustomBlockResponseStatusCode. */ - public static final PolicySettingsDefaultCustomBlockResponseStatusCode FOUR_ZERO_SIX = fromInt(406); + public static final PolicySettingsDefaultCustomBlockResponseStatusCode FOUR_ZERO_SIX = fromValue(406); /** * Static value 429 for PolicySettingsDefaultCustomBlockResponseStatusCode. */ - public static final PolicySettingsDefaultCustomBlockResponseStatusCode FOUR_TWO_NINE = fromInt(429); + public static final PolicySettingsDefaultCustomBlockResponseStatusCode FOUR_TWO_NINE = fromValue(429); - /** - * Creates a new instance of PolicySettingsDefaultCustomBlockResponseStatusCode value. - * - * @deprecated Use the {@link #fromInt(int)} factory method. - */ - @Deprecated - public PolicySettingsDefaultCustomBlockResponseStatusCode() { + private final Integer value; + + private PolicySettingsDefaultCustomBlockResponseStatusCode(Integer value) { + this.value = value; } /** - * Creates or finds a PolicySettingsDefaultCustomBlockResponseStatusCode from its string representation. + * Creates or finds a PolicySettingsDefaultCustomBlockResponseStatusCode. * - * @param name a name to look for. + * @param value a value to look for. * @return the corresponding PolicySettingsDefaultCustomBlockResponseStatusCode. + * @throws IllegalArgumentException if value is null. */ - public static PolicySettingsDefaultCustomBlockResponseStatusCode fromInt(int name) { - return fromString(String.valueOf(name), PolicySettingsDefaultCustomBlockResponseStatusCode.class); + public static PolicySettingsDefaultCustomBlockResponseStatusCode fromValue(Integer value) { + if (value == null) { + throw new IllegalArgumentException("'value' cannot be null."); + } + return VALUES.computeIfAbsent(value, NEW_INSTANCE); } /** * Gets known PolicySettingsDefaultCustomBlockResponseStatusCode values. * - * @return known PolicySettingsDefaultCustomBlockResponseStatusCode values. + * @return Known PolicySettingsDefaultCustomBlockResponseStatusCode values. */ public static Collection values() { - return values(PolicySettingsDefaultCustomBlockResponseStatusCode.class); + return new ArrayList<>(VALUES.values()); + } + + /** + * Gets the value of the PolicySettingsDefaultCustomBlockResponseStatusCode instance. + * + * @return the value of the PolicySettingsDefaultCustomBlockResponseStatusCode instance. + */ + @Override + public Integer getValue() { + return this.value; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeInt(getValue()); + } + + /** + * Reads an instance of PolicySettingsDefaultCustomBlockResponseStatusCode from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PolicySettingsDefaultCustomBlockResponseStatusCode if the JsonReader was pointing to an + * instance of it, or null if the JsonReader was pointing to JSON null. + * @throws IOException If an error occurs while reading the PolicySettingsDefaultCustomBlockResponseStatusCode. + * @throws IllegalStateException If unexpected JSON token is found. + */ + public static PolicySettingsDefaultCustomBlockResponseStatusCode fromJson(JsonReader jsonReader) + throws IOException { + JsonToken nextToken = jsonReader.nextToken(); + if (nextToken == JsonToken.NULL) { + return null; + } + if (nextToken != JsonToken.NUMBER) { + throw new IllegalStateException( + String.format("Unexpected JSON token for %s deserialization: %s", JsonToken.NUMBER, nextToken)); + } + return PolicySettingsDefaultCustomBlockResponseStatusCode.fromValue(jsonReader.getInt()); + } + + @Override + public String toString() { + return Objects.toString(this.value); + } + + @Override + public boolean equals(Object obj) { + return this == obj; + } + + @Override + public int hashCode() { + return Objects.hashCode(this.value); } } diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/PostArgsMatchConditionParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/PostArgsMatchConditionParameters.java index 31ab2e690d7e..7345178348ec 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/PostArgsMatchConditionParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/PostArgsMatchConditionParameters.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.cdn.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -17,11 +16,12 @@ * Defines the parameters for PostArgs match conditions. */ @Fluent -public final class PostArgsMatchConditionParameters implements JsonSerializable { +public final class PostArgsMatchConditionParameters extends DeliveryRuleConditionParameters { /* * The typeName property. */ - private String typeName = "DeliveryRulePostArgsConditionParameters"; + private DeliveryRuleConditionParametersType typeName + = DeliveryRuleConditionParametersType.DELIVERY_RULE_POST_ARGS_CONDITION_PARAMETERS; /* * Name of PostArg to be matched @@ -59,21 +59,11 @@ public PostArgsMatchConditionParameters() { * * @return the typeName value. */ - public String typeName() { + @Override + public DeliveryRuleConditionParametersType typeName() { return this.typeName; } - /** - * Set the typeName property: The typeName property. - * - * @param typeName the typeName value to set. - * @return the PostArgsMatchConditionParameters object itself. - */ - public PostArgsMatchConditionParameters withTypeName(String typeName) { - this.typeName = typeName; - return this; - } - /** * Get the selector property: Name of PostArg to be matched. * @@ -179,6 +169,7 @@ public PostArgsMatchConditionParameters withTransforms(List transform * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { if (operator() == null) { throw LOGGER.atError() @@ -195,8 +186,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("typeName", this.typeName); jsonWriter.writeStringField("operator", this.operator == null ? null : this.operator.toString()); + jsonWriter.writeStringField("typeName", this.typeName == null ? null : this.typeName.toString()); jsonWriter.writeStringField("selector", this.selector); jsonWriter.writeBooleanField("negateCondition", this.negateCondition); jsonWriter.writeArrayField("matchValues", this.matchValues, (writer, element) -> writer.writeString(element)); @@ -225,6 +216,9 @@ public static PostArgsMatchConditionParameters fromJson(JsonReader jsonReader) t if ("operator".equals(fieldName)) { deserializedPostArgsMatchConditionParameters.operator = PostArgsOperator.fromString(reader.getString()); + } else if ("typeName".equals(fieldName)) { + deserializedPostArgsMatchConditionParameters.typeName + = DeliveryRuleConditionParametersType.fromString(reader.getString()); } else if ("selector".equals(fieldName)) { deserializedPostArgsMatchConditionParameters.selector = reader.getString(); } else if ("negateCondition".equals(fieldName)) { diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/PostArgsOperator.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/PostArgsOperator.java index d0f02e6181f7..ecc47f9d8d31 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/PostArgsOperator.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/PostArgsOperator.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/PreviewSupportedResourceType.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/PreviewSupportedResourceType.java new file mode 100644 index 000000000000..103509601c6e --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/PreviewSupportedResourceType.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Resource type supported by preview. + */ +public final class PreviewSupportedResourceType extends ExpandableStringEnum { + /** + * Static value Microsoft.Cdn/profiles/afdEndpoints/routes for PreviewSupportedResourceType. + */ + public static final PreviewSupportedResourceType MICROSOFT_CDN_PROFILES_AFD_ENDPOINTS_ROUTE + = fromString("Microsoft.Cdn/profiles/afdEndpoints/routes"); + + /** + * Static value Microsoft.Cdn/profiles/originGroups for PreviewSupportedResourceType. + */ + public static final PreviewSupportedResourceType MICROSOFT_CDN_PROFILES_ORIGIN_GROUPS + = fromString("Microsoft.Cdn/profiles/originGroups"); + + /** + * Static value Microsoft.Cdn/profiles/originGroups/origins for PreviewSupportedResourceType. + */ + public static final PreviewSupportedResourceType MICROSOFT_CDN_PROFILES_ORIGIN_GROUPS_ORIGINS + = fromString("Microsoft.Cdn/profiles/originGroups/origins"); + + /** + * Static value Microsoft.Cdn/profiles/ruleSets for PreviewSupportedResourceType. + */ + public static final PreviewSupportedResourceType MICROSOFT_CDN_PROFILES_RULE_SETS + = fromString("Microsoft.Cdn/profiles/ruleSets"); + + /** + * Static value Microsoft.Cdn/profiles/ruleSets/rules for PreviewSupportedResourceType. + */ + public static final PreviewSupportedResourceType MICROSOFT_CDN_PROFILES_RULE_SETS_RULES + = fromString("Microsoft.Cdn/profiles/ruleSets/rules"); + + /** + * Static value Microsoft.Cdn/profiles/securityPolicies for PreviewSupportedResourceType. + */ + public static final PreviewSupportedResourceType MICROSOFT_CDN_PROFILES_SECURITY_POLICIES + = fromString("Microsoft.Cdn/profiles/securityPolicies"); + + /** + * Creates a new instance of PreviewSupportedResourceType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PreviewSupportedResourceType() { + } + + /** + * Creates or finds a PreviewSupportedResourceType from its string representation. + * + * @param name a name to look for. + * @return the corresponding PreviewSupportedResourceType. + */ + public static PreviewSupportedResourceType fromString(String name) { + return fromString(name, PreviewSupportedResourceType.class); + } + + /** + * Gets known PreviewSupportedResourceType values. + * + * @return known PreviewSupportedResourceType values. + */ + public static Collection values() { + return values(PreviewSupportedResourceType.class); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/PrivateEndpointStatus.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/PrivateEndpointStatus.java index 649e3c57307a..de7337c230a4 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/PrivateEndpointStatus.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/PrivateEndpointStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProbeProtocol.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProbeProtocol.java index a72a443d68f4..e319fe6877ac 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProbeProtocol.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProbeProtocol.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -21,7 +21,12 @@ public enum ProbeProtocol { /** * Enum value Https. */ - HTTPS("Https"); + HTTPS("Https"), + + /** + * Enum value Grpc. + */ + GRPC("Grpc"); /** * The actual serialized value for a ProbeProtocol instance. diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProfileAgentProvisioningState.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProfileAgentProvisioningState.java new file mode 100644 index 000000000000..d49549191b60 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProfileAgentProvisioningState.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Provisioning status of the profile agent association. + */ +public final class ProfileAgentProvisioningState extends ExpandableStringEnum { + /** + * Static value Succeeded for ProfileAgentProvisioningState. + */ + public static final ProfileAgentProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for ProfileAgentProvisioningState. + */ + public static final ProfileAgentProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Updating for ProfileAgentProvisioningState. + */ + public static final ProfileAgentProvisioningState UPDATING = fromString("Updating"); + + /** + * Static value Deleting for ProfileAgentProvisioningState. + */ + public static final ProfileAgentProvisioningState DELETING = fromString("Deleting"); + + /** + * Static value Creating for ProfileAgentProvisioningState. + */ + public static final ProfileAgentProvisioningState CREATING = fromString("Creating"); + + /** + * Creates a new instance of ProfileAgentProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ProfileAgentProvisioningState() { + } + + /** + * Creates or finds a ProfileAgentProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ProfileAgentProvisioningState. + */ + public static ProfileAgentProvisioningState fromString(String name) { + return fromString(name, ProfileAgentProvisioningState.class); + } + + /** + * Gets known ProfileAgentProvisioningState values. + * + * @return known ProfileAgentProvisioningState values. + */ + public static Collection values() { + return values(ProfileAgentProvisioningState.class); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProfileAgentUpdateParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProfileAgentUpdateParameters.java new file mode 100644 index 000000000000..b6f2ca948ede --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProfileAgentUpdateParameters.java @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.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 com.azure.resourcemanager.cdn.fluent.models.ProfileAgentUpdateProperties; +import java.io.IOException; +import java.util.List; + +/** + * Properties required to update a profile agent association. + */ +@Fluent +public final class ProfileAgentUpdateParameters implements JsonSerializable { + /* + * The properties for updating a profile agent association. + */ + private ProfileAgentUpdateProperties innerProperties; + + /** + * Creates an instance of ProfileAgentUpdateParameters class. + */ + public ProfileAgentUpdateParameters() { + } + + /** + * Get the innerProperties property: The properties for updating a profile agent association. + * + * @return the innerProperties value. + */ + private ProfileAgentUpdateProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the customDomains property: List of custom domains associated with this agent link. + * + * @return the customDomains value. + */ + public List customDomains() { + return this.innerProperties() == null ? null : this.innerProperties().customDomains(); + } + + /** + * Set the customDomains property: List of custom domains associated with this agent link. + * + * @param customDomains the customDomains value to set. + * @return the ProfileAgentUpdateParameters object itself. + */ + public ProfileAgentUpdateParameters withCustomDomains(List customDomains) { + if (this.innerProperties() == null) { + this.innerProperties = new ProfileAgentUpdateProperties(); + } + this.innerProperties().withCustomDomains(customDomains); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ProfileAgentUpdateParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ProfileAgentUpdateParameters 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 ProfileAgentUpdateParameters. + */ + public static ProfileAgentUpdateParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ProfileAgentUpdateParameters deserializedProfileAgentUpdateParameters = new ProfileAgentUpdateParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedProfileAgentUpdateParameters.innerProperties + = ProfileAgentUpdateProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedProfileAgentUpdateParameters; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProfileChangeSkuWafMapping.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProfileChangeSkuWafMapping.java index 30ee78a3ac5e..1baeebbcb261 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProfileChangeSkuWafMapping.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProfileChangeSkuWafMapping.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProfileLogScrubbing.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProfileLogScrubbing.java index f89179023f27..79fa64e1e939 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProfileLogScrubbing.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProfileLogScrubbing.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProfileProvisioningState.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProfileProvisioningState.java index a46ba22c8fca..417f4f3848fd 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProfileProvisioningState.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProfileProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProfileResourceState.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProfileResourceState.java index 50a5e6a00eaf..6f2e3cf15cea 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProfileResourceState.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProfileResourceState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProfileScrubbingRules.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProfileScrubbingRules.java index db528feae948..1886273bc164 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProfileScrubbingRules.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProfileScrubbingRules.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProfileScrubbingState.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProfileScrubbingState.java index e34f56971aa7..9ee7d0cc9ff2 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProfileScrubbingState.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProfileScrubbingState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProfileUpdateParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProfileUpdateParameters.java index d5878950f5b0..c39ead2463f1 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProfileUpdateParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProfileUpdateParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProfileUpgradeParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProfileUpgradeParameters.java index f580a16a57e3..4c62e16aa678 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProfileUpgradeParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProfileUpgradeParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProtocolType.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProtocolType.java index 2d92f12dba8e..929e98ef4b2a 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProtocolType.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProtocolType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProvisioningState.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProvisioningState.java index 236eb5ea2d48..3e40cee81e8d 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProvisioningState.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/PurgeParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/PurgeParameters.java index b4c8b0a2f46c..660745b29499 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/PurgeParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/PurgeParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/QueryStringBehavior.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/QueryStringBehavior.java index b1def31dc81e..09b4c269a16d 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/QueryStringBehavior.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/QueryStringBehavior.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/QueryStringCachingBehavior.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/QueryStringCachingBehavior.java index 85e2853521cf..f5f06dc00751 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/QueryStringCachingBehavior.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/QueryStringCachingBehavior.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/QueryStringMatchConditionParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/QueryStringMatchConditionParameters.java index f63bd2d484de..6cbe4db30f45 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/QueryStringMatchConditionParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/QueryStringMatchConditionParameters.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.cdn.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -17,12 +16,12 @@ * Defines the parameters for QueryString match conditions. */ @Fluent -public final class QueryStringMatchConditionParameters - implements JsonSerializable { +public final class QueryStringMatchConditionParameters extends DeliveryRuleConditionParameters { /* * The typeName property. */ - private String typeName = "DeliveryRuleQueryStringConditionParameters"; + private DeliveryRuleConditionParametersType typeName + = DeliveryRuleConditionParametersType.DELIVERY_RULE_QUERY_STRING_CONDITION_PARAMETERS; /* * Describes operator to be matched @@ -55,21 +54,11 @@ public QueryStringMatchConditionParameters() { * * @return the typeName value. */ - public String typeName() { + @Override + public DeliveryRuleConditionParametersType typeName() { return this.typeName; } - /** - * Set the typeName property: The typeName property. - * - * @param typeName the typeName value to set. - * @return the QueryStringMatchConditionParameters object itself. - */ - public QueryStringMatchConditionParameters withTypeName(String typeName) { - this.typeName = typeName; - return this; - } - /** * Get the operator property: Describes operator to be matched. * @@ -155,6 +144,7 @@ public QueryStringMatchConditionParameters withTransforms(List transf * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { if (operator() == null) { throw LOGGER.atError() @@ -171,8 +161,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("typeName", this.typeName); jsonWriter.writeStringField("operator", this.operator == null ? null : this.operator.toString()); + jsonWriter.writeStringField("typeName", this.typeName == null ? null : this.typeName.toString()); jsonWriter.writeBooleanField("negateCondition", this.negateCondition); jsonWriter.writeArrayField("matchValues", this.matchValues, (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("transforms", this.transforms, @@ -200,6 +190,9 @@ public static QueryStringMatchConditionParameters fromJson(JsonReader jsonReader if ("operator".equals(fieldName)) { deserializedQueryStringMatchConditionParameters.operator = QueryStringOperator.fromString(reader.getString()); + } else if ("typeName".equals(fieldName)) { + deserializedQueryStringMatchConditionParameters.typeName + = DeliveryRuleConditionParametersType.fromString(reader.getString()); } else if ("negateCondition".equals(fieldName)) { deserializedQueryStringMatchConditionParameters.negateCondition = reader.getNullable(JsonReader::getBoolean); diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/QueryStringOperator.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/QueryStringOperator.java index 4e7539949221..539d3e2f20ba 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/QueryStringOperator.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/QueryStringOperator.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RankingsResponseTablesItem.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RankingsResponseTablesItem.java index cc318136354c..d04a3fce625f 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RankingsResponseTablesItem.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RankingsResponseTablesItem.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.cdn.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 @@ /** * The RankingsResponseTablesItem model. */ -@Fluent +@Immutable public final class RankingsResponseTablesItem implements JsonSerializable { /* * The ranking property. @@ -30,7 +30,7 @@ public final class RankingsResponseTablesItem implements JsonSerializable data() { return this.data; } - /** - * Set the data property: The data property. - * - * @param data the data value to set. - * @return the RankingsResponseTablesItem object itself. - */ - public RankingsResponseTablesItem withData(List data) { - this.data = data; - return this; - } - /** * Validates the instance. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RankingsResponseTablesPropertiesItemsItem.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RankingsResponseTablesPropertiesItemsItem.java index 36ef463b5f3d..726611bffe70 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RankingsResponseTablesPropertiesItemsItem.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RankingsResponseTablesPropertiesItemsItem.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.cdn.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 @@ /** * The RankingsResponseTablesPropertiesItemsItem model. */ -@Fluent +@Immutable public final class RankingsResponseTablesPropertiesItemsItem implements JsonSerializable { /* @@ -31,7 +31,7 @@ public final class RankingsResponseTablesPropertiesItemsItem /** * Creates an instance of RankingsResponseTablesPropertiesItemsItem class. */ - public RankingsResponseTablesPropertiesItemsItem() { + private RankingsResponseTablesPropertiesItemsItem() { } /** @@ -43,17 +43,6 @@ public String name() { return this.name; } - /** - * Set the name property: The name property. - * - * @param name the name value to set. - * @return the RankingsResponseTablesPropertiesItemsItem object itself. - */ - public RankingsResponseTablesPropertiesItemsItem withName(String name) { - this.name = name; - return this; - } - /** * Get the metrics property: The metrics property. * @@ -63,18 +52,6 @@ public List metrics() { return this.metrics; } - /** - * Set the metrics property: The metrics property. - * - * @param metrics the metrics value to set. - * @return the RankingsResponseTablesPropertiesItemsItem object itself. - */ - public RankingsResponseTablesPropertiesItemsItem - withMetrics(List metrics) { - this.metrics = metrics; - return this; - } - /** * Validates the instance. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RankingsResponseTablesPropertiesItemsMetricsItem.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RankingsResponseTablesPropertiesItemsMetricsItem.java index 8a8c6d2ef748..96509f3ba38c 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RankingsResponseTablesPropertiesItemsMetricsItem.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RankingsResponseTablesPropertiesItemsMetricsItem.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.cdn.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 @@ /** * The RankingsResponseTablesPropertiesItemsMetricsItem model. */ -@Fluent +@Immutable public final class RankingsResponseTablesPropertiesItemsMetricsItem implements JsonSerializable { /* @@ -35,7 +35,7 @@ public final class RankingsResponseTablesPropertiesItemsMetricsItem /** * Creates an instance of RankingsResponseTablesPropertiesItemsMetricsItem class. */ - public RankingsResponseTablesPropertiesItemsMetricsItem() { + private RankingsResponseTablesPropertiesItemsMetricsItem() { } /** @@ -47,17 +47,6 @@ public String metric() { return this.metric; } - /** - * Set the metric property: The metric property. - * - * @param metric the metric value to set. - * @return the RankingsResponseTablesPropertiesItemsMetricsItem object itself. - */ - public RankingsResponseTablesPropertiesItemsMetricsItem withMetric(String metric) { - this.metric = metric; - return this; - } - /** * Get the value property: The value property. * @@ -67,17 +56,6 @@ public Long value() { return this.value; } - /** - * Set the value property: The value property. - * - * @param value the value value to set. - * @return the RankingsResponseTablesPropertiesItemsMetricsItem object itself. - */ - public RankingsResponseTablesPropertiesItemsMetricsItem withValue(Long value) { - this.value = value; - return this; - } - /** * Get the percentage property: The percentage property. * @@ -87,17 +65,6 @@ public Float percentage() { return this.percentage; } - /** - * Set the percentage property: The percentage property. - * - * @param percentage the percentage value to set. - * @return the RankingsResponseTablesPropertiesItemsMetricsItem object itself. - */ - public RankingsResponseTablesPropertiesItemsMetricsItem withPercentage(Float percentage) { - this.percentage = percentage; - return this; - } - /** * Validates the instance. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RateLimitRule.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RateLimitRule.java index bb579d7c7a4a..00bbe5036418 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RateLimitRule.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RateLimitRule.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -124,9 +125,24 @@ public RateLimitRule withAction(ActionType action) { */ @Override public void validate() { - super.validate(); + if (name() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property name in model RateLimitRule")); + } + if (matchConditions() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property matchConditions in model RateLimitRule")); + } else { + matchConditions().forEach(e -> e.validate()); + } + if (action() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property action in model RateLimitRule")); + } } + private static final ClientLogger LOGGER = new ClientLogger(RateLimitRule.class); + /** * {@inheritDoc} */ diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RateLimitRuleList.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RateLimitRuleList.java index cb68b0f80a74..b853ea480e94 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RateLimitRuleList.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RateLimitRuleList.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RedirectType.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RedirectType.java index 7eb803b05f3d..874ae6120dfa 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RedirectType.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RedirectType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RemoteAddressMatchConditionParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RemoteAddressMatchConditionParameters.java index 827da32607fe..9940f5e421ac 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RemoteAddressMatchConditionParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RemoteAddressMatchConditionParameters.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.cdn.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -17,12 +16,12 @@ * Defines the parameters for RemoteAddress match conditions. */ @Fluent -public final class RemoteAddressMatchConditionParameters - implements JsonSerializable { +public final class RemoteAddressMatchConditionParameters extends DeliveryRuleConditionParameters { /* * The typeName property. */ - private String typeName = "DeliveryRuleRemoteAddressConditionParameters"; + private DeliveryRuleConditionParametersType typeName + = DeliveryRuleConditionParametersType.DELIVERY_RULE_REMOTE_ADDRESS_CONDITION_PARAMETERS; /* * Describes operator to be matched @@ -56,21 +55,11 @@ public RemoteAddressMatchConditionParameters() { * * @return the typeName value. */ - public String typeName() { + @Override + public DeliveryRuleConditionParametersType typeName() { return this.typeName; } - /** - * Set the typeName property: The typeName property. - * - * @param typeName the typeName value to set. - * @return the RemoteAddressMatchConditionParameters object itself. - */ - public RemoteAddressMatchConditionParameters withTypeName(String typeName) { - this.typeName = typeName; - return this; - } - /** * Get the operator property: Describes operator to be matched. * @@ -160,6 +149,7 @@ public RemoteAddressMatchConditionParameters withTransforms(List tran * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { if (operator() == null) { throw LOGGER.atError() @@ -176,8 +166,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("typeName", this.typeName); jsonWriter.writeStringField("operator", this.operator == null ? null : this.operator.toString()); + jsonWriter.writeStringField("typeName", this.typeName == null ? null : this.typeName.toString()); jsonWriter.writeBooleanField("negateCondition", this.negateCondition); jsonWriter.writeArrayField("matchValues", this.matchValues, (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("transforms", this.transforms, @@ -205,6 +195,9 @@ public static RemoteAddressMatchConditionParameters fromJson(JsonReader jsonRead if ("operator".equals(fieldName)) { deserializedRemoteAddressMatchConditionParameters.operator = RemoteAddressOperator.fromString(reader.getString()); + } else if ("typeName".equals(fieldName)) { + deserializedRemoteAddressMatchConditionParameters.typeName + = DeliveryRuleConditionParametersType.fromString(reader.getString()); } else if ("negateCondition".equals(fieldName)) { deserializedRemoteAddressMatchConditionParameters.negateCondition = reader.getNullable(JsonReader::getBoolean); diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RemoteAddressOperator.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RemoteAddressOperator.java index d24c9567f796..a8688ccd3c77 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RemoteAddressOperator.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RemoteAddressOperator.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestBodyMatchConditionParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestBodyMatchConditionParameters.java index cf1aa9b39219..da251ac81fa4 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestBodyMatchConditionParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestBodyMatchConditionParameters.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.cdn.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -17,12 +16,12 @@ * Defines the parameters for RequestBody match conditions. */ @Fluent -public final class RequestBodyMatchConditionParameters - implements JsonSerializable { +public final class RequestBodyMatchConditionParameters extends DeliveryRuleConditionParameters { /* * The typeName property. */ - private String typeName = "DeliveryRuleRequestBodyConditionParameters"; + private DeliveryRuleConditionParametersType typeName + = DeliveryRuleConditionParametersType.DELIVERY_RULE_REQUEST_BODY_CONDITION_PARAMETERS; /* * Describes operator to be matched @@ -55,21 +54,11 @@ public RequestBodyMatchConditionParameters() { * * @return the typeName value. */ - public String typeName() { + @Override + public DeliveryRuleConditionParametersType typeName() { return this.typeName; } - /** - * Set the typeName property: The typeName property. - * - * @param typeName the typeName value to set. - * @return the RequestBodyMatchConditionParameters object itself. - */ - public RequestBodyMatchConditionParameters withTypeName(String typeName) { - this.typeName = typeName; - return this; - } - /** * Get the operator property: Describes operator to be matched. * @@ -155,6 +144,7 @@ public RequestBodyMatchConditionParameters withTransforms(List transf * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { if (operator() == null) { throw LOGGER.atError() @@ -171,8 +161,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("typeName", this.typeName); jsonWriter.writeStringField("operator", this.operator == null ? null : this.operator.toString()); + jsonWriter.writeStringField("typeName", this.typeName == null ? null : this.typeName.toString()); jsonWriter.writeBooleanField("negateCondition", this.negateCondition); jsonWriter.writeArrayField("matchValues", this.matchValues, (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("transforms", this.transforms, @@ -200,6 +190,9 @@ public static RequestBodyMatchConditionParameters fromJson(JsonReader jsonReader if ("operator".equals(fieldName)) { deserializedRequestBodyMatchConditionParameters.operator = RequestBodyOperator.fromString(reader.getString()); + } else if ("typeName".equals(fieldName)) { + deserializedRequestBodyMatchConditionParameters.typeName + = DeliveryRuleConditionParametersType.fromString(reader.getString()); } else if ("negateCondition".equals(fieldName)) { deserializedRequestBodyMatchConditionParameters.negateCondition = reader.getNullable(JsonReader::getBoolean); diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestBodyOperator.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestBodyOperator.java index 6b61f46d20a2..d248ea6324c4 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestBodyOperator.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestBodyOperator.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestHeaderMatchConditionParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestHeaderMatchConditionParameters.java index d6e03c1cd599..375577c67749 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestHeaderMatchConditionParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestHeaderMatchConditionParameters.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.cdn.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -17,12 +16,12 @@ * Defines the parameters for RequestHeader match conditions. */ @Fluent -public final class RequestHeaderMatchConditionParameters - implements JsonSerializable { +public final class RequestHeaderMatchConditionParameters extends DeliveryRuleConditionParameters { /* * The typeName property. */ - private String typeName = "DeliveryRuleRequestHeaderConditionParameters"; + private DeliveryRuleConditionParametersType typeName + = DeliveryRuleConditionParametersType.DELIVERY_RULE_REQUEST_HEADER_CONDITION_PARAMETERS; /* * Name of Header to be matched @@ -60,21 +59,11 @@ public RequestHeaderMatchConditionParameters() { * * @return the typeName value. */ - public String typeName() { + @Override + public DeliveryRuleConditionParametersType typeName() { return this.typeName; } - /** - * Set the typeName property: The typeName property. - * - * @param typeName the typeName value to set. - * @return the RequestHeaderMatchConditionParameters object itself. - */ - public RequestHeaderMatchConditionParameters withTypeName(String typeName) { - this.typeName = typeName; - return this; - } - /** * Get the selector property: Name of Header to be matched. * @@ -180,6 +169,7 @@ public RequestHeaderMatchConditionParameters withTransforms(List tran * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { if (operator() == null) { throw LOGGER.atError() @@ -196,8 +186,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("typeName", this.typeName); jsonWriter.writeStringField("operator", this.operator == null ? null : this.operator.toString()); + jsonWriter.writeStringField("typeName", this.typeName == null ? null : this.typeName.toString()); jsonWriter.writeStringField("selector", this.selector); jsonWriter.writeBooleanField("negateCondition", this.negateCondition); jsonWriter.writeArrayField("matchValues", this.matchValues, (writer, element) -> writer.writeString(element)); @@ -226,6 +216,9 @@ public static RequestHeaderMatchConditionParameters fromJson(JsonReader jsonRead if ("operator".equals(fieldName)) { deserializedRequestHeaderMatchConditionParameters.operator = RequestHeaderOperator.fromString(reader.getString()); + } else if ("typeName".equals(fieldName)) { + deserializedRequestHeaderMatchConditionParameters.typeName + = DeliveryRuleConditionParametersType.fromString(reader.getString()); } else if ("selector".equals(fieldName)) { deserializedRequestHeaderMatchConditionParameters.selector = reader.getString(); } else if ("negateCondition".equals(fieldName)) { diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestHeaderOperator.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestHeaderOperator.java index da6c3db5e742..187e383b0bdf 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestHeaderOperator.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestHeaderOperator.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestMethodMatchConditionParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestMethodMatchConditionParameters.java index b17a219ce07c..6b3b600b6ee3 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestMethodMatchConditionParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestMethodMatchConditionParameters.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.cdn.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -17,12 +16,12 @@ * Defines the parameters for RequestMethod match conditions. */ @Fluent -public final class RequestMethodMatchConditionParameters - implements JsonSerializable { +public final class RequestMethodMatchConditionParameters extends DeliveryRuleConditionParameters { /* * The typeName property. */ - private String typeName = "DeliveryRuleRequestMethodConditionParameters"; + private DeliveryRuleConditionParametersType typeName + = DeliveryRuleConditionParametersType.DELIVERY_RULE_REQUEST_METHOD_CONDITION_PARAMETERS; /* * Describes operator to be matched @@ -55,21 +54,11 @@ public RequestMethodMatchConditionParameters() { * * @return the typeName value. */ - public String typeName() { + @Override + public DeliveryRuleConditionParametersType typeName() { return this.typeName; } - /** - * Set the typeName property: The typeName property. - * - * @param typeName the typeName value to set. - * @return the RequestMethodMatchConditionParameters object itself. - */ - public RequestMethodMatchConditionParameters withTypeName(String typeName) { - this.typeName = typeName; - return this; - } - /** * Get the operator property: Describes operator to be matched. * @@ -156,6 +145,7 @@ public List matchValues() * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { if (operator() == null) { throw LOGGER.atError() @@ -172,8 +162,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("typeName", this.typeName); jsonWriter.writeStringField("operator", this.operator == null ? null : this.operator.toString()); + jsonWriter.writeStringField("typeName", this.typeName == null ? null : this.typeName.toString()); jsonWriter.writeBooleanField("negateCondition", this.negateCondition); jsonWriter.writeArrayField("transforms", this.transforms, (writer, element) -> writer.writeString(element == null ? null : element.toString())); @@ -202,6 +192,9 @@ public static RequestMethodMatchConditionParameters fromJson(JsonReader jsonRead if ("operator".equals(fieldName)) { deserializedRequestMethodMatchConditionParameters.operator = RequestMethodOperator.fromString(reader.getString()); + } else if ("typeName".equals(fieldName)) { + deserializedRequestMethodMatchConditionParameters.typeName + = DeliveryRuleConditionParametersType.fromString(reader.getString()); } else if ("negateCondition".equals(fieldName)) { deserializedRequestMethodMatchConditionParameters.negateCondition = reader.getNullable(JsonReader::getBoolean); diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestMethodMatchConditionParametersMatchValuesItem.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestMethodMatchConditionParametersMatchValuesItem.java index 40646287d89a..6e7c7b95b16f 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestMethodMatchConditionParametersMatchValuesItem.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestMethodMatchConditionParametersMatchValuesItem.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestMethodOperator.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestMethodOperator.java index 440296ad44a6..233e394e92fe 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestMethodOperator.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestMethodOperator.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestSchemeMatchConditionParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestSchemeMatchConditionParameters.java index b775c69995da..be34a9f32a74 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestSchemeMatchConditionParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestSchemeMatchConditionParameters.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.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; @@ -16,17 +15,17 @@ * Defines the parameters for RequestScheme match conditions. */ @Fluent -public final class RequestSchemeMatchConditionParameters - implements JsonSerializable { +public final class RequestSchemeMatchConditionParameters extends DeliveryRuleConditionParameters { /* * The typeName property. */ - private String typeName = "DeliveryRuleRequestSchemeConditionParameters"; + private DeliveryRuleConditionParametersType typeName + = DeliveryRuleConditionParametersType.DELIVERY_RULE_REQUEST_SCHEME_CONDITION_PARAMETERS; /* * Describes operator to be matched */ - private String operator = "Equal"; + private final String operator = "Equal"; /* * Describes if this is negate condition or not @@ -54,21 +53,11 @@ public RequestSchemeMatchConditionParameters() { * * @return the typeName value. */ - public String typeName() { + @Override + public DeliveryRuleConditionParametersType typeName() { return this.typeName; } - /** - * Set the typeName property: The typeName property. - * - * @param typeName the typeName value to set. - * @return the RequestSchemeMatchConditionParameters object itself. - */ - public RequestSchemeMatchConditionParameters withTypeName(String typeName) { - this.typeName = typeName; - return this; - } - /** * Get the operator property: Describes operator to be matched. * @@ -78,17 +67,6 @@ public String operator() { return this.operator; } - /** - * Set the operator property: Describes operator to be matched. - * - * @param operator the operator value to set. - * @return the RequestSchemeMatchConditionParameters object itself. - */ - public RequestSchemeMatchConditionParameters withOperator(String operator) { - this.operator = operator; - return this; - } - /** * Get the negateCondition property: Describes if this is negate condition or not. * @@ -155,6 +133,7 @@ public List matchValues() * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { } @@ -164,8 +143,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("typeName", this.typeName); jsonWriter.writeStringField("operator", this.operator); + jsonWriter.writeStringField("typeName", this.typeName == null ? null : this.typeName.toString()); jsonWriter.writeBooleanField("negateCondition", this.negateCondition); jsonWriter.writeArrayField("transforms", this.transforms, (writer, element) -> writer.writeString(element == null ? null : element.toString())); @@ -191,7 +170,10 @@ public static RequestSchemeMatchConditionParameters fromJson(JsonReader jsonRead String fieldName = reader.getFieldName(); reader.nextToken(); - if ("negateCondition".equals(fieldName)) { + if ("typeName".equals(fieldName)) { + deserializedRequestSchemeMatchConditionParameters.typeName + = DeliveryRuleConditionParametersType.fromString(reader.getString()); + } else if ("negateCondition".equals(fieldName)) { deserializedRequestSchemeMatchConditionParameters.negateCondition = reader.getNullable(JsonReader::getBoolean); } else if ("transforms".equals(fieldName)) { diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestSchemeMatchConditionParametersMatchValuesItem.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestSchemeMatchConditionParametersMatchValuesItem.java index d4f5bd411e8e..d9d6b1e93276 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestSchemeMatchConditionParametersMatchValuesItem.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestSchemeMatchConditionParametersMatchValuesItem.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestUriMatchConditionParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestUriMatchConditionParameters.java index 7db658c2b820..3b292e6f98cd 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestUriMatchConditionParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestUriMatchConditionParameters.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.cdn.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -17,11 +16,12 @@ * Defines the parameters for RequestUri match conditions. */ @Fluent -public final class RequestUriMatchConditionParameters implements JsonSerializable { +public final class RequestUriMatchConditionParameters extends DeliveryRuleConditionParameters { /* * The typeName property. */ - private String typeName = "DeliveryRuleRequestUriConditionParameters"; + private DeliveryRuleConditionParametersType typeName + = DeliveryRuleConditionParametersType.DELIVERY_RULE_REQUEST_URI_CONDITION_PARAMETERS; /* * Describes operator to be matched @@ -54,21 +54,11 @@ public RequestUriMatchConditionParameters() { * * @return the typeName value. */ - public String typeName() { + @Override + public DeliveryRuleConditionParametersType typeName() { return this.typeName; } - /** - * Set the typeName property: The typeName property. - * - * @param typeName the typeName value to set. - * @return the RequestUriMatchConditionParameters object itself. - */ - public RequestUriMatchConditionParameters withTypeName(String typeName) { - this.typeName = typeName; - return this; - } - /** * Get the operator property: Describes operator to be matched. * @@ -154,6 +144,7 @@ public RequestUriMatchConditionParameters withTransforms(List transfo * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { if (operator() == null) { throw LOGGER.atError() @@ -170,8 +161,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("typeName", this.typeName); jsonWriter.writeStringField("operator", this.operator == null ? null : this.operator.toString()); + jsonWriter.writeStringField("typeName", this.typeName == null ? null : this.typeName.toString()); jsonWriter.writeBooleanField("negateCondition", this.negateCondition); jsonWriter.writeArrayField("matchValues", this.matchValues, (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("transforms", this.transforms, @@ -199,6 +190,9 @@ public static RequestUriMatchConditionParameters fromJson(JsonReader jsonReader) if ("operator".equals(fieldName)) { deserializedRequestUriMatchConditionParameters.operator = RequestUriOperator.fromString(reader.getString()); + } else if ("typeName".equals(fieldName)) { + deserializedRequestUriMatchConditionParameters.typeName + = DeliveryRuleConditionParametersType.fromString(reader.getString()); } else if ("negateCondition".equals(fieldName)) { deserializedRequestUriMatchConditionParameters.negateCondition = reader.getNullable(JsonReader::getBoolean); diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestUriOperator.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestUriOperator.java index 8f557083a4b7..838ac0d649eb 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestUriOperator.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RequestUriOperator.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ResourceReference.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ResourceReference.java index 75b27e307b15..e6ae295e5061 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ResourceReference.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ResourceReference.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ResourceType.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ResourceType.java index 7203efbb34f9..d4b5d1cb519a 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ResourceType.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/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.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ResourceUsageUnit.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ResourceUsageUnit.java index 9c3c67bccf32..4dc886a61826 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ResourceUsageUnit.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ResourceUsageUnit.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ResourcesResponseCustomDomainsItem.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ResourcesResponseCustomDomainsItem.java index c53029011744..f5fd51efb42b 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ResourcesResponseCustomDomainsItem.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ResourcesResponseCustomDomainsItem.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.cdn.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 @@ /** * The ResourcesResponseCustomDomainsItem model. */ -@Fluent +@Immutable public final class ResourcesResponseCustomDomainsItem implements JsonSerializable { /* * The id property. @@ -39,7 +39,7 @@ public final class ResourcesResponseCustomDomainsItem implements JsonSerializabl /** * Creates an instance of ResourcesResponseCustomDomainsItem class. */ - public ResourcesResponseCustomDomainsItem() { + private ResourcesResponseCustomDomainsItem() { } /** @@ -51,17 +51,6 @@ public String id() { return this.id; } - /** - * Set the id property: The id property. - * - * @param id the id value to set. - * @return the ResourcesResponseCustomDomainsItem object itself. - */ - public ResourcesResponseCustomDomainsItem withId(String id) { - this.id = id; - return this; - } - /** * Get the name property: The name property. * @@ -71,17 +60,6 @@ public String name() { return this.name; } - /** - * Set the name property: The name property. - * - * @param name the name value to set. - * @return the ResourcesResponseCustomDomainsItem object itself. - */ - public ResourcesResponseCustomDomainsItem withName(String name) { - this.name = name; - return this; - } - /** * Get the endpointId property: The endpointId property. * @@ -91,17 +69,6 @@ public String endpointId() { return this.endpointId; } - /** - * Set the endpointId property: The endpointId property. - * - * @param endpointId the endpointId value to set. - * @return the ResourcesResponseCustomDomainsItem object itself. - */ - public ResourcesResponseCustomDomainsItem withEndpointId(String endpointId) { - this.endpointId = endpointId; - return this; - } - /** * Get the history property: The history property. * @@ -111,17 +78,6 @@ public Boolean history() { return this.history; } - /** - * Set the history property: The history property. - * - * @param history the history value to set. - * @return the ResourcesResponseCustomDomainsItem object itself. - */ - public ResourcesResponseCustomDomainsItem withHistory(Boolean history) { - this.history = history; - return this; - } - /** * Validates the instance. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ResourcesResponseEndpointsItem.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ResourcesResponseEndpointsItem.java index 8e731f8a1ed4..efae11539dfd 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ResourcesResponseEndpointsItem.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ResourcesResponseEndpointsItem.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.cdn.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 @@ /** * The ResourcesResponseEndpointsItem model. */ -@Fluent +@Immutable public final class ResourcesResponseEndpointsItem implements JsonSerializable { /* * The id property. @@ -40,7 +40,7 @@ public final class ResourcesResponseEndpointsItem implements JsonSerializable customDomains() { return this.customDomains; } - /** - * Set the customDomains property: The customDomains property. - * - * @param customDomains the customDomains value to set. - * @return the ResourcesResponseEndpointsItem object itself. - */ - public ResourcesResponseEndpointsItem - withCustomDomains(List customDomains) { - this.customDomains = customDomains; - return this; - } - /** * Validates the instance. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ResourcesResponseEndpointsPropertiesItemsItem.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ResourcesResponseEndpointsPropertiesItemsItem.java index f2284dcfd605..0ff7541aff74 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ResourcesResponseEndpointsPropertiesItemsItem.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ResourcesResponseEndpointsPropertiesItemsItem.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.cdn.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 @@ /** * The ResourcesResponseEndpointsPropertiesItemsItem model. */ -@Fluent +@Immutable public final class ResourcesResponseEndpointsPropertiesItemsItem implements JsonSerializable { /* @@ -40,7 +40,7 @@ public final class ResourcesResponseEndpointsPropertiesItemsItem /** * Creates an instance of ResourcesResponseEndpointsPropertiesItemsItem class. */ - public ResourcesResponseEndpointsPropertiesItemsItem() { + private ResourcesResponseEndpointsPropertiesItemsItem() { } /** @@ -52,17 +52,6 @@ public String id() { return this.id; } - /** - * Set the id property: The id property. - * - * @param id the id value to set. - * @return the ResourcesResponseEndpointsPropertiesItemsItem object itself. - */ - public ResourcesResponseEndpointsPropertiesItemsItem withId(String id) { - this.id = id; - return this; - } - /** * Get the name property: The name property. * @@ -72,17 +61,6 @@ public String name() { return this.name; } - /** - * Set the name property: The name property. - * - * @param name the name value to set. - * @return the ResourcesResponseEndpointsPropertiesItemsItem object itself. - */ - public ResourcesResponseEndpointsPropertiesItemsItem withName(String name) { - this.name = name; - return this; - } - /** * Get the endpointId property: The endpointId property. * @@ -92,17 +70,6 @@ public String endpointId() { return this.endpointId; } - /** - * Set the endpointId property: The endpointId property. - * - * @param endpointId the endpointId value to set. - * @return the ResourcesResponseEndpointsPropertiesItemsItem object itself. - */ - public ResourcesResponseEndpointsPropertiesItemsItem withEndpointId(String endpointId) { - this.endpointId = endpointId; - return this; - } - /** * Get the history property: The history property. * @@ -112,17 +79,6 @@ public Boolean history() { return this.history; } - /** - * Set the history property: The history property. - * - * @param history the history value to set. - * @return the ResourcesResponseEndpointsPropertiesItemsItem object itself. - */ - public ResourcesResponseEndpointsPropertiesItemsItem withHistory(Boolean history) { - this.history = history; - return this; - } - /** * Validates the instance. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ResponseBasedDetectedErrorTypes.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ResponseBasedDetectedErrorTypes.java index 075cf7503d13..e47d269109b5 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ResponseBasedDetectedErrorTypes.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ResponseBasedDetectedErrorTypes.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ResponseBasedOriginErrorDetectionParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ResponseBasedOriginErrorDetectionParameters.java index 55e029a85ac1..94eba996bee7 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ResponseBasedOriginErrorDetectionParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ResponseBasedOriginErrorDetectionParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RouteConfigurationOverrideActionParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RouteConfigurationOverrideActionParameters.java index fc7017e859e5..e3522ea1bd5b 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RouteConfigurationOverrideActionParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RouteConfigurationOverrideActionParameters.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.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; @@ -15,12 +14,12 @@ * Defines the parameters for the route configuration override action. */ @Fluent -public final class RouteConfigurationOverrideActionParameters - implements JsonSerializable { +public final class RouteConfigurationOverrideActionParameters extends DeliveryRuleActionParameters { /* * The typeName property. */ - private String typeName = "DeliveryRuleRouteConfigurationOverrideActionParameters"; + private DeliveryRuleActionParametersType typeName + = DeliveryRuleActionParametersType.DELIVERY_RULE_ROUTE_CONFIGURATION_OVERRIDE_ACTION_PARAMETERS; /* * A reference to the origin group override configuration. Leave empty to use the default origin group on route. @@ -44,21 +43,11 @@ public RouteConfigurationOverrideActionParameters() { * * @return the typeName value. */ - public String typeName() { + @Override + public DeliveryRuleActionParametersType typeName() { return this.typeName; } - /** - * Set the typeName property: The typeName property. - * - * @param typeName the typeName value to set. - * @return the RouteConfigurationOverrideActionParameters object itself. - */ - public RouteConfigurationOverrideActionParameters withTypeName(String typeName) { - this.typeName = typeName; - return this; - } - /** * Get the originGroupOverride property: A reference to the origin group override configuration. Leave empty to use * the default origin group on route. @@ -108,6 +97,7 @@ public RouteConfigurationOverrideActionParameters withCacheConfiguration(CacheCo * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { if (originGroupOverride() != null) { originGroupOverride().validate(); @@ -123,7 +113,7 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("typeName", this.typeName); + jsonWriter.writeStringField("typeName", this.typeName == null ? null : this.typeName.toString()); jsonWriter.writeJsonField("originGroupOverride", this.originGroupOverride); jsonWriter.writeJsonField("cacheConfiguration", this.cacheConfiguration); return jsonWriter.writeEndObject(); @@ -135,7 +125,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of RouteConfigurationOverrideActionParameters 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 RouteConfigurationOverrideActionParameters. */ public static RouteConfigurationOverrideActionParameters fromJson(JsonReader jsonReader) throws IOException { @@ -146,7 +135,10 @@ public static RouteConfigurationOverrideActionParameters fromJson(JsonReader jso String fieldName = reader.getFieldName(); reader.nextToken(); - if ("originGroupOverride".equals(fieldName)) { + if ("typeName".equals(fieldName)) { + deserializedRouteConfigurationOverrideActionParameters.typeName + = DeliveryRuleActionParametersType.fromString(reader.getString()); + } else if ("originGroupOverride".equals(fieldName)) { deserializedRouteConfigurationOverrideActionParameters.originGroupOverride = OriginGroupOverride.fromJson(reader); } else if ("cacheConfiguration".equals(fieldName)) { diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RouteUpdateParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RouteUpdateParameters.java index 3510c8aeafa6..1d4db69ba250 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RouteUpdateParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RouteUpdateParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -306,6 +306,31 @@ public RouteUpdateParameters withEnabledState(EnabledState enabledState) { return this; } + /** + * Get the grpcState property: Whether or not gRPC is enabled on this route. Permitted values are 'Enabled' or + * 'Disabled'. + * + * @return the grpcState value. + */ + public AfdRouteGrpcState grpcState() { + return this.innerProperties() == null ? null : this.innerProperties().grpcState(); + } + + /** + * Set the grpcState property: Whether or not gRPC is enabled on this route. Permitted values are 'Enabled' or + * 'Disabled'. + * + * @param grpcState the grpcState value to set. + * @return the RouteUpdateParameters object itself. + */ + public RouteUpdateParameters withGrpcState(AfdRouteGrpcState grpcState) { + if (this.innerProperties() == null) { + this.innerProperties = new RouteUpdatePropertiesParameters(); + } + this.innerProperties().withGrpcState(grpcState); + return this; + } + /** * Validates the instance. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RoutingRuleLink.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RoutingRuleLink.java new file mode 100644 index 000000000000..389476ea7292 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RoutingRuleLink.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.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; + +/** + * Defines the Resource ID for a Routing Rule. + */ +@Immutable +public final class RoutingRuleLink implements JsonSerializable { + /* + * Resource ID. + */ + private String id; + + /** + * Creates an instance of RoutingRuleLink class. + */ + private RoutingRuleLink() { + } + + /** + * Get the id property: Resource ID. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RoutingRuleLink from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RoutingRuleLink 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 RoutingRuleLink. + */ + public static RoutingRuleLink fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RoutingRuleLink deserializedRoutingRuleLink = new RoutingRuleLink(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedRoutingRuleLink.id = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRoutingRuleLink; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RuleCacheBehavior.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RuleCacheBehavior.java index e8682b24d715..c46abf0e7def 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RuleCacheBehavior.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RuleCacheBehavior.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RuleIsCompressionEnabled.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RuleIsCompressionEnabled.java index db89c70f2b60..6d7d0874979c 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RuleIsCompressionEnabled.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RuleIsCompressionEnabled.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RuleQueryStringCachingBehavior.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RuleQueryStringCachingBehavior.java index 4e28b4e76a88..120b06c1209e 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RuleQueryStringCachingBehavior.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RuleQueryStringCachingBehavior.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RuleSetsCreateHeaders.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RuleSetsCreateHeaders.java new file mode 100644 index 000000000000..508abdeebd4d --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RuleSetsCreateHeaders.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; + +/** + * The RuleSetsCreateHeaders model. + */ +@Immutable +public final class RuleSetsCreateHeaders { + /* + * The Retry-After property. + */ + private final Integer retryAfter; + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of RuleSetsCreateHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public RuleSetsCreateHeaders(HttpHeaders rawHeaders) { + String retryAfter = rawHeaders.getValue(HttpHeaderName.RETRY_AFTER); + if (retryAfter != null) { + this.retryAfter = Integer.parseInt(retryAfter); + } else { + this.retryAfter = null; + } + } + + /** + * Get the retryAfter property: The Retry-After property. + * + * @return the retryAfter value. + */ + public Integer retryAfter() { + return this.retryAfter; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RuleSetsCreateResponse.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RuleSetsCreateResponse.java new file mode 100644 index 000000000000..34f8ba0962e2 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RuleSetsCreateResponse.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.cdn.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; +import com.azure.resourcemanager.cdn.fluent.models.RuleSetInner; + +/** + * Contains all response data for the create operation. + */ +public final class RuleSetsCreateResponse extends ResponseBase { + /** + * Creates an instance of RuleSetsCreateResponse. + * + * @param request the request which resulted in this RuleSetsCreateResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public RuleSetsCreateResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, RuleSetInner value, + RuleSetsCreateHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** + * Gets the deserialized response body. + * + * @return the deserialized response body. + */ + @Override + public RuleSetInner getValue() { + return super.getValue(); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RuleType.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RuleType.java new file mode 100644 index 000000000000..30bed8c2d0f6 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RuleType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Describes type of rule. + */ +public final class RuleType extends ExpandableStringEnum { + /** + * Static value MatchRule for RuleType. + */ + public static final RuleType MATCH_RULE = fromString("MatchRule"); + + /** + * Static value RateLimitRule for RuleType. + */ + public static final RuleType RATE_LIMIT_RULE = fromString("RateLimitRule"); + + /** + * Creates a new instance of RuleType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RuleType() { + } + + /** + * Creates or finds a RuleType from its string representation. + * + * @param name a name to look for. + * @return the corresponding RuleType. + */ + public static RuleType fromString(String name) { + return fromString(name, RuleType.class); + } + + /** + * Gets known RuleType values. + * + * @return known RuleType values. + */ + public static Collection values() { + return values(RuleType.class); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RuleUpdateParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RuleUpdateParameters.java index cb312833d738..d0191e9c47dd 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RuleUpdateParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RuleUpdateParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ScrubbingRuleEntryMatchOperator.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ScrubbingRuleEntryMatchOperator.java index 5748540781ea..0d65eac5365a 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ScrubbingRuleEntryMatchOperator.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/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.cdn.models; @@ -17,6 +17,11 @@ public final class ScrubbingRuleEntryMatchOperator extends ExpandableStringEnum< */ public static final ScrubbingRuleEntryMatchOperator EQUALS_ANY = fromString("EqualsAny"); + /** + * Static value Equals for ScrubbingRuleEntryMatchOperator. + */ + public static final ScrubbingRuleEntryMatchOperator EQUALS = fromString("Equals"); + /** * Creates a new instance of ScrubbingRuleEntryMatchOperator value. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ScrubbingRuleEntryMatchVariable.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ScrubbingRuleEntryMatchVariable.java index 01d16b6b4af6..100ab34430db 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ScrubbingRuleEntryMatchVariable.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/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.cdn.models; @@ -26,6 +26,28 @@ public final class ScrubbingRuleEntryMatchVariable extends ExpandableStringEnum< */ public static final ScrubbingRuleEntryMatchVariable QUERY_STRING_ARG_NAMES = fromString("QueryStringArgNames"); + /** + * Static value RequestHeaderNames for ScrubbingRuleEntryMatchVariable. + */ + public static final ScrubbingRuleEntryMatchVariable REQUEST_HEADER_NAMES = fromString("RequestHeaderNames"); + + /** + * Static value RequestCookieNames for ScrubbingRuleEntryMatchVariable. + */ + public static final ScrubbingRuleEntryMatchVariable REQUEST_COOKIE_NAMES = fromString("RequestCookieNames"); + + /** + * Static value RequestBodyPostArgNames for ScrubbingRuleEntryMatchVariable. + */ + public static final ScrubbingRuleEntryMatchVariable REQUEST_BODY_POST_ARG_NAMES + = fromString("RequestBodyPostArgNames"); + + /** + * Static value RequestBodyJsonArgNames for ScrubbingRuleEntryMatchVariable. + */ + public static final ScrubbingRuleEntryMatchVariable REQUEST_BODY_JSON_ARG_NAMES + = fromString("RequestBodyJsonArgNames"); + /** * Creates a new instance of ScrubbingRuleEntryMatchVariable value. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ScrubbingRuleEntryState.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ScrubbingRuleEntryState.java index 4896e7ff1d2c..786b6249212b 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ScrubbingRuleEntryState.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/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.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SecretParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SecretParameters.java index 9faf048864f8..33644433bce4 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SecretParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SecretParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -86,6 +86,8 @@ public static SecretParameters fromJson(JsonReader jsonReader) throws IOExceptio return CustomerCertificateParameters.fromJson(readerToUse.reset()); } else if ("AzureFirstPartyManagedCertificate".equals(discriminatorValue)) { return AzureFirstPartyManagedCertificateParameters.fromJson(readerToUse.reset()); + } else if ("MtlsCertificateChain".equals(discriminatorValue)) { + return AfdSecretMtlsCertificateChain.fromJson(readerToUse.reset()); } else { return fromJsonKnownDiscriminator(readerToUse.reset()); } diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SecretType.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SecretType.java index 48c5cd36b3b4..d802d59cb11c 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SecretType.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SecretType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -32,6 +32,11 @@ public final class SecretType extends ExpandableStringEnum { public static final SecretType AZURE_FIRST_PARTY_MANAGED_CERTIFICATE = fromString("AzureFirstPartyManagedCertificate"); + /** + * Static value MtlsCertificateChain for SecretType. + */ + public static final SecretType MTLS_CERTIFICATE_CHAIN = fromString("MtlsCertificateChain"); + /** * Creates a new instance of SecretType value. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SecurityPolicyLink.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SecurityPolicyLink.java new file mode 100644 index 000000000000..eb9b2b0e984b --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SecurityPolicyLink.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.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; + +/** + * Defines the Resource ID for a Security Policy. + */ +@Immutable +public final class SecurityPolicyLink implements JsonSerializable { + /* + * Resource ID. + */ + private String id; + + /** + * Creates an instance of SecurityPolicyLink class. + */ + private SecurityPolicyLink() { + } + + /** + * Get the id property: Resource ID. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SecurityPolicyLink from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SecurityPolicyLink 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 SecurityPolicyLink. + */ + public static SecurityPolicyLink fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SecurityPolicyLink deserializedSecurityPolicyLink = new SecurityPolicyLink(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSecurityPolicyLink.id = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSecurityPolicyLink; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SecurityPolicyPropertiesParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SecurityPolicyPropertiesParameters.java index 7e6abe0246ed..22a38b49af0f 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SecurityPolicyPropertiesParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SecurityPolicyPropertiesParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -78,7 +78,10 @@ public static SecurityPolicyPropertiesParameters fromJson(JsonReader jsonReader) } } // Use the discriminator value to determine which subtype should be deserialized. - if ("WebApplicationFirewall".equals(discriminatorValue)) { + if ("WebApplicationFirewallEmbedded".equals(discriminatorValue)) { + return SecurityPolicyWebApplicationFirewallParametersWithEmbeddedWafPolicy + .fromJson(readerToUse.reset()); + } else if ("WebApplicationFirewall".equals(discriminatorValue)) { return SecurityPolicyWebApplicationFirewallParameters.fromJson(readerToUse.reset()); } else { return fromJsonKnownDiscriminator(readerToUse.reset()); diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SecurityPolicyPropertiesWithEmbeddedWafPolicy.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SecurityPolicyPropertiesWithEmbeddedWafPolicy.java new file mode 100644 index 000000000000..1dab67ef6435 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SecurityPolicyPropertiesWithEmbeddedWafPolicy.java @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Contains properties required to create a security policy. + */ +@Immutable +public final class SecurityPolicyPropertiesWithEmbeddedWafPolicy extends AfdStateProperties { + /* + * The name of the profile which holds the security policy. + */ + private String profileName; + + /* + * object which contains security policy parameters + */ + private SecurityPolicyWebApplicationFirewallParametersWithEmbeddedWafPolicy parameters; + + /* + * The deploymentStatus property. + */ + private DeploymentStatus deploymentStatus; + + /* + * Provisioning status + */ + private AfdProvisioningState provisioningState; + + /** + * Creates an instance of SecurityPolicyPropertiesWithEmbeddedWafPolicy class. + */ + private SecurityPolicyPropertiesWithEmbeddedWafPolicy() { + } + + /** + * Get the profileName property: The name of the profile which holds the security policy. + * + * @return the profileName value. + */ + public String profileName() { + return this.profileName; + } + + /** + * Get the parameters property: object which contains security policy parameters. + * + * @return the parameters value. + */ + public SecurityPolicyWebApplicationFirewallParametersWithEmbeddedWafPolicy parameters() { + return this.parameters; + } + + /** + * Get the deploymentStatus property: The deploymentStatus property. + * + * @return the deploymentStatus value. + */ + @Override + public DeploymentStatus deploymentStatus() { + return this.deploymentStatus; + } + + /** + * Get the provisioningState property: Provisioning status. + * + * @return the provisioningState value. + */ + @Override + public AfdProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (parameters() != null) { + parameters().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("parameters", this.parameters); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SecurityPolicyPropertiesWithEmbeddedWafPolicy from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SecurityPolicyPropertiesWithEmbeddedWafPolicy 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 SecurityPolicyPropertiesWithEmbeddedWafPolicy. + */ + public static SecurityPolicyPropertiesWithEmbeddedWafPolicy fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SecurityPolicyPropertiesWithEmbeddedWafPolicy deserializedSecurityPolicyPropertiesWithEmbeddedWafPolicy + = new SecurityPolicyPropertiesWithEmbeddedWafPolicy(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedSecurityPolicyPropertiesWithEmbeddedWafPolicy.provisioningState + = AfdProvisioningState.fromString(reader.getString()); + } else if ("deploymentStatus".equals(fieldName)) { + deserializedSecurityPolicyPropertiesWithEmbeddedWafPolicy.deploymentStatus + = DeploymentStatus.fromString(reader.getString()); + } else if ("profileName".equals(fieldName)) { + deserializedSecurityPolicyPropertiesWithEmbeddedWafPolicy.profileName = reader.getString(); + } else if ("parameters".equals(fieldName)) { + deserializedSecurityPolicyPropertiesWithEmbeddedWafPolicy.parameters + = SecurityPolicyWebApplicationFirewallParametersWithEmbeddedWafPolicy.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSecurityPolicyPropertiesWithEmbeddedWafPolicy; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SecurityPolicyType.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SecurityPolicyType.java index 72a2f89732a7..cb06ebe6a72d 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SecurityPolicyType.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SecurityPolicyType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -16,6 +16,12 @@ public final class SecurityPolicyType extends ExpandableStringEnum associations() { */ @Override public void validate() { - super.validate(); if (wafPolicy() != null) { wafPolicy().validate(); } diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SecurityPolicyWebApplicationFirewallParametersWithEmbeddedWafPolicy.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SecurityPolicyWebApplicationFirewallParametersWithEmbeddedWafPolicy.java new file mode 100644 index 000000000000..a13a88c666ab --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SecurityPolicyWebApplicationFirewallParametersWithEmbeddedWafPolicy.java @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Contains security policy waf parameters. + */ +@Fluent +public final class SecurityPolicyWebApplicationFirewallParametersWithEmbeddedWafPolicy + extends SecurityPolicyPropertiesParameters { + /* + * The type of the Security policy to create. + */ + private SecurityPolicyType type = SecurityPolicyType.WEB_APPLICATION_FIREWALL_EMBEDDED; + + /* + * Properties of the web application firewall policy. + */ + private WebApplicationFirewallPolicy wafPolicy; + + /* + * Waf associations + */ + private List associations; + + /** + * Creates an instance of SecurityPolicyWebApplicationFirewallParametersWithEmbeddedWafPolicy class. + */ + public SecurityPolicyWebApplicationFirewallParametersWithEmbeddedWafPolicy() { + } + + /** + * Get the type property: The type of the Security policy to create. + * + * @return the type value. + */ + @Override + public SecurityPolicyType type() { + return this.type; + } + + /** + * Get the wafPolicy property: Properties of the web application firewall policy. + * + * @return the wafPolicy value. + */ + public WebApplicationFirewallPolicy wafPolicy() { + return this.wafPolicy; + } + + /** + * Set the wafPolicy property: Properties of the web application firewall policy. + * + * @param wafPolicy the wafPolicy value to set. + * @return the SecurityPolicyWebApplicationFirewallParametersWithEmbeddedWafPolicy object itself. + */ + public SecurityPolicyWebApplicationFirewallParametersWithEmbeddedWafPolicy + withWafPolicy(WebApplicationFirewallPolicy wafPolicy) { + this.wafPolicy = wafPolicy; + return this; + } + + /** + * Get the associations property: Waf associations. + * + * @return the associations value. + */ + public List associations() { + return this.associations; + } + + /** + * Set the associations property: Waf associations. + * + * @param associations the associations value to set. + * @return the SecurityPolicyWebApplicationFirewallParametersWithEmbeddedWafPolicy object itself. + */ + public SecurityPolicyWebApplicationFirewallParametersWithEmbeddedWafPolicy + withAssociations(List associations) { + this.associations = associations; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (wafPolicy() != null) { + wafPolicy().validate(); + } + if (associations() != null) { + associations().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeJsonField("wafPolicy", this.wafPolicy); + jsonWriter.writeArrayField("associations", this.associations, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SecurityPolicyWebApplicationFirewallParametersWithEmbeddedWafPolicy from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SecurityPolicyWebApplicationFirewallParametersWithEmbeddedWafPolicy 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 + * SecurityPolicyWebApplicationFirewallParametersWithEmbeddedWafPolicy. + */ + public static SecurityPolicyWebApplicationFirewallParametersWithEmbeddedWafPolicy fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + SecurityPolicyWebApplicationFirewallParametersWithEmbeddedWafPolicy deserializedSecurityPolicyWebApplicationFirewallParametersWithEmbeddedWafPolicy + = new SecurityPolicyWebApplicationFirewallParametersWithEmbeddedWafPolicy(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedSecurityPolicyWebApplicationFirewallParametersWithEmbeddedWafPolicy.type + = SecurityPolicyType.fromString(reader.getString()); + } else if ("wafPolicy".equals(fieldName)) { + deserializedSecurityPolicyWebApplicationFirewallParametersWithEmbeddedWafPolicy.wafPolicy + = WebApplicationFirewallPolicy.fromJson(reader); + } else if ("associations".equals(fieldName)) { + List associations = reader + .readArray(reader1 -> SecurityPolicyWebApplicationFirewallAssociation.fromJson(reader1)); + deserializedSecurityPolicyWebApplicationFirewallParametersWithEmbeddedWafPolicy.associations + = associations; + } else { + reader.skipChildren(); + } + } + + return deserializedSecurityPolicyWebApplicationFirewallParametersWithEmbeddedWafPolicy; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ServerPortMatchConditionParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ServerPortMatchConditionParameters.java index e7d3bd10e24a..01c94a681ba4 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ServerPortMatchConditionParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ServerPortMatchConditionParameters.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.cdn.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -17,11 +16,12 @@ * Defines the parameters for ServerPort match conditions. */ @Fluent -public final class ServerPortMatchConditionParameters implements JsonSerializable { +public final class ServerPortMatchConditionParameters extends DeliveryRuleConditionParameters { /* * The typeName property. */ - private String typeName = "DeliveryRuleServerPortConditionParameters"; + private DeliveryRuleConditionParametersType typeName + = DeliveryRuleConditionParametersType.DELIVERY_RULE_SERVER_PORT_CONDITION_PARAMETERS; /* * Describes operator to be matched @@ -54,21 +54,11 @@ public ServerPortMatchConditionParameters() { * * @return the typeName value. */ - public String typeName() { + @Override + public DeliveryRuleConditionParametersType typeName() { return this.typeName; } - /** - * Set the typeName property: The typeName property. - * - * @param typeName the typeName value to set. - * @return the ServerPortMatchConditionParameters object itself. - */ - public ServerPortMatchConditionParameters withTypeName(String typeName) { - this.typeName = typeName; - return this; - } - /** * Get the operator property: Describes operator to be matched. * @@ -154,6 +144,7 @@ public ServerPortMatchConditionParameters withTransforms(List transfo * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { if (operator() == null) { throw LOGGER.atError() @@ -170,8 +161,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("typeName", this.typeName); jsonWriter.writeStringField("operator", this.operator == null ? null : this.operator.toString()); + jsonWriter.writeStringField("typeName", this.typeName == null ? null : this.typeName.toString()); jsonWriter.writeBooleanField("negateCondition", this.negateCondition); jsonWriter.writeArrayField("matchValues", this.matchValues, (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("transforms", this.transforms, @@ -199,6 +190,9 @@ public static ServerPortMatchConditionParameters fromJson(JsonReader jsonReader) if ("operator".equals(fieldName)) { deserializedServerPortMatchConditionParameters.operator = ServerPortOperator.fromString(reader.getString()); + } else if ("typeName".equals(fieldName)) { + deserializedServerPortMatchConditionParameters.typeName + = DeliveryRuleConditionParametersType.fromString(reader.getString()); } else if ("negateCondition".equals(fieldName)) { deserializedServerPortMatchConditionParameters.negateCondition = reader.getNullable(JsonReader::getBoolean); diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ServerPortOperator.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ServerPortOperator.java index 6b92924edf3b..981f9dcb6b2d 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ServerPortOperator.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ServerPortOperator.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ServiceSpecification.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ServiceSpecification.java index e17fad8c752a..f8795bd0bbde 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ServiceSpecification.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ServiceSpecification.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.cdn.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 @@ /** * One property of operation, include log specifications. */ -@Fluent +@Immutable public final class ServiceSpecification implements JsonSerializable { /* * Log specifications of operation. @@ -30,7 +30,7 @@ public final class ServiceSpecification implements JsonSerializable logSpecifications() { return this.logSpecifications; } - /** - * Set the logSpecifications property: Log specifications of operation. - * - * @param logSpecifications the logSpecifications value to set. - * @return the ServiceSpecification object itself. - */ - public ServiceSpecification withLogSpecifications(List logSpecifications) { - this.logSpecifications = logSpecifications; - return this; - } - /** * Get the metricSpecifications property: Metric specifications of operation. * @@ -62,17 +51,6 @@ public List metricSpecifications() { return this.metricSpecifications; } - /** - * Set the metricSpecifications property: Metric specifications of operation. - * - * @param metricSpecifications the metricSpecifications value to set. - * @return the ServiceSpecification object itself. - */ - public ServiceSpecification withMetricSpecifications(List metricSpecifications) { - this.metricSpecifications = metricSpecifications; - return this; - } - /** * Validates the instance. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SharedPrivateLinkResourceProperties.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SharedPrivateLinkResourceProperties.java index 4ae0474bbc29..689259e2a345 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SharedPrivateLinkResourceProperties.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SharedPrivateLinkResourceProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SharedPrivateLinkResourceStatus.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SharedPrivateLinkResourceStatus.java index fa11598320bd..3d507d87ddd1 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SharedPrivateLinkResourceStatus.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SharedPrivateLinkResourceStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/Sku.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/Sku.java index 1007b9010ae8..7555a9038f4c 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/Sku.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/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.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SkuName.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SkuName.java index 7b9bd0a7eb24..03aac86b551e 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SkuName.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/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.cdn.models; @@ -51,6 +51,11 @@ public final class SkuName extends ExpandableStringEnum { */ public static final SkuName PREMIUM_AZURE_FRONT_DOOR = fromString("Premium_AzureFrontDoor"); + /** + * Static value Classic_AzureFrontDoor for SkuName. + */ + public static final SkuName CLASSIC_AZURE_FRONT_DOOR = fromString("Classic_AzureFrontDoor"); + /** * Static value Standard_955BandWidth_ChinaCdn for SkuName. */ diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SocketAddrMatchConditionParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SocketAddrMatchConditionParameters.java index f85f6301d682..0b9e7667f6ac 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SocketAddrMatchConditionParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SocketAddrMatchConditionParameters.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.cdn.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -17,11 +16,12 @@ * Defines the parameters for SocketAddress match conditions. */ @Fluent -public final class SocketAddrMatchConditionParameters implements JsonSerializable { +public final class SocketAddrMatchConditionParameters extends DeliveryRuleConditionParameters { /* * The typeName property. */ - private String typeName = "DeliveryRuleSocketAddrConditionParameters"; + private DeliveryRuleConditionParametersType typeName + = DeliveryRuleConditionParametersType.DELIVERY_RULE_SOCKET_ADDR_CONDITION_PARAMETERS; /* * Describes operator to be matched @@ -54,21 +54,11 @@ public SocketAddrMatchConditionParameters() { * * @return the typeName value. */ - public String typeName() { + @Override + public DeliveryRuleConditionParametersType typeName() { return this.typeName; } - /** - * Set the typeName property: The typeName property. - * - * @param typeName the typeName value to set. - * @return the SocketAddrMatchConditionParameters object itself. - */ - public SocketAddrMatchConditionParameters withTypeName(String typeName) { - this.typeName = typeName; - return this; - } - /** * Get the operator property: Describes operator to be matched. * @@ -154,6 +144,7 @@ public SocketAddrMatchConditionParameters withTransforms(List transfo * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { if (operator() == null) { throw LOGGER.atError() @@ -170,8 +161,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("typeName", this.typeName); jsonWriter.writeStringField("operator", this.operator == null ? null : this.operator.toString()); + jsonWriter.writeStringField("typeName", this.typeName == null ? null : this.typeName.toString()); jsonWriter.writeBooleanField("negateCondition", this.negateCondition); jsonWriter.writeArrayField("matchValues", this.matchValues, (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("transforms", this.transforms, @@ -199,6 +190,9 @@ public static SocketAddrMatchConditionParameters fromJson(JsonReader jsonReader) if ("operator".equals(fieldName)) { deserializedSocketAddrMatchConditionParameters.operator = SocketAddrOperator.fromString(reader.getString()); + } else if ("typeName".equals(fieldName)) { + deserializedSocketAddrMatchConditionParameters.typeName + = DeliveryRuleConditionParametersType.fromString(reader.getString()); } else if ("negateCondition".equals(fieldName)) { deserializedSocketAddrMatchConditionParameters.negateCondition = reader.getNullable(JsonReader::getBoolean); diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SocketAddrOperator.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SocketAddrOperator.java index 3086a2d9cc25..2b948f418e53 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SocketAddrOperator.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SocketAddrOperator.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SslProtocol.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SslProtocol.java index bf81078797d9..01891ebc01a5 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SslProtocol.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SslProtocol.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SslProtocolMatchConditionParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SslProtocolMatchConditionParameters.java index 212f647246bc..d46d867bcad2 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SslProtocolMatchConditionParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SslProtocolMatchConditionParameters.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.cdn.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -17,12 +16,12 @@ * Defines the parameters for SslProtocol match conditions. */ @Fluent -public final class SslProtocolMatchConditionParameters - implements JsonSerializable { +public final class SslProtocolMatchConditionParameters extends DeliveryRuleConditionParameters { /* * The typeName property. */ - private String typeName = "DeliveryRuleSslProtocolConditionParameters"; + private DeliveryRuleConditionParametersType typeName + = DeliveryRuleConditionParametersType.DELIVERY_RULE_SSL_PROTOCOL_CONDITION_PARAMETERS; /* * Describes operator to be matched @@ -55,21 +54,11 @@ public SslProtocolMatchConditionParameters() { * * @return the typeName value. */ - public String typeName() { + @Override + public DeliveryRuleConditionParametersType typeName() { return this.typeName; } - /** - * Set the typeName property: The typeName property. - * - * @param typeName the typeName value to set. - * @return the SslProtocolMatchConditionParameters object itself. - */ - public SslProtocolMatchConditionParameters withTypeName(String typeName) { - this.typeName = typeName; - return this; - } - /** * Get the operator property: Describes operator to be matched. * @@ -155,6 +144,7 @@ public SslProtocolMatchConditionParameters withTransforms(List transf * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { if (operator() == null) { throw LOGGER.atError() @@ -171,8 +161,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("typeName", this.typeName); jsonWriter.writeStringField("operator", this.operator == null ? null : this.operator.toString()); + jsonWriter.writeStringField("typeName", this.typeName == null ? null : this.typeName.toString()); jsonWriter.writeBooleanField("negateCondition", this.negateCondition); jsonWriter.writeArrayField("matchValues", this.matchValues, (writer, element) -> writer.writeString(element == null ? null : element.toString())); @@ -201,6 +191,9 @@ public static SslProtocolMatchConditionParameters fromJson(JsonReader jsonReader if ("operator".equals(fieldName)) { deserializedSslProtocolMatchConditionParameters.operator = SslProtocolOperator.fromString(reader.getString()); + } else if ("typeName".equals(fieldName)) { + deserializedSslProtocolMatchConditionParameters.typeName + = DeliveryRuleConditionParametersType.fromString(reader.getString()); } else if ("negateCondition".equals(fieldName)) { deserializedSslProtocolMatchConditionParameters.negateCondition = reader.getNullable(JsonReader::getBoolean); diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SslProtocolOperator.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SslProtocolOperator.java index c9c228fbf496..767d4a179687 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SslProtocolOperator.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/SslProtocolOperator.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/Status.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/Status.java index 2ffaac818cf6..52da34545b1f 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/Status.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/Status.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/Transform.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/Transform.java index 85aadab900a7..f506e7fcbe09 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/Transform.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/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.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/TransformType.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/TransformType.java index f292beac02fa..56d5dee3968b 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/TransformType.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/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.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/TypeName.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/TypeName.java new file mode 100644 index 000000000000..e6ce95d6b1a3 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/TypeName.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.cdn.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for TypeName. + */ +public final class TypeName extends ExpandableStringEnum { + /** + * Static value DeliveryRuleAfdUrlSigningActionParameters for TypeName. + */ + public static final TypeName DELIVERY_RULE_AFD_URL_SIGNING_ACTION_PARAMETERS + = fromString("DeliveryRuleAfdUrlSigningActionParameters"); + + /** + * Creates a new instance of TypeName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TypeName() { + } + + /** + * Creates or finds a TypeName from its string representation. + * + * @param name a name to look for. + * @return the corresponding TypeName. + */ + public static TypeName fromString(String name) { + return fromString(name, TypeName.class); + } + + /** + * Gets known TypeName values. + * + * @return known TypeName values. + */ + public static Collection values() { + return values(TypeName.class); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UpdateRule.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UpdateRule.java index 069af792f9fc..d44d3714db13 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UpdateRule.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UpdateRule.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlFileExtensionMatchConditionParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlFileExtensionMatchConditionParameters.java index ab113a6fb8ad..60f7f54e316c 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlFileExtensionMatchConditionParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlFileExtensionMatchConditionParameters.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.cdn.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -17,12 +16,12 @@ * Defines the parameters for UrlFileExtension match conditions. */ @Fluent -public final class UrlFileExtensionMatchConditionParameters - implements JsonSerializable { +public final class UrlFileExtensionMatchConditionParameters extends DeliveryRuleConditionParameters { /* * The typeName property. */ - private String typeName = "DeliveryRuleUrlFileExtensionMatchConditionParameters"; + private DeliveryRuleConditionParametersType typeName + = DeliveryRuleConditionParametersType.DELIVERY_RULE_URL_FILE_EXTENSION_MATCH_CONDITION_PARAMETERS; /* * Describes operator to be matched @@ -55,21 +54,11 @@ public UrlFileExtensionMatchConditionParameters() { * * @return the typeName value. */ - public String typeName() { + @Override + public DeliveryRuleConditionParametersType typeName() { return this.typeName; } - /** - * Set the typeName property: The typeName property. - * - * @param typeName the typeName value to set. - * @return the UrlFileExtensionMatchConditionParameters object itself. - */ - public UrlFileExtensionMatchConditionParameters withTypeName(String typeName) { - this.typeName = typeName; - return this; - } - /** * Get the operator property: Describes operator to be matched. * @@ -155,6 +144,7 @@ public UrlFileExtensionMatchConditionParameters withTransforms(List t * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { if (operator() == null) { throw LOGGER.atError() @@ -171,8 +161,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("typeName", this.typeName); jsonWriter.writeStringField("operator", this.operator == null ? null : this.operator.toString()); + jsonWriter.writeStringField("typeName", this.typeName == null ? null : this.typeName.toString()); jsonWriter.writeBooleanField("negateCondition", this.negateCondition); jsonWriter.writeArrayField("matchValues", this.matchValues, (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("transforms", this.transforms, @@ -200,6 +190,9 @@ public static UrlFileExtensionMatchConditionParameters fromJson(JsonReader jsonR if ("operator".equals(fieldName)) { deserializedUrlFileExtensionMatchConditionParameters.operator = UrlFileExtensionOperator.fromString(reader.getString()); + } else if ("typeName".equals(fieldName)) { + deserializedUrlFileExtensionMatchConditionParameters.typeName + = DeliveryRuleConditionParametersType.fromString(reader.getString()); } else if ("negateCondition".equals(fieldName)) { deserializedUrlFileExtensionMatchConditionParameters.negateCondition = reader.getNullable(JsonReader::getBoolean); diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlFileExtensionOperator.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlFileExtensionOperator.java index ab6e0eabcb76..2668b9e11c39 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlFileExtensionOperator.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlFileExtensionOperator.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlFileNameMatchConditionParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlFileNameMatchConditionParameters.java index 8e523b69388a..35c739785fcf 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlFileNameMatchConditionParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlFileNameMatchConditionParameters.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.cdn.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -17,12 +16,12 @@ * Defines the parameters for UrlFilename match conditions. */ @Fluent -public final class UrlFileNameMatchConditionParameters - implements JsonSerializable { +public final class UrlFileNameMatchConditionParameters extends DeliveryRuleConditionParameters { /* * The typeName property. */ - private String typeName = "DeliveryRuleUrlFilenameConditionParameters"; + private DeliveryRuleConditionParametersType typeName + = DeliveryRuleConditionParametersType.DELIVERY_RULE_URL_FILENAME_CONDITION_PARAMETERS; /* * Describes operator to be matched @@ -55,21 +54,11 @@ public UrlFileNameMatchConditionParameters() { * * @return the typeName value. */ - public String typeName() { + @Override + public DeliveryRuleConditionParametersType typeName() { return this.typeName; } - /** - * Set the typeName property: The typeName property. - * - * @param typeName the typeName value to set. - * @return the UrlFileNameMatchConditionParameters object itself. - */ - public UrlFileNameMatchConditionParameters withTypeName(String typeName) { - this.typeName = typeName; - return this; - } - /** * Get the operator property: Describes operator to be matched. * @@ -155,6 +144,7 @@ public UrlFileNameMatchConditionParameters withTransforms(List transf * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { if (operator() == null) { throw LOGGER.atError() @@ -171,8 +161,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("typeName", this.typeName); jsonWriter.writeStringField("operator", this.operator == null ? null : this.operator.toString()); + jsonWriter.writeStringField("typeName", this.typeName == null ? null : this.typeName.toString()); jsonWriter.writeBooleanField("negateCondition", this.negateCondition); jsonWriter.writeArrayField("matchValues", this.matchValues, (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("transforms", this.transforms, @@ -200,6 +190,9 @@ public static UrlFileNameMatchConditionParameters fromJson(JsonReader jsonReader if ("operator".equals(fieldName)) { deserializedUrlFileNameMatchConditionParameters.operator = UrlFileNameOperator.fromString(reader.getString()); + } else if ("typeName".equals(fieldName)) { + deserializedUrlFileNameMatchConditionParameters.typeName + = DeliveryRuleConditionParametersType.fromString(reader.getString()); } else if ("negateCondition".equals(fieldName)) { deserializedUrlFileNameMatchConditionParameters.negateCondition = reader.getNullable(JsonReader::getBoolean); diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlFileNameOperator.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlFileNameOperator.java index c022919e7ba6..c2849944823f 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlFileNameOperator.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlFileNameOperator.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlPathMatchConditionParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlPathMatchConditionParameters.java index abda6f45dc96..881e11d02fad 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlPathMatchConditionParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlPathMatchConditionParameters.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.cdn.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -17,11 +16,12 @@ * Defines the parameters for UrlPath match conditions. */ @Fluent -public final class UrlPathMatchConditionParameters implements JsonSerializable { +public final class UrlPathMatchConditionParameters extends DeliveryRuleConditionParameters { /* * The typeName property. */ - private String typeName = "DeliveryRuleUrlPathMatchConditionParameters"; + private DeliveryRuleConditionParametersType typeName + = DeliveryRuleConditionParametersType.DELIVERY_RULE_URL_PATH_MATCH_CONDITION_PARAMETERS; /* * Describes operator to be matched @@ -54,21 +54,11 @@ public UrlPathMatchConditionParameters() { * * @return the typeName value. */ - public String typeName() { + @Override + public DeliveryRuleConditionParametersType typeName() { return this.typeName; } - /** - * Set the typeName property: The typeName property. - * - * @param typeName the typeName value to set. - * @return the UrlPathMatchConditionParameters object itself. - */ - public UrlPathMatchConditionParameters withTypeName(String typeName) { - this.typeName = typeName; - return this; - } - /** * Get the operator property: Describes operator to be matched. * @@ -154,6 +144,7 @@ public UrlPathMatchConditionParameters withTransforms(List transforms * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { if (operator() == null) { throw LOGGER.atError() @@ -170,8 +161,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("typeName", this.typeName); jsonWriter.writeStringField("operator", this.operator == null ? null : this.operator.toString()); + jsonWriter.writeStringField("typeName", this.typeName == null ? null : this.typeName.toString()); jsonWriter.writeBooleanField("negateCondition", this.negateCondition); jsonWriter.writeArrayField("matchValues", this.matchValues, (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("transforms", this.transforms, @@ -199,6 +190,9 @@ public static UrlPathMatchConditionParameters fromJson(JsonReader jsonReader) th if ("operator".equals(fieldName)) { deserializedUrlPathMatchConditionParameters.operator = UrlPathOperator.fromString(reader.getString()); + } else if ("typeName".equals(fieldName)) { + deserializedUrlPathMatchConditionParameters.typeName + = DeliveryRuleConditionParametersType.fromString(reader.getString()); } else if ("negateCondition".equals(fieldName)) { deserializedUrlPathMatchConditionParameters.negateCondition = reader.getNullable(JsonReader::getBoolean); diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlPathOperator.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlPathOperator.java index 854598da2f93..e9147a007ea3 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlPathOperator.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlPathOperator.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlRedirectAction.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlRedirectAction.java index aefad15fc6e0..f22c6145ed25 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlRedirectAction.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlRedirectAction.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -69,7 +69,6 @@ public UrlRedirectAction withParameters(UrlRedirectActionParameters parameters) */ @Override public void validate() { - super.validate(); if (parameters() == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Missing required property parameters in model UrlRedirectAction")); diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlRedirectActionParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlRedirectActionParameters.java index 7162ad70647c..57ccd0415461 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlRedirectActionParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlRedirectActionParameters.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.cdn.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -16,11 +15,12 @@ * Defines the parameters for the url redirect action. */ @Fluent -public final class UrlRedirectActionParameters implements JsonSerializable { +public final class UrlRedirectActionParameters extends DeliveryRuleActionParameters { /* * The typeName property. */ - private String typeName = "DeliveryRuleUrlRedirectActionParameters"; + private DeliveryRuleActionParametersType typeName + = DeliveryRuleActionParametersType.DELIVERY_RULE_URL_REDIRECT_ACTION_PARAMETERS; /* * The redirect type the rule will use when redirecting traffic. @@ -66,21 +66,11 @@ public UrlRedirectActionParameters() { * * @return the typeName value. */ - public String typeName() { + @Override + public DeliveryRuleActionParametersType typeName() { return this.typeName; } - /** - * Set the typeName property: The typeName property. - * - * @param typeName the typeName value to set. - * @return the UrlRedirectActionParameters object itself. - */ - public UrlRedirectActionParameters withTypeName(String typeName) { - this.typeName = typeName; - return this; - } - /** * Get the redirectType property: The redirect type the rule will use when redirecting traffic. * @@ -214,6 +204,7 @@ public UrlRedirectActionParameters withCustomFragment(String customFragment) { * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { if (redirectType() == null) { throw LOGGER.atError() @@ -230,8 +221,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("typeName", this.typeName); jsonWriter.writeStringField("redirectType", this.redirectType == null ? null : this.redirectType.toString()); + jsonWriter.writeStringField("typeName", this.typeName == null ? null : this.typeName.toString()); jsonWriter.writeStringField("destinationProtocol", this.destinationProtocol == null ? null : this.destinationProtocol.toString()); jsonWriter.writeStringField("customPath", this.customPath); @@ -259,6 +250,9 @@ public static UrlRedirectActionParameters fromJson(JsonReader jsonReader) throws if ("redirectType".equals(fieldName)) { deserializedUrlRedirectActionParameters.redirectType = RedirectType.fromString(reader.getString()); + } else if ("typeName".equals(fieldName)) { + deserializedUrlRedirectActionParameters.typeName + = DeliveryRuleActionParametersType.fromString(reader.getString()); } else if ("destinationProtocol".equals(fieldName)) { deserializedUrlRedirectActionParameters.destinationProtocol = DestinationProtocol.fromString(reader.getString()); diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlRewriteAction.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlRewriteAction.java index 24dbcb5707e3..2f6b7fc5b3de 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlRewriteAction.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlRewriteAction.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -69,7 +69,6 @@ public UrlRewriteAction withParameters(UrlRewriteActionParameters parameters) { */ @Override public void validate() { - super.validate(); if (parameters() == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Missing required property parameters in model UrlRewriteAction")); diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlRewriteActionParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlRewriteActionParameters.java index d88e714a0d04..87c919781ea7 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlRewriteActionParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlRewriteActionParameters.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.cdn.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -16,11 +15,12 @@ * Defines the parameters for the url rewrite action. */ @Fluent -public final class UrlRewriteActionParameters implements JsonSerializable { +public final class UrlRewriteActionParameters extends DeliveryRuleActionParameters { /* * The typeName property. */ - private String typeName = "DeliveryRuleUrlRewriteActionParameters"; + private DeliveryRuleActionParametersType typeName + = DeliveryRuleActionParametersType.DELIVERY_RULE_URL_REWRITE_ACTION_PARAMETERS; /* * define a request URI pattern that identifies the type of requests that may be rewritten. If value is blank, all @@ -49,21 +49,11 @@ public UrlRewriteActionParameters() { * * @return the typeName value. */ - public String typeName() { + @Override + public DeliveryRuleActionParametersType typeName() { return this.typeName; } - /** - * Set the typeName property: The typeName property. - * - * @param typeName the typeName value to set. - * @return the UrlRewriteActionParameters object itself. - */ - public UrlRewriteActionParameters withTypeName(String typeName) { - this.typeName = typeName; - return this; - } - /** * Get the sourcePattern property: define a request URI pattern that identifies the type of requests that may be * rewritten. If value is blank, all strings are matched. @@ -131,6 +121,7 @@ public UrlRewriteActionParameters withPreserveUnmatchedPath(Boolean preserveUnma * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { if (sourcePattern() == null) { throw LOGGER.atError() @@ -152,9 +143,9 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("typeName", this.typeName); jsonWriter.writeStringField("sourcePattern", this.sourcePattern); jsonWriter.writeStringField("destination", this.destination); + jsonWriter.writeStringField("typeName", this.typeName == null ? null : this.typeName.toString()); jsonWriter.writeBooleanField("preserveUnmatchedPath", this.preserveUnmatchedPath); return jsonWriter.writeEndObject(); } @@ -179,6 +170,9 @@ public static UrlRewriteActionParameters fromJson(JsonReader jsonReader) throws deserializedUrlRewriteActionParameters.sourcePattern = reader.getString(); } else if ("destination".equals(fieldName)) { deserializedUrlRewriteActionParameters.destination = reader.getString(); + } else if ("typeName".equals(fieldName)) { + deserializedUrlRewriteActionParameters.typeName + = DeliveryRuleActionParametersType.fromString(reader.getString()); } else if ("preserveUnmatchedPath".equals(fieldName)) { deserializedUrlRewriteActionParameters.preserveUnmatchedPath = reader.getNullable(JsonReader::getBoolean); diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlSigningAction.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlSigningAction.java index 46b494c62514..12a3b263b2f3 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlSigningAction.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlSigningAction.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -69,7 +69,6 @@ public UrlSigningAction withParameters(UrlSigningActionParameters parameters) { */ @Override public void validate() { - super.validate(); if (parameters() == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Missing required property parameters in model UrlSigningAction")); diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlSigningActionParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlSigningActionParameters.java index 4dbbbe023ad7..760a9107bc10 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlSigningActionParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlSigningActionParameters.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.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; @@ -16,11 +15,12 @@ * Defines the parameters for the Url Signing action. */ @Fluent -public final class UrlSigningActionParameters implements JsonSerializable { +public final class UrlSigningActionParameters extends DeliveryRuleActionParameters { /* * The typeName property. */ - private String typeName = "DeliveryRuleUrlSigningActionParameters"; + private DeliveryRuleActionParametersType typeName + = DeliveryRuleActionParametersType.DELIVERY_RULE_URL_SIGNING_ACTION_PARAMETERS; /* * Algorithm to use for URL signing @@ -43,21 +43,11 @@ public UrlSigningActionParameters() { * * @return the typeName value. */ - public String typeName() { + @Override + public DeliveryRuleActionParametersType typeName() { return this.typeName; } - /** - * Set the typeName property: The typeName property. - * - * @param typeName the typeName value to set. - * @return the UrlSigningActionParameters object itself. - */ - public UrlSigningActionParameters withTypeName(String typeName) { - this.typeName = typeName; - return this; - } - /** * Get the algorithm property: Algorithm to use for URL signing. * @@ -105,6 +95,7 @@ public UrlSigningActionParameters withParameterNameOverride(List e.validate()); @@ -117,7 +108,7 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("typeName", this.typeName); + jsonWriter.writeStringField("typeName", this.typeName == null ? null : this.typeName.toString()); jsonWriter.writeStringField("algorithm", this.algorithm == null ? null : this.algorithm.toString()); jsonWriter.writeArrayField("parameterNameOverride", this.parameterNameOverride, (writer, element) -> writer.writeJson(element)); @@ -130,7 +121,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of UrlSigningActionParameters 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 UrlSigningActionParameters. */ public static UrlSigningActionParameters fromJson(JsonReader jsonReader) throws IOException { @@ -140,7 +130,10 @@ public static UrlSigningActionParameters fromJson(JsonReader jsonReader) throws String fieldName = reader.getFieldName(); reader.nextToken(); - if ("algorithm".equals(fieldName)) { + if ("typeName".equals(fieldName)) { + deserializedUrlSigningActionParameters.typeName + = DeliveryRuleActionParametersType.fromString(reader.getString()); + } else if ("algorithm".equals(fieldName)) { deserializedUrlSigningActionParameters.algorithm = Algorithm.fromString(reader.getString()); } else if ("parameterNameOverride".equals(fieldName)) { List parameterNameOverride diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlSigningKey.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlSigningKey.java index 10fdc115f4e1..098e50d107a1 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlSigningKey.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlSigningKey.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlSigningKeyParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlSigningKeyParameters.java index e679f58dae7c..4a2bacf75dd3 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlSigningKeyParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlSigningKeyParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -29,10 +29,10 @@ public final class UrlSigningKeyParameters extends SecretParameters { /* * Resource reference to the Azure Key Vault secret. Expected to be in format of - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName} - * /providers/Microsoft.KeyVault/vaults/{vaultName} - * /secrets/{secretName} - * + * /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName} + * ​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName} + * ​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName} + * ​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ */ private ResourceReference secretSource; @@ -49,7 +49,7 @@ public UrlSigningKeyParameters() { /** * Get the type property: The type of the secret resource. - * + * * @return the type value. */ @Override @@ -60,7 +60,7 @@ public SecretType type() { /** * Get the keyId property: Defines the customer defined key Id. This id will exist in the incoming request to * indicate the key used to form the hash. - * + * * @return the keyId value. */ public String keyId() { @@ -70,7 +70,7 @@ public String keyId() { /** * Set the keyId property: Defines the customer defined key Id. This id will exist in the incoming request to * indicate the key used to form the hash. - * + * * @param keyId the keyId value to set. * @return the UrlSigningKeyParameters object itself. */ @@ -81,8 +81,8 @@ public UrlSigningKeyParameters withKeyId(String keyId) { /** * Get the secretSource property: Resource reference to the Azure Key Vault secret. Expected to be in format of - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets/{secretName}. - * + * /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. + * * @return the secretSource value. */ public ResourceReference secretSource() { @@ -91,8 +91,8 @@ public ResourceReference secretSource() { /** * Set the secretSource property: Resource reference to the Azure Key Vault secret. Expected to be in format of - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets/{secretName}. - * + * /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. + * * @param secretSource the secretSource value to set. * @return the UrlSigningKeyParameters object itself. */ @@ -103,7 +103,7 @@ public UrlSigningKeyParameters withSecretSource(ResourceReference secretSource) /** * Get the secretVersion property: Version of the secret to be used. - * + * * @return the secretVersion value. */ public String secretVersion() { @@ -112,7 +112,7 @@ public String secretVersion() { /** * Set the secretVersion property: Version of the secret to be used. - * + * * @param secretVersion the secretVersion value to set. * @return the UrlSigningKeyParameters object itself. */ @@ -123,12 +123,11 @@ public UrlSigningKeyParameters withSecretVersion(String secretVersion) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { - super.validate(); if (keyId() == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Missing required property keyId in model UrlSigningKeyParameters")); @@ -140,6 +139,11 @@ public void validate() { } else { secretSource().validate(); } + if (secretVersion() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property secretVersion in model UrlSigningKeyParameters")); + } } private static final ClientLogger LOGGER = new ClientLogger(UrlSigningKeyParameters.class); @@ -152,14 +156,14 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("keyId", this.keyId); jsonWriter.writeJsonField("secretSource", this.secretSource); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); jsonWriter.writeStringField("secretVersion", this.secretVersion); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); return jsonWriter.writeEndObject(); } /** * Reads an instance of UrlSigningKeyParameters from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of UrlSigningKeyParameters if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. @@ -177,10 +181,10 @@ public static UrlSigningKeyParameters fromJson(JsonReader jsonReader) throws IOE deserializedUrlSigningKeyParameters.keyId = reader.getString(); } else if ("secretSource".equals(fieldName)) { deserializedUrlSigningKeyParameters.secretSource = ResourceReference.fromJson(reader); - } else if ("type".equals(fieldName)) { - deserializedUrlSigningKeyParameters.type = SecretType.fromString(reader.getString()); } else if ("secretVersion".equals(fieldName)) { deserializedUrlSigningKeyParameters.secretVersion = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedUrlSigningKeyParameters.type = SecretType.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlSigningParamIdentifier.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlSigningParamIdentifier.java index 0a29c7eb833d..d4fdff25cbf6 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlSigningParamIdentifier.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UrlSigningParamIdentifier.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/Usage.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/Usage.java new file mode 100644 index 000000000000..0313f97018d8 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/Usage.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.resourcemanager.cdn.models; + +/** + * Represents a single usage record returned by Azure Front Door endpoint APIs. + */ +public interface Usage { + /** + * Gets the full resource identifier for the usage entry. + * + * @return the resource identifier + */ + String id(); + + /** + * Gets the measurement unit for the usage. + * + * @return the unit for the usage value + */ + UsageUnit unit(); + + /** + * Gets the current value that has been consumed. + * + * @return the current usage value + */ + long currentValue(); + + /** + * Gets the total limit for the usage metric. + * + * @return the usage limit + */ + long limit(); + + /** + * Gets the friendly name for this usage value. + * + * @return the usage name metadata + */ + UsageName name(); +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UsageName.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UsageName.java index b84351221daa..22c95db21781 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UsageName.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UsageName.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.cdn.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 @@ /** * The usage names. */ -@Fluent +@Immutable public final class UsageName implements JsonSerializable { /* * A string describing the resource name. @@ -29,7 +29,7 @@ public final class UsageName implements JsonSerializable { /** * Creates an instance of UsageName class. */ - public UsageName() { + private UsageName() { } /** @@ -41,17 +41,6 @@ public String value() { return this.value; } - /** - * Set the value property: A string describing the resource name. - * - * @param value the value value to set. - * @return the UsageName object itself. - */ - public UsageName withValue(String value) { - this.value = value; - return this; - } - /** * Get the localizedValue property: A localized string describing the resource name. * @@ -61,17 +50,6 @@ public String localizedValue() { return this.localizedValue; } - /** - * Set the localizedValue property: A localized string describing the resource name. - * - * @param localizedValue the localizedValue value to set. - * @return the UsageName object itself. - */ - public UsageName withLocalizedValue(String localizedValue) { - this.localizedValue = localizedValue; - return this; - } - /** * Validates the instance. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UsageUnit.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UsageUnit.java index ecb835214930..16699308ae36 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UsageUnit.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UsageUnit.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UserAssignedIdentity.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UserAssignedIdentity.java index 2759c60f30e5..1a3c32d5f686 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UserAssignedIdentity.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UserAssignedIdentity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UserManagedHttpsParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UserManagedHttpsParameters.java index b5ed0c03d91d..b4a2994628ca 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UserManagedHttpsParameters.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/UserManagedHttpsParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -90,7 +90,6 @@ public UserManagedHttpsParameters withMinimumTlsVersion(MinimumTlsVersion minimu */ @Override public void validate() { - super.validate(); if (certificateSourceParameters() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -98,6 +97,11 @@ public void validate() { } else { certificateSourceParameters().validate(); } + if (protocolType() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property protocolType in model UserManagedHttpsParameters")); + } } private static final ClientLogger LOGGER = new ClientLogger(UserManagedHttpsParameters.class); diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ValidateCustomDomainInput.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ValidateCustomDomainInput.java index 9fc547bfa2e7..db20fee93062 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ValidateCustomDomainInput.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ValidateCustomDomainInput.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ValidateProbeInput.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ValidateProbeInput.java index 094731f0b362..27d8501185ae 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ValidateProbeInput.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ValidateProbeInput.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ValidateSecretInput.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ValidateSecretInput.java index ff94eb67eeac..eda371109a27 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ValidateSecretInput.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ValidateSecretInput.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; @@ -24,10 +24,8 @@ public final class ValidateSecretInput implements JsonSerializable { + /** + * Static value SocketAddr for VariableName. + */ + public static final VariableName SOCKET_ADDR = fromString("SocketAddr"); + + /** + * Static value GeoLocation for VariableName. + */ + public static final VariableName GEO_LOCATION = fromString("GeoLocation"); + + /** + * Static value None for VariableName. + */ + public static final VariableName NONE = fromString("None"); + + /** + * Creates a new instance of VariableName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public VariableName() { + } + + /** + * Creates or finds a VariableName from its string representation. + * + * @param name a name to look for. + * @return the corresponding VariableName. + */ + public static VariableName fromString(String name) { + return fromString(name, VariableName.class); + } + + /** + * Gets known VariableName values. + * + * @return known VariableName values. + */ + public static Collection values() { + return values(VariableName.class); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafAction.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafAction.java index df1df13e6f7c..97bcadd68a17 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafAction.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafAction.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafGranularity.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafGranularity.java index 27f8ee94557a..34e77616bf08 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafGranularity.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafGranularity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafMatchVariable.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafMatchVariable.java index 89e2248a6646..76fe9f911555 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafMatchVariable.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafMatchVariable.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafMetric.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafMetric.java index cdd234028be4..395081ad6d5b 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafMetric.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafMetric.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafMetricsGranularity.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafMetricsGranularity.java index 0a03ae49ffad..e21a5b64f8b3 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafMetricsGranularity.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafMetricsGranularity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafMetricsResponseSeriesItem.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafMetricsResponseSeriesItem.java index 6e6a17d59fb8..6e204c0ee5db 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafMetricsResponseSeriesItem.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafMetricsResponseSeriesItem.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.cdn.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 @@ /** * The WafMetricsResponseSeriesItem model. */ -@Fluent +@Immutable public final class WafMetricsResponseSeriesItem implements JsonSerializable { /* * The metric property. @@ -40,7 +40,7 @@ public final class WafMetricsResponseSeriesItem implements JsonSerializable groups() { return this.groups; } - /** - * Set the groups property: The groups property. - * - * @param groups the groups value to set. - * @return the WafMetricsResponseSeriesItem object itself. - */ - public WafMetricsResponseSeriesItem withGroups(List groups) { - this.groups = groups; - return this; - } - /** * Get the data property: The data property. * @@ -112,17 +79,6 @@ public List data() { return this.data; } - /** - * Set the data property: The data property. - * - * @param data the data value to set. - * @return the WafMetricsResponseSeriesItem object itself. - */ - public WafMetricsResponseSeriesItem withData(List data) { - this.data = data; - return this; - } - /** * Validates the instance. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafMetricsResponseSeriesItemData.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafMetricsResponseSeriesItemData.java index b58c9b746269..982b96c41df7 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafMetricsResponseSeriesItemData.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafMetricsResponseSeriesItemData.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.cdn.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; @@ -17,7 +17,7 @@ /** * The WafMetricsResponseSeriesItemData model. */ -@Fluent +@Immutable public final class WafMetricsResponseSeriesItemData implements JsonSerializable { /* * The dateTime property. @@ -32,7 +32,7 @@ public final class WafMetricsResponseSeriesItemData implements JsonSerializable< /** * Creates an instance of WafMetricsResponseSeriesItemData class. */ - public WafMetricsResponseSeriesItemData() { + private WafMetricsResponseSeriesItemData() { } /** @@ -44,17 +44,6 @@ public OffsetDateTime dateTime() { return this.dateTime; } - /** - * Set the dateTime property: The dateTime property. - * - * @param dateTime the dateTime value to set. - * @return the WafMetricsResponseSeriesItemData object itself. - */ - public WafMetricsResponseSeriesItemData withDateTime(OffsetDateTime dateTime) { - this.dateTime = dateTime; - return this; - } - /** * Get the value property: The value property. * @@ -64,17 +53,6 @@ public Float value() { return this.value; } - /** - * Set the value property: The value property. - * - * @param value the value value to set. - * @return the WafMetricsResponseSeriesItemData object itself. - */ - public WafMetricsResponseSeriesItemData withValue(Float value) { - this.value = value; - return this; - } - /** * Validates the instance. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafMetricsResponseSeriesPropertiesItemsItem.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafMetricsResponseSeriesPropertiesItemsItem.java index 5ab91405f513..5a8a991cdf90 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafMetricsResponseSeriesPropertiesItemsItem.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafMetricsResponseSeriesPropertiesItemsItem.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.cdn.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 @@ /** * The WafMetricsResponseSeriesPropertiesItemsItem model. */ -@Fluent +@Immutable public final class WafMetricsResponseSeriesPropertiesItemsItem implements JsonSerializable { /* @@ -30,7 +30,7 @@ public final class WafMetricsResponseSeriesPropertiesItemsItem /** * Creates an instance of WafMetricsResponseSeriesPropertiesItemsItem class. */ - public WafMetricsResponseSeriesPropertiesItemsItem() { + private WafMetricsResponseSeriesPropertiesItemsItem() { } /** @@ -42,17 +42,6 @@ public String name() { return this.name; } - /** - * Set the name property: The name property. - * - * @param name the name value to set. - * @return the WafMetricsResponseSeriesPropertiesItemsItem object itself. - */ - public WafMetricsResponseSeriesPropertiesItemsItem withName(String name) { - this.name = name; - return this; - } - /** * Get the value property: The value property. * @@ -62,17 +51,6 @@ public String value() { return this.value; } - /** - * Set the value property: The value property. - * - * @param value the value value to set. - * @return the WafMetricsResponseSeriesPropertiesItemsItem object itself. - */ - public WafMetricsResponseSeriesPropertiesItemsItem withValue(String value) { - this.value = value; - return this; - } - /** * Validates the instance. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafMetricsSeriesUnit.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafMetricsSeriesUnit.java index 56671c469fff..426672bcb33f 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafMetricsSeriesUnit.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafMetricsSeriesUnit.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafRankingGroupBy.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafRankingGroupBy.java index 53f125811fee..99ffc2f0335a 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafRankingGroupBy.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafRankingGroupBy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafRankingType.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafRankingType.java index 010e557fe487..d0b093dcf050 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafRankingType.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafRankingType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafRankingsResponseDataItem.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafRankingsResponseDataItem.java index 45bec0937b24..8dfec79cbc1a 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafRankingsResponseDataItem.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafRankingsResponseDataItem.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.cdn.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 @@ /** * The WafRankingsResponseDataItem model. */ -@Fluent +@Immutable public final class WafRankingsResponseDataItem implements JsonSerializable { /* * The groupValues property. @@ -30,7 +30,7 @@ public final class WafRankingsResponseDataItem implements JsonSerializable groupValues() { return this.groupValues; } - /** - * Set the groupValues property: The groupValues property. - * - * @param groupValues the groupValues value to set. - * @return the WafRankingsResponseDataItem object itself. - */ - public WafRankingsResponseDataItem withGroupValues(List groupValues) { - this.groupValues = groupValues; - return this; - } - /** * Get the metrics property: The metrics property. * @@ -62,17 +51,6 @@ public List metrics() { return this.metrics; } - /** - * Set the metrics property: The metrics property. - * - * @param metrics the metrics value to set. - * @return the WafRankingsResponseDataItem object itself. - */ - public WafRankingsResponseDataItem withMetrics(List metrics) { - this.metrics = metrics; - return this; - } - /** * Validates the instance. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafRankingsResponseDataItemMetric.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafRankingsResponseDataItemMetric.java index e11689320880..6fad6e348371 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafRankingsResponseDataItemMetric.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafRankingsResponseDataItemMetric.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.cdn.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 @@ /** * The WafRankingsResponseDataItemMetric model. */ -@Fluent +@Immutable public final class WafRankingsResponseDataItemMetric implements JsonSerializable { /* * The metric property. @@ -34,7 +34,7 @@ public final class WafRankingsResponseDataItemMetric implements JsonSerializable /** * Creates an instance of WafRankingsResponseDataItemMetric class. */ - public WafRankingsResponseDataItemMetric() { + private WafRankingsResponseDataItemMetric() { } /** @@ -46,17 +46,6 @@ public String metric() { return this.metric; } - /** - * Set the metric property: The metric property. - * - * @param metric the metric value to set. - * @return the WafRankingsResponseDataItemMetric object itself. - */ - public WafRankingsResponseDataItemMetric withMetric(String metric) { - this.metric = metric; - return this; - } - /** * Get the value property: The value property. * @@ -66,17 +55,6 @@ public Long value() { return this.value; } - /** - * Set the value property: The value property. - * - * @param value the value value to set. - * @return the WafRankingsResponseDataItemMetric object itself. - */ - public WafRankingsResponseDataItemMetric withValue(Long value) { - this.value = value; - return this; - } - /** * Get the percentage property: The percentage property. * @@ -86,17 +64,6 @@ public Double percentage() { return this.percentage; } - /** - * Set the percentage property: The percentage property. - * - * @param percentage the percentage value to set. - * @return the WafRankingsResponseDataItemMetric object itself. - */ - public WafRankingsResponseDataItemMetric withPercentage(Double percentage) { - this.percentage = percentage; - return this; - } - /** * Validates the instance. * diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafRuleType.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafRuleType.java index 90e9597865ae..9e1b6c21f4c2 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafRuleType.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WafRuleType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WebAgentProvisioningState.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WebAgentProvisioningState.java new file mode 100644 index 000000000000..40dd9517fab8 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WebAgentProvisioningState.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Provisioning status of the web agent. + */ +public final class WebAgentProvisioningState extends ExpandableStringEnum { + /** + * Static value Creating for WebAgentProvisioningState. + */ + public static final WebAgentProvisioningState CREATING = fromString("Creating"); + + /** + * Static value Succeeded for WebAgentProvisioningState. + */ + public static final WebAgentProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for WebAgentProvisioningState. + */ + public static final WebAgentProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Updating for WebAgentProvisioningState. + */ + public static final WebAgentProvisioningState UPDATING = fromString("Updating"); + + /** + * Static value Deleting for WebAgentProvisioningState. + */ + public static final WebAgentProvisioningState DELETING = fromString("Deleting"); + + /** + * Creates a new instance of WebAgentProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public WebAgentProvisioningState() { + } + + /** + * Creates or finds a WebAgentProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding WebAgentProvisioningState. + */ + public static WebAgentProvisioningState fromString(String name) { + return fromString(name, WebAgentProvisioningState.class); + } + + /** + * Gets known WebAgentProvisioningState values. + * + * @return known WebAgentProvisioningState values. + */ + public static Collection values() { + return values(WebAgentProvisioningState.class); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WebAgentUpdateParameters.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WebAgentUpdateParameters.java new file mode 100644 index 000000000000..15ab64234777 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WebAgentUpdateParameters.java @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.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 com.azure.resourcemanager.cdn.fluent.models.WebAgentPropertiesUpdateParameters; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * Properties required to update a web agent. + */ +@Fluent +public final class WebAgentUpdateParameters implements JsonSerializable { + /* + * Web agent tags + */ + private Map tags; + + /* + * Properties of the web agent to be updated. + */ + private WebAgentPropertiesUpdateParameters innerProperties; + + /** + * Creates an instance of WebAgentUpdateParameters class. + */ + public WebAgentUpdateParameters() { + } + + /** + * Get the tags property: Web agent tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Web agent tags. + * + * @param tags the tags value to set. + * @return the WebAgentUpdateParameters object itself. + */ + public WebAgentUpdateParameters withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the innerProperties property: Properties of the web agent to be updated. + * + * @return the innerProperties value. + */ + private WebAgentPropertiesUpdateParameters innerProperties() { + return this.innerProperties; + } + + /** + * Get the description property: Optional textual description of the agent. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: Optional textual description of the agent. + * + * @param description the description value to set. + * @return the WebAgentUpdateParameters object itself. + */ + public WebAgentUpdateParameters withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new WebAgentPropertiesUpdateParameters(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Get the systemPrompt property: System prompt for the web agent. + * + * @return the systemPrompt value. + */ + public String systemPrompt() { + return this.innerProperties() == null ? null : this.innerProperties().systemPrompt(); + } + + /** + * Set the systemPrompt property: System prompt for the web agent. + * + * @param systemPrompt the systemPrompt value to set. + * @return the WebAgentUpdateParameters object itself. + */ + public WebAgentUpdateParameters withSystemPrompt(String systemPrompt) { + if (this.innerProperties() == null) { + this.innerProperties = new WebAgentPropertiesUpdateParameters(); + } + this.innerProperties().withSystemPrompt(systemPrompt); + return this; + } + + /** + * Get the paths property: List of paths associated with the web agent. + * + * @return the paths value. + */ + public List paths() { + return this.innerProperties() == null ? null : this.innerProperties().paths(); + } + + /** + * Set the paths property: List of paths associated with the web agent. + * + * @param paths the paths value to set. + * @return the WebAgentUpdateParameters object itself. + */ + public WebAgentUpdateParameters withPaths(List paths) { + if (this.innerProperties() == null) { + this.innerProperties = new WebAgentPropertiesUpdateParameters(); + } + this.innerProperties().withPaths(paths); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WebAgentUpdateParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WebAgentUpdateParameters 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 WebAgentUpdateParameters. + */ + public static WebAgentUpdateParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WebAgentUpdateParameters deserializedWebAgentUpdateParameters = new WebAgentUpdateParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedWebAgentUpdateParameters.tags = tags; + } else if ("properties".equals(fieldName)) { + deserializedWebAgentUpdateParameters.innerProperties + = WebAgentPropertiesUpdateParameters.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedWebAgentUpdateParameters; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WebApplicationFirewallPolicy.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WebApplicationFirewallPolicy.java new file mode 100644 index 000000000000..7af5e0dce28c --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WebApplicationFirewallPolicy.java @@ -0,0 +1,334 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.cdn.fluent.models.WebApplicationFirewallPolicyProperties; +import java.io.IOException; +import java.util.List; + +/** + * Defines web application firewall policy. + */ +@Fluent +public final class WebApplicationFirewallPolicy extends ProxyResource { + /* + * Properties of the web application firewall policy. + */ + private WebApplicationFirewallPolicyProperties innerProperties; + + /* + * Gets a unique read-only string that changes whenever the resource is updated. + */ + private String etag; + + /* + * The pricing tier of web application firewall policy. Defaults to Classic_AzureFrontDoor if not specified. + */ + private Sku sku; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of WebApplicationFirewallPolicy class. + */ + public WebApplicationFirewallPolicy() { + } + + /** + * Get the innerProperties property: Properties of the web application firewall policy. + * + * @return the innerProperties value. + */ + private WebApplicationFirewallPolicyProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the etag property: Gets a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value. + */ + public String etag() { + return this.etag; + } + + /** + * Set the etag property: Gets a unique read-only string that changes whenever the resource is updated. + * + * @param etag the etag value to set. + * @return the WebApplicationFirewallPolicy object itself. + */ + public WebApplicationFirewallPolicy withEtag(String etag) { + this.etag = etag; + return this; + } + + /** + * Get the sku property: The pricing tier of web application firewall policy. Defaults to Classic_AzureFrontDoor if + * not specified. + * + * @return the sku value. + */ + public Sku sku() { + return this.sku; + } + + /** + * Set the sku property: The pricing tier of web application firewall policy. Defaults to Classic_AzureFrontDoor if + * not specified. + * + * @param sku the sku value to set. + * @return the WebApplicationFirewallPolicy object itself. + */ + public WebApplicationFirewallPolicy withSku(Sku sku) { + this.sku = sku; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the policySettings property: Describes settings for the policy. + * + * @return the policySettings value. + */ + public PolicySettingsAfd policySettings() { + return this.innerProperties() == null ? null : this.innerProperties().policySettings(); + } + + /** + * Set the policySettings property: Describes settings for the policy. + * + * @param policySettings the policySettings value to set. + * @return the WebApplicationFirewallPolicy object itself. + */ + public WebApplicationFirewallPolicy withPolicySettings(PolicySettingsAfd policySettings) { + if (this.innerProperties() == null) { + this.innerProperties = new WebApplicationFirewallPolicyProperties(); + } + this.innerProperties().withPolicySettings(policySettings); + return this; + } + + /** + * Get the customRules property: Describes custom rules inside the policy. + * + * @return the customRules value. + */ + public CustomRuleListAfd customRules() { + return this.innerProperties() == null ? null : this.innerProperties().customRules(); + } + + /** + * Set the customRules property: Describes custom rules inside the policy. + * + * @param customRules the customRules value to set. + * @return the WebApplicationFirewallPolicy object itself. + */ + public WebApplicationFirewallPolicy withCustomRules(CustomRuleListAfd customRules) { + if (this.innerProperties() == null) { + this.innerProperties = new WebApplicationFirewallPolicyProperties(); + } + this.innerProperties().withCustomRules(customRules); + return this; + } + + /** + * Get the managedRules property: Describes managed rules inside the policy. + * + * @return the managedRules value. + */ + public ManagedRuleSetListAfd managedRules() { + return this.innerProperties() == null ? null : this.innerProperties().managedRules(); + } + + /** + * Set the managedRules property: Describes managed rules inside the policy. + * + * @param managedRules the managedRules value to set. + * @return the WebApplicationFirewallPolicy object itself. + */ + public WebApplicationFirewallPolicy withManagedRules(ManagedRuleSetListAfd managedRules) { + if (this.innerProperties() == null) { + this.innerProperties = new WebApplicationFirewallPolicyProperties(); + } + this.innerProperties().withManagedRules(managedRules); + return this; + } + + /** + * Get the frontendEndpointLinks property: Describes Frontend Endpoints associated with this Web Application + * Firewall policy. + * + * @return the frontendEndpointLinks value. + */ + public List frontendEndpointLinks() { + return this.innerProperties() == null ? null : this.innerProperties().frontendEndpointLinks(); + } + + /** + * Get the routingRuleLinks property: Describes Routing Rules associated with this Web Application Firewall policy. + * + * @return the routingRuleLinks value. + */ + public List routingRuleLinks() { + return this.innerProperties() == null ? null : this.innerProperties().routingRuleLinks(); + } + + /** + * Get the securityPolicyLinks property: Describes Security Policy associated with this Web Application Firewall + * policy. + * + * @return the securityPolicyLinks value. + */ + public List securityPolicyLinks() { + return this.innerProperties() == null ? null : this.innerProperties().securityPolicyLinks(); + } + + /** + * Get the provisioningState property: Provisioning state of the policy. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the resourceState property: The resourceState property. + * + * @return the resourceState value. + */ + public PolicyResourceState resourceState() { + return this.innerProperties() == null ? null : this.innerProperties().resourceState(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + if (sku() != null) { + sku().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeStringField("etag", this.etag); + jsonWriter.writeJsonField("sku", this.sku); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WebApplicationFirewallPolicy from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WebApplicationFirewallPolicy 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 WebApplicationFirewallPolicy. + */ + public static WebApplicationFirewallPolicy fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WebApplicationFirewallPolicy deserializedWebApplicationFirewallPolicy = new WebApplicationFirewallPolicy(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedWebApplicationFirewallPolicy.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedWebApplicationFirewallPolicy.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedWebApplicationFirewallPolicy.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedWebApplicationFirewallPolicy.innerProperties + = WebApplicationFirewallPolicyProperties.fromJson(reader); + } else if ("etag".equals(fieldName)) { + deserializedWebApplicationFirewallPolicy.etag = reader.getString(); + } else if ("sku".equals(fieldName)) { + deserializedWebApplicationFirewallPolicy.sku = Sku.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedWebApplicationFirewallPolicy.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedWebApplicationFirewallPolicy; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WebApplicationFirewallScrubbingRules.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WebApplicationFirewallScrubbingRules.java new file mode 100644 index 000000000000..2390e548d752 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WebApplicationFirewallScrubbingRules.java @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Defines the contents of the log scrubbing rules. + */ +@Fluent +public final class WebApplicationFirewallScrubbingRules + implements JsonSerializable { + /* + * The variable to be scrubbed from the logs. + */ + private ScrubbingRuleEntryMatchVariable matchVariable; + + /* + * When matchVariable is a collection, operate on the selector to specify which elements in the collection this rule + * applies to. + */ + private ScrubbingRuleEntryMatchOperator selectorMatchOperator; + + /* + * When matchVariable is a collection, operator used to specify which elements in the collection this rule applies + * to. + */ + private String selector; + + /* + * Defines the state of a log scrubbing rule. Default value is enabled. + */ + private ScrubbingRuleEntryState state; + + /** + * Creates an instance of WebApplicationFirewallScrubbingRules class. + */ + public WebApplicationFirewallScrubbingRules() { + } + + /** + * Get the matchVariable property: The variable to be scrubbed from the logs. + * + * @return the matchVariable value. + */ + public ScrubbingRuleEntryMatchVariable matchVariable() { + return this.matchVariable; + } + + /** + * Set the matchVariable property: The variable to be scrubbed from the logs. + * + * @param matchVariable the matchVariable value to set. + * @return the WebApplicationFirewallScrubbingRules object itself. + */ + public WebApplicationFirewallScrubbingRules withMatchVariable(ScrubbingRuleEntryMatchVariable matchVariable) { + this.matchVariable = matchVariable; + return this; + } + + /** + * Get the selectorMatchOperator property: When matchVariable is a collection, operate on the selector to specify + * which elements in the collection this rule applies to. + * + * @return the selectorMatchOperator value. + */ + public ScrubbingRuleEntryMatchOperator selectorMatchOperator() { + return this.selectorMatchOperator; + } + + /** + * Set the selectorMatchOperator property: When matchVariable is a collection, operate on the selector to specify + * which elements in the collection this rule applies to. + * + * @param selectorMatchOperator the selectorMatchOperator value to set. + * @return the WebApplicationFirewallScrubbingRules object itself. + */ + public WebApplicationFirewallScrubbingRules + withSelectorMatchOperator(ScrubbingRuleEntryMatchOperator 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 rule applies to. + * + * @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 rule applies to. + * + * @param selector the selector value to set. + * @return the WebApplicationFirewallScrubbingRules object itself. + */ + public WebApplicationFirewallScrubbingRules withSelector(String selector) { + this.selector = selector; + return this; + } + + /** + * Get the state property: Defines the state of a log scrubbing rule. Default value is enabled. + * + * @return the state value. + */ + public ScrubbingRuleEntryState state() { + return this.state; + } + + /** + * Set the state property: Defines the state of a log scrubbing rule. Default value is enabled. + * + * @param state the state value to set. + * @return the WebApplicationFirewallScrubbingRules object itself. + */ + public WebApplicationFirewallScrubbingRules withState(ScrubbingRuleEntryState state) { + this.state = state; + 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} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("matchVariable", this.matchVariable == null ? null : this.matchVariable.toString()); + jsonWriter.writeStringField("selectorMatchOperator", + this.selectorMatchOperator == null ? null : this.selectorMatchOperator.toString()); + jsonWriter.writeStringField("selector", this.selector); + jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WebApplicationFirewallScrubbingRules from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WebApplicationFirewallScrubbingRules 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 WebApplicationFirewallScrubbingRules. + */ + public static WebApplicationFirewallScrubbingRules fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WebApplicationFirewallScrubbingRules deserializedWebApplicationFirewallScrubbingRules + = new WebApplicationFirewallScrubbingRules(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("matchVariable".equals(fieldName)) { + deserializedWebApplicationFirewallScrubbingRules.matchVariable + = ScrubbingRuleEntryMatchVariable.fromString(reader.getString()); + } else if ("selectorMatchOperator".equals(fieldName)) { + deserializedWebApplicationFirewallScrubbingRules.selectorMatchOperator + = ScrubbingRuleEntryMatchOperator.fromString(reader.getString()); + } else if ("selector".equals(fieldName)) { + deserializedWebApplicationFirewallScrubbingRules.selector = reader.getString(); + } else if ("state".equals(fieldName)) { + deserializedWebApplicationFirewallScrubbingRules.state + = ScrubbingRuleEntryState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedWebApplicationFirewallScrubbingRules; + }); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WebApplicationFirewallScrubbingState.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WebApplicationFirewallScrubbingState.java new file mode 100644 index 000000000000..3a3fb27d2404 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/WebApplicationFirewallScrubbingState.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.cdn.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * State of the log scrubbing config. Default value is Enabled. + */ +public final class WebApplicationFirewallScrubbingState + extends ExpandableStringEnum { + /** + * Static value Enabled for WebApplicationFirewallScrubbingState. + */ + public static final WebApplicationFirewallScrubbingState ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for WebApplicationFirewallScrubbingState. + */ + public static final WebApplicationFirewallScrubbingState DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of WebApplicationFirewallScrubbingState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public WebApplicationFirewallScrubbingState() { + } + + /** + * Creates or finds a WebApplicationFirewallScrubbingState from its string representation. + * + * @param name a name to look for. + * @return the corresponding WebApplicationFirewallScrubbingState. + */ + public static WebApplicationFirewallScrubbingState fromString(String name) { + return fromString(name, WebApplicationFirewallScrubbingState.class); + } + + /** + * Gets known WebApplicationFirewallScrubbingState values. + * + * @return known WebApplicationFirewallScrubbingState values. + */ + public static Collection values() { + return values(WebApplicationFirewallScrubbingState.class); + } +} diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/package-info.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/package-info.java index 2f7f342c59ea..e70afad563ba 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/package-info.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/package-info.java @@ -1,9 +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 containing the data models for CdnManagementClient. - * Cdn Management Client. + * Package containing the data models for Cdn. + * Use these APIs to manage Azure Front Door and CDN resources through the Azure Resource Manager. You must make sure + * that requests made to these resources are secure. */ package com.azure.resourcemanager.cdn.models; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/package-info.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/package-info.java index e6659b9db3ba..2279be26f85c 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/package-info.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/package-info.java @@ -1,9 +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 containing the classes for CdnManagementClient. - * Cdn Management Client. + * Package containing the classes for Cdn. + * Use these APIs to manage Azure Front Door and CDN resources through the Azure Resource Manager. You must make sure + * that requests made to these resources are secure. */ package com.azure.resourcemanager.cdn; diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/module-info.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/module-info.java index 4c67d0cf340e..ab99f268c134 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/module-info.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/module-info.java @@ -13,4 +13,5 @@ // open packages specifically for azure core opens com.azure.resourcemanager.cdn.fluent.models to com.azure.core; opens com.azure.resourcemanager.cdn.models to com.azure.core; + opens com.azure.resourcemanager.cdn.implementation.models to com.azure.core; } diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/resources/META-INF/azure-resourcemanager-cdn_metadata.json b/sdk/cdn/azure-resourcemanager-cdn/src/main/resources/META-INF/azure-resourcemanager-cdn_metadata.json new file mode 100644 index 000000000000..6755adaf03b2 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/resources/META-INF/azure-resourcemanager-cdn_metadata.json @@ -0,0 +1 @@ +{"flavor":"azure","apiVersions":{"Microsoft.Cdn":"2025-09-01-preview"},"generatedFiles":["src/main/java/com/azure/resourcemanager/cdn/fluent/AfdCustomDomainsClient.java","src/main/java/com/azure/resourcemanager/cdn/fluent/AfdEndpointsClient.java","src/main/java/com/azure/resourcemanager/cdn/fluent/AfdOriginGroupsClient.java","src/main/java/com/azure/resourcemanager/cdn/fluent/AfdOriginsClient.java","src/main/java/com/azure/resourcemanager/cdn/fluent/AfdProfilesClient.java","src/main/java/com/azure/resourcemanager/cdn/fluent/CdnManagementClient.java","src/main/java/com/azure/resourcemanager/cdn/fluent/CustomDomainsClient.java","src/main/java/com/azure/resourcemanager/cdn/fluent/DeploymentVersionsClient.java","src/main/java/com/azure/resourcemanager/cdn/fluent/EdgeNodesClient.java","src/main/java/com/azure/resourcemanager/cdn/fluent/EndpointsClient.java","src/main/java/com/azure/resourcemanager/cdn/fluent/KeyGroupsClient.java","src/main/java/com/azure/resourcemanager/cdn/fluent/KnowledgeSourcesClient.java","src/main/java/com/azure/resourcemanager/cdn/fluent/LogAnalyticsClient.java","src/main/java/com/azure/resourcemanager/cdn/fluent/ManagedRuleSetsClient.java","src/main/java/com/azure/resourcemanager/cdn/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/cdn/fluent/OriginGroupsClient.java","src/main/java/com/azure/resourcemanager/cdn/fluent/OriginsClient.java","src/main/java/com/azure/resourcemanager/cdn/fluent/PoliciesClient.java","src/main/java/com/azure/resourcemanager/cdn/fluent/ProfileAgentsClient.java","src/main/java/com/azure/resourcemanager/cdn/fluent/ProfilesClient.java","src/main/java/com/azure/resourcemanager/cdn/fluent/ResourceUsagesClient.java","src/main/java/com/azure/resourcemanager/cdn/fluent/RoutesClient.java","src/main/java/com/azure/resourcemanager/cdn/fluent/RuleSetsClient.java","src/main/java/com/azure/resourcemanager/cdn/fluent/RulesClient.java","src/main/java/com/azure/resourcemanager/cdn/fluent/SecretsClient.java","src/main/java/com/azure/resourcemanager/cdn/fluent/SecurityPoliciesClient.java","src/main/java/com/azure/resourcemanager/cdn/fluent/WebAgentsClient.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdDomainInner.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdDomainProperties.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdDomainUpdatePropertiesParameters.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdEndpointInner.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdEndpointProperties.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdEndpointPropertiesUpdateParameters.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdOriginGroupInner.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdOriginGroupProperties.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdOriginGroupUpdatePropertiesParameters.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdOriginInner.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdOriginProperties.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/AfdOriginUpdatePropertiesParameters.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/CanMigrateProperties.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/CanMigrateResultInner.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/CdnWebApplicationFirewallPolicyInner.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/CdnWebApplicationFirewallPolicyProperties.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/CheckEndpointNameAvailabilityOutputInner.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/CheckNameAvailabilityOutputInner.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/CompareDeploymentVersionsResponseInner.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/ContinentsResponseInner.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/CustomDomainInner.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/CustomDomainProperties.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/CustomDomainPropertiesParameters.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/DeepCreatedCustomDomainProperties.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/DeepCreatedOriginGroupProperties.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/DeepCreatedOriginProperties.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/DeploymentVersionInner.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/DeploymentVersionProperties.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/DeploymentVersionUpdateProperties.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/EdgeNodeInner.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/EdgeNodeProperties.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/EndpointInner.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/EndpointProperties.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/EndpointPropertiesUpdateParameters.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/KeyGroupInner.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/KeyGroupProperties.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/KnowledgeSourceInner.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/KnowledgeSourceProperties.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/KnowledgeSourcePropertiesUpdateParameters.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/ManagedRuleSetDefinitionInner.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/ManagedRuleSetDefinitionProperties.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/MetricsResponseInner.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/MigrateResultInner.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/MigrateResultProperties.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/OperationProperties.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/OriginGroupInner.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/OriginGroupProperties.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/OriginGroupUpdatePropertiesParameters.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/OriginInner.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/OriginProperties.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/OriginUpdatePropertiesParameters.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/PolicySettingsLogScrubbing.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/ProfileAgentInner.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/ProfileAgentProperties.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/ProfileAgentUpdateProperties.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/ProfileInner.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/ProfileProperties.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/ProfilePropertiesUpdateParameters.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/RankingsResponseInner.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/ResourceUsageInner.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/ResourcesResponseInner.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/RouteInner.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/RouteProperties.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/RouteUpdatePropertiesParameters.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/RuleInner.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/RuleProperties.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/RuleSetInner.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/RuleSetProperties.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/RuleUpdatePropertiesParameters.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/SecretInner.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/SecretProperties.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/SecurityPolicyInner.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/SecurityPolicyProperties.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/SecurityPolicyUpdateProperties.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/SsoUriInner.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/SupportedOptimizationTypesListResultInner.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/UsageInner.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/ValidateCustomDomainOutputInner.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/ValidateProbeOutputInner.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/ValidateSecretOutputInner.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/WafMetricsResponseInner.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/WafRankingsResponseInner.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/WebAgentInner.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/WebAgentProperties.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/WebAgentPropertiesUpdateParameters.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/WebApplicationFirewallPolicyProperties.java","src/main/java/com/azure/resourcemanager/cdn/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/cdn/fluent/package-info.java","src/main/java/com/azure/resourcemanager/cdn/implementation/AfdCustomDomainsClientImpl.java","src/main/java/com/azure/resourcemanager/cdn/implementation/AfdEndpointsClientImpl.java","src/main/java/com/azure/resourcemanager/cdn/implementation/AfdOriginGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/cdn/implementation/AfdOriginsClientImpl.java","src/main/java/com/azure/resourcemanager/cdn/implementation/AfdProfilesClientImpl.java","src/main/java/com/azure/resourcemanager/cdn/implementation/CdnManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/cdn/implementation/CdnManagementClientImpl.java","src/main/java/com/azure/resourcemanager/cdn/implementation/CustomDomainsClientImpl.java","src/main/java/com/azure/resourcemanager/cdn/implementation/DeploymentVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/cdn/implementation/EdgeNodesClientImpl.java","src/main/java/com/azure/resourcemanager/cdn/implementation/EndpointsClientImpl.java","src/main/java/com/azure/resourcemanager/cdn/implementation/KeyGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/cdn/implementation/KnowledgeSourcesClientImpl.java","src/main/java/com/azure/resourcemanager/cdn/implementation/LogAnalyticsClientImpl.java","src/main/java/com/azure/resourcemanager/cdn/implementation/ManagedRuleSetsClientImpl.java","src/main/java/com/azure/resourcemanager/cdn/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/cdn/implementation/OriginGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/cdn/implementation/OriginsClientImpl.java","src/main/java/com/azure/resourcemanager/cdn/implementation/PoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/cdn/implementation/ProfileAgentsClientImpl.java","src/main/java/com/azure/resourcemanager/cdn/implementation/ProfilesClientImpl.java","src/main/java/com/azure/resourcemanager/cdn/implementation/ResourceUsagesClientImpl.java","src/main/java/com/azure/resourcemanager/cdn/implementation/RoutesClientImpl.java","src/main/java/com/azure/resourcemanager/cdn/implementation/RuleSetsClientImpl.java","src/main/java/com/azure/resourcemanager/cdn/implementation/RulesClientImpl.java","src/main/java/com/azure/resourcemanager/cdn/implementation/SecretsClientImpl.java","src/main/java/com/azure/resourcemanager/cdn/implementation/SecurityPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/cdn/implementation/WebAgentsClientImpl.java","src/main/java/com/azure/resourcemanager/cdn/implementation/models/AFDDomainListResult.java","src/main/java/com/azure/resourcemanager/cdn/implementation/models/AFDEndpointListResult.java","src/main/java/com/azure/resourcemanager/cdn/implementation/models/AFDOriginGroupListResult.java","src/main/java/com/azure/resourcemanager/cdn/implementation/models/AFDOriginListResult.java","src/main/java/com/azure/resourcemanager/cdn/implementation/models/CdnWebApplicationFirewallPolicyList.java","src/main/java/com/azure/resourcemanager/cdn/implementation/models/CustomDomainListResult.java","src/main/java/com/azure/resourcemanager/cdn/implementation/models/DeploymentVersionListResult.java","src/main/java/com/azure/resourcemanager/cdn/implementation/models/EdgenodeResult.java","src/main/java/com/azure/resourcemanager/cdn/implementation/models/EndpointListResult.java","src/main/java/com/azure/resourcemanager/cdn/implementation/models/KeyGroupListResult.java","src/main/java/com/azure/resourcemanager/cdn/implementation/models/KnowledgeSourceList.java","src/main/java/com/azure/resourcemanager/cdn/implementation/models/ManagedRuleSetDefinitionList.java","src/main/java/com/azure/resourcemanager/cdn/implementation/models/OperationsListResult.java","src/main/java/com/azure/resourcemanager/cdn/implementation/models/OriginGroupListResult.java","src/main/java/com/azure/resourcemanager/cdn/implementation/models/OriginListResult.java","src/main/java/com/azure/resourcemanager/cdn/implementation/models/ProfileAgentListResult.java","src/main/java/com/azure/resourcemanager/cdn/implementation/models/ProfileListResult.java","src/main/java/com/azure/resourcemanager/cdn/implementation/models/ResourceUsageListResult.java","src/main/java/com/azure/resourcemanager/cdn/implementation/models/RouteListResult.java","src/main/java/com/azure/resourcemanager/cdn/implementation/models/RuleListResult.java","src/main/java/com/azure/resourcemanager/cdn/implementation/models/RuleSetListResult.java","src/main/java/com/azure/resourcemanager/cdn/implementation/models/SecretListResult.java","src/main/java/com/azure/resourcemanager/cdn/implementation/models/SecurityPolicyListResult.java","src/main/java/com/azure/resourcemanager/cdn/implementation/models/UsagesListResult.java","src/main/java/com/azure/resourcemanager/cdn/implementation/models/WebAgentList.java","src/main/java/com/azure/resourcemanager/cdn/models/ActionType.java","src/main/java/com/azure/resourcemanager/cdn/models/ActivatedResourceReference.java","src/main/java/com/azure/resourcemanager/cdn/models/AfdCertificateType.java","src/main/java/com/azure/resourcemanager/cdn/models/AfdCipherSuiteSetType.java","src/main/java/com/azure/resourcemanager/cdn/models/AfdCustomizedCipherSuiteForTls12.java","src/main/java/com/azure/resourcemanager/cdn/models/AfdCustomizedCipherSuiteForTls13.java","src/main/java/com/azure/resourcemanager/cdn/models/AfdDomainHttpsCustomizedCipherSuiteSet.java","src/main/java/com/azure/resourcemanager/cdn/models/AfdDomainHttpsParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/AfdDomainMtlsParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/AfdDomainUpdateParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/AfdEndpointProtocols.java","src/main/java/com/azure/resourcemanager/cdn/models/AfdEndpointUpdateParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/AfdMinimumTlsVersion.java","src/main/java/com/azure/resourcemanager/cdn/models/AfdOriginGroupUpdateParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/AfdOriginUpdateParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/AfdProvisioningState.java","src/main/java/com/azure/resourcemanager/cdn/models/AfdPurgeParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/AfdQueryStringCachingBehavior.java","src/main/java/com/azure/resourcemanager/cdn/models/AfdRouteCacheConfiguration.java","src/main/java/com/azure/resourcemanager/cdn/models/AfdRouteGrpcState.java","src/main/java/com/azure/resourcemanager/cdn/models/AfdSecretMtlsCertificateChain.java","src/main/java/com/azure/resourcemanager/cdn/models/AfdStateProperties.java","src/main/java/com/azure/resourcemanager/cdn/models/AfdUrlSigningAction.java","src/main/java/com/azure/resourcemanager/cdn/models/AfdUrlSigningActionParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/AgentPath.java","src/main/java/com/azure/resourcemanager/cdn/models/AgentPathType.java","src/main/java/com/azure/resourcemanager/cdn/models/Algorithm.java","src/main/java/com/azure/resourcemanager/cdn/models/ApprovalStatus.java","src/main/java/com/azure/resourcemanager/cdn/models/AutoGeneratedDomainNameLabelScope.java","src/main/java/com/azure/resourcemanager/cdn/models/AzureFirstPartyManagedCertificate.java","src/main/java/com/azure/resourcemanager/cdn/models/AzureFirstPartyManagedCertificateParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/CacheBehavior.java","src/main/java/com/azure/resourcemanager/cdn/models/CacheConfiguration.java","src/main/java/com/azure/resourcemanager/cdn/models/CacheExpirationActionParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/CacheKeyQueryStringActionParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/CacheType.java","src/main/java/com/azure/resourcemanager/cdn/models/CanMigrateDefaultSku.java","src/main/java/com/azure/resourcemanager/cdn/models/CanMigrateParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/CdnCertificateSourceParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/CdnManagedHttpsParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/CdnMigrationToAfdParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/CdnWebApplicationFirewallPolicyPatchParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/Certificate.java","src/main/java/com/azure/resourcemanager/cdn/models/CertificateRevocationCheckEnabledState.java","src/main/java/com/azure/resourcemanager/cdn/models/CertificateSource.java","src/main/java/com/azure/resourcemanager/cdn/models/CertificateSourceParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/CertificateSourceParametersType.java","src/main/java/com/azure/resourcemanager/cdn/models/CertificateType.java","src/main/java/com/azure/resourcemanager/cdn/models/CheckEndpointNameAvailabilityInput.java","src/main/java/com/azure/resourcemanager/cdn/models/CheckHostnameAvailabilityInput.java","src/main/java/com/azure/resourcemanager/cdn/models/CheckNameAvailabilityInput.java","src/main/java/com/azure/resourcemanager/cdn/models/CidrIpAddress.java","src/main/java/com/azure/resourcemanager/cdn/models/ClientCertificateRequiredAndOriginValidatesAdvancedSettings.java","src/main/java/com/azure/resourcemanager/cdn/models/ClientCertificateRequiredAndValidatedAdvancedSettings.java","src/main/java/com/azure/resourcemanager/cdn/models/ClientCertificateValidatedIfPresentedAdvancedSettings.java","src/main/java/com/azure/resourcemanager/cdn/models/ClientPortMatchConditionParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/ClientPortOperator.java","src/main/java/com/azure/resourcemanager/cdn/models/CompareDeploymentVersionsParameter.java","src/main/java/com/azure/resourcemanager/cdn/models/CompleteMtlsPassthroughToOriginAdvancedSettings.java","src/main/java/com/azure/resourcemanager/cdn/models/CompressionSettings.java","src/main/java/com/azure/resourcemanager/cdn/models/ContinentsResponseContinentsItem.java","src/main/java/com/azure/resourcemanager/cdn/models/ContinentsResponseCountryOrRegionsItem.java","src/main/java/com/azure/resourcemanager/cdn/models/CookiesMatchConditionParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/CookiesOperator.java","src/main/java/com/azure/resourcemanager/cdn/models/CustomDomainHttpsParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/CustomDomainParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/CustomDomainResourceState.java","src/main/java/com/azure/resourcemanager/cdn/models/CustomHttpsProvisioningState.java","src/main/java/com/azure/resourcemanager/cdn/models/CustomHttpsProvisioningSubstate.java","src/main/java/com/azure/resourcemanager/cdn/models/CustomRule.java","src/main/java/com/azure/resourcemanager/cdn/models/CustomRuleAfd.java","src/main/java/com/azure/resourcemanager/cdn/models/CustomRuleEnabledState.java","src/main/java/com/azure/resourcemanager/cdn/models/CustomRuleList.java","src/main/java/com/azure/resourcemanager/cdn/models/CustomRuleListAfd.java","src/main/java/com/azure/resourcemanager/cdn/models/CustomerCertificate.java","src/main/java/com/azure/resourcemanager/cdn/models/CustomerCertificateParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/DeepCreatedCustomDomain.java","src/main/java/com/azure/resourcemanager/cdn/models/DeepCreatedOrigin.java","src/main/java/com/azure/resourcemanager/cdn/models/DeepCreatedOriginGroup.java","src/main/java/com/azure/resourcemanager/cdn/models/DeleteRule.java","src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRule.java","src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleAction.java","src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleActionParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleActionParametersType.java","src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleActionValue.java","src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleCacheExpirationAction.java","src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleCacheKeyQueryStringAction.java","src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleClientPortCondition.java","src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleCondition.java","src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleConditionParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleConditionParametersType.java","src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleCookiesCondition.java","src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleEdgeActionParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleHostnameCondition.java","src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleHttpVersionCondition.java","src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleIsDeviceCondition.java","src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRulePostArgsCondition.java","src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleQueryStringCondition.java","src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleRemoteAddressCondition.java","src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleRequestBodyCondition.java","src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleRequestHeaderAction.java","src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleRequestHeaderCondition.java","src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleRequestMethodCondition.java","src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleRequestSchemeCondition.java","src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleRequestUriCondition.java","src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleResponseHeaderAction.java","src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleRouteConfigurationOverrideAction.java","src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleServerPortCondition.java","src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleSocketAddrCondition.java","src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleSslProtocolCondition.java","src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleUrlFileExtensionCondition.java","src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleUrlFileNameCondition.java","src/main/java/com/azure/resourcemanager/cdn/models/DeliveryRuleUrlPathCondition.java","src/main/java/com/azure/resourcemanager/cdn/models/DeploymentRolloutStatus.java","src/main/java/com/azure/resourcemanager/cdn/models/DeploymentStages.java","src/main/java/com/azure/resourcemanager/cdn/models/DeploymentStatus.java","src/main/java/com/azure/resourcemanager/cdn/models/DeploymentVersionAfdOriginChange.java","src/main/java/com/azure/resourcemanager/cdn/models/DeploymentVersionAfdOriginGroupChange.java","src/main/java/com/azure/resourcemanager/cdn/models/DeploymentVersionChange.java","src/main/java/com/azure/resourcemanager/cdn/models/DeploymentVersionRouteChange.java","src/main/java/com/azure/resourcemanager/cdn/models/DeploymentVersionRuleChange.java","src/main/java/com/azure/resourcemanager/cdn/models/DeploymentVersionRuleSetChange.java","src/main/java/com/azure/resourcemanager/cdn/models/DeploymentVersionSecurityPolicyChange.java","src/main/java/com/azure/resourcemanager/cdn/models/DeploymentVersionUpdate.java","src/main/java/com/azure/resourcemanager/cdn/models/DestinationProtocol.java","src/main/java/com/azure/resourcemanager/cdn/models/DimensionProperties.java","src/main/java/com/azure/resourcemanager/cdn/models/DomainValidationProperties.java","src/main/java/com/azure/resourcemanager/cdn/models/DomainValidationState.java","src/main/java/com/azure/resourcemanager/cdn/models/EdgeAction.java","src/main/java/com/azure/resourcemanager/cdn/models/EnabledState.java","src/main/java/com/azure/resourcemanager/cdn/models/EndpointPropertiesUpdateParametersDeliveryPolicy.java","src/main/java/com/azure/resourcemanager/cdn/models/EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink.java","src/main/java/com/azure/resourcemanager/cdn/models/EndpointProvisioningState.java","src/main/java/com/azure/resourcemanager/cdn/models/EndpointResource.java","src/main/java/com/azure/resourcemanager/cdn/models/EndpointResourceState.java","src/main/java/com/azure/resourcemanager/cdn/models/EndpointUpdateParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/EnforceMtlsEnabledState.java","src/main/java/com/azure/resourcemanager/cdn/models/ForwardingProtocol.java","src/main/java/com/azure/resourcemanager/cdn/models/FrontendEndpointLink.java","src/main/java/com/azure/resourcemanager/cdn/models/GeoFilter.java","src/main/java/com/azure/resourcemanager/cdn/models/GeoFilterActions.java","src/main/java/com/azure/resourcemanager/cdn/models/GroupByVariable.java","src/main/java/com/azure/resourcemanager/cdn/models/HeaderAction.java","src/main/java/com/azure/resourcemanager/cdn/models/HeaderActionParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/HealthProbeParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/HealthProbeRequestType.java","src/main/java/com/azure/resourcemanager/cdn/models/HostnameMatchConditionParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/HostnameOperator.java","src/main/java/com/azure/resourcemanager/cdn/models/HttpErrorRangeParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/HttpVersionMatchConditionParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/HttpVersionOperator.java","src/main/java/com/azure/resourcemanager/cdn/models/HttpsRedirect.java","src/main/java/com/azure/resourcemanager/cdn/models/InvocationPoint.java","src/main/java/com/azure/resourcemanager/cdn/models/IpAddressGroup.java","src/main/java/com/azure/resourcemanager/cdn/models/IsDeviceMatchConditionParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/IsDeviceMatchConditionParametersMatchValuesItem.java","src/main/java/com/azure/resourcemanager/cdn/models/IsDeviceOperator.java","src/main/java/com/azure/resourcemanager/cdn/models/KeyGroupUpdatePropertiesParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/KeyVaultCertificateSourceParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/KeyVaultSigningKeyParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/KeyVaultSigningKeyParametersType.java","src/main/java/com/azure/resourcemanager/cdn/models/KnowledgeSourceProvisioningState.java","src/main/java/com/azure/resourcemanager/cdn/models/KnowledgeSourceType.java","src/main/java/com/azure/resourcemanager/cdn/models/KnowledgeSourceUpdateFrequency.java","src/main/java/com/azure/resourcemanager/cdn/models/KnowledgeSourceUpdateParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/LinkToDefaultDomain.java","src/main/java/com/azure/resourcemanager/cdn/models/LoadBalancingSettingsParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/LoadParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/LogMetric.java","src/main/java/com/azure/resourcemanager/cdn/models/LogMetricsGranularity.java","src/main/java/com/azure/resourcemanager/cdn/models/LogMetricsGroupBy.java","src/main/java/com/azure/resourcemanager/cdn/models/LogRanking.java","src/main/java/com/azure/resourcemanager/cdn/models/LogRankingMetric.java","src/main/java/com/azure/resourcemanager/cdn/models/LogSpecification.java","src/main/java/com/azure/resourcemanager/cdn/models/ManagedCertificate.java","src/main/java/com/azure/resourcemanager/cdn/models/ManagedCertificateParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleDefinition.java","src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleEnabledState.java","src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleExclusion.java","src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleExclusionMatchVariable.java","src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleExclusionSelectorMatchOperator.java","src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleGroupDefinition.java","src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleGroupOverride.java","src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleGroupOverrideAfd.java","src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleOverride.java","src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleOverrideAfd.java","src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleSet.java","src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleSetActionType.java","src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleSetAfd.java","src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleSetList.java","src/main/java/com/azure/resourcemanager/cdn/models/ManagedRuleSetListAfd.java","src/main/java/com/azure/resourcemanager/cdn/models/ManagedServiceIdentity.java","src/main/java/com/azure/resourcemanager/cdn/models/ManagedServiceIdentityType.java","src/main/java/com/azure/resourcemanager/cdn/models/MatchCondition.java","src/main/java/com/azure/resourcemanager/cdn/models/MatchConditionAfd.java","src/main/java/com/azure/resourcemanager/cdn/models/MatchProcessingBehavior.java","src/main/java/com/azure/resourcemanager/cdn/models/MatchVariable.java","src/main/java/com/azure/resourcemanager/cdn/models/MetricAvailability.java","src/main/java/com/azure/resourcemanager/cdn/models/MetricSpecification.java","src/main/java/com/azure/resourcemanager/cdn/models/MetricsGranularity.java","src/main/java/com/azure/resourcemanager/cdn/models/MetricsResponseSeriesItem.java","src/main/java/com/azure/resourcemanager/cdn/models/MetricsResponseSeriesItemData.java","src/main/java/com/azure/resourcemanager/cdn/models/MetricsResponseSeriesPropertiesItemsItem.java","src/main/java/com/azure/resourcemanager/cdn/models/MetricsSeriesUnit.java","src/main/java/com/azure/resourcemanager/cdn/models/MigrationEndpointMapping.java","src/main/java/com/azure/resourcemanager/cdn/models/MigrationErrorType.java","src/main/java/com/azure/resourcemanager/cdn/models/MigrationParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/MigrationWebApplicationFirewallMapping.java","src/main/java/com/azure/resourcemanager/cdn/models/MinimumTlsVersion.java","src/main/java/com/azure/resourcemanager/cdn/models/MtlsScenarioType.java","src/main/java/com/azure/resourcemanager/cdn/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/cdn/models/Operator.java","src/main/java/com/azure/resourcemanager/cdn/models/OptimizationType.java","src/main/java/com/azure/resourcemanager/cdn/models/OriginAuthenticationProperties.java","src/main/java/com/azure/resourcemanager/cdn/models/OriginAuthenticationType.java","src/main/java/com/azure/resourcemanager/cdn/models/OriginCapacityResourceProperties.java","src/main/java/com/azure/resourcemanager/cdn/models/OriginGroupOverride.java","src/main/java/com/azure/resourcemanager/cdn/models/OriginGroupOverrideAction.java","src/main/java/com/azure/resourcemanager/cdn/models/OriginGroupOverrideActionParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/OriginGroupProvisioningState.java","src/main/java/com/azure/resourcemanager/cdn/models/OriginGroupResourceState.java","src/main/java/com/azure/resourcemanager/cdn/models/OriginGroupUpdateParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/OriginProvisioningState.java","src/main/java/com/azure/resourcemanager/cdn/models/OriginResourceState.java","src/main/java/com/azure/resourcemanager/cdn/models/OriginUpdateParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/ParamIndicator.java","src/main/java/com/azure/resourcemanager/cdn/models/PolicyEnabledState.java","src/main/java/com/azure/resourcemanager/cdn/models/PolicyMode.java","src/main/java/com/azure/resourcemanager/cdn/models/PolicyRequestBodyCheck.java","src/main/java/com/azure/resourcemanager/cdn/models/PolicyResourceState.java","src/main/java/com/azure/resourcemanager/cdn/models/PolicySettings.java","src/main/java/com/azure/resourcemanager/cdn/models/PolicySettingsAfd.java","src/main/java/com/azure/resourcemanager/cdn/models/PolicySettingsDefaultCustomBlockResponseStatusCode.java","src/main/java/com/azure/resourcemanager/cdn/models/PostArgsMatchConditionParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/PostArgsOperator.java","src/main/java/com/azure/resourcemanager/cdn/models/PreviewSupportedResourceType.java","src/main/java/com/azure/resourcemanager/cdn/models/PrivateEndpointStatus.java","src/main/java/com/azure/resourcemanager/cdn/models/ProbeProtocol.java","src/main/java/com/azure/resourcemanager/cdn/models/ProfileAgentProvisioningState.java","src/main/java/com/azure/resourcemanager/cdn/models/ProfileAgentUpdateParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/ProfileChangeSkuWafMapping.java","src/main/java/com/azure/resourcemanager/cdn/models/ProfileLogScrubbing.java","src/main/java/com/azure/resourcemanager/cdn/models/ProfileProvisioningState.java","src/main/java/com/azure/resourcemanager/cdn/models/ProfileResourceState.java","src/main/java/com/azure/resourcemanager/cdn/models/ProfileScrubbingRules.java","src/main/java/com/azure/resourcemanager/cdn/models/ProfileScrubbingState.java","src/main/java/com/azure/resourcemanager/cdn/models/ProfileUpdateParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/ProfileUpgradeParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/ProtocolType.java","src/main/java/com/azure/resourcemanager/cdn/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/cdn/models/PurgeParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/QueryStringBehavior.java","src/main/java/com/azure/resourcemanager/cdn/models/QueryStringCachingBehavior.java","src/main/java/com/azure/resourcemanager/cdn/models/QueryStringMatchConditionParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/QueryStringOperator.java","src/main/java/com/azure/resourcemanager/cdn/models/RankingsResponseTablesItem.java","src/main/java/com/azure/resourcemanager/cdn/models/RankingsResponseTablesPropertiesItemsItem.java","src/main/java/com/azure/resourcemanager/cdn/models/RankingsResponseTablesPropertiesItemsMetricsItem.java","src/main/java/com/azure/resourcemanager/cdn/models/RateLimitRule.java","src/main/java/com/azure/resourcemanager/cdn/models/RateLimitRuleList.java","src/main/java/com/azure/resourcemanager/cdn/models/RedirectType.java","src/main/java/com/azure/resourcemanager/cdn/models/RemoteAddressMatchConditionParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/RemoteAddressOperator.java","src/main/java/com/azure/resourcemanager/cdn/models/RequestBodyMatchConditionParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/RequestBodyOperator.java","src/main/java/com/azure/resourcemanager/cdn/models/RequestHeaderMatchConditionParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/RequestHeaderOperator.java","src/main/java/com/azure/resourcemanager/cdn/models/RequestMethodMatchConditionParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/RequestMethodMatchConditionParametersMatchValuesItem.java","src/main/java/com/azure/resourcemanager/cdn/models/RequestMethodOperator.java","src/main/java/com/azure/resourcemanager/cdn/models/RequestSchemeMatchConditionParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/RequestSchemeMatchConditionParametersMatchValuesItem.java","src/main/java/com/azure/resourcemanager/cdn/models/RequestUriMatchConditionParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/RequestUriOperator.java","src/main/java/com/azure/resourcemanager/cdn/models/ResourceReference.java","src/main/java/com/azure/resourcemanager/cdn/models/ResourceType.java","src/main/java/com/azure/resourcemanager/cdn/models/ResourceUsageUnit.java","src/main/java/com/azure/resourcemanager/cdn/models/ResourcesResponseCustomDomainsItem.java","src/main/java/com/azure/resourcemanager/cdn/models/ResourcesResponseEndpointsItem.java","src/main/java/com/azure/resourcemanager/cdn/models/ResourcesResponseEndpointsPropertiesItemsItem.java","src/main/java/com/azure/resourcemanager/cdn/models/ResponseBasedDetectedErrorTypes.java","src/main/java/com/azure/resourcemanager/cdn/models/ResponseBasedOriginErrorDetectionParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/RouteConfigurationOverrideActionParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/RouteUpdateParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/RoutingRuleLink.java","src/main/java/com/azure/resourcemanager/cdn/models/RuleCacheBehavior.java","src/main/java/com/azure/resourcemanager/cdn/models/RuleIsCompressionEnabled.java","src/main/java/com/azure/resourcemanager/cdn/models/RuleQueryStringCachingBehavior.java","src/main/java/com/azure/resourcemanager/cdn/models/RuleSetsCreateHeaders.java","src/main/java/com/azure/resourcemanager/cdn/models/RuleSetsCreateResponse.java","src/main/java/com/azure/resourcemanager/cdn/models/RuleType.java","src/main/java/com/azure/resourcemanager/cdn/models/RuleUpdateParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/ScrubbingRuleEntryMatchOperator.java","src/main/java/com/azure/resourcemanager/cdn/models/ScrubbingRuleEntryMatchVariable.java","src/main/java/com/azure/resourcemanager/cdn/models/ScrubbingRuleEntryState.java","src/main/java/com/azure/resourcemanager/cdn/models/SecretParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/SecretType.java","src/main/java/com/azure/resourcemanager/cdn/models/SecurityPolicyLink.java","src/main/java/com/azure/resourcemanager/cdn/models/SecurityPolicyPropertiesParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/SecurityPolicyPropertiesWithEmbeddedWafPolicy.java","src/main/java/com/azure/resourcemanager/cdn/models/SecurityPolicyType.java","src/main/java/com/azure/resourcemanager/cdn/models/SecurityPolicyUpdateParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/SecurityPolicyWebApplicationFirewallAssociation.java","src/main/java/com/azure/resourcemanager/cdn/models/SecurityPolicyWebApplicationFirewallParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/SecurityPolicyWebApplicationFirewallParametersWithEmbeddedWafPolicy.java","src/main/java/com/azure/resourcemanager/cdn/models/ServerPortMatchConditionParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/ServerPortOperator.java","src/main/java/com/azure/resourcemanager/cdn/models/ServiceSpecification.java","src/main/java/com/azure/resourcemanager/cdn/models/SharedPrivateLinkResourceProperties.java","src/main/java/com/azure/resourcemanager/cdn/models/SharedPrivateLinkResourceStatus.java","src/main/java/com/azure/resourcemanager/cdn/models/Sku.java","src/main/java/com/azure/resourcemanager/cdn/models/SkuName.java","src/main/java/com/azure/resourcemanager/cdn/models/SocketAddrMatchConditionParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/SocketAddrOperator.java","src/main/java/com/azure/resourcemanager/cdn/models/SslProtocol.java","src/main/java/com/azure/resourcemanager/cdn/models/SslProtocolMatchConditionParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/SslProtocolOperator.java","src/main/java/com/azure/resourcemanager/cdn/models/Status.java","src/main/java/com/azure/resourcemanager/cdn/models/Transform.java","src/main/java/com/azure/resourcemanager/cdn/models/TransformType.java","src/main/java/com/azure/resourcemanager/cdn/models/TypeName.java","src/main/java/com/azure/resourcemanager/cdn/models/UpdateRule.java","src/main/java/com/azure/resourcemanager/cdn/models/UrlFileExtensionMatchConditionParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/UrlFileExtensionOperator.java","src/main/java/com/azure/resourcemanager/cdn/models/UrlFileNameMatchConditionParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/UrlFileNameOperator.java","src/main/java/com/azure/resourcemanager/cdn/models/UrlPathMatchConditionParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/UrlPathOperator.java","src/main/java/com/azure/resourcemanager/cdn/models/UrlRedirectAction.java","src/main/java/com/azure/resourcemanager/cdn/models/UrlRedirectActionParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/UrlRewriteAction.java","src/main/java/com/azure/resourcemanager/cdn/models/UrlRewriteActionParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/UrlSigningAction.java","src/main/java/com/azure/resourcemanager/cdn/models/UrlSigningActionParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/UrlSigningKey.java","src/main/java/com/azure/resourcemanager/cdn/models/UrlSigningKeyParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/UrlSigningParamIdentifier.java","src/main/java/com/azure/resourcemanager/cdn/models/UsageName.java","src/main/java/com/azure/resourcemanager/cdn/models/UsageUnit.java","src/main/java/com/azure/resourcemanager/cdn/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/cdn/models/UserManagedHttpsParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/ValidateCustomDomainInput.java","src/main/java/com/azure/resourcemanager/cdn/models/ValidateProbeInput.java","src/main/java/com/azure/resourcemanager/cdn/models/ValidateSecretInput.java","src/main/java/com/azure/resourcemanager/cdn/models/VariableName.java","src/main/java/com/azure/resourcemanager/cdn/models/WafAction.java","src/main/java/com/azure/resourcemanager/cdn/models/WafGranularity.java","src/main/java/com/azure/resourcemanager/cdn/models/WafMatchVariable.java","src/main/java/com/azure/resourcemanager/cdn/models/WafMetric.java","src/main/java/com/azure/resourcemanager/cdn/models/WafMetricsGranularity.java","src/main/java/com/azure/resourcemanager/cdn/models/WafMetricsResponseSeriesItem.java","src/main/java/com/azure/resourcemanager/cdn/models/WafMetricsResponseSeriesItemData.java","src/main/java/com/azure/resourcemanager/cdn/models/WafMetricsResponseSeriesPropertiesItemsItem.java","src/main/java/com/azure/resourcemanager/cdn/models/WafMetricsSeriesUnit.java","src/main/java/com/azure/resourcemanager/cdn/models/WafRankingGroupBy.java","src/main/java/com/azure/resourcemanager/cdn/models/WafRankingType.java","src/main/java/com/azure/resourcemanager/cdn/models/WafRankingsResponseDataItem.java","src/main/java/com/azure/resourcemanager/cdn/models/WafRankingsResponseDataItemMetric.java","src/main/java/com/azure/resourcemanager/cdn/models/WafRuleType.java","src/main/java/com/azure/resourcemanager/cdn/models/WebAgentProvisioningState.java","src/main/java/com/azure/resourcemanager/cdn/models/WebAgentUpdateParameters.java","src/main/java/com/azure/resourcemanager/cdn/models/WebApplicationFirewallPolicy.java","src/main/java/com/azure/resourcemanager/cdn/models/WebApplicationFirewallScrubbingRules.java","src/main/java/com/azure/resourcemanager/cdn/models/WebApplicationFirewallScrubbingState.java","src/main/java/com/azure/resourcemanager/cdn/models/package-info.java","src/main/java/com/azure/resourcemanager/cdn/package-info.java"]} \ No newline at end of file diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-cdn/proxy-config.json b/sdk/cdn/azure-resourcemanager-cdn/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-cdn/proxy-config.json index ee3d459d326e..a94cd3141e53 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-cdn/proxy-config.json +++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-cdn/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.cdn.implementation.AfdCustomDomainsClientImpl$AfdCustomDomainsService"],["com.azure.resourcemanager.cdn.implementation.AfdEndpointsClientImpl$AfdEndpointsService"],["com.azure.resourcemanager.cdn.implementation.AfdOriginGroupsClientImpl$AfdOriginGroupsService"],["com.azure.resourcemanager.cdn.implementation.AfdOriginsClientImpl$AfdOriginsService"],["com.azure.resourcemanager.cdn.implementation.AfdProfilesClientImpl$AfdProfilesService"],["com.azure.resourcemanager.cdn.implementation.CdnManagementClientImpl$CdnManagementClientService"],["com.azure.resourcemanager.cdn.implementation.CustomDomainsClientImpl$CustomDomainsService"],["com.azure.resourcemanager.cdn.implementation.EdgeNodesClientImpl$EdgeNodesService"],["com.azure.resourcemanager.cdn.implementation.EndpointsClientImpl$EndpointsService"],["com.azure.resourcemanager.cdn.implementation.LogAnalyticsClientImpl$LogAnalyticsService"],["com.azure.resourcemanager.cdn.implementation.ManagedRuleSetsClientImpl$ManagedRuleSetsService"],["com.azure.resourcemanager.cdn.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.cdn.implementation.OriginGroupsClientImpl$OriginGroupsService"],["com.azure.resourcemanager.cdn.implementation.OriginsClientImpl$OriginsService"],["com.azure.resourcemanager.cdn.implementation.PoliciesClientImpl$PoliciesService"],["com.azure.resourcemanager.cdn.implementation.ProfilesClientImpl$ProfilesService"],["com.azure.resourcemanager.cdn.implementation.ResourceUsagesClientImpl$ResourceUsagesService"],["com.azure.resourcemanager.cdn.implementation.RoutesClientImpl$RoutesService"],["com.azure.resourcemanager.cdn.implementation.RuleSetsClientImpl$RuleSetsService"],["com.azure.resourcemanager.cdn.implementation.RulesClientImpl$RulesService"],["com.azure.resourcemanager.cdn.implementation.SecretsClientImpl$SecretsService"],["com.azure.resourcemanager.cdn.implementation.SecurityPoliciesClientImpl$SecurityPoliciesService"]] \ No newline at end of file +[["com.azure.resourcemanager.cdn.implementation.AfdCustomDomainsClientImpl$AfdCustomDomainsService"],["com.azure.resourcemanager.cdn.implementation.AfdEndpointsClientImpl$AfdEndpointsService"],["com.azure.resourcemanager.cdn.implementation.AfdOriginGroupsClientImpl$AfdOriginGroupsService"],["com.azure.resourcemanager.cdn.implementation.AfdOriginsClientImpl$AfdOriginsService"],["com.azure.resourcemanager.cdn.implementation.AfdProfilesClientImpl$AfdProfilesService"],["com.azure.resourcemanager.cdn.implementation.CdnManagementClientImpl$CdnManagementClientService"],["com.azure.resourcemanager.cdn.implementation.CustomDomainsClientImpl$CustomDomainsService"],["com.azure.resourcemanager.cdn.implementation.DeploymentVersionsClientImpl$DeploymentVersionsService"],["com.azure.resourcemanager.cdn.implementation.EdgeNodesClientImpl$EdgeNodesService"],["com.azure.resourcemanager.cdn.implementation.EndpointsClientImpl$EndpointsService"],["com.azure.resourcemanager.cdn.implementation.KeyGroupsClientImpl$KeyGroupsService"],["com.azure.resourcemanager.cdn.implementation.KnowledgeSourcesClientImpl$KnowledgeSourcesService"],["com.azure.resourcemanager.cdn.implementation.LogAnalyticsClientImpl$LogAnalyticsService"],["com.azure.resourcemanager.cdn.implementation.ManagedRuleSetsClientImpl$ManagedRuleSetsService"],["com.azure.resourcemanager.cdn.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.cdn.implementation.OriginGroupsClientImpl$OriginGroupsService"],["com.azure.resourcemanager.cdn.implementation.OriginsClientImpl$OriginsService"],["com.azure.resourcemanager.cdn.implementation.PoliciesClientImpl$PoliciesService"],["com.azure.resourcemanager.cdn.implementation.ProfileAgentsClientImpl$ProfileAgentsService"],["com.azure.resourcemanager.cdn.implementation.ProfilesClientImpl$ProfilesService"],["com.azure.resourcemanager.cdn.implementation.ResourceUsagesClientImpl$ResourceUsagesService"],["com.azure.resourcemanager.cdn.implementation.RoutesClientImpl$RoutesService"],["com.azure.resourcemanager.cdn.implementation.RuleSetsClientImpl$RuleSetsService"],["com.azure.resourcemanager.cdn.implementation.RulesClientImpl$RulesService"],["com.azure.resourcemanager.cdn.implementation.SecretsClientImpl$SecretsService"],["com.azure.resourcemanager.cdn.implementation.SecurityPoliciesClientImpl$SecurityPoliciesService"],["com.azure.resourcemanager.cdn.implementation.WebAgentsClientImpl$WebAgentsService"]] \ No newline at end of file diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/test/java/com/azure/resourcemanager/cdn/CdnProfileOperationsTests.java b/sdk/cdn/azure-resourcemanager-cdn/src/test/java/com/azure/resourcemanager/cdn/CdnProfileOperationsTests.java index e84557d88ee7..5331715d11d0 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/src/test/java/com/azure/resourcemanager/cdn/CdnProfileOperationsTests.java +++ b/sdk/cdn/azure-resourcemanager-cdn/src/test/java/com/azure/resourcemanager/cdn/CdnProfileOperationsTests.java @@ -8,6 +8,9 @@ import com.azure.core.management.Region; import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.appservice.models.AppServiceDomain; +import com.azure.resourcemanager.cdn.models.AfdEndpoint; +import com.azure.resourcemanager.cdn.models.AfdOrigin; +import com.azure.resourcemanager.cdn.models.AfdOriginGroup; import com.azure.resourcemanager.cdn.models.CacheBehavior; import com.azure.resourcemanager.cdn.models.CacheExpirationActionParameters; import com.azure.resourcemanager.cdn.models.CacheType; @@ -19,19 +22,23 @@ import com.azure.resourcemanager.cdn.models.DeliveryRuleHttpVersionCondition; import com.azure.resourcemanager.cdn.models.DeliveryRuleRequestSchemeCondition; import com.azure.resourcemanager.cdn.models.DestinationProtocol; +import com.azure.resourcemanager.cdn.models.EnabledState; +import com.azure.resourcemanager.cdn.models.EnforceMtlsEnabledState; import com.azure.resourcemanager.cdn.models.HttpVersionMatchConditionParameters; import com.azure.resourcemanager.cdn.models.HttpVersionOperator; +import com.azure.resourcemanager.cdn.models.LoadBalancingSettingsParameters; import com.azure.resourcemanager.cdn.models.RedirectType; import com.azure.resourcemanager.cdn.models.RequestSchemeMatchConditionParameters; import com.azure.resourcemanager.cdn.models.RequestSchemeMatchConditionParametersMatchValuesItem; +import com.azure.resourcemanager.cdn.models.SkuName; import com.azure.resourcemanager.cdn.models.UrlRedirectAction; import com.azure.resourcemanager.cdn.models.UrlRedirectActionParameters; import com.azure.resourcemanager.dns.models.DnsZone; import com.azure.resourcemanager.resources.fluentcore.arm.CountryIsoCode; import com.azure.resourcemanager.resources.fluentcore.arm.CountryPhoneCode; import com.azure.resourcemanager.resources.models.ResourceGroup; -import com.azure.resourcemanager.test.utils.TestUtilities; import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import java.util.Arrays; @@ -64,9 +71,9 @@ public void canCreateCdnProfile() { CdnProfile cdnProfile = cdnManager.profiles() .define(cdnProfileName) - .withRegion(region) + .withGlobal() .withExistingResourceGroup(resourceGroup) - .withStandardMicrosoftSku() + .withSku(SkuName.STANDARD_AZURE_FRONT_DOOR) .create(); Assertions.assertNotNull(cdnProfile); @@ -94,9 +101,9 @@ public void canCreateUpdateCdnProfile() { CdnProfile cdnProfile = cdnManager.profiles() .define(cdnProfileName) - .withRegion(region) + .withGlobal() .withExistingResourceGroup(resourceGroup) - .withStandardMicrosoftSku() + .withSku(SkuName.STANDARD_AZURE_FRONT_DOOR) .create(); Assertions.assertNotNull(cdnProfile); @@ -104,21 +111,39 @@ public void canCreateUpdateCdnProfile() { Assertions.assertEquals(0, cdnProfile.endpoints().size()); cdnProfile.update() - .defineNewEndpoint(cdnEndpointName) - .withOrigin("origin1", "www.someDomain.net") - .withHttpAllowed(true) - .withHttpsAllowed(true) + .defineNewAfdEndpoint(cdnEndpointName) + .withEnabledState(EnabledState.ENABLED) + .withEnforceMtls(EnforceMtlsEnabledState.ENABLED) + .attach() + .defineAfdOriginGroup("originGroup1") + .withLoadBalancingSettings( + new LoadBalancingSettingsParameters().withSampleSize(5).withSuccessfulSamplesRequired(3)) + .withSessionAffinityState(EnabledState.ENABLED) + .defineAfdOrigin("origin1") + .withHostname("www.somedomain.net") + .withEnabledState(EnabledState.ENABLED) + .withHttpPort(80) + .attach() .attach() .apply(); - Map cdnEndpointMap = cdnProfile.endpoints(); - CdnEndpoint cdnEndpoint = cdnEndpointMap.get(cdnEndpointName); + Map cdnEndpointMap = cdnProfile.afdEndpoints(); + AfdEndpoint cdnEndpoint = cdnEndpointMap.get(cdnEndpointName); Assertions.assertNotNull(cdnEndpoint); - Assertions.assertTrue(cdnEndpoint.isHttpAllowed()); - Assertions.assertTrue(cdnEndpoint.isHttpsAllowed()); - Assertions.assertFalse(cdnEndpoint.isCompressionEnabled()); - Assertions.assertEquals("www.someDomain.net", cdnEndpoint.originHostName()); + Assertions.assertEquals(EnabledState.ENABLED, cdnEndpoint.enabledState()); + Assertions.assertEquals(EnforceMtlsEnabledState.ENABLED, cdnEndpoint.enforceMtls()); + + AfdOriginGroup originGroup = cdnProfile.afdOriginGroups().get("originGroup1"); + Assertions.assertNotNull(originGroup); + Assertions.assertEquals(EnabledState.ENABLED, originGroup.sessionAffinityState()); + Assertions.assertEquals(3, originGroup.loadBalancingSettings().successfulSamplesRequired()); + + AfdOrigin origin = originGroup.origins().get("origin1"); + Assertions.assertNotNull(origin); + Assertions.assertEquals("www.somedomain.net", origin.hostname()); + Assertions.assertEquals(EnabledState.ENABLED, origin.enabledState()); + Assertions.assertEquals(80, origin.httpPort()); } @Test @@ -131,43 +156,133 @@ public void canCreateUpdateCdnEndpoint() { CheckNameAvailabilityResult result = cdnManager.profiles().checkEndpointNameAvailability(cdnProfileName); Assertions.assertTrue(result.nameAvailable()); + // create profile with endpoint, origin group, and origins CdnProfile cdnProfile = cdnManager.profiles() .define(cdnProfileName) - .withRegion(region) + .withGlobal() .withExistingResourceGroup(resourceGroup) - .withStandardMicrosoftSku() - .defineNewEndpoint(cdnEndpointName) - .withOrigin("origin1", "www.someDomain.net") - .withHttpAllowed(false) - .withHttpsAllowed(true) + .withSku(SkuName.STANDARD_AZURE_FRONT_DOOR) + .defineNewAfdEndpoint(cdnEndpointName) + .withEnabledState(EnabledState.ENABLED) + .withEnforceMtls(EnforceMtlsEnabledState.ENABLED) + .attach() + .defineAfdOriginGroup("originGroup1") + .withLoadBalancingSettings( + new LoadBalancingSettingsParameters().withSampleSize(4).withSuccessfulSamplesRequired(2)) + .withSessionAffinityState(EnabledState.ENABLED) + .defineAfdOrigin("origin1") + .withHostname("www.domain1.net") + .withEnabledState(EnabledState.ENABLED) + .withHttpPort(80) + .attach() + .defineAfdOrigin("origin2") + .withHostname("www.domain2.net") + .withEnabledState(EnabledState.ENABLED) + .withHttpPort(8080) + .attach() .attach() .create(); Assertions.assertNotNull(cdnProfile); Assertions.assertEquals(cdnProfileName, cdnProfile.name()); - Map cdnEndpointMap = cdnProfile.endpoints(); - Assertions.assertEquals(1, cdnProfile.endpoints().size()); + // verify endpoint + Map cdnEndpointMap = cdnProfile.afdEndpoints(); + Assertions.assertEquals(1, cdnEndpointMap.size()); - CdnEndpoint cdnEndpoint = cdnEndpointMap.get(cdnEndpointName); + AfdEndpoint cdnEndpoint = cdnEndpointMap.get(cdnEndpointName); Assertions.assertNotNull(cdnEndpoint); - Assertions.assertFalse(cdnEndpoint.isHttpAllowed()); - Assertions.assertTrue(cdnEndpoint.isHttpsAllowed()); - Assertions.assertEquals(0, cdnEndpoint.customDomains().size()); - + Assertions.assertEquals(EnabledState.ENABLED, cdnEndpoint.enabledState()); + Assertions.assertEquals(EnforceMtlsEnabledState.ENABLED, cdnEndpoint.enforceMtls()); + + // verify origin group + AfdOriginGroup originGroup1 = cdnProfile.afdOriginGroups().get("originGroup1"); + Assertions.assertNotNull(originGroup1); + Assertions.assertEquals(EnabledState.ENABLED, originGroup1.sessionAffinityState()); + Assertions.assertEquals(4, originGroup1.loadBalancingSettings().sampleSize()); + Assertions.assertEquals(2, originGroup1.loadBalancingSettings().successfulSamplesRequired()); + + // verify origins + AfdOrigin origin1 = originGroup1.origins().get("origin1"); + Assertions.assertNotNull(origin1); + Assertions.assertEquals("www.domain1.net", origin1.hostname()); + Assertions.assertEquals(80, origin1.httpPort()); + + AfdOrigin origin2 = originGroup1.origins().get("origin2"); + Assertions.assertNotNull(origin2); + Assertions.assertEquals("www.domain2.net", origin2.hostname()); + Assertions.assertEquals(8080, origin2.httpPort()); + + // update endpoint, origin group, and origin cdnProfile.update() - .updateEndpoint(cdnEndpointName) - .withHttpAllowed(true) - .withHttpsAllowed(false) + .updateAfdEndpoint(cdnEndpointName) + .withEnabledState(EnabledState.DISABLED) + .withEnforceMtls(EnforceMtlsEnabledState.DISABLED) + .parent() + .updateAfdOriginGroup("originGroup1") + .withSessionAffinityState(EnabledState.DISABLED) + .withLoadBalancingSettings( + new LoadBalancingSettingsParameters().withSampleSize(6).withSuccessfulSamplesRequired(4)) + .updateAfdOrigin("origin1") + .withHostname("www.updated-domain1.net") + .withHttpPort(8081) + .parent() .parent() .apply(); cdnEndpoint.refresh(); - Assertions.assertTrue(cdnEndpoint.isHttpAllowed()); - Assertions.assertFalse(cdnEndpoint.isHttpsAllowed()); - Assertions.assertTrue(TestUtilities.getSize(cdnEndpoint.listResourceUsage()) > 0); + Assertions.assertEquals(EnabledState.DISABLED, cdnEndpoint.enabledState()); + Assertions.assertEquals(EnforceMtlsEnabledState.DISABLED, cdnEndpoint.enforceMtls()); + + originGroup1.refresh(); + Assertions.assertEquals(EnabledState.DISABLED, originGroup1.sessionAffinityState()); + Assertions.assertEquals(6, originGroup1.loadBalancingSettings().sampleSize()); + Assertions.assertEquals(4, originGroup1.loadBalancingSettings().successfulSamplesRequired()); + + origin1 = originGroup1.origins().get("origin1"); + Assertions.assertEquals("www.updated-domain1.net", origin1.hostname()); + Assertions.assertEquals(8081, origin1.httpPort()); + + // remove origin from origin group + cdnProfile.update().updateAfdOriginGroup("originGroup1").withoutAfdOrigin("origin2").parent().apply(); + + originGroup1.refresh(); + Assertions.assertNull(originGroup1.origins().get("origin2")); + Assertions.assertNotNull(originGroup1.origins().get("origin1")); + + // add a new origin group + cdnProfile.update() + .defineAfdOriginGroup("originGroup2") + .withLoadBalancingSettings( + new LoadBalancingSettingsParameters().withSampleSize(3).withSuccessfulSamplesRequired(2)) + .defineAfdOrigin("origin3") + .withHostname("www.domain3.net") + .withEnabledState(EnabledState.ENABLED) + .withHttpPort(80) + .attach() + .attach() + .apply(); + + AfdOriginGroup originGroup2 = cdnProfile.afdOriginGroups().get("originGroup2"); + Assertions.assertNotNull(originGroup2); + Assertions.assertEquals(3, originGroup2.loadBalancingSettings().sampleSize()); + AfdOrigin origin3 = originGroup2.origins().get("origin3"); + Assertions.assertNotNull(origin3); + Assertions.assertEquals("www.domain3.net", origin3.hostname()); + + // remove origin group + cdnProfile.update().withoutAfdOriginGroup("originGroup2").apply(); + + Assertions.assertNull(cdnProfile.afdOriginGroups().get("originGroup2")); + + // remove endpoint + cdnProfile.update().withoutAfdEndpoint(cdnEndpointName).apply(); + + cdnEndpointMap = cdnProfile.afdEndpoints(); + Assertions.assertTrue(cdnEndpointMap.isEmpty()); } + @Disabled("Use rule set and rules") @Test public void canCrudStandardRulesEngineRules() { String cdnProfileName = generateRandomResourceName("cdnp", 15); @@ -187,9 +302,9 @@ public void canCrudStandardRulesEngineRules() { // create cdnProfile with one cdnEndpoint, with 1 rule CdnProfile cdnProfile = cdnManager.profiles() .define(cdnProfileName) - .withRegion(region) + .withGlobal() .withExistingResourceGroup(resourceGroup) - .withStandardMicrosoftSku() + .withSku(SkuName.STANDARD_AZURE_FRONT_DOOR) .defineNewEndpoint(cdnEndpointName) .withOrigin(originName1, "www.someDomain.net") .withHttpAllowed(false) @@ -305,6 +420,7 @@ public void canCrudStandardRulesEngineRules() { Assertions.assertEquals(2, cdnProfile.endpoints().get(cdnEndpointName).standardRulesEngineRules().size()); } + @Disabled("Domain registration is deprecated from appservice") @Test public void canCreateWithCustomDomain() { String cdnProfileName = generateRandomResourceName("cdnp", 15); @@ -344,9 +460,9 @@ public void canCreateWithCustomDomain() { CdnProfile cdnProfile = cdnManager.profiles() .define(cdnProfileName) - .withRegion(region) + .withGlobal() .withNewResourceGroup(rgName) - .withStandardMicrosoftSku() + .withSku(SkuName.STANDARD_AZURE_FRONT_DOOR) .defineNewEndpoint(cdnEndpointName) .withOrigin("origin1", "www.someDomain.net") .withHttpAllowed(false) diff --git a/sdk/cdn/azure-resourcemanager-cdn/tsp-location.yaml b/sdk/cdn/azure-resourcemanager-cdn/tsp-location.yaml new file mode 100644 index 000000000000..3b91d8ba6f75 --- /dev/null +++ b/sdk/cdn/azure-resourcemanager-cdn/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/cdn/resource-manager/Microsoft.Cdn/Cdn +commit: b80200621b2d49fc27a9cbb03ef011716c9ec7b5 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestCdn.java b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestCdn.java index ec04d961cc21..46aba6756919 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestCdn.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestCdn.java @@ -17,6 +17,7 @@ import com.azure.resourcemanager.cdn.models.SkuName; import com.azure.resourcemanager.resources.fluentcore.arm.CountryIsoCode; import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; import java.util.Arrays; import java.util.Map; @@ -28,6 +29,7 @@ public class TestCdn extends TestTemplate { private static final ClientLogger LOGGER = new ClientLogger(TestCdn.class); + @Disabled("SKU STANDARD_MICROSOFT does not allow create new profiles; STANDARD_AZURE_FRONT_DOOR needs location=global") @Override public CdnProfile createResource(CdnProfiles profiles) throws Exception { final Region region = Region.US_EAST; @@ -43,7 +45,7 @@ public CdnProfile createResource(CdnProfiles profiles) throws Exception { CdnProfile cdnProfile = profiles.define(cdnProfileName) .withRegion(region) .withNewResourceGroup(groupName) - .withStandardVerizonSku() + .withSku(SkuName.STANDARD_AZURE_FRONT_DOOR) .defineNewEndpoint(cdnEndpointName) .withOrigin(cdnOriginHostName) .withGeoFilter("/path/videos", GeoFilterActions.BLOCK, CountryIsoCode.ARGENTINA)