diff --git a/eng/lintingconfigs/revapi/track2/revapi.json b/eng/lintingconfigs/revapi/track2/revapi.json index ca6b5ab7d88c..34a2dfb3d426 100644 --- a/eng/lintingconfigs/revapi/track2/revapi.json +++ b/eng/lintingconfigs/revapi/track2/revapi.json @@ -1113,6 +1113,30 @@ "code": ".*", "old": ".*com\\.azure\\.resourcemanager\\.search\\.models\\.(IdentityType|PublicNetworkAccess|SharedPrivateLinkResourceProvisioningState|SharedPrivateLinkResourceStatus|SkuName).*", "justification": "Enum changed from sealed to expandable (ExpandableStringEnum) during TypeSpec migration." + }, + { + "code": "java.method.visibilityReduced", + "old" : { + "matcher": "regex", + "match": "method void com\\.azure\\.resourcemanager\\.trafficmanager\\.models\\..*\\:\\:\\\\(\\)" + }, + "justification": "Output-only immutable models' constructors are now private." + }, + { + "code": "java.method.removed", + "old" : { + "matcher": "regex", + "match": "method .* com\\.azure\\.resourcemanager\\.trafficmanager\\.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\\.trafficmanager\\.models\\..*ListResult" + }, + "justification": "Pageable models moved to implementation package. Unlikely used by user." } ] } diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/CHANGELOG.md b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/CHANGELOG.md index bf3aa81eea26..01c69dec6a96 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/CHANGELOG.md +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/CHANGELOG.md @@ -2,12 +2,6 @@ ## 2.54.0-beta.1 (Unreleased) -### Features Added - -### Breaking Changes - -### Bugs Fixed - ### Other Changes ## 2.53.6 (2026-01-29) diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/README.md b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/README.md index b5058cd51702..cb64d843d768 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/README.md +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/README.md @@ -18,7 +18,7 @@ For documentation on how to use this package, please see [Azure Management Libra com.azure.resourcemanager azure-resourcemanager-trafficmanager - 2.53.1 + 2.54.0-beta.1 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/EndpointsClient.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/EndpointsClient.java index 76927262403c..e082f335ff32 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/EndpointsClient.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/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.trafficmanager.fluent; @@ -18,147 +18,147 @@ */ public interface EndpointsClient { /** - * Update a Traffic Manager endpoint. + * Gets a Traffic Manager endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. - * @param endpointType The type of the Traffic Manager endpoint to be updated. - * @param endpointName The name of the Traffic Manager endpoint to be updated. - * @param parameters The Traffic Manager endpoint parameters supplied to the Update operation. + * @param endpointType The type of the Traffic Manager endpoint. + * @param endpointName The name of the Traffic Manager 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 class representing a Traffic Manager endpoint along with {@link Response} on successful completion of - * {@link Mono}. + * @return a Traffic Manager endpoint along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateWithResponseAsync(String resourceGroupName, String profileName, - EndpointTypes endpointType, String endpointName, EndpointInner parameters); + Mono> getWithResponseAsync(String resourceGroupName, String profileName, + EndpointTypes endpointType, String endpointName); /** - * Update a Traffic Manager endpoint. + * Gets a Traffic Manager endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. - * @param endpointType The type of the Traffic Manager endpoint to be updated. - * @param endpointName The name of the Traffic Manager endpoint to be updated. - * @param parameters The Traffic Manager endpoint parameters supplied to the Update operation. + * @param endpointType The type of the Traffic Manager endpoint. + * @param endpointName The name of the Traffic Manager 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 class representing a Traffic Manager endpoint on successful completion of {@link Mono}. + * @return a Traffic Manager endpoint on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String profileName, EndpointTypes endpointType, - String endpointName, EndpointInner parameters); + Mono getAsync(String resourceGroupName, String profileName, EndpointTypes endpointType, + String endpointName); /** - * Update a Traffic Manager endpoint. + * Gets a Traffic Manager endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. - * @param endpointType The type of the Traffic Manager endpoint to be updated. - * @param endpointName The name of the Traffic Manager endpoint to be updated. - * @param parameters The Traffic Manager endpoint parameters supplied to the Update operation. + * @param endpointType The type of the Traffic Manager endpoint. + * @param endpointName The name of the Traffic Manager 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 class representing a Traffic Manager endpoint along with {@link Response}. + * @return a Traffic Manager endpoint along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String profileName, EndpointTypes endpointType, - String endpointName, EndpointInner parameters, Context context); + Response getWithResponse(String resourceGroupName, String profileName, EndpointTypes endpointType, + String endpointName, Context context); /** - * Update a Traffic Manager endpoint. + * Gets a Traffic Manager endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. - * @param endpointType The type of the Traffic Manager endpoint to be updated. - * @param endpointName The name of the Traffic Manager endpoint to be updated. - * @param parameters The Traffic Manager endpoint parameters supplied to the Update operation. + * @param endpointType The type of the Traffic Manager endpoint. + * @param endpointName The name of the Traffic Manager 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 class representing a Traffic Manager endpoint. + * @return a Traffic Manager endpoint. */ @ServiceMethod(returns = ReturnType.SINGLE) - EndpointInner update(String resourceGroupName, String profileName, EndpointTypes endpointType, String endpointName, - EndpointInner parameters); + EndpointInner get(String resourceGroupName, String profileName, EndpointTypes endpointType, String endpointName); /** - * Gets a Traffic Manager endpoint. + * Create or update a Traffic Manager endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. * @param endpointType The type of the Traffic Manager endpoint. * @param endpointName The name of the Traffic Manager endpoint. + * @param parameters The Traffic Manager endpoint parameters supplied to the CreateOrUpdate operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 Traffic Manager endpoint along with {@link Response} on successful completion of {@link Mono}. + * @return class representing a Traffic Manager endpoint along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String profileName, - EndpointTypes endpointType, String endpointName); + Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String profileName, + EndpointTypes endpointType, String endpointName, EndpointInner parameters); /** - * Gets a Traffic Manager endpoint. + * Create or update a Traffic Manager endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. * @param endpointType The type of the Traffic Manager endpoint. * @param endpointName The name of the Traffic Manager endpoint. + * @param parameters The Traffic Manager endpoint parameters supplied to the CreateOrUpdate operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 Traffic Manager endpoint on successful completion of {@link Mono}. + * @return class representing a Traffic Manager endpoint on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String profileName, EndpointTypes endpointType, - String endpointName); + Mono createOrUpdateAsync(String resourceGroupName, String profileName, EndpointTypes endpointType, + String endpointName, EndpointInner parameters); /** - * Gets a Traffic Manager endpoint. + * Create or update a Traffic Manager endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. * @param endpointType The type of the Traffic Manager endpoint. * @param endpointName The name of the Traffic Manager endpoint. + * @param parameters The Traffic Manager endpoint parameters supplied to the CreateOrUpdate operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 Traffic Manager endpoint along with {@link Response}. + * @return class representing a Traffic Manager endpoint along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String profileName, EndpointTypes endpointType, - String endpointName, Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String profileName, + EndpointTypes endpointType, String endpointName, EndpointInner parameters, Context context); /** - * Gets a Traffic Manager endpoint. + * Create or update a Traffic Manager endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. * @param endpointType The type of the Traffic Manager endpoint. * @param endpointName The name of the Traffic Manager endpoint. + * @param parameters The Traffic Manager endpoint parameters supplied to the CreateOrUpdate operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 Traffic Manager endpoint. + * @return class representing a Traffic Manager endpoint. */ @ServiceMethod(returns = ReturnType.SINGLE) - EndpointInner get(String resourceGroupName, String profileName, EndpointTypes endpointType, String endpointName); + EndpointInner createOrUpdate(String resourceGroupName, String profileName, EndpointTypes endpointType, + String endpointName, EndpointInner parameters); /** - * Create or update a Traffic Manager endpoint. + * Update a Traffic Manager endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. - * @param endpointType The type of the Traffic Manager endpoint to be created or updated. - * @param endpointName The name of the Traffic Manager endpoint to be created or updated. - * @param parameters The Traffic Manager endpoint parameters supplied to the CreateOrUpdate operation. + * @param endpointType The type of the Traffic Manager endpoint. + * @param endpointName The name of the Traffic Manager endpoint. + * @param parameters The Traffic Manager endpoint parameters supplied to the Update operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -166,34 +166,34 @@ Response getWithResponse(String resourceGroupName, String profile * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String profileName, + Mono> updateWithResponseAsync(String resourceGroupName, String profileName, EndpointTypes endpointType, String endpointName, EndpointInner parameters); /** - * Create or update a Traffic Manager endpoint. + * Update a Traffic Manager endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. - * @param endpointType The type of the Traffic Manager endpoint to be created or updated. - * @param endpointName The name of the Traffic Manager endpoint to be created or updated. - * @param parameters The Traffic Manager endpoint parameters supplied to the CreateOrUpdate operation. + * @param endpointType The type of the Traffic Manager endpoint. + * @param endpointName The name of the Traffic Manager endpoint. + * @param parameters The Traffic Manager endpoint parameters supplied to the Update operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return class representing a Traffic Manager endpoint on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, String profileName, EndpointTypes endpointType, + Mono updateAsync(String resourceGroupName, String profileName, EndpointTypes endpointType, String endpointName, EndpointInner parameters); /** - * Create or update a Traffic Manager endpoint. + * Update a Traffic Manager endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. - * @param endpointType The type of the Traffic Manager endpoint to be created or updated. - * @param endpointName The name of the Traffic Manager endpoint to be created or updated. - * @param parameters The Traffic Manager endpoint parameters supplied to the CreateOrUpdate operation. + * @param endpointType The type of the Traffic Manager endpoint. + * @param endpointName The name of the Traffic Manager endpoint. + * @param parameters The Traffic Manager endpoint parameters supplied to the Update operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -201,33 +201,33 @@ Mono createOrUpdateAsync(String resourceGroupName, String profile * @return class representing a Traffic Manager endpoint along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String profileName, - EndpointTypes endpointType, String endpointName, EndpointInner parameters, Context context); + Response updateWithResponse(String resourceGroupName, String profileName, EndpointTypes endpointType, + String endpointName, EndpointInner parameters, Context context); /** - * Create or update a Traffic Manager endpoint. + * Update a Traffic Manager endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. - * @param endpointType The type of the Traffic Manager endpoint to be created or updated. - * @param endpointName The name of the Traffic Manager endpoint to be created or updated. - * @param parameters The Traffic Manager endpoint parameters supplied to the CreateOrUpdate operation. + * @param endpointType The type of the Traffic Manager endpoint. + * @param endpointName The name of the Traffic Manager endpoint. + * @param parameters The Traffic Manager endpoint parameters supplied to the Update operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return class representing a Traffic Manager endpoint. */ @ServiceMethod(returns = ReturnType.SINGLE) - EndpointInner createOrUpdate(String resourceGroupName, String profileName, EndpointTypes endpointType, - String endpointName, EndpointInner parameters); + EndpointInner update(String resourceGroupName, String profileName, EndpointTypes endpointType, String endpointName, + EndpointInner parameters); /** * Deletes a Traffic Manager endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. - * @param endpointType The type of the Traffic Manager endpoint to be deleted. - * @param endpointName The name of the Traffic Manager endpoint to be deleted. + * @param endpointType The type of the Traffic Manager endpoint. + * @param endpointName The name of the Traffic Manager 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. @@ -243,8 +243,8 @@ Mono> deleteWithResponseAsync(String resour * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. - * @param endpointType The type of the Traffic Manager endpoint to be deleted. - * @param endpointName The name of the Traffic Manager endpoint to be deleted. + * @param endpointType The type of the Traffic Manager endpoint. + * @param endpointName The name of the Traffic Manager 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. @@ -259,8 +259,8 @@ Mono deleteAsync(String resourceGroupName, String pr * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. - * @param endpointType The type of the Traffic Manager endpoint to be deleted. - * @param endpointName The name of the Traffic Manager endpoint to be deleted. + * @param endpointType The type of the Traffic Manager endpoint. + * @param endpointName The name of the Traffic Manager 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. @@ -276,8 +276,8 @@ Response deleteWithResponse(String resourceGroupName * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. - * @param endpointType The type of the Traffic Manager endpoint to be deleted. - * @param endpointName The name of the Traffic Manager endpoint to be deleted. + * @param endpointType The type of the Traffic Manager endpoint. + * @param endpointName The name of the Traffic Manager 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. diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/GeographicHierarchiesClient.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/GeographicHierarchiesClient.java index 1f7bab0c8b62..7e5013a665b5 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/GeographicHierarchiesClient.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/GeographicHierarchiesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.trafficmanager.fluent; diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/HeatMapsClient.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/HeatMapsClient.java index 29aee4a9a53f..e68b5c29195b 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/HeatMapsClient.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/HeatMapsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.trafficmanager.fluent; @@ -9,6 +9,7 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.trafficmanager.fluent.models.HeatMapModelInner; +import com.azure.resourcemanager.trafficmanager.models.HeatMapType; import java.util.List; import reactor.core.publisher.Mono; @@ -21,6 +22,7 @@ public interface HeatMapsClient { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. + * @param heatMapType The type of the heatmap. * @param topLeft The top left latitude,longitude pair of the rectangular viewport to query for. * @param botRight The bottom right latitude,longitude pair of the rectangular viewport to query for. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -31,26 +33,28 @@ public interface HeatMapsClient { */ @ServiceMethod(returns = ReturnType.SINGLE) Mono> getWithResponseAsync(String resourceGroupName, String profileName, - List topLeft, List botRight); + HeatMapType heatMapType, List topLeft, List botRight); /** * Gets latest heatmap for Traffic Manager profile. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. + * @param heatMapType The type of the heatmap. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return latest heatmap for Traffic Manager profile on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String profileName); + Mono getAsync(String resourceGroupName, String profileName, HeatMapType heatMapType); /** * Gets latest heatmap for Traffic Manager profile. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. + * @param heatMapType The type of the heatmap. * @param topLeft The top left latitude,longitude pair of the rectangular viewport to query for. * @param botRight The bottom right latitude,longitude pair of the rectangular viewport to query for. * @param context The context to associate with this operation. @@ -60,19 +64,20 @@ Mono> getWithResponseAsync(String resourceGroupName, * @return latest heatmap for Traffic Manager profile along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String profileName, List topLeft, - List botRight, Context context); + Response getWithResponse(String resourceGroupName, String profileName, HeatMapType heatMapType, + List topLeft, List botRight, Context context); /** * Gets latest heatmap for Traffic Manager profile. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. + * @param heatMapType The type of the heatmap. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return latest heatmap for Traffic Manager profile. */ @ServiceMethod(returns = ReturnType.SINGLE) - HeatMapModelInner get(String resourceGroupName, String profileName); + HeatMapModelInner get(String resourceGroupName, String profileName, HeatMapType heatMapType); } diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/ProfilesClient.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/ProfilesClient.java index 1042eacaa0bc..d121cb94c6b7 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/ProfilesClient.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/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.trafficmanager.fluent; @@ -25,416 +25,408 @@ public interface ProfilesClient extends InnerSupportsGet, InnerSupportsListing, InnerSupportsDelete { /** - * Checks the availability of a Traffic Manager Relative DNS name. + * Gets a Traffic Manager profile. * - * @param parameters The Traffic Manager name parameters supplied to the CheckTrafficManagerNameAvailability - * operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The name of the Traffic Manager 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 class representing a Traffic Manager Name Availability response along with {@link Response} on successful - * completion of {@link Mono}. + * @return a Traffic Manager profile along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> checkTrafficManagerRelativeDnsNameAvailabilityWithResponseAsync( - CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters); + Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String profileName); /** - * Checks the availability of a Traffic Manager Relative DNS name. + * Gets a Traffic Manager profile. * - * @param parameters The Traffic Manager name parameters supplied to the CheckTrafficManagerNameAvailability - * operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The name of the Traffic Manager 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 class representing a Traffic Manager Name Availability response on successful completion of {@link Mono}. + * @return a Traffic Manager profile on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono checkTrafficManagerRelativeDnsNameAvailabilityAsync( - CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters); + Mono getByResourceGroupAsync(String resourceGroupName, String profileName); /** - * Checks the availability of a Traffic Manager Relative DNS name. + * Gets a Traffic Manager profile. * - * @param parameters The Traffic Manager name parameters supplied to the CheckTrafficManagerNameAvailability - * operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The name of the Traffic Manager 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 class representing a Traffic Manager Name Availability response along with {@link Response}. + * @return a Traffic Manager profile along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response checkTrafficManagerRelativeDnsNameAvailabilityWithResponse( - CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String profileName, + Context context); /** - * Checks the availability of a Traffic Manager Relative DNS name. + * Gets a Traffic Manager profile. * - * @param parameters The Traffic Manager name parameters supplied to the CheckTrafficManagerNameAvailability - * operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The name of the Traffic Manager 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 class representing a Traffic Manager Name Availability response. + * @return a Traffic Manager profile. */ @ServiceMethod(returns = ReturnType.SINGLE) - TrafficManagerNameAvailabilityInner checkTrafficManagerRelativeDnsNameAvailability( - CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters); + ProfileInner getByResourceGroup(String resourceGroupName, String profileName); /** - * Checks the availability of a Traffic Manager Relative DNS name. + * Create or update a Traffic Manager profile. * - * @param parameters The Traffic Manager name parameters supplied to the CheckTrafficManagerNameAvailability - * operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The name of the Traffic Manager profile. + * @param parameters The Traffic Manager profile parameters supplied to the CreateOrUpdate operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return class representing a Traffic Manager Name Availability response along with {@link Response} on successful - * completion of {@link Mono}. + * @return class representing a Traffic Manager profile along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> checkTrafficManagerNameAvailabilityV2WithResponseAsync( - CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters); + Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String profileName, + ProfileInner parameters); /** - * Checks the availability of a Traffic Manager Relative DNS name. + * Create or update a Traffic Manager profile. * - * @param parameters The Traffic Manager name parameters supplied to the CheckTrafficManagerNameAvailability - * operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The name of the Traffic Manager profile. + * @param parameters The Traffic Manager profile parameters supplied to the CreateOrUpdate operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return class representing a Traffic Manager Name Availability response on successful completion of {@link Mono}. + * @return class representing a Traffic Manager profile on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono - checkTrafficManagerNameAvailabilityV2Async(CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters); + Mono createOrUpdateAsync(String resourceGroupName, String profileName, ProfileInner parameters); /** - * Checks the availability of a Traffic Manager Relative DNS name. + * Create or update a Traffic Manager profile. * - * @param parameters The Traffic Manager name parameters supplied to the CheckTrafficManagerNameAvailability - * operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The name of the Traffic Manager profile. + * @param parameters The Traffic Manager profile parameters supplied to the CreateOrUpdate operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return class representing a Traffic Manager Name Availability response along with {@link Response}. + * @return class representing a Traffic Manager profile along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response checkTrafficManagerNameAvailabilityV2WithResponse( - CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters, Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String profileName, + ProfileInner parameters, Context context); /** - * Checks the availability of a Traffic Manager Relative DNS name. + * Create or update a Traffic Manager profile. * - * @param parameters The Traffic Manager name parameters supplied to the CheckTrafficManagerNameAvailability - * operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The name of the Traffic Manager profile. + * @param parameters The Traffic Manager profile parameters supplied to the CreateOrUpdate operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return class representing a Traffic Manager Name Availability response. + * @return class representing a Traffic Manager profile. */ @ServiceMethod(returns = ReturnType.SINGLE) - TrafficManagerNameAvailabilityInner - checkTrafficManagerNameAvailabilityV2(CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters); + ProfileInner createOrUpdate(String resourceGroupName, String profileName, ProfileInner parameters); /** - * Lists all Traffic Manager profiles within a resource group. + * Update a Traffic Manager profile. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The name of the Traffic Manager profile. + * @param parameters The Traffic Manager profile parameters supplied to the Update operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list Traffic Manager profiles operation response as paginated response with {@link PagedFlux}. + * @return class representing a Traffic Manager profile along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupAsync(String resourceGroupName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> updateWithResponseAsync(String resourceGroupName, String profileName, + ProfileInner parameters); /** - * Lists all Traffic Manager profiles within a resource group. + * Update a Traffic Manager profile. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The name of the Traffic Manager profile. + * @param parameters The Traffic Manager profile parameters supplied to the Update operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list Traffic Manager profiles operation response as paginated response with {@link PagedIterable}. + * @return class representing a Traffic Manager profile on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono updateAsync(String resourceGroupName, String profileName, ProfileInner parameters); /** - * Lists all Traffic Manager profiles within a resource group. + * Update a Traffic Manager profile. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The name of the Traffic Manager profile. + * @param parameters The Traffic Manager profile parameters supplied to the Update operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list Traffic Manager profiles operation response as paginated response with {@link PagedIterable}. + * @return class representing a Traffic Manager profile along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse(String resourceGroupName, String profileName, ProfileInner parameters, + Context context); /** - * Lists all Traffic Manager profiles within a subscription. + * Update a Traffic Manager profile. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The name of the Traffic Manager profile. + * @param parameters The Traffic Manager profile parameters supplied to the Update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list Traffic Manager profiles operation response as paginated response with {@link PagedFlux}. + * @return class representing a Traffic Manager profile. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(); + @ServiceMethod(returns = ReturnType.SINGLE) + ProfileInner update(String resourceGroupName, String profileName, ProfileInner parameters); /** - * Lists all Traffic Manager profiles within a subscription. + * Deletes a Traffic Manager profile. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The name of the Traffic Manager 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 list Traffic Manager profiles operation response as paginated response with {@link PagedIterable}. + * @return the result of the request or operation along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> deleteWithResponseAsync(String resourceGroupName, String profileName); /** - * Lists all Traffic Manager profiles within a subscription. + * Deletes a Traffic Manager profile. * - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The name of the Traffic Manager 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 list Traffic Manager profiles operation response as paginated response with {@link PagedIterable}. + * @return the result of the request or operation on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono deleteAsync(String resourceGroupName, String profileName); /** - * Gets a Traffic Manager profile. + * Deletes a Traffic Manager profile. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager 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 a Traffic Manager profile along with {@link Response} on successful completion of {@link Mono}. + * @return the result of the request or operation along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String profileName); + Response deleteWithResponse(String resourceGroupName, String profileName, + Context context); /** - * Gets a Traffic Manager profile. + * Deletes a Traffic Manager profile. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager 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 Traffic Manager profile on successful completion of {@link Mono}. + * @return the result of the request or operation. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getByResourceGroupAsync(String resourceGroupName, String profileName); + DeleteOperationResultInner delete(String resourceGroupName, String profileName); /** - * Gets a Traffic Manager profile. + * Lists all Traffic Manager profiles within a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param profileName The name of the Traffic Manager 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 a Traffic Manager profile along with {@link Response}. + * @return the response of a Profile list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String profileName, - Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(); /** - * Gets a Traffic Manager profile. + * Lists all Traffic Manager profiles within a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param profileName The name of the Traffic Manager 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 Traffic Manager profile. + * @return the response of a Profile list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - ProfileInner getByResourceGroup(String resourceGroupName, String profileName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); /** - * Create or update a Traffic Manager profile. + * Lists all Traffic Manager profiles within a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param profileName The name of the Traffic Manager profile. - * @param parameters The Traffic Manager profile parameters supplied to the CreateOrUpdate operation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return class representing a Traffic Manager profile along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response of a Profile list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String profileName, - ProfileInner parameters); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); /** - * Create or update a Traffic Manager profile. + * Lists all Traffic Manager profiles within a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param profileName The name of the Traffic Manager profile. - * @param parameters The Traffic Manager profile parameters supplied to the CreateOrUpdate operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return class representing a Traffic Manager profile 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 createOrUpdateAsync(String resourceGroupName, String profileName, ProfileInner parameters); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByResourceGroupAsync(String resourceGroupName); /** - * Create or update a Traffic Manager profile. + * Lists all Traffic Manager profiles within a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param profileName The name of the Traffic Manager profile. - * @param parameters The Traffic Manager profile parameters supplied to the CreateOrUpdate operation. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return class representing a Traffic Manager profile along with {@link Response}. + * @return the response of a Profile list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String profileName, - ProfileInner parameters, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Create or update a Traffic Manager profile. + * Lists all Traffic Manager profiles within a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param profileName The name of the Traffic Manager profile. - * @param parameters The Traffic Manager profile parameters supplied to the CreateOrUpdate operation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return class representing a Traffic Manager profile. + * @return the response of a Profile list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - ProfileInner createOrUpdate(String resourceGroupName, String profileName, ProfileInner parameters); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Deletes a Traffic Manager profile. + * Checks the availability of a Traffic Manager Relative DNS name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param profileName The name of the Traffic Manager profile to be deleted. + * @param parameters 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. - * @return the result of the request or operation along with {@link Response} on successful completion of - * {@link Mono}. + * @return class representing a Traffic Manager Name Availability response along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteWithResponseAsync(String resourceGroupName, String profileName); + Mono> checkTrafficManagerRelativeDnsNameAvailabilityWithResponseAsync( + CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters); /** - * Deletes a Traffic Manager profile. + * Checks the availability of a Traffic Manager Relative DNS name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param profileName The name of the Traffic Manager profile to be deleted. + * @param parameters 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. - * @return the result of the request or operation on successful completion of {@link Mono}. + * @return class representing a Traffic Manager Name Availability response on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String profileName); + Mono checkTrafficManagerRelativeDnsNameAvailabilityAsync( + CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters); /** - * Deletes a Traffic Manager profile. + * Checks the availability of a Traffic Manager Relative DNS name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param profileName The name of the Traffic Manager profile to be deleted. + * @param parameters 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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of the request or operation along with {@link Response}. + * @return class representing a Traffic Manager Name Availability response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String profileName, - Context context); + Response checkTrafficManagerRelativeDnsNameAvailabilityWithResponse( + CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters, Context context); /** - * Deletes a Traffic Manager profile. + * Checks the availability of a Traffic Manager Relative DNS name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param profileName The name of the Traffic Manager profile to be deleted. + * @param parameters 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. - * @return the result of the request or operation. + * @return class representing a Traffic Manager Name Availability response. */ @ServiceMethod(returns = ReturnType.SINGLE) - DeleteOperationResultInner delete(String resourceGroupName, String profileName); + TrafficManagerNameAvailabilityInner checkTrafficManagerRelativeDnsNameAvailability( + CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters); /** - * Update a Traffic Manager profile. + * Checks the availability of a Traffic Manager Relative DNS name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param profileName The name of the Traffic Manager profile. - * @param parameters The Traffic Manager profile parameters supplied to the Update operation. + * @param parameters 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. - * @return class representing a Traffic Manager profile along with {@link Response} on successful completion of - * {@link Mono}. + * @return class representing a Traffic Manager Name Availability response along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateWithResponseAsync(String resourceGroupName, String profileName, - ProfileInner parameters); + Mono> checkTrafficManagerNameAvailabilityV2WithResponseAsync( + CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters); /** - * Update a Traffic Manager profile. + * Checks the availability of a Traffic Manager Relative DNS name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param profileName The name of the Traffic Manager profile. - * @param parameters The Traffic Manager profile parameters supplied to the Update operation. + * @param parameters 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. - * @return class representing a Traffic Manager profile on successful completion of {@link Mono}. + * @return class representing a Traffic Manager Name Availability response on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String profileName, ProfileInner parameters); + Mono + checkTrafficManagerNameAvailabilityV2Async(CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters); /** - * Update a Traffic Manager profile. + * Checks the availability of a Traffic Manager Relative DNS name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param profileName The name of the Traffic Manager profile. - * @param parameters The Traffic Manager profile parameters supplied to the Update operation. + * @param parameters 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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return class representing a Traffic Manager profile along with {@link Response}. + * @return class representing a Traffic Manager Name Availability response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String profileName, ProfileInner parameters, - Context context); + Response checkTrafficManagerNameAvailabilityV2WithResponse( + CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters, Context context); /** - * Update a Traffic Manager profile. + * Checks the availability of a Traffic Manager Relative DNS name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param profileName The name of the Traffic Manager profile. - * @param parameters The Traffic Manager profile parameters supplied to the Update operation. + * @param parameters 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. - * @return class representing a Traffic Manager profile. + * @return class representing a Traffic Manager Name Availability response. */ @ServiceMethod(returns = ReturnType.SINGLE) - ProfileInner update(String resourceGroupName, String profileName, ProfileInner parameters); + TrafficManagerNameAvailabilityInner + checkTrafficManagerNameAvailabilityV2(CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters); } diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/TrafficManagerManagementClient.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/TrafficManagerManagementClient.java index 55fe3f446f79..0b500d5e9528 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/TrafficManagerManagementClient.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/TrafficManagerManagementClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.trafficmanager.fluent; @@ -12,26 +12,26 @@ */ public interface TrafficManagerManagementClient { /** - * Gets The ID of the target subscription. - * - * @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. * diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/TrafficManagerUserMetricsKeysClient.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/TrafficManagerUserMetricsKeysClient.java index 8470a9097f90..2927eea1741c 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/TrafficManagerUserMetricsKeysClient.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/TrafficManagerUserMetricsKeysClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.trafficmanager.fluent; diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/models/DeleteOperationResultInner.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/models/DeleteOperationResultInner.java index f1e65e9aa438..34abfe36eab7 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/models/DeleteOperationResultInner.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/models/DeleteOperationResultInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.trafficmanager.fluent.models; @@ -24,7 +24,7 @@ public final class DeleteOperationResultInner implements JsonSerializable { /* * The region at the root of the hierarchy from all the regions in the hierarchy can be retrieved. @@ -25,7 +25,7 @@ public final class GeographicHierarchyProperties implements JsonSerializable endpoints() { return this.innerProperties() == null ? null : this.innerProperties().endpoints(); } - /** - * Set the endpoints property: The endpoints used in this HeatMap calculation. - * - * @param endpoints the endpoints value to set. - * @return the HeatMapModelInner object itself. - */ - public HeatMapModelInner withEndpoints(List endpoints) { - if (this.innerProperties() == null) { - this.innerProperties = new HeatMapProperties(); - } - this.innerProperties().withEndpoints(endpoints); - return this; - } - /** * Get the trafficFlows property: The traffic flows produced in this HeatMap calculation. * @@ -197,20 +121,6 @@ public List trafficFlows() { return this.innerProperties() == null ? null : this.innerProperties().trafficFlows(); } - /** - * Set the trafficFlows property: The traffic flows produced in this HeatMap calculation. - * - * @param trafficFlows the trafficFlows value to set. - * @return the HeatMapModelInner object itself. - */ - public HeatMapModelInner withTrafficFlows(List trafficFlows) { - if (this.innerProperties() == null) { - this.innerProperties = new HeatMapProperties(); - } - this.innerProperties().withTrafficFlows(trafficFlows); - return this; - } - /** * Validates the instance. * @@ -241,7 +151,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of HeatMapModelInner 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 HeatMapModelInner. */ public static HeatMapModelInner fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/models/HeatMapProperties.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/models/HeatMapProperties.java index b30a5d7258d5..2f7bf8f1adc6 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/models/HeatMapProperties.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/models/HeatMapProperties.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.trafficmanager.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 @@ /** * Class representing a Traffic Manager HeatMap properties. */ -@Fluent +@Immutable public final class HeatMapProperties implements JsonSerializable { /* * The beginning of the time window for this HeatMap, inclusive. @@ -45,7 +45,7 @@ public final class HeatMapProperties implements JsonSerializable endpoints() { return this.endpoints; } - /** - * Set the endpoints property: The endpoints used in this HeatMap calculation. - * - * @param endpoints the endpoints value to set. - * @return the HeatMapProperties object itself. - */ - public HeatMapProperties withEndpoints(List endpoints) { - this.endpoints = endpoints; - return this; - } - /** * Get the trafficFlows property: The traffic flows produced in this HeatMap calculation. * @@ -117,17 +84,6 @@ public List trafficFlows() { return this.trafficFlows; } - /** - * Set the trafficFlows property: The traffic flows produced in this HeatMap calculation. - * - * @param trafficFlows the trafficFlows value to set. - * @return the HeatMapProperties object itself. - */ - public HeatMapProperties withTrafficFlows(List trafficFlows) { - this.trafficFlows = trafficFlows; - return this; - } - /** * Validates the instance. * diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/models/ProfileInner.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/models/ProfileInner.java index 070701256b90..87cc062da9cd 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/models/ProfileInner.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/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.trafficmanager.fluent.models; diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/models/ProfileProperties.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/models/ProfileProperties.java index 710efa9562f8..f52a2ce7d717 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/models/ProfileProperties.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/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.trafficmanager.fluent.models; diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/models/TrafficManagerGeographicHierarchyInner.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/models/TrafficManagerGeographicHierarchyInner.java index 17dbaa0d5903..4adda3c1c3d5 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/models/TrafficManagerGeographicHierarchyInner.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/models/TrafficManagerGeographicHierarchyInner.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.trafficmanager.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.json.JsonReader; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * Class representing the Geographic hierarchy used with the Geographic traffic routing method. */ -@Fluent +@Immutable public final class TrafficManagerGeographicHierarchyInner extends ProxyResource { /* * The properties of the Geographic Hierarchy resource. @@ -42,7 +42,7 @@ public final class TrafficManagerGeographicHierarchyInner extends ProxyResource /** * Creates an instance of TrafficManagerGeographicHierarchyInner class. */ - public TrafficManagerGeographicHierarchyInner() { + private TrafficManagerGeographicHierarchyInner() { } /** @@ -64,18 +64,6 @@ public String id() { return this.id; } - /** - * Set the id property: Fully qualified resource Id for the resource. Ex - - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}. - * - * @param id the id value to set. - * @return the TrafficManagerGeographicHierarchyInner object itself. - */ - public TrafficManagerGeographicHierarchyInner withId(String id) { - this.id = id; - return this; - } - /** * Get the name property: The name of the resource. * @@ -85,17 +73,6 @@ public String name() { return this.name; } - /** - * Set the name property: The name of the resource. - * - * @param name the name value to set. - * @return the TrafficManagerGeographicHierarchyInner object itself. - */ - public TrafficManagerGeographicHierarchyInner withName(String name) { - this.name = name; - return this; - } - /** * Get the type property: The type of the resource. Ex- Microsoft.Network/trafficManagerProfiles. * @@ -105,17 +82,6 @@ public String type() { return this.type; } - /** - * Set the type property: The type of the resource. Ex- Microsoft.Network/trafficManagerProfiles. - * - * @param type the type value to set. - * @return the TrafficManagerGeographicHierarchyInner object itself. - */ - public TrafficManagerGeographicHierarchyInner withType(String type) { - this.type = type; - return this; - } - /** * Get the geographicHierarchy property: The region at the root of the hierarchy from all the regions in the * hierarchy can be retrieved. @@ -126,21 +92,6 @@ public Region geographicHierarchy() { return this.innerProperties() == null ? null : this.innerProperties().geographicHierarchy(); } - /** - * Set the geographicHierarchy property: The region at the root of the hierarchy from all the regions in the - * hierarchy can be retrieved. - * - * @param geographicHierarchy the geographicHierarchy value to set. - * @return the TrafficManagerGeographicHierarchyInner object itself. - */ - public TrafficManagerGeographicHierarchyInner withGeographicHierarchy(Region geographicHierarchy) { - if (this.innerProperties() == null) { - this.innerProperties = new GeographicHierarchyProperties(); - } - this.innerProperties().withGeographicHierarchy(geographicHierarchy); - return this; - } - /** * Validates the instance. * @@ -171,7 +122,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of TrafficManagerGeographicHierarchyInner 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 TrafficManagerGeographicHierarchyInner. */ public static TrafficManagerGeographicHierarchyInner fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/models/TrafficManagerNameAvailabilityInner.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/models/TrafficManagerNameAvailabilityInner.java index 14015463852a..acf6b48b9a29 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/models/TrafficManagerNameAvailabilityInner.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/models/TrafficManagerNameAvailabilityInner.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.trafficmanager.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; @@ -14,7 +14,7 @@ /** * Class representing a Traffic Manager Name Availability response. */ -@Fluent +@Immutable public final class TrafficManagerNameAvailabilityInner implements JsonSerializable { /* @@ -45,7 +45,7 @@ public final class TrafficManagerNameAvailabilityInner /** * Creates an instance of TrafficManagerNameAvailabilityInner class. */ - public TrafficManagerNameAvailabilityInner() { + private TrafficManagerNameAvailabilityInner() { } /** @@ -57,17 +57,6 @@ public String name() { return this.name; } - /** - * Set the name property: The relative name. - * - * @param name the name value to set. - * @return the TrafficManagerNameAvailabilityInner object itself. - */ - public TrafficManagerNameAvailabilityInner withName(String name) { - this.name = name; - return this; - } - /** * Get the type property: Traffic Manager profile resource type. * @@ -77,17 +66,6 @@ public String type() { return this.type; } - /** - * Set the type property: Traffic Manager profile resource type. - * - * @param type the type value to set. - * @return the TrafficManagerNameAvailabilityInner object itself. - */ - public TrafficManagerNameAvailabilityInner withType(String type) { - this.type = type; - return this; - } - /** * Get the nameAvailable property: Describes whether the relative name is available or not. * @@ -97,17 +75,6 @@ public Boolean nameAvailable() { return this.nameAvailable; } - /** - * Set the nameAvailable property: Describes whether the relative name is available or not. - * - * @param nameAvailable the nameAvailable value to set. - * @return the TrafficManagerNameAvailabilityInner object itself. - */ - public TrafficManagerNameAvailabilityInner withNameAvailable(Boolean nameAvailable) { - this.nameAvailable = nameAvailable; - return this; - } - /** * Get the reason property: The reason why the name is not available, when applicable. * @@ -117,17 +84,6 @@ public String reason() { return this.reason; } - /** - * Set the reason property: The reason why the name is not available, when applicable. - * - * @param reason the reason value to set. - * @return the TrafficManagerNameAvailabilityInner object itself. - */ - public TrafficManagerNameAvailabilityInner withReason(String reason) { - this.reason = reason; - return this; - } - /** * Get the message property: Descriptive message that explains why the name is not available, when applicable. * @@ -137,17 +93,6 @@ public String message() { return this.message; } - /** - * Set the message property: Descriptive message that explains why the name is not available, when applicable. - * - * @param message the message value to set. - * @return the TrafficManagerNameAvailabilityInner object itself. - */ - public TrafficManagerNameAvailabilityInner withMessage(String message) { - this.message = message; - return this; - } - /** * Validates the instance. * diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/models/UserMetricsModelInner.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/models/UserMetricsModelInner.java index 90fd448ad9a5..66c49e80c6b5 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/models/UserMetricsModelInner.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/models/UserMetricsModelInner.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.trafficmanager.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.json.JsonReader; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Class representing Traffic Manager User Metrics. */ -@Fluent +@Immutable public final class UserMetricsModelInner extends ProxyResource { /* * The properties of the Traffic Manager User Metrics. @@ -41,7 +41,7 @@ public final class UserMetricsModelInner extends ProxyResource { /** * Creates an instance of UserMetricsModelInner class. */ - public UserMetricsModelInner() { + private UserMetricsModelInner() { } /** @@ -63,18 +63,6 @@ public String id() { return this.id; } - /** - * Set the id property: Fully qualified resource Id for the resource. Ex - - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}. - * - * @param id the id value to set. - * @return the UserMetricsModelInner object itself. - */ - public UserMetricsModelInner withId(String id) { - this.id = id; - return this; - } - /** * Get the name property: The name of the resource. * @@ -84,17 +72,6 @@ public String name() { return this.name; } - /** - * Set the name property: The name of the resource. - * - * @param name the name value to set. - * @return the UserMetricsModelInner object itself. - */ - public UserMetricsModelInner withName(String name) { - this.name = name; - return this; - } - /** * Get the type property: The type of the resource. Ex- Microsoft.Network/trafficManagerProfiles. * @@ -104,17 +81,6 @@ public String type() { return this.type; } - /** - * Set the type property: The type of the resource. Ex- Microsoft.Network/trafficManagerProfiles. - * - * @param type the type value to set. - * @return the UserMetricsModelInner object itself. - */ - public UserMetricsModelInner withType(String type) { - this.type = type; - return this; - } - /** * Get the key property: The key returned by the User Metrics operation. * @@ -124,20 +90,6 @@ public String key() { return this.innerProperties() == null ? null : this.innerProperties().key(); } - /** - * Set the key property: The key returned by the User Metrics operation. - * - * @param key the key value to set. - * @return the UserMetricsModelInner object itself. - */ - public UserMetricsModelInner withKey(String key) { - if (this.innerProperties() == null) { - this.innerProperties = new UserMetricsProperties(); - } - this.innerProperties().withKey(key); - return this; - } - /** * Validates the instance. * @@ -168,7 +120,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of UserMetricsModelInner 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 UserMetricsModelInner. */ public static UserMetricsModelInner fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/models/UserMetricsProperties.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/models/UserMetricsProperties.java index cb742d70c8ea..6d8ca887b5eb 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/models/UserMetricsProperties.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/fluent/models/UserMetricsProperties.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.trafficmanager.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; @@ -14,7 +14,7 @@ /** * Class representing a Traffic Manager Real User Metrics key response. */ -@Fluent +@Immutable public final class UserMetricsProperties implements JsonSerializable { /* * The key returned by the User Metrics operation. @@ -24,7 +24,7 @@ public final class UserMetricsProperties implements JsonSerializable> update(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("endpointType") EndpointTypes endpointType, @PathParam("endpointName") String endpointName, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") EndpointInner parameters, @HeaderParam("Accept") String accept, - Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{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("endpointType") EndpointTypes endpointType, @PathParam("endpointName") String endpointName, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}") @ExpectedResponses({ 200, 201 }) @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("profileName") String profileName, @PathParam("endpointType") EndpointTypes endpointType, @PathParam("endpointName") String endpointName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") EndpointInner parameters, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") EndpointInner parameters, @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, + @PathParam("endpointType") EndpointTypes endpointType, @PathParam("endpointName") String endpointName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") EndpointInner parameters, Context context); @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}") @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("profileName") String profileName, @PathParam("endpointType") EndpointTypes endpointType, @PathParam("endpointName") String endpointName, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); } /** - * Update a Traffic Manager endpoint. + * Gets a Traffic Manager endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. - * @param endpointType The type of the Traffic Manager endpoint to be updated. - * @param endpointName The name of the Traffic Manager endpoint to be updated. - * @param parameters The Traffic Manager endpoint parameters supplied to the Update operation. + * @param endpointType The type of the Traffic Manager endpoint. + * @param endpointName The name of the Traffic Manager 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 class representing a Traffic Manager endpoint along with {@link Response} on successful completion of - * {@link Mono}. + * @return a Traffic Manager endpoint along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync(String resourceGroupName, String profileName, - EndpointTypes endpointType, String endpointName, EndpointInner parameters) { + public Mono> getWithResponseAsync(String resourceGroupName, String profileName, + EndpointTypes endpointType, 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.")); @@ -140,45 +140,38 @@ public Mono> updateWithResponseAsync(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.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, profileName, - endpointType, endpointName, this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, - accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointType, endpointName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Update a Traffic Manager endpoint. + * Gets a Traffic Manager endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. - * @param endpointType The type of the Traffic Manager endpoint to be updated. - * @param endpointName The name of the Traffic Manager endpoint to be updated. - * @param parameters The Traffic Manager endpoint parameters supplied to the Update operation. + * @param endpointType The type of the Traffic Manager endpoint. + * @param endpointName The name of the Traffic Manager 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 class representing a Traffic Manager endpoint along with {@link Response} on successful completion of - * {@link Mono}. + * @return a Traffic Manager endpoint along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String profileName, - EndpointTypes endpointType, String endpointName, EndpointInner parameters, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String profileName, + EndpointTypes endpointType, 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.")); @@ -192,101 +185,93 @@ private Mono> updateWithResponseAsync(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.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), resourceGroupName, profileName, endpointType, endpointName, - this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, endpointType, endpointName, accept, context); } /** - * Update a Traffic Manager endpoint. + * Gets a Traffic Manager endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. - * @param endpointType The type of the Traffic Manager endpoint to be updated. - * @param endpointName The name of the Traffic Manager endpoint to be updated. - * @param parameters The Traffic Manager endpoint parameters supplied to the Update operation. + * @param endpointType The type of the Traffic Manager endpoint. + * @param endpointName The name of the Traffic Manager 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 class representing a Traffic Manager endpoint on successful completion of {@link Mono}. + * @return a Traffic Manager endpoint on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String profileName, EndpointTypes endpointType, - String endpointName, EndpointInner parameters) { - return updateWithResponseAsync(resourceGroupName, profileName, endpointType, endpointName, parameters) + public Mono getAsync(String resourceGroupName, String profileName, EndpointTypes endpointType, + String endpointName) { + return getWithResponseAsync(resourceGroupName, profileName, endpointType, endpointName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Update a Traffic Manager endpoint. + * Gets a Traffic Manager endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. - * @param endpointType The type of the Traffic Manager endpoint to be updated. - * @param endpointName The name of the Traffic Manager endpoint to be updated. - * @param parameters The Traffic Manager endpoint parameters supplied to the Update operation. + * @param endpointType The type of the Traffic Manager endpoint. + * @param endpointName The name of the Traffic Manager 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 class representing a Traffic Manager endpoint along with {@link Response}. + * @return a Traffic Manager endpoint along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String profileName, - EndpointTypes endpointType, String endpointName, EndpointInner parameters, Context context) { - return updateWithResponseAsync(resourceGroupName, profileName, endpointType, endpointName, parameters, context) - .block(); + public Response getWithResponse(String resourceGroupName, String profileName, + EndpointTypes endpointType, String endpointName, Context context) { + return getWithResponseAsync(resourceGroupName, profileName, endpointType, endpointName, context).block(); } /** - * Update a Traffic Manager endpoint. + * Gets a Traffic Manager endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. - * @param endpointType The type of the Traffic Manager endpoint to be updated. - * @param endpointName The name of the Traffic Manager endpoint to be updated. - * @param parameters The Traffic Manager endpoint parameters supplied to the Update operation. + * @param endpointType The type of the Traffic Manager endpoint. + * @param endpointName The name of the Traffic Manager 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 class representing a Traffic Manager endpoint. + * @return a Traffic Manager endpoint. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EndpointInner update(String resourceGroupName, String profileName, EndpointTypes endpointType, - String endpointName, EndpointInner parameters) { - return updateWithResponse(resourceGroupName, profileName, endpointType, endpointName, parameters, Context.NONE) - .getValue(); + public EndpointInner get(String resourceGroupName, String profileName, EndpointTypes endpointType, + String endpointName) { + return getWithResponse(resourceGroupName, profileName, endpointType, endpointName, Context.NONE).getValue(); } /** - * Gets a Traffic Manager endpoint. + * Create or update a Traffic Manager endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. * @param endpointType The type of the Traffic Manager endpoint. * @param endpointName The name of the Traffic Manager endpoint. + * @param parameters The Traffic Manager endpoint parameters supplied to the CreateOrUpdate operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Traffic Manager endpoint along with {@link Response} on successful completion of {@link Mono}. + * @return class representing a Traffic Manager endpoint along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String profileName, - EndpointTypes endpointType, String endpointName) { + public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String profileName, + EndpointTypes endpointType, String endpointName, EndpointInner parameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); @@ -300,37 +285,46 @@ 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.")); + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, profileName, endpointType, - endpointName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointType, endpointName, + contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a Traffic Manager endpoint. + * Create or update a Traffic Manager endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. * @param endpointType The type of the Traffic Manager endpoint. * @param endpointName The name of the Traffic Manager endpoint. + * @param parameters The Traffic Manager endpoint parameters supplied to the CreateOrUpdate operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Traffic Manager endpoint along with {@link Response} on successful completion of {@link Mono}. + * @return class representing a Traffic Manager endpoint along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String profileName, - EndpointTypes endpointType, String endpointName, Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String profileName, + EndpointTypes endpointType, String endpointName, EndpointInner parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); @@ -344,80 +338,88 @@ 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.")); + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), resourceGroupName, profileName, endpointType, endpointName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointType, endpointName, contentType, + accept, parameters, context); } /** - * Gets a Traffic Manager endpoint. + * Create or update a Traffic Manager endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. * @param endpointType The type of the Traffic Manager endpoint. * @param endpointName The name of the Traffic Manager endpoint. + * @param parameters The Traffic Manager endpoint parameters supplied to the CreateOrUpdate operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Traffic Manager endpoint on successful completion of {@link Mono}. + * @return class representing a Traffic Manager endpoint on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String profileName, EndpointTypes endpointType, - String endpointName) { - return getWithResponseAsync(resourceGroupName, profileName, endpointType, endpointName) + public Mono createOrUpdateAsync(String resourceGroupName, String profileName, + EndpointTypes endpointType, String endpointName, EndpointInner parameters) { + return createOrUpdateWithResponseAsync(resourceGroupName, profileName, endpointType, endpointName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets a Traffic Manager endpoint. + * Create or update a Traffic Manager endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. * @param endpointType The type of the Traffic Manager endpoint. * @param endpointName The name of the Traffic Manager endpoint. + * @param parameters The Traffic Manager endpoint parameters supplied to the CreateOrUpdate operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Traffic Manager endpoint along with {@link Response}. + * @return class representing a Traffic Manager endpoint along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String profileName, - EndpointTypes endpointType, String endpointName, Context context) { - return getWithResponseAsync(resourceGroupName, profileName, endpointType, endpointName, context).block(); + public Response createOrUpdateWithResponse(String resourceGroupName, String profileName, + EndpointTypes endpointType, String endpointName, EndpointInner parameters, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, profileName, endpointType, endpointName, parameters, + context).block(); } /** - * Gets a Traffic Manager endpoint. + * Create or update a Traffic Manager endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. * @param endpointType The type of the Traffic Manager endpoint. * @param endpointName The name of the Traffic Manager endpoint. + * @param parameters The Traffic Manager endpoint parameters supplied to the CreateOrUpdate operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Traffic Manager endpoint. + * @return class representing a Traffic Manager endpoint. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EndpointInner get(String resourceGroupName, String profileName, EndpointTypes endpointType, - String endpointName) { - return getWithResponse(resourceGroupName, profileName, endpointType, endpointName, Context.NONE).getValue(); + public EndpointInner createOrUpdate(String resourceGroupName, String profileName, EndpointTypes endpointType, + String endpointName, EndpointInner parameters) { + return createOrUpdateWithResponse(resourceGroupName, profileName, endpointType, endpointName, parameters, + Context.NONE).getValue(); } /** - * Create or update a Traffic Manager endpoint. + * Update a Traffic Manager endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. - * @param endpointType The type of the Traffic Manager endpoint to be created or updated. - * @param endpointName The name of the Traffic Manager endpoint to be created or updated. - * @param parameters The Traffic Manager endpoint parameters supplied to the CreateOrUpdate operation. + * @param endpointType The type of the Traffic Manager endpoint. + * @param endpointName The name of the Traffic Manager endpoint. + * @param parameters The Traffic Manager endpoint parameters supplied to the Update operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -425,12 +427,16 @@ public EndpointInner get(String resourceGroupName, String profileName, EndpointT * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String profileName, + public Mono> updateWithResponseAsync(String resourceGroupName, String profileName, EndpointTypes endpointType, String endpointName, EndpointInner parameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); @@ -444,31 +450,28 @@ public Mono> createOrUpdateWithResponseAsync(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 (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, profileName, - endpointType, endpointName, this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, - accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointType, endpointName, + contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update a Traffic Manager endpoint. + * Update a Traffic Manager endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. - * @param endpointType The type of the Traffic Manager endpoint to be created or updated. - * @param endpointName The name of the Traffic Manager endpoint to be created or updated. - * @param parameters The Traffic Manager endpoint parameters supplied to the CreateOrUpdate operation. + * @param endpointType The type of the Traffic Manager endpoint. + * @param endpointName The name of the Traffic Manager endpoint. + * @param parameters The Traffic Manager endpoint parameters supplied to the Update operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -477,12 +480,16 @@ public Mono> createOrUpdateWithResponseAsync(String reso * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String profileName, + private Mono> updateWithResponseAsync(String resourceGroupName, String profileName, EndpointTypes endpointType, String endpointName, EndpointInner parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); @@ -496,49 +503,46 @@ private Mono> createOrUpdateWithResponseAsync(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 (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, profileName, endpointType, - endpointName, this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, endpointType, endpointName, contentType, accept, parameters, context); } /** - * Create or update a Traffic Manager endpoint. + * Update a Traffic Manager endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. - * @param endpointType The type of the Traffic Manager endpoint to be created or updated. - * @param endpointName The name of the Traffic Manager endpoint to be created or updated. - * @param parameters The Traffic Manager endpoint parameters supplied to the CreateOrUpdate operation. + * @param endpointType The type of the Traffic Manager endpoint. + * @param endpointName The name of the Traffic Manager endpoint. + * @param parameters The Traffic Manager endpoint parameters supplied to the Update operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return class representing a Traffic Manager endpoint on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, String profileName, - EndpointTypes endpointType, String endpointName, EndpointInner parameters) { - return createOrUpdateWithResponseAsync(resourceGroupName, profileName, endpointType, endpointName, parameters) + public Mono updateAsync(String resourceGroupName, String profileName, EndpointTypes endpointType, + String endpointName, EndpointInner parameters) { + return updateWithResponseAsync(resourceGroupName, profileName, endpointType, endpointName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Create or update a Traffic Manager endpoint. + * Update a Traffic Manager endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. - * @param endpointType The type of the Traffic Manager endpoint to be created or updated. - * @param endpointName The name of the Traffic Manager endpoint to be created or updated. - * @param parameters The Traffic Manager endpoint parameters supplied to the CreateOrUpdate operation. + * @param endpointType The type of the Traffic Manager endpoint. + * @param endpointName The name of the Traffic Manager endpoint. + * @param parameters The Traffic Manager endpoint parameters supplied to the Update operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -546,30 +550,30 @@ public Mono createOrUpdateAsync(String resourceGroupName, String * @return class representing a Traffic Manager endpoint along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String profileName, + public Response updateWithResponse(String resourceGroupName, String profileName, EndpointTypes endpointType, String endpointName, EndpointInner parameters, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, profileName, endpointType, endpointName, parameters, - context).block(); + return updateWithResponseAsync(resourceGroupName, profileName, endpointType, endpointName, parameters, context) + .block(); } /** - * Create or update a Traffic Manager endpoint. + * Update a Traffic Manager endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. - * @param endpointType The type of the Traffic Manager endpoint to be created or updated. - * @param endpointName The name of the Traffic Manager endpoint to be created or updated. - * @param parameters The Traffic Manager endpoint parameters supplied to the CreateOrUpdate operation. + * @param endpointType The type of the Traffic Manager endpoint. + * @param endpointName The name of the Traffic Manager endpoint. + * @param parameters The Traffic Manager endpoint parameters supplied to the Update operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return class representing a Traffic Manager endpoint. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EndpointInner createOrUpdate(String resourceGroupName, String profileName, EndpointTypes endpointType, + public EndpointInner update(String resourceGroupName, String profileName, EndpointTypes endpointType, String endpointName, EndpointInner parameters) { - return createOrUpdateWithResponse(resourceGroupName, profileName, endpointType, endpointName, parameters, - Context.NONE).getValue(); + return updateWithResponse(resourceGroupName, profileName, endpointType, endpointName, parameters, Context.NONE) + .getValue(); } /** @@ -577,8 +581,8 @@ public EndpointInner createOrUpdate(String resourceGroupName, String profileName * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. - * @param endpointType The type of the Traffic Manager endpoint to be deleted. - * @param endpointName The name of the Traffic Manager endpoint to be deleted. + * @param endpointType The type of the Traffic Manager endpoint. + * @param endpointName The name of the Traffic Manager 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. @@ -592,6 +596,10 @@ public Mono> deleteWithResponseAsync(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.")); @@ -605,15 +613,11 @@ public Mono> deleteWithResponseAsync(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.delete(this.client.getEndpoint(), resourceGroupName, profileName, endpointType, - endpointName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, endpointType, endpointName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -622,8 +626,8 @@ public Mono> deleteWithResponseAsync(String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. - * @param endpointType The type of the Traffic Manager endpoint to be deleted. - * @param endpointName The name of the Traffic Manager endpoint to be deleted. + * @param endpointType The type of the Traffic Manager endpoint. + * @param endpointName The name of the Traffic Manager 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. @@ -638,6 +642,10 @@ private Mono> deleteWithResponseAsync(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.")); @@ -651,14 +659,10 @@ private Mono> deleteWithResponseAsync(Strin 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, endpointType, endpointName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, endpointType, endpointName, accept, context); } /** @@ -666,8 +670,8 @@ private Mono> deleteWithResponseAsync(Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. - * @param endpointType The type of the Traffic Manager endpoint to be deleted. - * @param endpointName The name of the Traffic Manager endpoint to be deleted. + * @param endpointType The type of the Traffic Manager endpoint. + * @param endpointName The name of the Traffic Manager 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. @@ -685,8 +689,8 @@ public Mono deleteAsync(String resourceGroupName, St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. - * @param endpointType The type of the Traffic Manager endpoint to be deleted. - * @param endpointName The name of the Traffic Manager endpoint to be deleted. + * @param endpointType The type of the Traffic Manager endpoint. + * @param endpointName The name of the Traffic Manager 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. @@ -704,8 +708,8 @@ public Response deleteWithResponse(String resourceGr * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. - * @param endpointType The type of the Traffic Manager endpoint to be deleted. - * @param endpointName The name of the Traffic Manager endpoint to be deleted. + * @param endpointType The type of the Traffic Manager endpoint. + * @param endpointName The name of the Traffic Manager 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. diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/GeographicHierarchiesClientImpl.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/GeographicHierarchiesClientImpl.java index a7fbf4e93dfd..39a06ab746bf 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/GeographicHierarchiesClientImpl.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/GeographicHierarchiesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.trafficmanager.implementation; @@ -53,14 +53,14 @@ public final class GeographicHierarchiesClientImpl implements GeographicHierarch * The interface defining all the services for TrafficManagerManagementClientGeographicHierarchies to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "TrafficManagerManage") + @Host("{endpoint}") + @ServiceInterface(name = "TrafficManagerManagementClientGeographicHierarchies") public interface GeographicHierarchiesService { @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.Network/trafficManagerGeographicHierarchies/default") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getDefault(@HostParam("$host") String endpoint, + Mono> getDefault(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); } diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/HeatMapsClientImpl.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/HeatMapsClientImpl.java index 45b7948250fa..b76c969b500b 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/HeatMapsClientImpl.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/HeatMapsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.trafficmanager.implementation; @@ -25,6 +25,7 @@ import com.azure.core.util.serializer.JacksonAdapter; import com.azure.resourcemanager.trafficmanager.fluent.HeatMapsClient; import com.azure.resourcemanager.trafficmanager.fluent.models.HeatMapModelInner; +import com.azure.resourcemanager.trafficmanager.models.HeatMapType; import java.util.List; import reactor.core.publisher.Mono; @@ -56,19 +57,18 @@ public final class HeatMapsClientImpl implements HeatMapsClient { * The interface defining all the services for TrafficManagerManagementClientHeatMaps to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "TrafficManagerManage") + @Host("{endpoint}") + @ServiceInterface(name = "TrafficManagerManagementClientHeatMaps") public interface HeatMapsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/heatMaps/{heatMapType}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @PathParam("heatMapType") String heatMapType, @QueryParam("topLeft") String topLeft, - @QueryParam("botRight") String botRight, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("heatMapType") HeatMapType heatMapType, @QueryParam("topLeft") String topLeft, + @QueryParam("botRight") String botRight, @HeaderParam("Accept") String accept, Context context); } /** @@ -76,6 +76,7 @@ Mono> get(@HostParam("$host") String endpoint, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. + * @param heatMapType The type of the heatmap. * @param topLeft The top left latitude,longitude pair of the rectangular viewport to query for. * @param botRight The bottom right latitude,longitude pair of the rectangular viewport to query for. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -86,15 +87,7 @@ Mono> get(@HostParam("$host") String endpoint, */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getWithResponseAsync(String resourceGroupName, String profileName, - List topLeft, List botRight) { - 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.")); - } + HeatMapType heatMapType, List topLeft, List botRight) { if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); @@ -102,16 +95,18 @@ public Mono> getWithResponseAsync(String resourceGro if (profileName == null) { return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); } - final String heatMapType = "default"; + if (heatMapType == null) { + return Mono.error(new IllegalArgumentException("Parameter heatMapType is required and cannot be null.")); + } final String accept = "application/json"; String topLeftConverted = JacksonAdapter.createDefaultSerializerAdapter().serializeIterable(topLeft, CollectionFormat.CSV); String botRightConverted = JacksonAdapter.createDefaultSerializerAdapter().serializeIterable(botRight, CollectionFormat.CSV); return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, profileName, heatMapType, topLeftConverted, botRightConverted, - this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, heatMapType, topLeftConverted, + botRightConverted, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -120,6 +115,7 @@ public Mono> getWithResponseAsync(String resourceGro * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. + * @param heatMapType The type of the heatmap. * @param topLeft The top left latitude,longitude pair of the rectangular viewport to query for. * @param botRight The bottom right latitude,longitude pair of the rectangular viewport to query for. * @param context The context to associate with this operation. @@ -131,15 +127,7 @@ public Mono> getWithResponseAsync(String resourceGro */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String profileName, - List topLeft, List botRight, 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.")); - } + HeatMapType heatMapType, List topLeft, List botRight, Context context) { if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); @@ -147,15 +135,17 @@ private Mono> getWithResponseAsync(String resourceGr if (profileName == null) { return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); } - final String heatMapType = "default"; + if (heatMapType == null) { + return Mono.error(new IllegalArgumentException("Parameter heatMapType is required and cannot be null.")); + } final String accept = "application/json"; String topLeftConverted = JacksonAdapter.createDefaultSerializerAdapter().serializeIterable(topLeft, CollectionFormat.CSV); String botRightConverted = JacksonAdapter.createDefaultSerializerAdapter().serializeIterable(botRight, CollectionFormat.CSV); context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, profileName, - heatMapType, topLeftConverted, botRightConverted, this.client.getApiVersion(), accept, context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, heatMapType, topLeftConverted, botRightConverted, accept, context); } /** @@ -163,16 +153,17 @@ private Mono> getWithResponseAsync(String resourceGr * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. + * @param heatMapType The type of the heatmap. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return latest heatmap for Traffic Manager profile on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String profileName) { + public Mono getAsync(String resourceGroupName, String profileName, HeatMapType heatMapType) { final List topLeft = null; final List botRight = null; - return getWithResponseAsync(resourceGroupName, profileName, topLeft, botRight) + return getWithResponseAsync(resourceGroupName, profileName, heatMapType, topLeft, botRight) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -181,6 +172,7 @@ public Mono getAsync(String resourceGroupName, String profile * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. + * @param heatMapType The type of the heatmap. * @param topLeft The top left latitude,longitude pair of the rectangular viewport to query for. * @param botRight The bottom right latitude,longitude pair of the rectangular viewport to query for. * @param context The context to associate with this operation. @@ -191,8 +183,8 @@ public Mono getAsync(String resourceGroupName, String profile */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String profileName, - List topLeft, List botRight, Context context) { - return getWithResponseAsync(resourceGroupName, profileName, topLeft, botRight, context).block(); + HeatMapType heatMapType, List topLeft, List botRight, Context context) { + return getWithResponseAsync(resourceGroupName, profileName, heatMapType, topLeft, botRight, context).block(); } /** @@ -200,15 +192,16 @@ public Response getWithResponse(String resourceGroupName, Str * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param profileName The name of the Traffic Manager profile. + * @param heatMapType The type of the heatmap. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return latest heatmap for Traffic Manager profile. */ @ServiceMethod(returns = ReturnType.SINGLE) - public HeatMapModelInner get(String resourceGroupName, String profileName) { + public HeatMapModelInner get(String resourceGroupName, String profileName, HeatMapType heatMapType) { final List topLeft = null; final List botRight = null; - return getWithResponse(resourceGroupName, profileName, topLeft, botRight, Context.NONE).getValue(); + return getWithResponse(resourceGroupName, profileName, heatMapType, topLeft, botRight, Context.NONE).getValue(); } } diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/ProfilesClientImpl.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/ProfilesClientImpl.java index 523a87c393f7..32d274b09a67 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/ProfilesClientImpl.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/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.trafficmanager.implementation; @@ -37,8 +37,8 @@ import com.azure.resourcemanager.trafficmanager.fluent.models.DeleteOperationResultInner; import com.azure.resourcemanager.trafficmanager.fluent.models.ProfileInner; import com.azure.resourcemanager.trafficmanager.fluent.models.TrafficManagerNameAvailabilityInner; +import com.azure.resourcemanager.trafficmanager.implementation.models.ProfileListResult; import com.azure.resourcemanager.trafficmanager.models.CheckTrafficManagerRelativeDnsNameAvailabilityParameters; -import com.azure.resourcemanager.trafficmanager.models.ProfileListResult; import reactor.core.publisher.Mono; /** @@ -70,209 +70,231 @@ public final class ProfilesClientImpl implements InnerSupportsGet, * The interface defining all the services for TrafficManagerManagementClientProfiles to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "TrafficManagerManage") + @Host("{endpoint}") + @ServiceInterface(name = "TrafficManagerManagementClientProfiles") public interface ProfilesService { @Headers({ "Content-Type: application/json" }) - @Post("/providers/Microsoft.Network/checkTrafficManagerNameAvailability") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> checkTrafficManagerRelativeDnsNameAvailability( - @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Network/checkTrafficManagerNameAvailabilityV2") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> checkTrafficManagerNameAvailabilityV2( - @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters, - @HeaderParam("Accept") String accept, Context context); + Mono> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ProfileInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles") + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + Mono> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ProfileInner parameters, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Network/trafficmanagerprofiles") - @ExpectedResponses({ 200 }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@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, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Network/trafficmanagerprofiles") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, + 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" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") ProfileInner parameters, @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Post("/providers/Microsoft.Network/checkTrafficManagerNameAvailability") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> checkTrafficManagerRelativeDnsNameAvailability( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters, + Context context); + + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Network/checkTrafficManagerNameAvailabilityV2") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> checkTrafficManagerNameAvailabilityV2( + @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") CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}") - @ExpectedResponses({ 200, 204 }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}") + @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("profileName") String profileName, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") ProfileInner parameters, @HeaderParam("Accept") String accept, - Context context); + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** - * Checks the availability of a Traffic Manager Relative DNS name. + * Gets a Traffic Manager profile. * - * @param parameters The Traffic Manager name parameters supplied to the CheckTrafficManagerNameAvailability - * operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The name of the Traffic Manager 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 class representing a Traffic Manager Name Availability response along with {@link Response} on successful - * completion of {@link Mono}. + * @return a Traffic Manager profile along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> - checkTrafficManagerRelativeDnsNameAvailabilityWithResponseAsync( - CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters) { + 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 (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.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.checkTrafficManagerRelativeDnsNameAvailability(this.client.getEndpoint(), - this.client.getApiVersion(), parameters, accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Checks the availability of a Traffic Manager Relative DNS name. + * Gets a Traffic Manager profile. * - * @param parameters The Traffic Manager name parameters supplied to the CheckTrafficManagerNameAvailability - * operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The name of the Traffic Manager 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 class representing a Traffic Manager Name Availability response along with {@link Response} on successful - * completion of {@link Mono}. + * @return a Traffic Manager profile along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - checkTrafficManagerRelativeDnsNameAvailabilityWithResponseAsync( - CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters, 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.")); } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.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.checkTrafficManagerRelativeDnsNameAvailability(this.client.getEndpoint(), - this.client.getApiVersion(), parameters, accept, context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, accept, context); } /** - * Checks the availability of a Traffic Manager Relative DNS name. + * Gets a Traffic Manager profile. * - * @param parameters The Traffic Manager name parameters supplied to the CheckTrafficManagerNameAvailability - * operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The name of the Traffic Manager 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 class representing a Traffic Manager Name Availability response on successful completion of {@link Mono}. + * @return a Traffic Manager profile on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono checkTrafficManagerRelativeDnsNameAvailabilityAsync( - CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters) { - return checkTrafficManagerRelativeDnsNameAvailabilityWithResponseAsync(parameters) + public Mono getByResourceGroupAsync(String resourceGroupName, String profileName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, profileName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Checks the availability of a Traffic Manager Relative DNS name. + * Gets a Traffic Manager profile. * - * @param parameters The Traffic Manager name parameters supplied to the CheckTrafficManagerNameAvailability - * operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The name of the Traffic Manager 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 class representing a Traffic Manager Name Availability response along with {@link Response}. + * @return a Traffic Manager profile along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response checkTrafficManagerRelativeDnsNameAvailabilityWithResponse( - CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters, Context context) { - return checkTrafficManagerRelativeDnsNameAvailabilityWithResponseAsync(parameters, context).block(); + public Response getByResourceGroupWithResponse(String resourceGroupName, String profileName, + Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, profileName, context).block(); } /** - * Checks the availability of a Traffic Manager Relative DNS name. + * Gets a Traffic Manager profile. * - * @param parameters The Traffic Manager name parameters supplied to the CheckTrafficManagerNameAvailability - * operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The name of the Traffic Manager 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 class representing a Traffic Manager Name Availability response. + * @return a Traffic Manager profile. */ @ServiceMethod(returns = ReturnType.SINGLE) - public TrafficManagerNameAvailabilityInner checkTrafficManagerRelativeDnsNameAvailability( - CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters) { - return checkTrafficManagerRelativeDnsNameAvailabilityWithResponse(parameters, Context.NONE).getValue(); + public ProfileInner getByResourceGroup(String resourceGroupName, String profileName) { + return getByResourceGroupWithResponse(resourceGroupName, profileName, Context.NONE).getValue(); } /** - * Checks the availability of a Traffic Manager Relative DNS name. + * Create or update a Traffic Manager profile. * - * @param parameters The Traffic Manager name parameters supplied to the CheckTrafficManagerNameAvailability - * operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The name of the Traffic Manager profile. + * @param parameters The Traffic Manager profile parameters supplied to the CreateOrUpdate operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return class representing a Traffic Manager Name Availability response along with {@link Response} on successful - * completion of {@link Mono}. + * @return class representing a Traffic Manager profile along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> checkTrafficManagerNameAvailabilityV2WithResponseAsync( - CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters) { + public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String profileName, + ProfileInner parameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -281,33 +303,43 @@ public Mono> checkTrafficManagerNa return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (profileName == null) { + return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); + } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.checkTrafficManagerNameAvailabilityV2(this.client.getEndpoint(), - this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, contentType, accept, parameters, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Checks the availability of a Traffic Manager Relative DNS name. + * Create or update a Traffic Manager profile. * - * @param parameters The Traffic Manager name parameters supplied to the CheckTrafficManagerNameAvailability - * operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The name of the Traffic Manager profile. + * @param parameters The Traffic Manager profile parameters supplied to the CreateOrUpdate operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return class representing a Traffic Manager Name Availability response along with {@link Response} on successful - * completion of {@link Mono}. + * @return class representing a Traffic Manager profile along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkTrafficManagerNameAvailabilityV2WithResponseAsync( - CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters, Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String profileName, + ProfileInner parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -316,191 +348,330 @@ private Mono> checkTrafficManagerN return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (profileName == null) { + return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); + } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.checkTrafficManagerNameAvailabilityV2(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), parameters, accept, context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, contentType, accept, parameters, context); } /** - * Checks the availability of a Traffic Manager Relative DNS name. + * Create or update a Traffic Manager profile. * - * @param parameters The Traffic Manager name parameters supplied to the CheckTrafficManagerNameAvailability - * operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The name of the Traffic Manager profile. + * @param parameters The Traffic Manager profile parameters supplied to the CreateOrUpdate operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return class representing a Traffic Manager Name Availability response on successful completion of {@link Mono}. + * @return class representing a Traffic Manager profile on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono checkTrafficManagerNameAvailabilityV2Async( - CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters) { - return checkTrafficManagerNameAvailabilityV2WithResponseAsync(parameters) + public Mono createOrUpdateAsync(String resourceGroupName, String profileName, + ProfileInner parameters) { + return createOrUpdateWithResponseAsync(resourceGroupName, profileName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Checks the availability of a Traffic Manager Relative DNS name. + * Create or update a Traffic Manager profile. * - * @param parameters The Traffic Manager name parameters supplied to the CheckTrafficManagerNameAvailability - * operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The name of the Traffic Manager profile. + * @param parameters The Traffic Manager profile parameters supplied to the CreateOrUpdate operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return class representing a Traffic Manager Name Availability response along with {@link Response}. + * @return class representing a Traffic Manager profile along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response checkTrafficManagerNameAvailabilityV2WithResponse( - CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters, Context context) { - return checkTrafficManagerNameAvailabilityV2WithResponseAsync(parameters, context).block(); + public Response createOrUpdateWithResponse(String resourceGroupName, String profileName, + ProfileInner parameters, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, profileName, parameters, context).block(); } /** - * Checks the availability of a Traffic Manager Relative DNS name. + * Create or update a Traffic Manager profile. * - * @param parameters The Traffic Manager name parameters supplied to the CheckTrafficManagerNameAvailability - * operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The name of the Traffic Manager profile. + * @param parameters The Traffic Manager profile parameters supplied to the CreateOrUpdate operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return class representing a Traffic Manager Name Availability response. + * @return class representing a Traffic Manager profile. */ @ServiceMethod(returns = ReturnType.SINGLE) - public TrafficManagerNameAvailabilityInner - checkTrafficManagerNameAvailabilityV2(CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters) { - return checkTrafficManagerNameAvailabilityV2WithResponse(parameters, Context.NONE).getValue(); + public ProfileInner createOrUpdate(String resourceGroupName, String profileName, ProfileInner parameters) { + return createOrUpdateWithResponse(resourceGroupName, profileName, parameters, Context.NONE).getValue(); } /** - * Lists all Traffic Manager profiles within a resource group. + * Update a Traffic Manager profile. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The name of the Traffic Manager profile. + * @param parameters The Traffic Manager profile parameters supplied to the Update operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list Traffic Manager profiles operation response along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return class representing a Traffic Manager profile along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + public Mono> updateWithResponseAsync(String resourceGroupName, String profileName, + ProfileInner parameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), null, null)) + return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists all Traffic Manager profiles within a resource group. + * Update a Traffic Manager profile. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The name of the Traffic Manager profile. + * @param parameters The Traffic Manager profile parameters supplied to the Update operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list Traffic Manager profiles operation response along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return class representing a Traffic Manager profile along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { + private Mono> updateWithResponseAsync(String resourceGroupName, String profileName, + ProfileInner parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), null, null)); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, contentType, accept, parameters, context); } /** - * Lists all Traffic Manager profiles within a resource group. + * Update a Traffic Manager profile. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The name of the Traffic Manager profile. + * @param parameters The Traffic Manager profile parameters supplied to the Update operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list Traffic Manager profiles operation response as paginated response with {@link PagedFlux}. + * @return class representing a Traffic Manager profile on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateAsync(String resourceGroupName, String profileName, ProfileInner parameters) { + return updateWithResponseAsync(resourceGroupName, profileName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Lists all Traffic Manager profiles within a resource group. + * Update a Traffic Manager profile. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The name of the Traffic Manager profile. + * @param parameters The Traffic Manager profile parameters supplied to the Update operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list Traffic Manager profiles operation response as paginated response with {@link PagedFlux}. + * @return class representing a Traffic Manager profile along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse(String resourceGroupName, String profileName, + ProfileInner parameters, Context context) { + return updateWithResponseAsync(resourceGroupName, profileName, parameters, context).block(); } /** - * Lists all Traffic Manager profiles within a resource group. + * Update a Traffic Manager profile. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The name of the Traffic Manager profile. + * @param parameters The Traffic Manager profile parameters supplied to the Update operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list Traffic Manager profiles operation response as paginated response with {@link PagedIterable}. + * @return class representing a Traffic Manager profile. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public ProfileInner update(String resourceGroupName, String profileName, ProfileInner parameters) { + return updateWithResponse(resourceGroupName, profileName, parameters, Context.NONE).getValue(); } /** - * Lists all Traffic Manager profiles within a resource group. + * Deletes a Traffic Manager profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The name of the Traffic Manager 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 result of the request or operation along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, profileName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a Traffic Manager profile. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The name of the Traffic Manager 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 list Traffic Manager profiles operation response as paginated response with {@link PagedIterable}. + * @return the result of the request or operation along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync(String resourceGroupName, + String profileName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (profileName == null) { + return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, profileName, accept, context); + } + + /** + * Deletes a Traffic Manager profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The name of the Traffic Manager 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 result of the request or operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String profileName) { + return deleteWithResponseAsync(resourceGroupName, profileName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Deletes a Traffic Manager profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The name of the Traffic Manager 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 result of the request or operation along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String resourceGroupName, String profileName, + Context context) { + return deleteWithResponseAsync(resourceGroupName, profileName, context).block(); + } + + /** + * Deletes a Traffic Manager profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param profileName The name of the Traffic Manager 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 result of the request or operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeleteOperationResultInner delete(String resourceGroupName, String profileName) { + return deleteWithResponse(resourceGroupName, profileName, Context.NONE).getValue(); } /** @@ -508,8 +679,8 @@ public PagedIterable listByResourceGroup(String resourceGroupName, * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list Traffic Manager profiles operation response along with {@link PagedResponse} 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> listSinglePageAsync() { @@ -526,7 +697,7 @@ private Mono> listSinglePageAsync() { .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(), null, null)) + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -537,8 +708,8 @@ private Mono> listSinglePageAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list Traffic Manager profiles operation response along with {@link PagedResponse} 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> listSinglePageAsync(Context context) { @@ -556,7 +727,7 @@ private Mono> listSinglePageAsync(Context context) { .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(), null, null)); + res.getValue().value(), res.getValue().nextLink(), null)); } /** @@ -564,11 +735,12 @@ private Mono> listSinglePageAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list Traffic Manager profiles operation response as paginated response with {@link PagedFlux}. + * @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()); + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** @@ -578,11 +750,12 @@ public PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list Traffic Manager profiles operation response as paginated response with {@link PagedFlux}. + * @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)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); } /** @@ -590,7 +763,7 @@ private PagedFlux listAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list Traffic Manager profiles operation response as paginated response with {@link PagedIterable}. + * @return the response of a Profile list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -604,7 +777,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list Traffic Manager profiles operation response as paginated response with {@link PagedIterable}. + * @return the response of a Profile list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -612,510 +785,464 @@ public PagedIterable list(Context context) { } /** - * Gets a Traffic Manager profile. + * Lists all Traffic Manager profiles within a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param profileName The name of the Traffic Manager 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 Traffic Manager profile along with {@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> getByResourceGroupWithResponseAsync(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.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, - profileName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a Traffic Manager profile. + * Lists all Traffic Manager profiles within a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param profileName The name of the Traffic Manager 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 Traffic Manager profile along with {@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> getByResourceGroupWithResponseAsync(String resourceGroupName, - String profileName, Context context) { + 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.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, profileName, - this.client.getApiVersion(), this.client.getSubscriptionId(), 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)); } /** - * Gets a Traffic Manager profile. + * Lists all Traffic Manager profiles within a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param profileName The name of the Traffic Manager 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 Traffic Manager profile on successful completion of {@link Mono}. + * @return the response of a Profile list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getByResourceGroupAsync(String resourceGroupName, String profileName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, profileName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * Gets a Traffic Manager profile. + * Lists all Traffic Manager profiles within a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param profileName The name of the Traffic Manager 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 Traffic Manager profile along with {@link Response}. + * @return the response of a Profile list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String profileName, - Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, profileName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** - * Gets a Traffic Manager profile. + * Lists all Traffic Manager profiles within a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param profileName The name of the Traffic Manager 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 Traffic Manager profile. + * @return the response of a Profile list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ProfileInner getByResourceGroup(String resourceGroupName, String profileName) { - return getByResourceGroupWithResponse(resourceGroupName, profileName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); } /** - * Create or update a Traffic Manager profile. + * Lists all Traffic Manager profiles within a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param profileName The name of the Traffic Manager profile. - * @param parameters The Traffic Manager profile parameters supplied to the CreateOrUpdate operation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return class representing a Traffic Manager profile along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response of a Profile list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String profileName, - ProfileInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (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.")); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Checks the availability of a Traffic Manager Relative DNS name. + * + * @param parameters 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. + * @return class representing a Traffic Manager Name Availability response along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> + checkTrafficManagerRelativeDnsNameAvailabilityWithResponseAsync( + CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, profileName, - this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context)) + .withContext(context -> service.checkTrafficManagerRelativeDnsNameAvailability(this.client.getEndpoint(), + this.client.getApiVersion(), contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update a Traffic Manager profile. + * Checks the availability of a Traffic Manager Relative DNS name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param profileName The name of the Traffic Manager profile. - * @param parameters The Traffic Manager profile parameters supplied to the CreateOrUpdate operation. + * @param parameters 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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return class representing a Traffic Manager profile along with {@link Response} on successful completion of - * {@link Mono}. + * @return class representing a Traffic Manager Name Availability response along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String profileName, - ProfileInner parameters, Context context) { + private Mono> + checkTrafficManagerRelativeDnsNameAvailabilityWithResponseAsync( + CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (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 (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, profileName, - this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context); + return service.checkTrafficManagerRelativeDnsNameAvailability(this.client.getEndpoint(), + this.client.getApiVersion(), contentType, accept, parameters, context); } /** - * Create or update a Traffic Manager profile. + * Checks the availability of a Traffic Manager Relative DNS name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param profileName The name of the Traffic Manager profile. - * @param parameters The Traffic Manager profile parameters supplied to the CreateOrUpdate operation. + * @param parameters 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. - * @return class representing a Traffic Manager profile on successful completion of {@link Mono}. + * @return class representing a Traffic Manager Name Availability response on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, String profileName, - ProfileInner parameters) { - return createOrUpdateWithResponseAsync(resourceGroupName, profileName, parameters) + public Mono checkTrafficManagerRelativeDnsNameAvailabilityAsync( + CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters) { + return checkTrafficManagerRelativeDnsNameAvailabilityWithResponseAsync(parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Create or update a Traffic Manager profile. + * Checks the availability of a Traffic Manager Relative DNS name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param profileName The name of the Traffic Manager profile. - * @param parameters The Traffic Manager profile parameters supplied to the CreateOrUpdate operation. + * @param parameters 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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return class representing a Traffic Manager profile along with {@link Response}. + * @return class representing a Traffic Manager Name Availability response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String profileName, - ProfileInner parameters, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, profileName, parameters, context).block(); + public Response checkTrafficManagerRelativeDnsNameAvailabilityWithResponse( + CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters, Context context) { + return checkTrafficManagerRelativeDnsNameAvailabilityWithResponseAsync(parameters, context).block(); } /** - * Create or update a Traffic Manager profile. + * Checks the availability of a Traffic Manager Relative DNS name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param profileName The name of the Traffic Manager profile. - * @param parameters The Traffic Manager profile parameters supplied to the CreateOrUpdate operation. + * @param parameters 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. - * @return class representing a Traffic Manager profile. + * @return class representing a Traffic Manager Name Availability response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ProfileInner createOrUpdate(String resourceGroupName, String profileName, ProfileInner parameters) { - return createOrUpdateWithResponse(resourceGroupName, profileName, parameters, Context.NONE).getValue(); + public TrafficManagerNameAvailabilityInner checkTrafficManagerRelativeDnsNameAvailability( + CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters) { + return checkTrafficManagerRelativeDnsNameAvailabilityWithResponse(parameters, Context.NONE).getValue(); } /** - * Deletes a Traffic Manager profile. + * Checks the availability of a Traffic Manager Relative DNS name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param profileName The name of the Traffic Manager profile to be deleted. + * @param parameters 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. - * @return the result of the request or operation along with {@link Response} on successful completion of - * {@link Mono}. + * @return class representing a Traffic Manager Name Availability response along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync(String resourceGroupName, - String profileName) { + public Mono> checkTrafficManagerNameAvailabilityV2WithResponseAsync( + CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, profileName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .withContext(context -> service.checkTrafficManagerNameAvailabilityV2(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a Traffic Manager profile. + * Checks the availability of a Traffic Manager Relative DNS name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param profileName The name of the Traffic Manager profile to be deleted. + * @param parameters 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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of the request or operation along with {@link Response} on successful completion of - * {@link Mono}. + * @return class representing a Traffic Manager Name Availability response along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, - String profileName, Context context) { + private Mono> checkTrafficManagerNameAvailabilityV2WithResponseAsync( + CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), resourceGroupName, profileName, this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context); + return service.checkTrafficManagerNameAvailabilityV2(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), contentType, accept, parameters, context); } /** - * Deletes a Traffic Manager profile. + * Checks the availability of a Traffic Manager Relative DNS name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param profileName The name of the Traffic Manager profile to be deleted. + * @param parameters 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. - * @return the result of the request or operation on successful completion of {@link Mono}. + * @return class representing a Traffic Manager Name Availability response on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String profileName) { - return deleteWithResponseAsync(resourceGroupName, profileName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono checkTrafficManagerNameAvailabilityV2Async( + CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters) { + return checkTrafficManagerNameAvailabilityV2WithResponseAsync(parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Deletes a Traffic Manager profile. + * Checks the availability of a Traffic Manager Relative DNS name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param profileName The name of the Traffic Manager profile to be deleted. + * @param parameters 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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of the request or operation along with {@link Response}. + * @return class representing a Traffic Manager Name Availability response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String profileName, - Context context) { - return deleteWithResponseAsync(resourceGroupName, profileName, context).block(); + public Response checkTrafficManagerNameAvailabilityV2WithResponse( + CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters, Context context) { + return checkTrafficManagerNameAvailabilityV2WithResponseAsync(parameters, context).block(); } /** - * Deletes a Traffic Manager profile. + * Checks the availability of a Traffic Manager Relative DNS name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param profileName The name of the Traffic Manager profile to be deleted. + * @param parameters 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. - * @return the result of the request or operation. + * @return class representing a Traffic Manager Name Availability response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DeleteOperationResultInner delete(String resourceGroupName, String profileName) { - return deleteWithResponse(resourceGroupName, profileName, Context.NONE).getValue(); + public TrafficManagerNameAvailabilityInner + checkTrafficManagerNameAvailabilityV2(CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters) { + return checkTrafficManagerNameAvailabilityV2WithResponse(parameters, Context.NONE).getValue(); } /** - * Update a Traffic Manager profile. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param profileName The name of the Traffic Manager profile. - * @param parameters The Traffic Manager profile parameters supplied to the Update operation. + * @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 class representing a Traffic Manager profile along with {@link Response} 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) - public Mono> updateWithResponseAsync(String resourceGroupName, String profileName, - ProfileInner parameters) { + 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.")); } - 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 (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, profileName, - this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context)) + .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())); } /** - * Update a Traffic Manager profile. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param profileName The name of the Traffic Manager profile. - * @param parameters The Traffic Manager profile parameters supplied to the Update operation. + * @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 class representing a Traffic Manager profile along with {@link Response} 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> updateWithResponseAsync(String resourceGroupName, String profileName, - ProfileInner parameters, Context context) { + 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.")); } - 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 (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), resourceGroupName, profileName, this.client.getApiVersion(), - this.client.getSubscriptionId(), parameters, accept, 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)); } /** - * Update a Traffic Manager profile. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param profileName The name of the Traffic Manager profile. - * @param parameters The Traffic Manager profile parameters supplied to the Update operation. + * @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 class representing a Traffic Manager profile 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 updateAsync(String resourceGroupName, String profileName, ProfileInner parameters) { - return updateWithResponseAsync(resourceGroupName, profileName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + 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())); } /** - * Update a Traffic Manager profile. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param profileName The name of the Traffic Manager profile. - * @param parameters The Traffic Manager profile parameters supplied to the Update operation. + * @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 class representing a Traffic Manager profile along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String profileName, - ProfileInner parameters, Context context) { - return updateWithResponseAsync(resourceGroupName, profileName, parameters, context).block(); - } - - /** - * Update a Traffic Manager profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param profileName The name of the Traffic Manager profile. - * @param parameters The Traffic Manager profile parameters supplied to the Update operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return class representing a Traffic Manager profile. + * @return the response of a Profile list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ProfileInner update(String resourceGroupName, String profileName, ProfileInner parameters) { - return updateWithResponse(resourceGroupName, profileName, parameters, Context.NONE).getValue(); + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerManagementClientBuilder.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerManagementClientBuilder.java index 0de0b7127dfa..9026f3afa2ed 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerManagementClientBuilder.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerManagementClientBuilder.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.trafficmanager.implementation; @@ -20,34 +20,34 @@ @ServiceClientBuilder(serviceClients = { TrafficManagerManagementClientImpl.class }) public final class TrafficManagerManagementClientBuilder { /* - * The ID of the target subscription. + * Service host */ - private String subscriptionId; + private String endpoint; /** - * Sets The ID of the target subscription. + * Sets Service host. * - * @param subscriptionId the subscriptionId value. + * @param endpoint the endpoint value. * @return the TrafficManagerManagementClientBuilder. */ - public TrafficManagerManagementClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; + public TrafficManagerManagementClientBuilder 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 TrafficManagerManagementClientBuilder. */ - public TrafficManagerManagementClientBuilder endpoint(String endpoint) { - this.endpoint = endpoint; + public TrafficManagerManagementClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; return this; } @@ -132,7 +132,7 @@ public TrafficManagerManagementClientImpl buildClient() { ? serializerAdapter : SerializerFactory.createDefaultManagementSerializerAdapter(); TrafficManagerManagementClientImpl client = new TrafficManagerManagementClientImpl(localPipeline, - localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); + localSerializerAdapter, localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId); return client; } } diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerManagementClientImpl.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerManagementClientImpl.java index 071293c9b357..69e6f4b6090e 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerManagementClientImpl.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerManagementClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.trafficmanager.implementation; @@ -24,26 +24,12 @@ public final class TrafficManagerManagementClientImpl extends AzureServiceClient implements TrafficManagerManagementClient { /** - * The ID of the target subscription. - */ - private final String subscriptionId; - - /** - * Gets The ID of the target subscription. - * - * @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. */ @@ -52,12 +38,12 @@ public String getEndpoint() { } /** - * Api Version. + * Version parameter. */ private final String apiVersion; /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ @@ -65,6 +51,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. */ @@ -184,17 +184,17 @@ public TrafficManagerUserMetricsKeysClient getTrafficManagerUserMetricsKeys() { * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. - * @param subscriptionId The ID of the target subscription. - * @param endpoint server parameter. + * @param endpoint Service host. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. */ TrafficManagerManagementClientImpl(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.subscriptionId = subscriptionId; this.apiVersion = "2022-04-01"; this.endpoints = new EndpointsClientImpl(this); this.profiles = new ProfilesClientImpl(this); diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerUserMetricsKeysClientImpl.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerUserMetricsKeysClientImpl.java index 056b9af794f9..15fcec2a3440 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerUserMetricsKeysClientImpl.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerUserMetricsKeysClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.trafficmanager.implementation; @@ -57,14 +57,14 @@ public final class TrafficManagerUserMetricsKeysClientImpl implements TrafficMan * The interface defining all the services for TrafficManagerManagementClientTrafficManagerUserMetricsKeys to be * used by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "TrafficManagerManage") + @Host("{endpoint}") + @ServiceInterface(name = "TrafficManagerManagementClientTrafficManagerUserMetricsKeys") public interface TrafficManagerUserMetricsKeysService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Network/trafficManagerUserMetricsKeys/default") @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, @HeaderParam("Accept") String accept, Context context); @@ -72,7 +72,7 @@ Mono> get(@HostParam("$host") String endpoint, @Put("/subscriptions/{subscriptionId}/providers/Microsoft.Network/trafficManagerUserMetricsKeys/default") @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, + Mono> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @@ -80,7 +80,7 @@ Mono> createOrUpdate(@HostParam("$host") String @Delete("/subscriptions/{subscriptionId}/providers/Microsoft.Network/trafficManagerUserMetricsKeys/default") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, + Mono> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); } diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/ProfileListResult.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/models/ProfileListResult.java similarity index 65% rename from sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/ProfileListResult.java rename to sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/models/ProfileListResult.java index 7bd03a4ecaec..1672794671dc 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/ProfileListResult.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/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.trafficmanager.models; +package com.azure.resourcemanager.trafficmanager.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,23 +15,28 @@ import java.util.List; /** - * The list Traffic Manager profiles operation response. + * The response of a Profile list operation. */ -@Fluent +@Immutable public final class ProfileListResult implements JsonSerializable { /* - * Gets the list of Traffic manager profiles. + * The Profile items on this page */ private List value; + /* + * 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: Gets the list of Traffic manager profiles. + * Get the value property: The Profile items on this page. * * @return the value value. */ @@ -39,14 +45,12 @@ public List value() { } /** - * Set the value property: Gets the list of Traffic manager profiles. + * Get the nextLink property: The link to the next page of items. * - * @param value the value value to set. - * @return the ProfileListResult object itself. + * @return the nextLink value. */ - public ProfileListResult withValue(List value) { - this.value = value; - return this; + public String nextLink() { + return this.nextLink; } /** @@ -55,11 +59,16 @@ public ProfileListResult withValue(List value) { * @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} */ @@ -67,6 +76,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -76,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 { @@ -88,6 +99,8 @@ public static ProfileListResult fromJson(JsonReader jsonReader) throws IOExcepti if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> ProfileInner.fromJson(reader1)); deserializedProfileListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedProfileListResult.nextLink = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/AllowedEndpointRecordType.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/AllowedEndpointRecordType.java index 2269ac4660c7..ad371628a495 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/AllowedEndpointRecordType.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/AllowedEndpointRecordType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.trafficmanager.models; diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/AlwaysServe.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/AlwaysServe.java index 3b6c2c39da29..c6e172af4d17 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/AlwaysServe.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/AlwaysServe.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.trafficmanager.models; diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/CheckTrafficManagerRelativeDnsNameAvailabilityParameters.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/CheckTrafficManagerRelativeDnsNameAvailabilityParameters.java index d38ff5539433..a335c4963d67 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/CheckTrafficManagerRelativeDnsNameAvailabilityParameters.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/CheckTrafficManagerRelativeDnsNameAvailabilityParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.trafficmanager.models; diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/DnsConfig.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/DnsConfig.java index eeea83c26dfb..90c02a0ddac9 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/DnsConfig.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/DnsConfig.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.trafficmanager.models; diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointMonitorStatus.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointMonitorStatus.java index 32cbc5e96022..b4ce7e7fa17e 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointMonitorStatus.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointMonitorStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.trafficmanager.models; diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointPropertiesCustomHeadersItem.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointPropertiesCustomHeadersItem.java index 77b516876384..a8490d4ca11b 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointPropertiesCustomHeadersItem.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointPropertiesCustomHeadersItem.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.trafficmanager.models; diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointPropertiesSubnetsItem.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointPropertiesSubnetsItem.java index 23a76df7080d..39c7404487c2 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointPropertiesSubnetsItem.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointPropertiesSubnetsItem.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.trafficmanager.models; diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointStatus.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointStatus.java index cb92cf432145..9a963acfb48d 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointStatus.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.trafficmanager.models; diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointTypes.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointTypes.java index bf10bc290666..6a6cffc635ee 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointTypes.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointTypes.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.trafficmanager.models; diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/HeatMapEndpoint.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/HeatMapEndpoint.java index 3dff6b776706..bb1fc44e8393 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/HeatMapEndpoint.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/HeatMapEndpoint.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.trafficmanager.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 @@ /** * Class which is a sparse representation of a Traffic Manager endpoint. */ -@Fluent +@Immutable public final class HeatMapEndpoint implements JsonSerializable { /* * The ARM Resource ID of this Traffic Manager endpoint. @@ -29,7 +29,7 @@ public final class HeatMapEndpoint implements JsonSerializable /** * Creates an instance of HeatMapEndpoint class. */ - public HeatMapEndpoint() { + private HeatMapEndpoint() { } /** @@ -41,17 +41,6 @@ public String resourceId() { return this.resourceId; } - /** - * Set the resourceId property: The ARM Resource ID of this Traffic Manager endpoint. - * - * @param resourceId the resourceId value to set. - * @return the HeatMapEndpoint object itself. - */ - public HeatMapEndpoint withResourceId(String resourceId) { - this.resourceId = resourceId; - return this; - } - /** * Get the endpointId property: A number uniquely identifying this endpoint in query experiences. * @@ -61,17 +50,6 @@ public Integer endpointId() { return this.endpointId; } - /** - * Set the endpointId property: A number uniquely identifying this endpoint in query experiences. - * - * @param endpointId the endpointId value to set. - * @return the HeatMapEndpoint object itself. - */ - public HeatMapEndpoint withEndpointId(Integer endpointId) { - this.endpointId = endpointId; - return this; - } - /** * Validates the instance. * diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/HeatMapType.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/HeatMapType.java new file mode 100644 index 000000000000..bf0b54ec7097 --- /dev/null +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/HeatMapType.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.trafficmanager.models; + +/** + * Defines values for HeatMapType. + */ +public enum HeatMapType { + /** + * Enum value default. + */ + DEFAULT("default"); + + /** + * The actual serialized value for a HeatMapType instance. + */ + private final String value; + + HeatMapType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a HeatMapType instance. + * + * @param value the serialized value to parse. + * @return the parsed HeatMapType object, or null if unable to parse. + */ + public static HeatMapType fromString(String value) { + if (value == null) { + return null; + } + HeatMapType[] items = HeatMapType.values(); + for (HeatMapType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + /** + * {@inheritDoc} + */ + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorConfig.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorConfig.java index e6f1005ebd07..7dc968b9037c 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorConfig.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorConfig.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.trafficmanager.models; diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorConfigCustomHeadersItem.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorConfigCustomHeadersItem.java index 7756809f664f..2d692d929c68 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorConfigCustomHeadersItem.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorConfigCustomHeadersItem.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.trafficmanager.models; diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorConfigExpectedStatusCodeRangesItem.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorConfigExpectedStatusCodeRangesItem.java index 35e53885e627..06c233de1314 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorConfigExpectedStatusCodeRangesItem.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorConfigExpectedStatusCodeRangesItem.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.trafficmanager.models; diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorProtocol.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorProtocol.java index 64025e03b90b..0d3c3ae4e50b 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorProtocol.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorProtocol.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.trafficmanager.models; diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/ProfileMonitorStatus.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/ProfileMonitorStatus.java index 5770c793d1d8..4723e0be0d2d 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/ProfileMonitorStatus.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/ProfileMonitorStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.trafficmanager.models; diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/ProfileStatus.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/ProfileStatus.java index 95812ce31e20..744fe0ae6bc1 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/ProfileStatus.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/ProfileStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.trafficmanager.models; diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/QueryExperience.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/QueryExperience.java index f7be8c038253..5e55b32532a1 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/QueryExperience.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/QueryExperience.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.trafficmanager.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 @@ /** * Class representing a Traffic Manager HeatMap query experience properties. */ -@Fluent +@Immutable public final class QueryExperience implements JsonSerializable { /* * The id of the endpoint from the 'endpoints' array which these queries were routed to. @@ -34,7 +34,7 @@ public final class QueryExperience implements JsonSerializable /** * Creates an instance of QueryExperience class. */ - public QueryExperience() { + private QueryExperience() { } /** @@ -47,18 +47,6 @@ public int endpointId() { return this.endpointId; } - /** - * Set the endpointId property: The id of the endpoint from the 'endpoints' array which these queries were routed - * to. - * - * @param endpointId the endpointId value to set. - * @return the QueryExperience object itself. - */ - public QueryExperience withEndpointId(int endpointId) { - this.endpointId = endpointId; - return this; - } - /** * Get the queryCount property: The number of queries originating from this location. * @@ -68,17 +56,6 @@ public int queryCount() { return this.queryCount; } - /** - * Set the queryCount property: The number of queries originating from this location. - * - * @param queryCount the queryCount value to set. - * @return the QueryExperience object itself. - */ - public QueryExperience withQueryCount(int queryCount) { - this.queryCount = queryCount; - return this; - } - /** * Get the latency property: The latency experienced by queries originating from this location. * @@ -88,17 +65,6 @@ public Double latency() { return this.latency; } - /** - * Set the latency property: The latency experienced by queries originating from this location. - * - * @param latency the latency value to set. - * @return the QueryExperience object itself. - */ - public QueryExperience withLatency(Double latency) { - this.latency = latency; - return this; - } - /** * Validates the instance. * diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/Region.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/Region.java index eda543886377..ebee9a10167d 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/Region.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/Region.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.trafficmanager.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 @@ /** * Class representing a region in the Geographic hierarchy used with the Geographic traffic routing method. */ -@Fluent +@Immutable public final class Region implements JsonSerializable { /* * The code of the region @@ -35,7 +35,7 @@ public final class Region implements JsonSerializable { /** * Creates an instance of Region class. */ - public Region() { + private Region() { } /** @@ -47,17 +47,6 @@ public String code() { return this.code; } - /** - * Set the code property: The code of the region. - * - * @param code the code value to set. - * @return the Region object itself. - */ - public Region withCode(String code) { - this.code = code; - return this; - } - /** * Get the name property: The name of the region. * @@ -67,17 +56,6 @@ public String name() { return this.name; } - /** - * Set the name property: The name of the region. - * - * @param name the name value to set. - * @return the Region object itself. - */ - public Region withName(String name) { - this.name = name; - return this; - } - /** * Get the regions property: The list of Regions grouped under this Region in the Geographic Hierarchy. * @@ -87,17 +65,6 @@ public List regions() { return this.regions; } - /** - * Set the regions property: The list of Regions grouped under this Region in the Geographic Hierarchy. - * - * @param regions the regions value to set. - * @return the Region object itself. - */ - public Region withRegions(List regions) { - this.regions = regions; - return this; - } - /** * Validates the instance. * diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficFlow.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficFlow.java index 3af351967088..ad9406eaccd3 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficFlow.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficFlow.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.trafficmanager.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 @@ /** * Class representing a Traffic Manager HeatMap traffic flow properties. */ -@Fluent +@Immutable public final class TrafficFlow implements JsonSerializable { /* * The IP address that this query experience originated from. @@ -40,7 +40,7 @@ public final class TrafficFlow implements JsonSerializable { /** * Creates an instance of TrafficFlow class. */ - public TrafficFlow() { + private TrafficFlow() { } /** @@ -52,17 +52,6 @@ public String sourceIp() { return this.sourceIp; } - /** - * Set the sourceIp property: The IP address that this query experience originated from. - * - * @param sourceIp the sourceIp value to set. - * @return the TrafficFlow object itself. - */ - public TrafficFlow withSourceIp(String sourceIp) { - this.sourceIp = sourceIp; - return this; - } - /** * Get the latitude property: The approximate latitude that these queries originated from. * @@ -72,17 +61,6 @@ public Double latitude() { return this.latitude; } - /** - * Set the latitude property: The approximate latitude that these queries originated from. - * - * @param latitude the latitude value to set. - * @return the TrafficFlow object itself. - */ - public TrafficFlow withLatitude(Double latitude) { - this.latitude = latitude; - return this; - } - /** * Get the longitude property: The approximate longitude that these queries originated from. * @@ -92,17 +70,6 @@ public Double longitude() { return this.longitude; } - /** - * Set the longitude property: The approximate longitude that these queries originated from. - * - * @param longitude the longitude value to set. - * @return the TrafficFlow object itself. - */ - public TrafficFlow withLongitude(Double longitude) { - this.longitude = longitude; - return this; - } - /** * Get the queryExperiences property: The query experiences produced in this HeatMap calculation. * @@ -112,17 +79,6 @@ public List queryExperiences() { return this.queryExperiences; } - /** - * Set the queryExperiences property: The query experiences produced in this HeatMap calculation. - * - * @param queryExperiences the queryExperiences value to set. - * @return the TrafficFlow object itself. - */ - public TrafficFlow withQueryExperiences(List queryExperiences) { - this.queryExperiences = queryExperiences; - return this; - } - /** * Validates the instance. * diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficRoutingMethod.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficRoutingMethod.java index 1d12d1f526c1..f44de711edef 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficRoutingMethod.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficRoutingMethod.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.trafficmanager.models; diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficViewEnrollmentStatus.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficViewEnrollmentStatus.java index 15a80df4b23b..a4fa3833e72b 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficViewEnrollmentStatus.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficViewEnrollmentStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.trafficmanager.models; diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/package-info.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/package-info.java index f8e27eeea905..8265f0e77174 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/package-info.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/models/package-info.java @@ -1,9 +1,8 @@ // Copyright (c) Microsoft Corporation. All 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 TrafficManagerManagementClient. - * null. + * Package containing the data models for TrafficManager. */ package com.azure.resourcemanager.trafficmanager.models; diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/package-info.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/package-info.java index b68dea6b1645..a6b5cb917d81 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/package-info.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/package-info.java @@ -1,9 +1,8 @@ // Copyright (c) Microsoft Corporation. All 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 TrafficManagerManagementClient. - * null. + * Package containing the classes for TrafficManager. */ package com.azure.resourcemanager.trafficmanager; diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/module-info.java b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/module-info.java index bde181602117..ee5d952f8ea7 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/module-info.java +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/java/module-info.java @@ -12,5 +12,6 @@ // open packages specifically for azure core opens com.azure.resourcemanager.trafficmanager.fluent.models to com.azure.core; + opens com.azure.resourcemanager.trafficmanager.implementation.models to com.azure.core; opens com.azure.resourcemanager.trafficmanager.models to com.azure.core; } diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/resources/META-INF/azure-resourcemanager-trafficmanager_metadata.json b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/resources/META-INF/azure-resourcemanager-trafficmanager_metadata.json new file mode 100644 index 000000000000..34f08c2366f1 --- /dev/null +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/src/main/resources/META-INF/azure-resourcemanager-trafficmanager_metadata.json @@ -0,0 +1 @@ +{"flavor":"azure","apiVersions":{"Microsoft.Network":"2022-04-01"},"generatedFiles":["src/main/java/com/azure/resourcemanager/trafficmanager/fluent/EndpointsClient.java","src/main/java/com/azure/resourcemanager/trafficmanager/fluent/GeographicHierarchiesClient.java","src/main/java/com/azure/resourcemanager/trafficmanager/fluent/HeatMapsClient.java","src/main/java/com/azure/resourcemanager/trafficmanager/fluent/ProfilesClient.java","src/main/java/com/azure/resourcemanager/trafficmanager/fluent/TrafficManagerManagementClient.java","src/main/java/com/azure/resourcemanager/trafficmanager/fluent/TrafficManagerUserMetricsKeysClient.java","src/main/java/com/azure/resourcemanager/trafficmanager/fluent/models/DeleteOperationResultInner.java","src/main/java/com/azure/resourcemanager/trafficmanager/fluent/models/EndpointInner.java","src/main/java/com/azure/resourcemanager/trafficmanager/fluent/models/EndpointProperties.java","src/main/java/com/azure/resourcemanager/trafficmanager/fluent/models/GeographicHierarchyProperties.java","src/main/java/com/azure/resourcemanager/trafficmanager/fluent/models/HeatMapModelInner.java","src/main/java/com/azure/resourcemanager/trafficmanager/fluent/models/HeatMapProperties.java","src/main/java/com/azure/resourcemanager/trafficmanager/fluent/models/ProfileInner.java","src/main/java/com/azure/resourcemanager/trafficmanager/fluent/models/ProfileProperties.java","src/main/java/com/azure/resourcemanager/trafficmanager/fluent/models/TrafficManagerGeographicHierarchyInner.java","src/main/java/com/azure/resourcemanager/trafficmanager/fluent/models/TrafficManagerNameAvailabilityInner.java","src/main/java/com/azure/resourcemanager/trafficmanager/fluent/models/UserMetricsModelInner.java","src/main/java/com/azure/resourcemanager/trafficmanager/fluent/models/UserMetricsProperties.java","src/main/java/com/azure/resourcemanager/trafficmanager/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/trafficmanager/fluent/package-info.java","src/main/java/com/azure/resourcemanager/trafficmanager/implementation/EndpointsClientImpl.java","src/main/java/com/azure/resourcemanager/trafficmanager/implementation/GeographicHierarchiesClientImpl.java","src/main/java/com/azure/resourcemanager/trafficmanager/implementation/HeatMapsClientImpl.java","src/main/java/com/azure/resourcemanager/trafficmanager/implementation/ProfilesClientImpl.java","src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerManagementClientImpl.java","src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerUserMetricsKeysClientImpl.java","src/main/java/com/azure/resourcemanager/trafficmanager/implementation/models/ProfileListResult.java","src/main/java/com/azure/resourcemanager/trafficmanager/models/AllowedEndpointRecordType.java","src/main/java/com/azure/resourcemanager/trafficmanager/models/AlwaysServe.java","src/main/java/com/azure/resourcemanager/trafficmanager/models/CheckTrafficManagerRelativeDnsNameAvailabilityParameters.java","src/main/java/com/azure/resourcemanager/trafficmanager/models/DnsConfig.java","src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointMonitorStatus.java","src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointPropertiesCustomHeadersItem.java","src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointPropertiesSubnetsItem.java","src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointStatus.java","src/main/java/com/azure/resourcemanager/trafficmanager/models/EndpointTypes.java","src/main/java/com/azure/resourcemanager/trafficmanager/models/HeatMapEndpoint.java","src/main/java/com/azure/resourcemanager/trafficmanager/models/HeatMapType.java","src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorConfig.java","src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorConfigCustomHeadersItem.java","src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorConfigExpectedStatusCodeRangesItem.java","src/main/java/com/azure/resourcemanager/trafficmanager/models/MonitorProtocol.java","src/main/java/com/azure/resourcemanager/trafficmanager/models/ProfileMonitorStatus.java","src/main/java/com/azure/resourcemanager/trafficmanager/models/ProfileStatus.java","src/main/java/com/azure/resourcemanager/trafficmanager/models/QueryExperience.java","src/main/java/com/azure/resourcemanager/trafficmanager/models/Region.java","src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficFlow.java","src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficRoutingMethod.java","src/main/java/com/azure/resourcemanager/trafficmanager/models/TrafficViewEnrollmentStatus.java","src/main/java/com/azure/resourcemanager/trafficmanager/models/package-info.java","src/main/java/com/azure/resourcemanager/trafficmanager/package-info.java"]} \ No newline at end of file diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/tsp-location.yaml b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/tsp-location.yaml new file mode 100644 index 000000000000..5b137bbba034 --- /dev/null +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/trafficmanager/resource-manager/Microsoft.Network/TrafficManager +commit: 56b4c685b89a096de3d97b3b86efcbf99c470138 +repo: Azure/azure-rest-api-specs +additionalDirectories: