From edeff8f3ee95953d2ce809551e1a5c7cbf49f5ec Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Tue, 3 Jun 2025 13:12:00 +0800 Subject: [PATCH 01/12] update core --- core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core b/core index eb614bee9d..7e271db383 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit eb614bee9d7aca4420d97c346a660b94ed0879a9 +Subproject commit 7e271db38367e28ff2c9ef5992ef2696fb81db5f From 6ccce5289fc4115eb078f86aaf9f9661f7e1d70e Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Tue, 3 Jun 2025 13:12:25 +0800 Subject: [PATCH 02/12] sync test --- typespec-tests/tsp/internal.tsp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/typespec-tests/tsp/internal.tsp b/typespec-tests/tsp/internal.tsp index 8146c7a9e4..3b6723b30e 100644 --- a/typespec-tests/tsp/internal.tsp +++ b/typespec-tests/tsp/internal.tsp @@ -4,7 +4,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-client-generator-core"; using TypeSpec.Http; -using Azure.Core; using Azure.ClientGenerator.Core; @service(#{ title: "Internal" }) @@ -44,7 +43,7 @@ model StandAloneData { } // StandAloneDataInner will be generated as intput + output -@usage(Usage.input | Usage.output) +@usage(Usage.input | Usage.output, "!python") model StandAloneDataInner { name: string; } @@ -91,14 +90,14 @@ model ProtocolInternalModel { @route("/internal") interface InternalOp { // test ApiRequest with Access.public - @access(Access.public, "python") - @access(Access.internal, "client") + @access(Access.public, "!python") + @access(Access.internal, "java") @post postInternal(@body body: ApiRequest): ResponseInternal; // test ApiResponse with Access.public @get - @access(Access.internal, "java") + @access(Access.internal, "python, java") getInternal(): ApiResponse; @route("/protocal-internal") From e6cdf06acc2f3c7bcf79328363f058ae3392935a Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Tue, 3 Jun 2025 14:08:42 +0800 Subject: [PATCH 03/12] azure-health-insights-radiologyinsights PR merged --- eng/sdk/sync_sdk.py | 1 - 1 file changed, 1 deletion(-) diff --git a/eng/sdk/sync_sdk.py b/eng/sdk/sync_sdk.py index 9760fab9e3..4ae58af679 100644 --- a/eng/sdk/sync_sdk.py +++ b/eng/sdk/sync_sdk.py @@ -20,7 +20,6 @@ # expect failure on below # "azure-developer-devcenter", # 2 breaks introduced into stable api-version # "azure-ai-vision-face", # SDK in development - # "azure-health-insights-radiologyinsights", # SDK in development ] From 5ab109521d995f6b666850f318575f258bd0f225 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Tue, 3 Jun 2025 14:12:54 +0800 Subject: [PATCH 04/12] skip v2 module --- eng/sdk/sync_sdk.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/eng/sdk/sync_sdk.py b/eng/sdk/sync_sdk.py index 4ae58af679..1e96321acd 100644 --- a/eng/sdk/sync_sdk.py +++ b/eng/sdk/sync_sdk.py @@ -110,6 +110,11 @@ def update_sdks(): if artifact in skip_artifacts: continue + if os.path.dirname(module_path).endswith("-v2"): + # skip modules on azure-core-v2 + logging.info(f"Skip azure-core-v2 module on path {module_path}") + continue + generated_samples_path = os.path.join( module_path, get_generated_folder_from_artifact(module_path, artifact, "samples") ) From 8bfcf65d4b3eb19c2081cfc3e9b98cfb960f39bc Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Thu, 5 Jun 2025 10:25:25 +0800 Subject: [PATCH 05/12] sync test --- .../ArmResourceProviderManager.java | 17 + .../armresourceprovider/fluent/ArmClient.java | 7 + .../fluent/ImmutableResourceModelsClient.java | 79 ++++ .../NginxConfigurationResponseInner.java | 157 +++++++ .../implementation/ArmClientImpl.java | 16 + .../implementation/ChildResourceImpl.java | 2 +- .../CustomTemplateResourceImpl.java | 2 +- .../ImmutableResourceModelsClientImpl.java | 394 ++++++++++++++++++ .../ImmutableResourceModelsImpl.java | 35 ++ .../NginxConfigurationResponseImpl.java | 125 ++++++ .../TopLevelArmResourceImpl.java | 2 +- .../models/ImmutableResourceModels.java | 18 + .../models/NginxConfigurationRequest.java | 93 +++++ .../models/NginxConfigurationResponse.java | 173 ++++++++ .../NginxConfigurationResponseProperties.java | 101 +++++ .../proxy-config.json | 2 +- typespec-tests/tsp/arm.tsp | 40 ++ 17 files changed, 1259 insertions(+), 4 deletions(-) create mode 100644 typespec-tests/src/main/java/tsptest/armresourceprovider/fluent/ImmutableResourceModelsClient.java create mode 100644 typespec-tests/src/main/java/tsptest/armresourceprovider/fluent/models/NginxConfigurationResponseInner.java create mode 100644 typespec-tests/src/main/java/tsptest/armresourceprovider/implementation/ImmutableResourceModelsClientImpl.java create mode 100644 typespec-tests/src/main/java/tsptest/armresourceprovider/implementation/ImmutableResourceModelsImpl.java create mode 100644 typespec-tests/src/main/java/tsptest/armresourceprovider/implementation/NginxConfigurationResponseImpl.java create mode 100644 typespec-tests/src/main/java/tsptest/armresourceprovider/models/ImmutableResourceModels.java create mode 100644 typespec-tests/src/main/java/tsptest/armresourceprovider/models/NginxConfigurationRequest.java create mode 100644 typespec-tests/src/main/java/tsptest/armresourceprovider/models/NginxConfigurationResponse.java create mode 100644 typespec-tests/src/main/java/tsptest/armresourceprovider/models/NginxConfigurationResponseProperties.java diff --git a/typespec-tests/src/main/java/tsptest/armresourceprovider/ArmResourceProviderManager.java b/typespec-tests/src/main/java/tsptest/armresourceprovider/ArmResourceProviderManager.java index 92e976bbe4..f957e26140 100644 --- a/typespec-tests/src/main/java/tsptest/armresourceprovider/ArmResourceProviderManager.java +++ b/typespec-tests/src/main/java/tsptest/armresourceprovider/ArmResourceProviderManager.java @@ -36,6 +36,7 @@ import tsptest.armresourceprovider.implementation.ChildExtensionResourceInterfacesImpl; import tsptest.armresourceprovider.implementation.ChildResourcesInterfacesImpl; import tsptest.armresourceprovider.implementation.CustomTemplateResourceInterfacesImpl; +import tsptest.armresourceprovider.implementation.ImmutableResourceModelsImpl; import tsptest.armresourceprovider.implementation.ManagedMaintenanceWindowStatusOperationsImpl; import tsptest.armresourceprovider.implementation.ModelInterfaceSameNamesImpl; import tsptest.armresourceprovider.implementation.OperationsImpl; @@ -43,6 +44,7 @@ import tsptest.armresourceprovider.models.ChildExtensionResourceInterfaces; import tsptest.armresourceprovider.models.ChildResourcesInterfaces; import tsptest.armresourceprovider.models.CustomTemplateResourceInterfaces; +import tsptest.armresourceprovider.models.ImmutableResourceModels; import tsptest.armresourceprovider.models.ManagedMaintenanceWindowStatusOperations; import tsptest.armresourceprovider.models.ModelInterfaceSameNames; import tsptest.armresourceprovider.models.Operations; @@ -67,6 +69,8 @@ public final class ArmResourceProviderManager { private ModelInterfaceSameNames modelInterfaceSameNames; + private ImmutableResourceModels immutableResourceModels; + private final ArmClient clientObject; private ArmResourceProviderManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { @@ -372,6 +376,19 @@ public ModelInterfaceSameNames modelInterfaceSameNames() { return modelInterfaceSameNames; } + /** + * Gets the resource collection API of ImmutableResourceModels. It manages NginxConfigurationResponse. + * + * @return Resource collection API of ImmutableResourceModels. + */ + public ImmutableResourceModels immutableResourceModels() { + if (this.immutableResourceModels == null) { + this.immutableResourceModels + = new ImmutableResourceModelsImpl(clientObject.getImmutableResourceModels(), this); + } + return immutableResourceModels; + } + /** * Gets wrapped service client ArmClient providing direct access to the underlying auto-generated API * implementation, based on Azure REST API. diff --git a/typespec-tests/src/main/java/tsptest/armresourceprovider/fluent/ArmClient.java b/typespec-tests/src/main/java/tsptest/armresourceprovider/fluent/ArmClient.java index dad78013c0..e2725aa9c5 100644 --- a/typespec-tests/src/main/java/tsptest/armresourceprovider/fluent/ArmClient.java +++ b/typespec-tests/src/main/java/tsptest/armresourceprovider/fluent/ArmClient.java @@ -94,4 +94,11 @@ public interface ArmClient { * @return the ModelInterfaceSameNamesClient object. */ ModelInterfaceSameNamesClient getModelInterfaceSameNames(); + + /** + * Gets the ImmutableResourceModelsClient object to access its operations. + * + * @return the ImmutableResourceModelsClient object. + */ + ImmutableResourceModelsClient getImmutableResourceModels(); } diff --git a/typespec-tests/src/main/java/tsptest/armresourceprovider/fluent/ImmutableResourceModelsClient.java b/typespec-tests/src/main/java/tsptest/armresourceprovider/fluent/ImmutableResourceModelsClient.java new file mode 100644 index 0000000000..5b87283dd0 --- /dev/null +++ b/typespec-tests/src/main/java/tsptest/armresourceprovider/fluent/ImmutableResourceModelsClient.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package tsptest.armresourceprovider.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import tsptest.armresourceprovider.fluent.models.NginxConfigurationResponseInner; +import tsptest.armresourceprovider.models.NginxConfigurationRequest; + +/** + * An instance of this class provides access to all the operations defined in ImmutableResourceModelsClient. + */ +public interface ImmutableResourceModelsClient { + /** + * The createOrUpdate operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param configurationName The name of the NginxConfigurationResponse. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of concrete proxy resource types can be created by aliasing this type + * using a specific property type. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NginxConfigurationResponseInner> + beginCreateOrUpdate(String resourceGroupName, String configurationName); + + /** + * The createOrUpdate operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param configurationName The name of the NginxConfigurationResponse. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of concrete proxy resource types can be created by aliasing this type + * using a specific property type. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NginxConfigurationResponseInner> beginCreateOrUpdate( + String resourceGroupName, String configurationName, NginxConfigurationRequest properties, Context context); + + /** + * The createOrUpdate operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param configurationName The name of the NginxConfigurationResponse. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NginxConfigurationResponseInner createOrUpdate(String resourceGroupName, String configurationName); + + /** + * The createOrUpdate operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param configurationName The name of the NginxConfigurationResponse. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NginxConfigurationResponseInner createOrUpdate(String resourceGroupName, String configurationName, + NginxConfigurationRequest properties, Context context); +} diff --git a/typespec-tests/src/main/java/tsptest/armresourceprovider/fluent/models/NginxConfigurationResponseInner.java b/typespec-tests/src/main/java/tsptest/armresourceprovider/fluent/models/NginxConfigurationResponseInner.java new file mode 100644 index 0000000000..d730985af3 --- /dev/null +++ b/typespec-tests/src/main/java/tsptest/armresourceprovider/fluent/models/NginxConfigurationResponseInner.java @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package tsptest.armresourceprovider.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import tsptest.armresourceprovider.models.NginxConfigurationResponseProperties; + +/** + * Concrete proxy resource types can be created by aliasing this type using a specific property type. + */ +@Immutable +public final class NginxConfigurationResponseInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private NginxConfigurationResponseProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of NginxConfigurationResponseInner class. + */ + private NginxConfigurationResponseInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public NginxConfigurationResponseProperties properties() { + return this.properties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NginxConfigurationResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NginxConfigurationResponseInner 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 NginxConfigurationResponseInner. + */ + public static NginxConfigurationResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NginxConfigurationResponseInner deserializedNginxConfigurationResponseInner + = new NginxConfigurationResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedNginxConfigurationResponseInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedNginxConfigurationResponseInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedNginxConfigurationResponseInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedNginxConfigurationResponseInner.properties + = NginxConfigurationResponseProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedNginxConfigurationResponseInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedNginxConfigurationResponseInner; + }); + } +} diff --git a/typespec-tests/src/main/java/tsptest/armresourceprovider/implementation/ArmClientImpl.java b/typespec-tests/src/main/java/tsptest/armresourceprovider/implementation/ArmClientImpl.java index d8f405df37..c0a1d03475 100644 --- a/typespec-tests/src/main/java/tsptest/armresourceprovider/implementation/ArmClientImpl.java +++ b/typespec-tests/src/main/java/tsptest/armresourceprovider/implementation/ArmClientImpl.java @@ -38,6 +38,7 @@ import tsptest.armresourceprovider.fluent.ChildExtensionResourceInterfacesClient; import tsptest.armresourceprovider.fluent.ChildResourcesInterfacesClient; import tsptest.armresourceprovider.fluent.CustomTemplateResourceInterfacesClient; +import tsptest.armresourceprovider.fluent.ImmutableResourceModelsClient; import tsptest.armresourceprovider.fluent.ManagedMaintenanceWindowStatusOperationsClient; import tsptest.armresourceprovider.fluent.ModelInterfaceSameNamesClient; import tsptest.armresourceprovider.fluent.OperationsClient; @@ -230,6 +231,20 @@ public ModelInterfaceSameNamesClient getModelInterfaceSameNames() { return this.modelInterfaceSameNames; } + /** + * The ImmutableResourceModelsClient object to access its operations. + */ + private final ImmutableResourceModelsClient immutableResourceModels; + + /** + * Gets the ImmutableResourceModelsClient object to access its operations. + * + * @return the ImmutableResourceModelsClient object. + */ + public ImmutableResourceModelsClient getImmutableResourceModels() { + return this.immutableResourceModels; + } + /** * Initializes an instance of ArmClient client. * @@ -255,6 +270,7 @@ public ModelInterfaceSameNamesClient getModelInterfaceSameNames() { this.childExtensionResourceInterfaces = new ChildExtensionResourceInterfacesClientImpl(this); this.managedMaintenanceWindowStatusOperations = new ManagedMaintenanceWindowStatusOperationsClientImpl(this); this.modelInterfaceSameNames = new ModelInterfaceSameNamesClientImpl(this); + this.immutableResourceModels = new ImmutableResourceModelsClientImpl(this); } /** diff --git a/typespec-tests/src/main/java/tsptest/armresourceprovider/implementation/ChildResourceImpl.java b/typespec-tests/src/main/java/tsptest/armresourceprovider/implementation/ChildResourceImpl.java index a5c4b6cb1b..495b29a7b4 100644 --- a/typespec-tests/src/main/java/tsptest/armresourceprovider/implementation/ChildResourceImpl.java +++ b/typespec-tests/src/main/java/tsptest/armresourceprovider/implementation/ChildResourceImpl.java @@ -187,6 +187,6 @@ public ChildResourceImpl withTags(Map tags) { } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/typespec-tests/src/main/java/tsptest/armresourceprovider/implementation/CustomTemplateResourceImpl.java b/typespec-tests/src/main/java/tsptest/armresourceprovider/implementation/CustomTemplateResourceImpl.java index 43814b8e71..9c64a9ca0c 100644 --- a/typespec-tests/src/main/java/tsptest/armresourceprovider/implementation/CustomTemplateResourceImpl.java +++ b/typespec-tests/src/main/java/tsptest/armresourceprovider/implementation/CustomTemplateResourceImpl.java @@ -221,6 +221,6 @@ public CustomTemplateResourceImpl withIfNoneMatch(String ifNoneMatch) { } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/typespec-tests/src/main/java/tsptest/armresourceprovider/implementation/ImmutableResourceModelsClientImpl.java b/typespec-tests/src/main/java/tsptest/armresourceprovider/implementation/ImmutableResourceModelsClientImpl.java new file mode 100644 index 0000000000..bca0234ea8 --- /dev/null +++ b/typespec-tests/src/main/java/tsptest/armresourceprovider/implementation/ImmutableResourceModelsClientImpl.java @@ -0,0 +1,394 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package tsptest.armresourceprovider.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import tsptest.armresourceprovider.fluent.ImmutableResourceModelsClient; +import tsptest.armresourceprovider.fluent.models.NginxConfigurationResponseInner; +import tsptest.armresourceprovider.models.NginxConfigurationRequest; + +/** + * An instance of this class provides access to all the operations defined in ImmutableResourceModelsClient. + */ +public final class ImmutableResourceModelsClientImpl implements ImmutableResourceModelsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ImmutableResourceModelsService service; + + /** + * The service client containing this operation class. + */ + private final ArmClientImpl client; + + /** + * Initializes an instance of ImmutableResourceModelsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ImmutableResourceModelsClientImpl(ArmClientImpl client) { + this.service = RestProxy.create(ImmutableResourceModelsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ArmClientImmutableResourceModels to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ArmClientImmutableRe") + public interface ImmutableResourceModelsService { + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/TspTest.ArmResourceProvider/configurations/{configurationName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("configurationName") String configurationName, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NginxConfigurationRequest properties, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/TspTest.ArmResourceProvider/configurations/{configurationName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("configurationName") String configurationName, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NginxConfigurationRequest properties, Context context); + } + + /** + * The createOrUpdate operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param configurationName The name of the NginxConfigurationResponse. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type along + * with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String configurationName, NginxConfigurationRequest properties) { + 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 (configurationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); + } + if (properties != null) { + properties.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, configurationName, accept, properties, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * The createOrUpdate operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param configurationName The name of the NginxConfigurationResponse. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String configurationName, + NginxConfigurationRequest properties) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (configurationName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); + } + if (properties != null) { + properties.validate(); + } + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, configurationName, accept, properties, Context.NONE); + } + + /** + * The createOrUpdate operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param configurationName The name of the NginxConfigurationResponse. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String configurationName, + NginxConfigurationRequest properties, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (configurationName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); + } + if (properties != null) { + properties.validate(); + } + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, configurationName, accept, properties, context); + } + + /** + * The createOrUpdate operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param configurationName The name of the NginxConfigurationResponse. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of concrete proxy resource types can be created by aliasing this type + * using a specific property type. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NginxConfigurationResponseInner> + beginCreateOrUpdateAsync(String resourceGroupName, String configurationName, + NginxConfigurationRequest properties) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, configurationName, properties); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), NginxConfigurationResponseInner.class, NginxConfigurationResponseInner.class, + this.client.getContext()); + } + + /** + * The createOrUpdate operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param configurationName The name of the NginxConfigurationResponse. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of concrete proxy resource types can be created by aliasing this type + * using a specific property type. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NginxConfigurationResponseInner> + beginCreateOrUpdateAsync(String resourceGroupName, String configurationName) { + final NginxConfigurationRequest properties = null; + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, configurationName, properties); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), NginxConfigurationResponseInner.class, NginxConfigurationResponseInner.class, + this.client.getContext()); + } + + /** + * The createOrUpdate operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param configurationName The name of the NginxConfigurationResponse. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of concrete proxy resource types can be created by aliasing this type + * using a specific property type. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NginxConfigurationResponseInner> + beginCreateOrUpdate(String resourceGroupName, String configurationName, NginxConfigurationRequest properties) { + Response response = createOrUpdateWithResponse(resourceGroupName, configurationName, properties); + return this.client.getLroResult(response, + NginxConfigurationResponseInner.class, NginxConfigurationResponseInner.class, Context.NONE); + } + + /** + * The createOrUpdate operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param configurationName The name of the NginxConfigurationResponse. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of concrete proxy resource types can be created by aliasing this type + * using a specific property type. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NginxConfigurationResponseInner> + beginCreateOrUpdate(String resourceGroupName, String configurationName) { + final NginxConfigurationRequest properties = null; + Response response = createOrUpdateWithResponse(resourceGroupName, configurationName, properties); + return this.client.getLroResult(response, + NginxConfigurationResponseInner.class, NginxConfigurationResponseInner.class, Context.NONE); + } + + /** + * The createOrUpdate operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param configurationName The name of the NginxConfigurationResponse. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of concrete proxy resource types can be created by aliasing this type + * using a specific property type. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NginxConfigurationResponseInner> beginCreateOrUpdate( + String resourceGroupName, String configurationName, NginxConfigurationRequest properties, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, configurationName, properties, context); + return this.client.getLroResult(response, + NginxConfigurationResponseInner.class, NginxConfigurationResponseInner.class, context); + } + + /** + * The createOrUpdate operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param configurationName The name of the NginxConfigurationResponse. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, + String configurationName, NginxConfigurationRequest properties) { + return beginCreateOrUpdateAsync(resourceGroupName, configurationName, properties).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * The createOrUpdate operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param configurationName The name of the NginxConfigurationResponse. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, + String configurationName) { + final NginxConfigurationRequest properties = null; + return beginCreateOrUpdateAsync(resourceGroupName, configurationName, properties).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * The createOrUpdate operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param configurationName The name of the NginxConfigurationResponse. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NginxConfigurationResponseInner createOrUpdate(String resourceGroupName, String configurationName) { + final NginxConfigurationRequest properties = null; + return beginCreateOrUpdate(resourceGroupName, configurationName, properties).getFinalResult(); + } + + /** + * The createOrUpdate operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param configurationName The name of the NginxConfigurationResponse. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NginxConfigurationResponseInner createOrUpdate(String resourceGroupName, String configurationName, + NginxConfigurationRequest properties, Context context) { + return beginCreateOrUpdate(resourceGroupName, configurationName, properties, context).getFinalResult(); + } + + private static final ClientLogger LOGGER = new ClientLogger(ImmutableResourceModelsClientImpl.class); +} diff --git a/typespec-tests/src/main/java/tsptest/armresourceprovider/implementation/ImmutableResourceModelsImpl.java b/typespec-tests/src/main/java/tsptest/armresourceprovider/implementation/ImmutableResourceModelsImpl.java new file mode 100644 index 0000000000..f96ddcbb88 --- /dev/null +++ b/typespec-tests/src/main/java/tsptest/armresourceprovider/implementation/ImmutableResourceModelsImpl.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package tsptest.armresourceprovider.implementation; + +import com.azure.core.util.logging.ClientLogger; +import tsptest.armresourceprovider.fluent.ImmutableResourceModelsClient; +import tsptest.armresourceprovider.models.ImmutableResourceModels; + +public final class ImmutableResourceModelsImpl implements ImmutableResourceModels { + private static final ClientLogger LOGGER = new ClientLogger(ImmutableResourceModelsImpl.class); + + private final ImmutableResourceModelsClient innerClient; + + private final tsptest.armresourceprovider.ArmResourceProviderManager serviceManager; + + public ImmutableResourceModelsImpl(ImmutableResourceModelsClient innerClient, + tsptest.armresourceprovider.ArmResourceProviderManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + private ImmutableResourceModelsClient serviceClient() { + return this.innerClient; + } + + private tsptest.armresourceprovider.ArmResourceProviderManager manager() { + return this.serviceManager; + } + + public NginxConfigurationResponseImpl define(String name) { + return new NginxConfigurationResponseImpl(name, this.manager()); + } +} diff --git a/typespec-tests/src/main/java/tsptest/armresourceprovider/implementation/NginxConfigurationResponseImpl.java b/typespec-tests/src/main/java/tsptest/armresourceprovider/implementation/NginxConfigurationResponseImpl.java new file mode 100644 index 0000000000..d5bf017dcd --- /dev/null +++ b/typespec-tests/src/main/java/tsptest/armresourceprovider/implementation/NginxConfigurationResponseImpl.java @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package tsptest.armresourceprovider.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import tsptest.armresourceprovider.fluent.models.NginxConfigurationResponseInner; +import tsptest.armresourceprovider.models.NginxConfigurationRequest; +import tsptest.armresourceprovider.models.NginxConfigurationResponse; +import tsptest.armresourceprovider.models.NginxConfigurationResponseProperties; + +public final class NginxConfigurationResponseImpl + implements NginxConfigurationResponse, NginxConfigurationResponse.Definition, NginxConfigurationResponse.Update { + private NginxConfigurationResponseInner innerObject; + + private final tsptest.armresourceprovider.ArmResourceProviderManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public NginxConfigurationResponseProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public NginxConfigurationResponseInner innerModel() { + return this.innerObject; + } + + private tsptest.armresourceprovider.ArmResourceProviderManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String configurationName; + + private NginxConfigurationRequest createProperties; + + private NginxConfigurationRequest updateProperties; + + public NginxConfigurationResponseImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public NginxConfigurationResponse create() { + this.innerObject = serviceManager.serviceClient() + .getImmutableResourceModels() + .createOrUpdate(resourceGroupName, configurationName, createProperties, Context.NONE); + return this; + } + + public NginxConfigurationResponse create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getImmutableResourceModels() + .createOrUpdate(resourceGroupName, configurationName, createProperties, context); + return this; + } + + NginxConfigurationResponseImpl(String name, tsptest.armresourceprovider.ArmResourceProviderManager serviceManager) { + this.serviceManager = serviceManager; + this.configurationName = name; + this.createProperties = new NginxConfigurationRequest(); + } + + public NginxConfigurationResponseImpl update() { + this.updateProperties = new NginxConfigurationRequest(); + return this; + } + + public NginxConfigurationResponse apply() { + this.innerObject = serviceManager.serviceClient() + .getImmutableResourceModels() + .createOrUpdate(resourceGroupName, configurationName, updateProperties, Context.NONE); + return this; + } + + public NginxConfigurationResponse apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getImmutableResourceModels() + .createOrUpdate(resourceGroupName, configurationName, updateProperties, context); + return this; + } + + NginxConfigurationResponseImpl(NginxConfigurationResponseInner innerObject, + tsptest.armresourceprovider.ArmResourceProviderManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.configurationName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "configurations"); + } + + public NginxConfigurationResponseImpl withRootFile(String rootFile) { + if (isInCreateMode()) { + this.createProperties.withRootFile(rootFile); + return this; + } else { + this.updateProperties.withRootFile(rootFile); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/typespec-tests/src/main/java/tsptest/armresourceprovider/implementation/TopLevelArmResourceImpl.java b/typespec-tests/src/main/java/tsptest/armresourceprovider/implementation/TopLevelArmResourceImpl.java index 4645fa86a1..7e2a1b291c 100644 --- a/typespec-tests/src/main/java/tsptest/armresourceprovider/implementation/TopLevelArmResourceImpl.java +++ b/typespec-tests/src/main/java/tsptest/armresourceprovider/implementation/TopLevelArmResourceImpl.java @@ -243,6 +243,6 @@ public TopLevelArmResourceImpl withStartTimeStamp(OffsetDateTime startTimeStamp) } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/typespec-tests/src/main/java/tsptest/armresourceprovider/models/ImmutableResourceModels.java b/typespec-tests/src/main/java/tsptest/armresourceprovider/models/ImmutableResourceModels.java new file mode 100644 index 0000000000..c65bd865a3 --- /dev/null +++ b/typespec-tests/src/main/java/tsptest/armresourceprovider/models/ImmutableResourceModels.java @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package tsptest.armresourceprovider.models; + +/** + * Resource collection API of ImmutableResourceModels. + */ +public interface ImmutableResourceModels { + /** + * Begins definition for a new NginxConfigurationResponse resource. + * + * @param name resource name. + * @return the first stage of the new NginxConfigurationResponse definition. + */ + NginxConfigurationResponse.DefinitionStages.Blank define(String name); +} diff --git a/typespec-tests/src/main/java/tsptest/armresourceprovider/models/NginxConfigurationRequest.java b/typespec-tests/src/main/java/tsptest/armresourceprovider/models/NginxConfigurationRequest.java new file mode 100644 index 0000000000..2a7e82423c --- /dev/null +++ b/typespec-tests/src/main/java/tsptest/armresourceprovider/models/NginxConfigurationRequest.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package tsptest.armresourceprovider.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The NginxConfigurationRequest model. + */ +@Fluent +public final class NginxConfigurationRequest implements JsonSerializable { + /* + * The rootFile property. + */ + private String rootFile; + + /** + * Creates an instance of NginxConfigurationRequest class. + */ + public NginxConfigurationRequest() { + } + + /** + * Get the rootFile property: The rootFile property. + * + * @return the rootFile value. + */ + public String rootFile() { + return this.rootFile; + } + + /** + * Set the rootFile property: The rootFile property. + * + * @param rootFile the rootFile value to set. + * @return the NginxConfigurationRequest object itself. + */ + public NginxConfigurationRequest withRootFile(String rootFile) { + this.rootFile = rootFile; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("rootFile", this.rootFile); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NginxConfigurationRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NginxConfigurationRequest if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NginxConfigurationRequest. + */ + public static NginxConfigurationRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NginxConfigurationRequest deserializedNginxConfigurationRequest = new NginxConfigurationRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("rootFile".equals(fieldName)) { + deserializedNginxConfigurationRequest.rootFile = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNginxConfigurationRequest; + }); + } +} diff --git a/typespec-tests/src/main/java/tsptest/armresourceprovider/models/NginxConfigurationResponse.java b/typespec-tests/src/main/java/tsptest/armresourceprovider/models/NginxConfigurationResponse.java new file mode 100644 index 0000000000..118714eab6 --- /dev/null +++ b/typespec-tests/src/main/java/tsptest/armresourceprovider/models/NginxConfigurationResponse.java @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package tsptest.armresourceprovider.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import tsptest.armresourceprovider.fluent.models.NginxConfigurationResponseInner; + +/** + * An immutable client-side representation of NginxConfigurationResponse. + */ +public interface NginxConfigurationResponse { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + NginxConfigurationResponseProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner tsptest.armresourceprovider.fluent.models.NginxConfigurationResponseInner object. + * + * @return the inner object. + */ + NginxConfigurationResponseInner innerModel(); + + /** + * The entirety of the NginxConfigurationResponse definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + } + + /** + * The NginxConfigurationResponse definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the NginxConfigurationResponse definition. + */ + interface Blank extends WithResourceGroup { + } + + /** + * The stage of the NginxConfigurationResponse definition allowing to specify parent resource. + */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the NginxConfigurationResponse definition which contains all the minimum required properties for + * the resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithRootFile { + /** + * Executes the create request. + * + * @return the created resource. + */ + NginxConfigurationResponse create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + NginxConfigurationResponse create(Context context); + } + + /** + * The stage of the NginxConfigurationResponse definition allowing to specify rootFile. + */ + interface WithRootFile { + /** + * Specifies the rootFile property: The rootFile property.. + * + * @param rootFile The rootFile property. + * @return the next definition stage. + */ + WithCreate withRootFile(String rootFile); + } + } + + /** + * Begins update for the NginxConfigurationResponse resource. + * + * @return the stage of resource update. + */ + NginxConfigurationResponse.Update update(); + + /** + * The template for NginxConfigurationResponse update. + */ + interface Update extends UpdateStages.WithRootFile { + /** + * Executes the update request. + * + * @return the updated resource. + */ + NginxConfigurationResponse apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + NginxConfigurationResponse apply(Context context); + } + + /** + * The NginxConfigurationResponse update stages. + */ + interface UpdateStages { + /** + * The stage of the NginxConfigurationResponse update allowing to specify rootFile. + */ + interface WithRootFile { + /** + * Specifies the rootFile property: The rootFile property.. + * + * @param rootFile The rootFile property. + * @return the next definition stage. + */ + Update withRootFile(String rootFile); + } + } +} diff --git a/typespec-tests/src/main/java/tsptest/armresourceprovider/models/NginxConfigurationResponseProperties.java b/typespec-tests/src/main/java/tsptest/armresourceprovider/models/NginxConfigurationResponseProperties.java new file mode 100644 index 0000000000..47d711ab0c --- /dev/null +++ b/typespec-tests/src/main/java/tsptest/armresourceprovider/models/NginxConfigurationResponseProperties.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package tsptest.armresourceprovider.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The NginxConfigurationResponseProperties model. + */ +@Immutable +public final class NginxConfigurationResponseProperties + implements JsonSerializable { + /* + * The provisioningState property. + */ + private ProvisioningState provisioningState; + + /* + * The rootFile property. + */ + private String rootFile; + + /** + * Creates an instance of NginxConfigurationResponseProperties class. + */ + private NginxConfigurationResponseProperties() { + } + + /** + * Get the provisioningState property: The provisioningState property. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the rootFile property: The rootFile property. + * + * @return the rootFile value. + */ + public String rootFile() { + return this.rootFile; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("rootFile", this.rootFile); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NginxConfigurationResponseProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NginxConfigurationResponseProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NginxConfigurationResponseProperties. + */ + public static NginxConfigurationResponseProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NginxConfigurationResponseProperties deserializedNginxConfigurationResponseProperties + = new NginxConfigurationResponseProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedNginxConfigurationResponseProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("rootFile".equals(fieldName)) { + deserializedNginxConfigurationResponseProperties.rootFile = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNginxConfigurationResponseProperties; + }); + } +} diff --git a/typespec-tests/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-armresourceprovider-generated/proxy-config.json b/typespec-tests/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-armresourceprovider-generated/proxy-config.json index b076302abc..1bed01673f 100644 --- a/typespec-tests/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-armresourceprovider-generated/proxy-config.json +++ b/typespec-tests/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-armresourceprovider-generated/proxy-config.json @@ -1 +1 @@ -[["tsptest.armresourceprovider.implementation.ChildExtensionResourceInterfacesClientImpl$ChildExtensionResourceInterfacesService"],["tsptest.armresourceprovider.implementation.ChildResourcesInterfacesClientImpl$ChildResourcesInterfacesService"],["tsptest.armresourceprovider.implementation.CustomTemplateResourceInterfacesClientImpl$CustomTemplateResourceInterfacesService"],["tsptest.armresourceprovider.implementation.ManagedMaintenanceWindowStatusOperationsClientImpl$ManagedMaintenanceWindowStatusOperationsService"],["tsptest.armresourceprovider.implementation.ModelInterfaceSameNamesClientImpl$ModelInterfaceSameNamesService"],["tsptest.armresourceprovider.implementation.OperationsClientImpl$OperationsService"],["tsptest.armresourceprovider.implementation.TopLevelArmResourceInterfacesClientImpl$TopLevelArmResourceInterfacesService"]] \ No newline at end of file +[["tsptest.armresourceprovider.implementation.ChildExtensionResourceInterfacesClientImpl$ChildExtensionResourceInterfacesService"],["tsptest.armresourceprovider.implementation.ChildResourcesInterfacesClientImpl$ChildResourcesInterfacesService"],["tsptest.armresourceprovider.implementation.CustomTemplateResourceInterfacesClientImpl$CustomTemplateResourceInterfacesService"],["tsptest.armresourceprovider.implementation.ImmutableResourceModelsClientImpl$ImmutableResourceModelsService"],["tsptest.armresourceprovider.implementation.ManagedMaintenanceWindowStatusOperationsClientImpl$ManagedMaintenanceWindowStatusOperationsService"],["tsptest.armresourceprovider.implementation.ModelInterfaceSameNamesClientImpl$ModelInterfaceSameNamesService"],["tsptest.armresourceprovider.implementation.OperationsClientImpl$OperationsService"],["tsptest.armresourceprovider.implementation.TopLevelArmResourceInterfacesClientImpl$TopLevelArmResourceInterfacesService"]] \ No newline at end of file diff --git a/typespec-tests/tsp/arm.tsp b/typespec-tests/tsp/arm.tsp index 67d9b7fa58..2094f7e786 100644 --- a/typespec-tests/tsp/arm.tsp +++ b/typespec-tests/tsp/arm.tsp @@ -243,6 +243,27 @@ model ModelInterfaceDifferentNameProperties { provisioningState: string; } +model NginxConfigurationResponse + is Azure.ResourceManager.ProxyResource { + ...ResourceNameParameter< + Resource = NginxConfigurationResponse, + KeyName = "configurationName", + SegmentName = "configurations", + NamePattern = "" + >; +} + +model NginxConfigurationResponseProperties { + @visibility(Lifecycle.Read) + provisioningState?: ProvisioningState; + + rootFile?: string; +} + +model NginxConfigurationRequest { + rootFile?: string; +} + //----------------------- Paths ----------------------- @armResourceOperations interface ChildResourcesInterface @@ -315,6 +336,25 @@ interface ModelInterfaceSameName { get is ArmResourceRead; } +// Resource model is immutable output only. +@armResourceOperations +interface ImmutableResourceModel { + @put + createOrUpdate is Azure.ResourceManager.Legacy.UpdateOperation< + ResourceInstanceParameters< + NginxConfigurationResponse, + Azure.ResourceManager.Foundations.DefaultBaseParameters + >, + NginxConfigurationRequest, + NginxConfigurationResponse | ArmResourceCreatedResponse< + NginxConfigurationResponse, + LroHeaders = ArmAsyncOperationHeader + >, + ErrorResponse, + OptionalRequestBody = true + >; +} + @@clientName(TspTest.ArmResourceProvider, "ArmClient"); @@clientName(ManagedMaintenanceWindowStatusContent, "ManagedMaintenanceWindowStatus"); @@clientName(ModelInterfaceDifferentName, "ModelInterfaceSameName"); From d8ed855eb10ec24faab9c3032cf5b285d05d944f Mon Sep 17 00:00:00 2001 From: actions-user Date: Thu, 5 Jun 2025 03:06:03 +0000 Subject: [PATCH 06/12] re-generate test code --- .../FormRecognizerClientImplBuilder.java | 6 +++ ...stParameterGroupingTestServiceBuilder.java | 6 +++ ...rameterGroupingPostRequiredParameters.java | 8 +++- .../AutoRestReportServiceForAzureBuilder.java | 6 +++ ...ureSpecialParametersTestClientBuilder.java | 6 +++ ...NamedRequestIdParamGroupingParameters.java | 9 ++++- ...ameterizedHostTestPagingClientBuilder.java | 6 +++ .../AutoRestPagingTestServiceBuilder.java | 6 +++ .../paging/models/CustomParameterGroup.java | 10 ++++- .../MicrosoftAzureTestUrlBuilder.java | 6 +++ .../AutoRestComplexTestServiceBuilder.java | 6 +++ .../AdditionalPropertiesClientBuilder.java | 6 +++ .../models/PetAPInPropertiesWithAPString.java | 8 +++- .../models/Sku.java | 7 +++- .../binaryrequestresponsesync/Binaries.java | 39 +++++++++++++------ .../BinariesClientBuilder.java | 6 +++ ...AutoRestSwaggerBATArrayServiceBuilder.java | 6 +++ .../AutoRestBoolTestServiceBuilder.java | 6 +++ .../AutoRestSwaggerBATByteServiceBuilder.java | 6 +++ .../AutoRestDateTestServiceBuilder.java | 6 +++ .../AutoRestDateTimeTestServiceBuilder.java | 6 +++ ...RestRFC1123DateTimeTestServiceBuilder.java | 6 +++ ...estSwaggerBATDictionaryServiceBuilder.java | 6 +++ .../AutoRestDurationTestServiceBuilder.java | 6 +++ .../AutoRestSwaggerBATFileServiceBuilder.java | 6 +++ .../BodyFormsDataURLEncodedBuilder.java | 6 +++ ...ntApplicationXWwwFormUrlencodedSchema.java | 14 +++++-- ...ntApplicationXWwwFormUrlencodedSchema.java | 14 +++++-- .../AutoRestIntegerTestServiceBuilder.java | 6 +++ .../AutoRestSwaggerBATServiceImplBuilder.java | 6 +++ .../clientdefaultvalue/models/Sku.java | 7 +++- ...AutoRestSwaggerConstantServiceBuilder.java | 6 +++ .../ModelAsStringRequiredOneValueDefault.java | 8 +++- ...odelAsStringRequiredOneValueNoDefault.java | 8 +++- .../ModelAsStringRequiredTwoValueDefault.java | 8 +++- ...odelAsStringRequiredTwoValueNoDefault.java | 8 +++- ...oModelAsStringRequiredTwoValueDefault.java | 8 +++- ...odelAsStringRequiredTwoValueNoDefault.java | 8 +++- ...estParameterizedHostTestClientBuilder.java | 6 +++ ...ameterizedCustomHostTestClientBuilder.java | 6 +++ ...toRestHeadExceptionTestServiceBuilder.java | 6 +++ .../EnumDiscriminatorBuilder.java | 6 +++ .../MonitorManagementClientBuilder.java | 6 +++ .../MonitorManagementClientBuilder.java | 6 +++ .../models/ApplicationPackageReference.java | 6 ++- .../models/MetricAlertProperties.java | 6 ++- .../models/MetricAlertResource.java | 8 +++- .../models/ApplicationPackageReference.java | 6 ++- .../models/MetricAlertResource.java | 6 ++- .../MonitorManagementClientBuilder.java | 6 +++ .../models/ApplicationPackageReference.java | 6 ++- .../models/MetricAlertProperties.java | 6 ++- .../noflatten/models/MetricAlertResource.java | 6 ++- .../MonitorManagementClientBuilder.java | 6 +++ .../models/ApplicationPackageReference.java | 6 ++- .../models/MetricAlertResource.java | 6 ++- .../EnumDiscriminatorBuilder.java | 6 +++ .../extensibleenums/PetStoreIncBuilder.java | 6 +++ .../fixtures/extensibleenums/models/Pet.java | 5 ++- .../head/AutoRestHeadTestServiceBuilder.java | 6 +++ ...utoRestSwaggerBATHeaderServiceBuilder.java | 6 +++ ...toRestHeadExceptionTestServiceBuilder.java | 6 +++ ...tHttpInfrastructureTestServiceBuilder.java | 6 +++ .../MonitorManagementClientBuilder.java | 6 +++ .../models/ApplicationPackageReference.java | 6 ++- .../models/MetricAlertResource.java | 6 ++- ...ongRunningOperationTestServiceBuilder.java | 6 +++ .../mediatypes/MediaTypesClientBuilder.java | 6 +++ ...tResourceFlatteningTestServiceBuilder.java | 6 +++ .../modelflattening/models/BaseProduct.java | 6 ++- .../models/FlattenParameterGroup.java | 10 ++++- .../modelflattening/models/SimpleProduct.java | 6 ++- ...ltipleInheritanceServiceClientBuilder.java | 6 +++ .../multipleinheritance/models/Cat.java | 5 ++- .../multipleinheritance/models/Horse.java | 5 ++- .../multipleinheritance/models/Kitten.java | 5 ++- .../multipleinheritance/models/Pet.java | 5 ++- ...utoRestSwaggerBATHeaderServiceBuilder.java | 6 +++ ...utoRestSwaggerBATHeaderServiceBuilder.java | 6 +++ .../AutoRestParameterFlatteningBuilder.java | 6 +++ .../AvailabilitySetUpdateParameters.java | 8 +++- .../report/AutoRestReportServiceBuilder.java | 6 +++ ...FieldsAsCtorArgsTransformationBuilder.java | 6 +++ .../TransformationAsParentRequiredFields.java | 33 ++++++++++------ .../TransformationAsRequiredFields.java | 28 ++++++++----- ...estRequiredOptionalTestServiceBuilder.java | 6 +++ .../requiredoptional/models/ArrayWrapper.java | 6 ++- .../requiredoptional/models/ClassWrapper.java | 6 ++- .../models/StringWrapper.java | 6 ++- .../specialheader/SpecialHeaderBuilder.java | 6 +++ .../AutoRestSwaggerBATXMLServiceBuilder.java | 6 +++ .../models/AccessPolicy.java | 12 ++++-- .../models/Blob.java | 11 ++++-- .../models/BlobPrefix.java | 6 ++- .../models/BlobProperties.java | 9 ++++- .../models/Container.java | 9 ++++- .../models/ContainerProperties.java | 10 ++++- .../models/CorsRule.java | 15 +++++-- .../models/ListBlobsResponse.java | 22 ++++++++--- .../models/ListContainersResponse.java | 15 +++++-- .../models/Logging.java | 9 ++++- .../models/SignedIdentifier.java | 9 ++++- .../url/AutoRestUrlTestServiceBuilder.java | 6 +++ ...tliCollectionFormatTestServiceBuilder.java | 7 ++++ .../AutoRestValidationTestBuilder.java | 6 +++ .../fixtures/validation/models/Product.java | 9 ++++- .../xmlconstant/models/QueryRequest.java | 6 ++- .../AutoRestSwaggerBATXMLServiceBuilder.java | 6 +++ .../xmlservice/models/AccessPolicy.java | 12 ++++-- .../java/fixtures/xmlservice/models/Blob.java | 11 ++++-- .../xmlservice/models/BlobPrefix.java | 6 ++- .../xmlservice/models/BlobProperties.java | 9 ++++- .../fixtures/xmlservice/models/Container.java | 9 ++++- .../models/ContainerProperties.java | 10 ++++- .../fixtures/xmlservice/models/CorsRule.java | 15 +++++-- .../xmlservice/models/ListBlobsResponse.java | 22 ++++++++--- .../models/ListContainersResponse.java | 15 +++++-- .../fixtures/xmlservice/models/Logging.java | 9 ++++- .../xmlservice/models/SignedIdentifier.java | 9 ++++- 119 files changed, 808 insertions(+), 158 deletions(-) diff --git a/azure-dataplane-tests/src/main/java/com/azure/ai/formrecognizer/documentanalysis/implementation/FormRecognizerClientImplBuilder.java b/azure-dataplane-tests/src/main/java/com/azure/ai/formrecognizer/documentanalysis/implementation/FormRecognizerClientImplBuilder.java index 311f773775..7d7d555606 100644 --- a/azure-dataplane-tests/src/main/java/com/azure/ai/formrecognizer/documentanalysis/implementation/FormRecognizerClientImplBuilder.java +++ b/azure-dataplane-tests/src/main/java/com/azure/ai/formrecognizer/documentanalysis/implementation/FormRecognizerClientImplBuilder.java @@ -32,6 +32,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -95,6 +96,9 @@ public FormRecognizerClientImplBuilder httpClient(HttpClient httpClient) { @Generated @Override public FormRecognizerClientImplBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -321,4 +325,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(FormRecognizerClientImplBuilder.class); } diff --git a/azure-tests/src/main/java/fixtures/azureparametergrouping/AutoRestParameterGroupingTestServiceBuilder.java b/azure-tests/src/main/java/fixtures/azureparametergrouping/AutoRestParameterGroupingTestServiceBuilder.java index 41f35379b9..c3f174d6fa 100644 --- a/azure-tests/src/main/java/fixtures/azureparametergrouping/AutoRestParameterGroupingTestServiceBuilder.java +++ b/azure-tests/src/main/java/fixtures/azureparametergrouping/AutoRestParameterGroupingTestServiceBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -91,6 +92,9 @@ public AutoRestParameterGroupingTestServiceBuilder httpClient(HttpClient httpCli @Generated @Override public AutoRestParameterGroupingTestServiceBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -281,4 +285,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(AutoRestParameterGroupingTestServiceBuilder.class); } diff --git a/azure-tests/src/main/java/fixtures/azureparametergrouping/models/ParameterGroupingPostRequiredParameters.java b/azure-tests/src/main/java/fixtures/azureparametergrouping/models/ParameterGroupingPostRequiredParameters.java index 2029441ccc..aa80d11447 100644 --- a/azure-tests/src/main/java/fixtures/azureparametergrouping/models/ParameterGroupingPostRequiredParameters.java +++ b/azure-tests/src/main/java/fixtures/azureparametergrouping/models/ParameterGroupingPostRequiredParameters.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; /** * Parameter group. @@ -138,8 +139,11 @@ public ParameterGroupingPostRequiredParameters setBody(int body) { */ public void validate() { if (getPath() == null) { - throw new IllegalArgumentException( - "Missing required property path in model ParameterGroupingPostRequiredParameters"); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property path in model ParameterGroupingPostRequiredParameters")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ParameterGroupingPostRequiredParameters.class); } diff --git a/azure-tests/src/main/java/fixtures/azurereport/AutoRestReportServiceForAzureBuilder.java b/azure-tests/src/main/java/fixtures/azurereport/AutoRestReportServiceForAzureBuilder.java index 1b05d4b483..7c41d8dc8f 100644 --- a/azure-tests/src/main/java/fixtures/azurereport/AutoRestReportServiceForAzureBuilder.java +++ b/azure-tests/src/main/java/fixtures/azurereport/AutoRestReportServiceForAzureBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -90,6 +91,9 @@ public AutoRestReportServiceForAzureBuilder httpClient(HttpClient httpClient) { @Generated @Override public AutoRestReportServiceForAzureBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -280,4 +284,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(AutoRestReportServiceForAzureBuilder.class); } diff --git a/azure-tests/src/main/java/fixtures/azurespecials/AutoRestAzureSpecialParametersTestClientBuilder.java b/azure-tests/src/main/java/fixtures/azurespecials/AutoRestAzureSpecialParametersTestClientBuilder.java index 709d87a8ca..d9dfaa157f 100644 --- a/azure-tests/src/main/java/fixtures/azurespecials/AutoRestAzureSpecialParametersTestClientBuilder.java +++ b/azure-tests/src/main/java/fixtures/azurespecials/AutoRestAzureSpecialParametersTestClientBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -91,6 +92,9 @@ public AutoRestAzureSpecialParametersTestClientBuilder httpClient(HttpClient htt @Generated @Override public AutoRestAzureSpecialParametersTestClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -321,4 +325,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(AutoRestAzureSpecialParametersTestClientBuilder.class); } diff --git a/azure-tests/src/main/java/fixtures/azurespecials/models/HeaderCustomNamedRequestIdParamGroupingParameters.java b/azure-tests/src/main/java/fixtures/azurespecials/models/HeaderCustomNamedRequestIdParamGroupingParameters.java index c435b98ee9..c279216a92 100644 --- a/azure-tests/src/main/java/fixtures/azurespecials/models/HeaderCustomNamedRequestIdParamGroupingParameters.java +++ b/azure-tests/src/main/java/fixtures/azurespecials/models/HeaderCustomNamedRequestIdParamGroupingParameters.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; /** * Parameter group. @@ -54,8 +55,12 @@ public HeaderCustomNamedRequestIdParamGroupingParameters setFooClientRequestId(S */ public void validate() { if (getFooClientRequestId() == null) { - throw new IllegalArgumentException( - "Missing required property fooClientRequestId in model HeaderCustomNamedRequestIdParamGroupingParameters"); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property fooClientRequestId in model HeaderCustomNamedRequestIdParamGroupingParameters")); } } + + private static final ClientLogger LOGGER + = new ClientLogger(HeaderCustomNamedRequestIdParamGroupingParameters.class); } diff --git a/azure-tests/src/main/java/fixtures/custombaseuri/paging/AutoRestParameterizedHostTestPagingClientBuilder.java b/azure-tests/src/main/java/fixtures/custombaseuri/paging/AutoRestParameterizedHostTestPagingClientBuilder.java index 0bc3ce7969..9faac67714 100644 --- a/azure-tests/src/main/java/fixtures/custombaseuri/paging/AutoRestParameterizedHostTestPagingClientBuilder.java +++ b/azure-tests/src/main/java/fixtures/custombaseuri/paging/AutoRestParameterizedHostTestPagingClientBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -91,6 +92,9 @@ public AutoRestParameterizedHostTestPagingClientBuilder httpClient(HttpClient ht @Generated @Override public AutoRestParameterizedHostTestPagingClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -281,4 +285,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(AutoRestParameterizedHostTestPagingClientBuilder.class); } diff --git a/azure-tests/src/main/java/fixtures/paging/AutoRestPagingTestServiceBuilder.java b/azure-tests/src/main/java/fixtures/paging/AutoRestPagingTestServiceBuilder.java index 3d8eef54b7..3498d7c5ae 100644 --- a/azure-tests/src/main/java/fixtures/paging/AutoRestPagingTestServiceBuilder.java +++ b/azure-tests/src/main/java/fixtures/paging/AutoRestPagingTestServiceBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import fixtures.paging.implementation.AutoRestPagingTestServiceImpl; @@ -92,6 +93,9 @@ public AutoRestPagingTestServiceBuilder httpClient(HttpClient httpClient) { @Generated @Override public AutoRestPagingTestServiceBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -321,4 +325,6 @@ public AutoRestPagingTestServiceAsyncClient buildAsyncClient() { public AutoRestPagingTestServiceClient buildClient() { return new AutoRestPagingTestServiceClient(buildInnerClient().getPagings()); } + + private static final ClientLogger LOGGER = new ClientLogger(AutoRestPagingTestServiceBuilder.class); } diff --git a/azure-tests/src/main/java/fixtures/paging/models/CustomParameterGroup.java b/azure-tests/src/main/java/fixtures/paging/models/CustomParameterGroup.java index 02fb44967a..5b320051d4 100644 --- a/azure-tests/src/main/java/fixtures/paging/models/CustomParameterGroup.java +++ b/azure-tests/src/main/java/fixtures/paging/models/CustomParameterGroup.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; /** * Parameter group. @@ -82,10 +83,15 @@ public CustomParameterGroup setTenant(String tenant) { */ public void validate() { if (getApiVersion() == null) { - throw new IllegalArgumentException("Missing required property apiVersion in model CustomParameterGroup"); + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property apiVersion in model CustomParameterGroup")); } if (getTenant() == null) { - throw new IllegalArgumentException("Missing required property tenant in model CustomParameterGroup"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property tenant in model CustomParameterGroup")); } } + + private static final ClientLogger LOGGER = new ClientLogger(CustomParameterGroup.class); } diff --git a/azure-tests/src/main/java/fixtures/subscriptionidapiversion/MicrosoftAzureTestUrlBuilder.java b/azure-tests/src/main/java/fixtures/subscriptionidapiversion/MicrosoftAzureTestUrlBuilder.java index 88054f7407..62fb2898ac 100644 --- a/azure-tests/src/main/java/fixtures/subscriptionidapiversion/MicrosoftAzureTestUrlBuilder.java +++ b/azure-tests/src/main/java/fixtures/subscriptionidapiversion/MicrosoftAzureTestUrlBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -90,6 +91,9 @@ public MicrosoftAzureTestUrlBuilder httpClient(HttpClient httpClient) { @Generated @Override public MicrosoftAzureTestUrlBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -318,4 +322,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(MicrosoftAzureTestUrlBuilder.class); } diff --git a/customization-tests/src/main/java/fixtures/bodycomplex/AutoRestComplexTestServiceBuilder.java b/customization-tests/src/main/java/fixtures/bodycomplex/AutoRestComplexTestServiceBuilder.java index 48bc43d3af..993e7fe11c 100644 --- a/customization-tests/src/main/java/fixtures/bodycomplex/AutoRestComplexTestServiceBuilder.java +++ b/customization-tests/src/main/java/fixtures/bodycomplex/AutoRestComplexTestServiceBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import fixtures.bodycomplex.implementation.AutoRestComplexTestServiceImpl; @@ -110,6 +111,9 @@ public AutoRestComplexTestServiceBuilder httpClient(HttpClient httpClient) { @Generated @Override public AutoRestComplexTestServiceBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -499,4 +503,6 @@ public ReadonlypropertyClient buildReadonlypropertyClient() { public FlattencomplexClient buildFlattencomplexClient() { return new FlattencomplexClient(buildInnerClient().getFlattencomplexes()); } + + private static final ClientLogger LOGGER = new ClientLogger(AutoRestComplexTestServiceBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/additionalproperties/AdditionalPropertiesClientBuilder.java b/vanilla-tests/src/main/java/fixtures/additionalproperties/AdditionalPropertiesClientBuilder.java index 643ce79d42..8e5960555c 100644 --- a/vanilla-tests/src/main/java/fixtures/additionalproperties/AdditionalPropertiesClientBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/additionalproperties/AdditionalPropertiesClientBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -90,6 +91,9 @@ public AdditionalPropertiesClientBuilder httpClient(HttpClient httpClient) { @Generated @Override public AdditionalPropertiesClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -280,4 +284,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(AdditionalPropertiesClientBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/additionalproperties/models/PetAPInPropertiesWithAPString.java b/vanilla-tests/src/main/java/fixtures/additionalproperties/models/PetAPInPropertiesWithAPString.java index 60351db5d1..50db74f8df 100644 --- a/vanilla-tests/src/main/java/fixtures/additionalproperties/models/PetAPInPropertiesWithAPString.java +++ b/vanilla-tests/src/main/java/fixtures/additionalproperties/models/PetAPInPropertiesWithAPString.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -190,11 +191,14 @@ public PetAPInPropertiesWithAPString setAdditionalProperties(Map */ public void validate() { if (getOdataLocation() == null) { - throw new IllegalArgumentException( - "Missing required property odataLocation in model PetAPInPropertiesWithAPString"); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property odataLocation in model PetAPInPropertiesWithAPString")); } } + private static final ClientLogger LOGGER = new ClientLogger(PetAPInPropertiesWithAPString.class); + /** * {@inheritDoc} */ diff --git a/vanilla-tests/src/main/java/fixtures/annotatedgettersandsetters/models/Sku.java b/vanilla-tests/src/main/java/fixtures/annotatedgettersandsetters/models/Sku.java index e231ccf3bd..9e1bfbf8bd 100644 --- a/vanilla-tests/src/main/java/fixtures/annotatedgettersandsetters/models/Sku.java +++ b/vanilla-tests/src/main/java/fixtures/annotatedgettersandsetters/models/Sku.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonGetter; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSetter; @@ -173,10 +174,12 @@ public String getTestString() { */ public void validate() { if (getFamily() == null) { - throw new IllegalArgumentException("Missing required property family in model Sku"); + throw LOGGER.atError().log(new IllegalArgumentException("Missing required property family in model Sku")); } if (getName() == null) { - throw new IllegalArgumentException("Missing required property name in model Sku"); + throw LOGGER.atError().log(new IllegalArgumentException("Missing required property name in model Sku")); } } + + private static final ClientLogger LOGGER = new ClientLogger(Sku.class); } diff --git a/vanilla-tests/src/main/java/fixtures/binaryrequestresponsesync/Binaries.java b/vanilla-tests/src/main/java/fixtures/binaryrequestresponsesync/Binaries.java index 1b1402a17f..7c9b66d385 100644 --- a/vanilla-tests/src/main/java/fixtures/binaryrequestresponsesync/Binaries.java +++ b/vanilla-tests/src/main/java/fixtures/binaryrequestresponsesync/Binaries.java @@ -21,6 +21,7 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -327,13 +328,16 @@ public Mono putWithBinaryRequestAndResponseAsync(String runbookName, public Response putWithBinaryRequestAndResponseWithResponse(String runbookName, BinaryData binaryContent, long contentLength, Context context) { if (this.client.getHost() == null) { - throw new IllegalArgumentException("Parameter this.client.getHost() is required and cannot be null."); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter this.client.getHost() is required and cannot be null.")); } if (runbookName == null) { - throw new IllegalArgumentException("Parameter runbookName is required and cannot be null."); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter runbookName is required and cannot be null.")); } if (binaryContent == null) { - throw new IllegalArgumentException("Parameter binaryContent is required and cannot be null."); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter binaryContent is required and cannot be null.")); } final String accept = "application/zip"; return service.putWithBinaryRequestAndResponseSync(this.client.getHost(), runbookName, binaryContent, @@ -546,13 +550,16 @@ public Mono> putWithBinaryJsonRequestAndBinaryTextResponseAsync public Response putWithBinaryJsonRequestAndBinaryTextResponseWithResponse(String runbookName, BinaryData binaryContent, long contentLength, Context context) { if (this.client.getHost() == null) { - throw new IllegalArgumentException("Parameter this.client.getHost() is required and cannot be null."); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter this.client.getHost() is required and cannot be null.")); } if (runbookName == null) { - throw new IllegalArgumentException("Parameter runbookName is required and cannot be null."); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter runbookName is required and cannot be null.")); } if (binaryContent == null) { - throw new IllegalArgumentException("Parameter binaryContent is required and cannot be null."); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter binaryContent is required and cannot be null.")); } final String accept = "text/powershell"; return service.putWithBinaryJsonRequestAndBinaryTextResponseSync(this.client.getHost(), runbookName, @@ -763,13 +770,16 @@ public Mono putWithBinaryTextRequestAndBinaryResponseAsync(String ru public Response putWithBinaryTextRequestAndBinaryResponseWithResponse(String runbookName, BinaryData binaryContent, long contentLength, Context context) { if (this.client.getHost() == null) { - throw new IllegalArgumentException("Parameter this.client.getHost() is required and cannot be null."); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter this.client.getHost() is required and cannot be null.")); } if (runbookName == null) { - throw new IllegalArgumentException("Parameter runbookName is required and cannot be null."); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter runbookName is required and cannot be null.")); } if (binaryContent == null) { - throw new IllegalArgumentException("Parameter binaryContent is required and cannot be null."); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter binaryContent is required and cannot be null.")); } final String accept = "application/zip"; return service.putWithBinaryTextRequestAndBinaryResponseSync(this.client.getHost(), runbookName, binaryContent, @@ -980,13 +990,16 @@ public Mono> putWithBinaryTextRequestAndResponseAsync(String ru public Response putWithBinaryTextRequestAndResponseWithResponse(String runbookName, BinaryData binaryContent, long contentLength, Context context) { if (this.client.getHost() == null) { - throw new IllegalArgumentException("Parameter this.client.getHost() is required and cannot be null."); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter this.client.getHost() is required and cannot be null.")); } if (runbookName == null) { - throw new IllegalArgumentException("Parameter runbookName is required and cannot be null."); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter runbookName is required and cannot be null.")); } if (binaryContent == null) { - throw new IllegalArgumentException("Parameter binaryContent is required and cannot be null."); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter binaryContent is required and cannot be null.")); } final String accept = "text/powershell"; return service.putWithBinaryTextRequestAndResponseSync(this.client.getHost(), runbookName, binaryContent, @@ -1010,4 +1023,6 @@ public BinaryData putWithBinaryTextRequestAndResponse(String runbookName, Binary return putWithBinaryTextRequestAndResponseWithResponse(runbookName, binaryContent, contentLength, Context.NONE) .getValue(); } + + private static final ClientLogger LOGGER = new ClientLogger(Binaries.class); } diff --git a/vanilla-tests/src/main/java/fixtures/binaryrequestresponsesync/BinariesClientBuilder.java b/vanilla-tests/src/main/java/fixtures/binaryrequestresponsesync/BinariesClientBuilder.java index 37ae86dfb8..31d452d07c 100644 --- a/vanilla-tests/src/main/java/fixtures/binaryrequestresponsesync/BinariesClientBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/binaryrequestresponsesync/BinariesClientBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -90,6 +91,9 @@ public BinariesClientBuilder httpClient(HttpClient httpClient) { @Generated @Override public BinariesClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -279,4 +283,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(BinariesClientBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/bodyarray/AutoRestSwaggerBATArrayServiceBuilder.java b/vanilla-tests/src/main/java/fixtures/bodyarray/AutoRestSwaggerBATArrayServiceBuilder.java index 9bcba47bad..3bb13ae61e 100644 --- a/vanilla-tests/src/main/java/fixtures/bodyarray/AutoRestSwaggerBATArrayServiceBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/bodyarray/AutoRestSwaggerBATArrayServiceBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -90,6 +91,9 @@ public AutoRestSwaggerBATArrayServiceBuilder httpClient(HttpClient httpClient) { @Generated @Override public AutoRestSwaggerBATArrayServiceBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -280,4 +284,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(AutoRestSwaggerBATArrayServiceBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/bodyboolean/quirks/AutoRestBoolTestServiceBuilder.java b/vanilla-tests/src/main/java/fixtures/bodyboolean/quirks/AutoRestBoolTestServiceBuilder.java index cf377e3d62..02dabfdc66 100644 --- a/vanilla-tests/src/main/java/fixtures/bodyboolean/quirks/AutoRestBoolTestServiceBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/bodyboolean/quirks/AutoRestBoolTestServiceBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -90,6 +91,9 @@ public AutoRestBoolTestServiceBuilder httpClient(HttpClient httpClient) { @Generated @Override public AutoRestBoolTestServiceBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -279,4 +283,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(AutoRestBoolTestServiceBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/bodybyte/AutoRestSwaggerBATByteServiceBuilder.java b/vanilla-tests/src/main/java/fixtures/bodybyte/AutoRestSwaggerBATByteServiceBuilder.java index 28f2c290c6..fd9ee1264e 100644 --- a/vanilla-tests/src/main/java/fixtures/bodybyte/AutoRestSwaggerBATByteServiceBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/bodybyte/AutoRestSwaggerBATByteServiceBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -90,6 +91,9 @@ public AutoRestSwaggerBATByteServiceBuilder httpClient(HttpClient httpClient) { @Generated @Override public AutoRestSwaggerBATByteServiceBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -280,4 +284,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(AutoRestSwaggerBATByteServiceBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/bodydate/AutoRestDateTestServiceBuilder.java b/vanilla-tests/src/main/java/fixtures/bodydate/AutoRestDateTestServiceBuilder.java index b0aa713941..d12bdc0467 100644 --- a/vanilla-tests/src/main/java/fixtures/bodydate/AutoRestDateTestServiceBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/bodydate/AutoRestDateTestServiceBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -90,6 +91,9 @@ public AutoRestDateTestServiceBuilder httpClient(HttpClient httpClient) { @Generated @Override public AutoRestDateTestServiceBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -279,4 +283,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(AutoRestDateTestServiceBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/bodydatetime/AutoRestDateTimeTestServiceBuilder.java b/vanilla-tests/src/main/java/fixtures/bodydatetime/AutoRestDateTimeTestServiceBuilder.java index a7fddb4b49..075b961287 100644 --- a/vanilla-tests/src/main/java/fixtures/bodydatetime/AutoRestDateTimeTestServiceBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/bodydatetime/AutoRestDateTimeTestServiceBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -90,6 +91,9 @@ public AutoRestDateTimeTestServiceBuilder httpClient(HttpClient httpClient) { @Generated @Override public AutoRestDateTimeTestServiceBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -280,4 +284,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(AutoRestDateTimeTestServiceBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/bodydatetimerfc1123/AutoRestRFC1123DateTimeTestServiceBuilder.java b/vanilla-tests/src/main/java/fixtures/bodydatetimerfc1123/AutoRestRFC1123DateTimeTestServiceBuilder.java index 2c180bf22f..9efd148cb9 100644 --- a/vanilla-tests/src/main/java/fixtures/bodydatetimerfc1123/AutoRestRFC1123DateTimeTestServiceBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/bodydatetimerfc1123/AutoRestRFC1123DateTimeTestServiceBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -91,6 +92,9 @@ public AutoRestRFC1123DateTimeTestServiceBuilder httpClient(HttpClient httpClien @Generated @Override public AutoRestRFC1123DateTimeTestServiceBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -281,4 +285,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(AutoRestRFC1123DateTimeTestServiceBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/bodydictionary/AutoRestSwaggerBATDictionaryServiceBuilder.java b/vanilla-tests/src/main/java/fixtures/bodydictionary/AutoRestSwaggerBATDictionaryServiceBuilder.java index 26b5b4fe81..d00c5ba1d2 100644 --- a/vanilla-tests/src/main/java/fixtures/bodydictionary/AutoRestSwaggerBATDictionaryServiceBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/bodydictionary/AutoRestSwaggerBATDictionaryServiceBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import fixtures.bodydictionary.implementation.AutoRestSwaggerBATDictionaryServiceImpl; @@ -95,6 +96,9 @@ public AutoRestSwaggerBATDictionaryServiceBuilder httpClient(HttpClient httpClie @Generated @Override public AutoRestSwaggerBATDictionaryServiceBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -305,4 +309,6 @@ public AutoRestSwaggerBATDictionaryServiceAsyncClient buildAsyncClient() { public AutoRestSwaggerBATDictionaryServiceClient buildClient() { return new AutoRestSwaggerBATDictionaryServiceClient(buildInnerClient().getDictionaries()); } + + private static final ClientLogger LOGGER = new ClientLogger(AutoRestSwaggerBATDictionaryServiceBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/bodyduration/AutoRestDurationTestServiceBuilder.java b/vanilla-tests/src/main/java/fixtures/bodyduration/AutoRestDurationTestServiceBuilder.java index f933e70e28..c2ed87877e 100644 --- a/vanilla-tests/src/main/java/fixtures/bodyduration/AutoRestDurationTestServiceBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/bodyduration/AutoRestDurationTestServiceBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -90,6 +91,9 @@ public AutoRestDurationTestServiceBuilder httpClient(HttpClient httpClient) { @Generated @Override public AutoRestDurationTestServiceBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -280,4 +284,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(AutoRestDurationTestServiceBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/bodyfile/AutoRestSwaggerBATFileServiceBuilder.java b/vanilla-tests/src/main/java/fixtures/bodyfile/AutoRestSwaggerBATFileServiceBuilder.java index 04960ee540..3ab930f33f 100644 --- a/vanilla-tests/src/main/java/fixtures/bodyfile/AutoRestSwaggerBATFileServiceBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/bodyfile/AutoRestSwaggerBATFileServiceBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -90,6 +91,9 @@ public AutoRestSwaggerBATFileServiceBuilder httpClient(HttpClient httpClient) { @Generated @Override public AutoRestSwaggerBATFileServiceBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -280,4 +284,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(AutoRestSwaggerBATFileServiceBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/bodyformdataurlencoded/BodyFormsDataURLEncodedBuilder.java b/vanilla-tests/src/main/java/fixtures/bodyformdataurlencoded/BodyFormsDataURLEncodedBuilder.java index 6aa546c84d..b1f122908d 100644 --- a/vanilla-tests/src/main/java/fixtures/bodyformdataurlencoded/BodyFormsDataURLEncodedBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/bodyformdataurlencoded/BodyFormsDataURLEncodedBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -90,6 +91,9 @@ public BodyFormsDataURLEncodedBuilder httpClient(HttpClient httpClient) { @Generated @Override public BodyFormsDataURLEncodedBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -279,4 +283,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(BodyFormsDataURLEncodedBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/bodyformdataurlencoded/models/Paths14Hl8BdFormsdataurlencodedPetAddPetidPostRequestbodyContentApplicationXWwwFormUrlencodedSchema.java b/vanilla-tests/src/main/java/fixtures/bodyformdataurlencoded/models/Paths14Hl8BdFormsdataurlencodedPetAddPetidPostRequestbodyContentApplicationXWwwFormUrlencodedSchema.java index fb18f4753e..da1000a512 100644 --- a/vanilla-tests/src/main/java/fixtures/bodyformdataurlencoded/models/Paths14Hl8BdFormsdataurlencodedPetAddPetidPostRequestbodyContentApplicationXWwwFormUrlencodedSchema.java +++ b/vanilla-tests/src/main/java/fixtures/bodyformdataurlencoded/models/Paths14Hl8BdFormsdataurlencodedPetAddPetidPostRequestbodyContentApplicationXWwwFormUrlencodedSchema.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -184,15 +185,20 @@ public String getStatus() { */ public void validate() { if (getPetType() == null) { - throw new IllegalArgumentException( - "Missing required property petType in model Paths14Hl8BdFormsdataurlencodedPetAddPetidPostRequestbodyContentApplicationXWwwFormUrlencodedSchema"); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property petType in model Paths14Hl8BdFormsdataurlencodedPetAddPetidPostRequestbodyContentApplicationXWwwFormUrlencodedSchema")); } if (getPetFood() == null) { - throw new IllegalArgumentException( - "Missing required property petFood in model Paths14Hl8BdFormsdataurlencodedPetAddPetidPostRequestbodyContentApplicationXWwwFormUrlencodedSchema"); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property petFood in model Paths14Hl8BdFormsdataurlencodedPetAddPetidPostRequestbodyContentApplicationXWwwFormUrlencodedSchema")); } } + private static final ClientLogger LOGGER = new ClientLogger( + Paths14Hl8BdFormsdataurlencodedPetAddPetidPostRequestbodyContentApplicationXWwwFormUrlencodedSchema.class); + /** * {@inheritDoc} */ diff --git a/vanilla-tests/src/main/java/fixtures/bodyformdataurlencoded/models/PathsPvivzlFormsdataurlencodedPartialconstantbodyPostRequestbodyContentApplicationXWwwFormUrlencodedSchema.java b/vanilla-tests/src/main/java/fixtures/bodyformdataurlencoded/models/PathsPvivzlFormsdataurlencodedPartialconstantbodyPostRequestbodyContentApplicationXWwwFormUrlencodedSchema.java index c4dc5f0cc2..94e704d011 100644 --- a/vanilla-tests/src/main/java/fixtures/bodyformdataurlencoded/models/PathsPvivzlFormsdataurlencodedPartialconstantbodyPostRequestbodyContentApplicationXWwwFormUrlencodedSchema.java +++ b/vanilla-tests/src/main/java/fixtures/bodyformdataurlencoded/models/PathsPvivzlFormsdataurlencodedPartialconstantbodyPostRequestbodyContentApplicationXWwwFormUrlencodedSchema.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -114,15 +115,20 @@ public String getAadAccessToken() { */ public void validate() { if (getService() == null) { - throw new IllegalArgumentException( - "Missing required property service in model PathsPvivzlFormsdataurlencodedPartialconstantbodyPostRequestbodyContentApplicationXWwwFormUrlencodedSchema"); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property service in model PathsPvivzlFormsdataurlencodedPartialconstantbodyPostRequestbodyContentApplicationXWwwFormUrlencodedSchema")); } if (getAadAccessToken() == null) { - throw new IllegalArgumentException( - "Missing required property aadAccessToken in model PathsPvivzlFormsdataurlencodedPartialconstantbodyPostRequestbodyContentApplicationXWwwFormUrlencodedSchema"); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property aadAccessToken in model PathsPvivzlFormsdataurlencodedPartialconstantbodyPostRequestbodyContentApplicationXWwwFormUrlencodedSchema")); } } + private static final ClientLogger LOGGER = new ClientLogger( + PathsPvivzlFormsdataurlencodedPartialconstantbodyPostRequestbodyContentApplicationXWwwFormUrlencodedSchema.class); + /** * {@inheritDoc} */ diff --git a/vanilla-tests/src/main/java/fixtures/bodyinteger/AutoRestIntegerTestServiceBuilder.java b/vanilla-tests/src/main/java/fixtures/bodyinteger/AutoRestIntegerTestServiceBuilder.java index e42fec8603..9a21a35441 100644 --- a/vanilla-tests/src/main/java/fixtures/bodyinteger/AutoRestIntegerTestServiceBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/bodyinteger/AutoRestIntegerTestServiceBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -90,6 +91,9 @@ public AutoRestIntegerTestServiceBuilder httpClient(HttpClient httpClient) { @Generated @Override public AutoRestIntegerTestServiceBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -280,4 +284,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(AutoRestIntegerTestServiceBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/bodystring/implementation/AutoRestSwaggerBATServiceImplBuilder.java b/vanilla-tests/src/main/java/fixtures/bodystring/implementation/AutoRestSwaggerBATServiceImplBuilder.java index c554454749..c008d45e20 100644 --- a/vanilla-tests/src/main/java/fixtures/bodystring/implementation/AutoRestSwaggerBATServiceImplBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/bodystring/implementation/AutoRestSwaggerBATServiceImplBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import fixtures.bodystring.AutoRestSwaggerBATService; @@ -91,6 +92,9 @@ public AutoRestSwaggerBATServiceImplBuilder httpClient(HttpClient httpClient) { @Generated @Override public AutoRestSwaggerBATServiceImplBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -281,4 +285,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(AutoRestSwaggerBATServiceImplBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/clientdefaultvalue/models/Sku.java b/vanilla-tests/src/main/java/fixtures/clientdefaultvalue/models/Sku.java index 82eee5ec87..3edb761263 100644 --- a/vanilla-tests/src/main/java/fixtures/clientdefaultvalue/models/Sku.java +++ b/vanilla-tests/src/main/java/fixtures/clientdefaultvalue/models/Sku.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -162,13 +163,15 @@ public String getTestString() { */ public void validate() { if (getFamily() == null) { - throw new IllegalArgumentException("Missing required property family in model Sku"); + throw LOGGER.atError().log(new IllegalArgumentException("Missing required property family in model Sku")); } if (getName() == null) { - throw new IllegalArgumentException("Missing required property name in model Sku"); + throw LOGGER.atError().log(new IllegalArgumentException("Missing required property name in model Sku")); } } + private static final ClientLogger LOGGER = new ClientLogger(Sku.class); + /** * {@inheritDoc} */ diff --git a/vanilla-tests/src/main/java/fixtures/constants/AutoRestSwaggerConstantServiceBuilder.java b/vanilla-tests/src/main/java/fixtures/constants/AutoRestSwaggerConstantServiceBuilder.java index d98b222c74..49fa251259 100644 --- a/vanilla-tests/src/main/java/fixtures/constants/AutoRestSwaggerConstantServiceBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/constants/AutoRestSwaggerConstantServiceBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -90,6 +91,9 @@ public AutoRestSwaggerConstantServiceBuilder httpClient(HttpClient httpClient) { @Generated @Override public AutoRestSwaggerConstantServiceBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -338,4 +342,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(AutoRestSwaggerConstantServiceBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/constants/models/ModelAsStringRequiredOneValueDefault.java b/vanilla-tests/src/main/java/fixtures/constants/models/ModelAsStringRequiredOneValueDefault.java index def0a88a4f..d511838386 100644 --- a/vanilla-tests/src/main/java/fixtures/constants/models/ModelAsStringRequiredOneValueDefault.java +++ b/vanilla-tests/src/main/java/fixtures/constants/models/ModelAsStringRequiredOneValueDefault.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -60,11 +61,14 @@ public ModelAsStringRequiredOneValueDefault setParameter(ModelAsStringRequiredOn */ public void validate() { if (getParameter() == null) { - throw new IllegalArgumentException( - "Missing required property parameter in model ModelAsStringRequiredOneValueDefault"); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property parameter in model ModelAsStringRequiredOneValueDefault")); } } + private static final ClientLogger LOGGER = new ClientLogger(ModelAsStringRequiredOneValueDefault.class); + /** * {@inheritDoc} */ diff --git a/vanilla-tests/src/main/java/fixtures/constants/models/ModelAsStringRequiredOneValueNoDefault.java b/vanilla-tests/src/main/java/fixtures/constants/models/ModelAsStringRequiredOneValueNoDefault.java index f11bbeeed6..937210e673 100644 --- a/vanilla-tests/src/main/java/fixtures/constants/models/ModelAsStringRequiredOneValueNoDefault.java +++ b/vanilla-tests/src/main/java/fixtures/constants/models/ModelAsStringRequiredOneValueNoDefault.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -60,11 +61,14 @@ public ModelAsStringRequiredOneValueNoDefault setParameter(ModelAsStringRequired */ public void validate() { if (getParameter() == null) { - throw new IllegalArgumentException( - "Missing required property parameter in model ModelAsStringRequiredOneValueNoDefault"); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property parameter in model ModelAsStringRequiredOneValueNoDefault")); } } + private static final ClientLogger LOGGER = new ClientLogger(ModelAsStringRequiredOneValueNoDefault.class); + /** * {@inheritDoc} */ diff --git a/vanilla-tests/src/main/java/fixtures/constants/models/ModelAsStringRequiredTwoValueDefault.java b/vanilla-tests/src/main/java/fixtures/constants/models/ModelAsStringRequiredTwoValueDefault.java index d728633750..a48e8d482c 100644 --- a/vanilla-tests/src/main/java/fixtures/constants/models/ModelAsStringRequiredTwoValueDefault.java +++ b/vanilla-tests/src/main/java/fixtures/constants/models/ModelAsStringRequiredTwoValueDefault.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -60,11 +61,14 @@ public ModelAsStringRequiredTwoValueDefault setParameter(ModelAsStringRequiredTw */ public void validate() { if (getParameter() == null) { - throw new IllegalArgumentException( - "Missing required property parameter in model ModelAsStringRequiredTwoValueDefault"); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property parameter in model ModelAsStringRequiredTwoValueDefault")); } } + private static final ClientLogger LOGGER = new ClientLogger(ModelAsStringRequiredTwoValueDefault.class); + /** * {@inheritDoc} */ diff --git a/vanilla-tests/src/main/java/fixtures/constants/models/ModelAsStringRequiredTwoValueNoDefault.java b/vanilla-tests/src/main/java/fixtures/constants/models/ModelAsStringRequiredTwoValueNoDefault.java index 3630b35153..9f2bced755 100644 --- a/vanilla-tests/src/main/java/fixtures/constants/models/ModelAsStringRequiredTwoValueNoDefault.java +++ b/vanilla-tests/src/main/java/fixtures/constants/models/ModelAsStringRequiredTwoValueNoDefault.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -60,11 +61,14 @@ public ModelAsStringRequiredTwoValueNoDefault setParameter(ModelAsStringRequired */ public void validate() { if (getParameter() == null) { - throw new IllegalArgumentException( - "Missing required property parameter in model ModelAsStringRequiredTwoValueNoDefault"); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property parameter in model ModelAsStringRequiredTwoValueNoDefault")); } } + private static final ClientLogger LOGGER = new ClientLogger(ModelAsStringRequiredTwoValueNoDefault.class); + /** * {@inheritDoc} */ diff --git a/vanilla-tests/src/main/java/fixtures/constants/models/NoModelAsStringRequiredTwoValueDefault.java b/vanilla-tests/src/main/java/fixtures/constants/models/NoModelAsStringRequiredTwoValueDefault.java index 3a1145faaa..2adc0f7ca8 100644 --- a/vanilla-tests/src/main/java/fixtures/constants/models/NoModelAsStringRequiredTwoValueDefault.java +++ b/vanilla-tests/src/main/java/fixtures/constants/models/NoModelAsStringRequiredTwoValueDefault.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -60,11 +61,14 @@ public NoModelAsStringRequiredTwoValueDefault setParameter(NoModelAsStringRequir */ public void validate() { if (getParameter() == null) { - throw new IllegalArgumentException( - "Missing required property parameter in model NoModelAsStringRequiredTwoValueDefault"); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property parameter in model NoModelAsStringRequiredTwoValueDefault")); } } + private static final ClientLogger LOGGER = new ClientLogger(NoModelAsStringRequiredTwoValueDefault.class); + /** * {@inheritDoc} */ diff --git a/vanilla-tests/src/main/java/fixtures/constants/models/NoModelAsStringRequiredTwoValueNoDefault.java b/vanilla-tests/src/main/java/fixtures/constants/models/NoModelAsStringRequiredTwoValueNoDefault.java index d9f2b103b5..33bf665c62 100644 --- a/vanilla-tests/src/main/java/fixtures/constants/models/NoModelAsStringRequiredTwoValueNoDefault.java +++ b/vanilla-tests/src/main/java/fixtures/constants/models/NoModelAsStringRequiredTwoValueNoDefault.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -61,11 +62,14 @@ public NoModelAsStringRequiredTwoValueNoDefaultEnum getParameter() { */ public void validate() { if (getParameter() == null) { - throw new IllegalArgumentException( - "Missing required property parameter in model NoModelAsStringRequiredTwoValueNoDefault"); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property parameter in model NoModelAsStringRequiredTwoValueNoDefault")); } } + private static final ClientLogger LOGGER = new ClientLogger(NoModelAsStringRequiredTwoValueNoDefault.class); + /** * {@inheritDoc} */ diff --git a/vanilla-tests/src/main/java/fixtures/custombaseuri/AutoRestParameterizedHostTestClientBuilder.java b/vanilla-tests/src/main/java/fixtures/custombaseuri/AutoRestParameterizedHostTestClientBuilder.java index d271fa0c0f..ad1929f847 100644 --- a/vanilla-tests/src/main/java/fixtures/custombaseuri/AutoRestParameterizedHostTestClientBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/custombaseuri/AutoRestParameterizedHostTestClientBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -91,6 +92,9 @@ public AutoRestParameterizedHostTestClientBuilder httpClient(HttpClient httpClie @Generated @Override public AutoRestParameterizedHostTestClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -281,4 +285,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(AutoRestParameterizedHostTestClientBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/custombaseuri/moreoptions/AutoRestParameterizedCustomHostTestClientBuilder.java b/vanilla-tests/src/main/java/fixtures/custombaseuri/moreoptions/AutoRestParameterizedCustomHostTestClientBuilder.java index 8b063574da..da8f42306f 100644 --- a/vanilla-tests/src/main/java/fixtures/custombaseuri/moreoptions/AutoRestParameterizedCustomHostTestClientBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/custombaseuri/moreoptions/AutoRestParameterizedCustomHostTestClientBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -91,6 +92,9 @@ public AutoRestParameterizedCustomHostTestClientBuilder httpClient(HttpClient ht @Generated @Override public AutoRestParameterizedCustomHostTestClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -300,4 +304,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(AutoRestParameterizedCustomHostTestClientBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/customhttpexceptionmapping/AutoRestHeadExceptionTestServiceBuilder.java b/vanilla-tests/src/main/java/fixtures/customhttpexceptionmapping/AutoRestHeadExceptionTestServiceBuilder.java index 93338b34af..6f00c27de4 100644 --- a/vanilla-tests/src/main/java/fixtures/customhttpexceptionmapping/AutoRestHeadExceptionTestServiceBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/customhttpexceptionmapping/AutoRestHeadExceptionTestServiceBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -90,6 +91,9 @@ public AutoRestHeadExceptionTestServiceBuilder httpClient(HttpClient httpClient) @Generated @Override public AutoRestHeadExceptionTestServiceBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -280,4 +284,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(AutoRestHeadExceptionTestServiceBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/discriminatorenum/EnumDiscriminatorBuilder.java b/vanilla-tests/src/main/java/fixtures/discriminatorenum/EnumDiscriminatorBuilder.java index 1f047ea0e8..802883c3ec 100644 --- a/vanilla-tests/src/main/java/fixtures/discriminatorenum/EnumDiscriminatorBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/discriminatorenum/EnumDiscriminatorBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -90,6 +91,9 @@ public EnumDiscriminatorBuilder httpClient(HttpClient httpClient) { @Generated @Override public EnumDiscriminatorBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -279,4 +283,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(EnumDiscriminatorBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/discriminatorflattening/MonitorManagementClientBuilder.java b/vanilla-tests/src/main/java/fixtures/discriminatorflattening/MonitorManagementClientBuilder.java index 3f2e6e4672..abee70cda3 100644 --- a/vanilla-tests/src/main/java/fixtures/discriminatorflattening/MonitorManagementClientBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/discriminatorflattening/MonitorManagementClientBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -90,6 +91,9 @@ public MonitorManagementClientBuilder httpClient(HttpClient httpClient) { @Generated @Override public MonitorManagementClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -279,4 +283,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(MonitorManagementClientBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/discriminatorflattening/clientflatten/MonitorManagementClientBuilder.java b/vanilla-tests/src/main/java/fixtures/discriminatorflattening/clientflatten/MonitorManagementClientBuilder.java index 9a16e17f33..7ab577d9d7 100644 --- a/vanilla-tests/src/main/java/fixtures/discriminatorflattening/clientflatten/MonitorManagementClientBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/discriminatorflattening/clientflatten/MonitorManagementClientBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -90,6 +91,9 @@ public MonitorManagementClientBuilder httpClient(HttpClient httpClient) { @Generated @Override public MonitorManagementClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -279,4 +283,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(MonitorManagementClientBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/discriminatorflattening/clientflatten/models/ApplicationPackageReference.java b/vanilla-tests/src/main/java/fixtures/discriminatorflattening/clientflatten/models/ApplicationPackageReference.java index b5f0019ec2..831ad0463d 100644 --- a/vanilla-tests/src/main/java/fixtures/discriminatorflattening/clientflatten/models/ApplicationPackageReference.java +++ b/vanilla-tests/src/main/java/fixtures/discriminatorflattening/clientflatten/models/ApplicationPackageReference.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -93,7 +94,10 @@ public ApplicationPackageReference setVersion(String version) { */ public void validate() { if (getId() == null) { - throw new IllegalArgumentException("Missing required property id in model ApplicationPackageReference"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property id in model ApplicationPackageReference")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ApplicationPackageReference.class); } diff --git a/vanilla-tests/src/main/java/fixtures/discriminatorflattening/clientflatten/models/MetricAlertProperties.java b/vanilla-tests/src/main/java/fixtures/discriminatorflattening/clientflatten/models/MetricAlertProperties.java index e7a5197d8d..fbb38191c8 100644 --- a/vanilla-tests/src/main/java/fixtures/discriminatorflattening/clientflatten/models/MetricAlertProperties.java +++ b/vanilla-tests/src/main/java/fixtures/discriminatorflattening/clientflatten/models/MetricAlertProperties.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -56,9 +57,12 @@ public MetricAlertProperties setCriteria(MetricAlertCriteria criteria) { */ public void validate() { if (getCriteria() == null) { - throw new IllegalArgumentException("Missing required property criteria in model MetricAlertProperties"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property criteria in model MetricAlertProperties")); } else { getCriteria().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(MetricAlertProperties.class); } diff --git a/vanilla-tests/src/main/java/fixtures/discriminatorflattening/clientflatten/models/MetricAlertResource.java b/vanilla-tests/src/main/java/fixtures/discriminatorflattening/clientflatten/models/MetricAlertResource.java index 4ecf6ffa79..ce85e92b8d 100644 --- a/vanilla-tests/src/main/java/fixtures/discriminatorflattening/clientflatten/models/MetricAlertResource.java +++ b/vanilla-tests/src/main/java/fixtures/discriminatorflattening/clientflatten/models/MetricAlertResource.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -69,10 +70,13 @@ public MetricAlertResource setCriteria(MetricAlertCriteria criteria) { */ public void validate() { if (getInnerProperties() == null) { - throw new IllegalArgumentException( - "Missing required property innerProperties in model MetricAlertResource"); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property innerProperties in model MetricAlertResource")); } else { getInnerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(MetricAlertResource.class); } diff --git a/vanilla-tests/src/main/java/fixtures/discriminatorflattening/models/ApplicationPackageReference.java b/vanilla-tests/src/main/java/fixtures/discriminatorflattening/models/ApplicationPackageReference.java index b1f77e29a5..89cd87823a 100644 --- a/vanilla-tests/src/main/java/fixtures/discriminatorflattening/models/ApplicationPackageReference.java +++ b/vanilla-tests/src/main/java/fixtures/discriminatorflattening/models/ApplicationPackageReference.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -93,7 +94,10 @@ public ApplicationPackageReference setVersion(String version) { */ public void validate() { if (getId() == null) { - throw new IllegalArgumentException("Missing required property id in model ApplicationPackageReference"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property id in model ApplicationPackageReference")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ApplicationPackageReference.class); } diff --git a/vanilla-tests/src/main/java/fixtures/discriminatorflattening/models/MetricAlertResource.java b/vanilla-tests/src/main/java/fixtures/discriminatorflattening/models/MetricAlertResource.java index 6e7bc93093..5fda799865 100644 --- a/vanilla-tests/src/main/java/fixtures/discriminatorflattening/models/MetricAlertResource.java +++ b/vanilla-tests/src/main/java/fixtures/discriminatorflattening/models/MetricAlertResource.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; import com.azure.core.annotation.JsonFlatten; +import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -58,9 +59,12 @@ public MetricAlertResource setCriteria(MetricAlertCriteria criteria) { */ public void validate() { if (getCriteria() == null) { - throw new IllegalArgumentException("Missing required property criteria in model MetricAlertResource"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property criteria in model MetricAlertResource")); } else { getCriteria().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(MetricAlertResource.class); } diff --git a/vanilla-tests/src/main/java/fixtures/discriminatorflattening/noflatten/MonitorManagementClientBuilder.java b/vanilla-tests/src/main/java/fixtures/discriminatorflattening/noflatten/MonitorManagementClientBuilder.java index 5cbc4fa534..22349e15e8 100644 --- a/vanilla-tests/src/main/java/fixtures/discriminatorflattening/noflatten/MonitorManagementClientBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/discriminatorflattening/noflatten/MonitorManagementClientBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -90,6 +91,9 @@ public MonitorManagementClientBuilder httpClient(HttpClient httpClient) { @Generated @Override public MonitorManagementClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -279,4 +283,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(MonitorManagementClientBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/discriminatorflattening/noflatten/models/ApplicationPackageReference.java b/vanilla-tests/src/main/java/fixtures/discriminatorflattening/noflatten/models/ApplicationPackageReference.java index 973dfbd8b7..afde260b66 100644 --- a/vanilla-tests/src/main/java/fixtures/discriminatorflattening/noflatten/models/ApplicationPackageReference.java +++ b/vanilla-tests/src/main/java/fixtures/discriminatorflattening/noflatten/models/ApplicationPackageReference.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -93,7 +94,10 @@ public ApplicationPackageReference setVersion(String version) { */ public void validate() { if (getId() == null) { - throw new IllegalArgumentException("Missing required property id in model ApplicationPackageReference"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property id in model ApplicationPackageReference")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ApplicationPackageReference.class); } diff --git a/vanilla-tests/src/main/java/fixtures/discriminatorflattening/noflatten/models/MetricAlertProperties.java b/vanilla-tests/src/main/java/fixtures/discriminatorflattening/noflatten/models/MetricAlertProperties.java index 17178497df..c8a0633c8d 100644 --- a/vanilla-tests/src/main/java/fixtures/discriminatorflattening/noflatten/models/MetricAlertProperties.java +++ b/vanilla-tests/src/main/java/fixtures/discriminatorflattening/noflatten/models/MetricAlertProperties.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -56,9 +57,12 @@ public MetricAlertProperties setCriteria(MetricAlertCriteria criteria) { */ public void validate() { if (getCriteria() == null) { - throw new IllegalArgumentException("Missing required property criteria in model MetricAlertProperties"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property criteria in model MetricAlertProperties")); } else { getCriteria().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(MetricAlertProperties.class); } diff --git a/vanilla-tests/src/main/java/fixtures/discriminatorflattening/noflatten/models/MetricAlertResource.java b/vanilla-tests/src/main/java/fixtures/discriminatorflattening/noflatten/models/MetricAlertResource.java index f6a0dc7e1c..74e0a1a243 100644 --- a/vanilla-tests/src/main/java/fixtures/discriminatorflattening/noflatten/models/MetricAlertResource.java +++ b/vanilla-tests/src/main/java/fixtures/discriminatorflattening/noflatten/models/MetricAlertResource.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -56,9 +57,12 @@ public MetricAlertResource setProperties(MetricAlertProperties properties) { */ public void validate() { if (getProperties() == null) { - throw new IllegalArgumentException("Missing required property properties in model MetricAlertResource"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property properties in model MetricAlertResource")); } else { getProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(MetricAlertResource.class); } diff --git a/vanilla-tests/src/main/java/fixtures/discriminatorflattening/requirexmsflattened/MonitorManagementClientBuilder.java b/vanilla-tests/src/main/java/fixtures/discriminatorflattening/requirexmsflattened/MonitorManagementClientBuilder.java index dea1e20aec..6dd27da1f6 100644 --- a/vanilla-tests/src/main/java/fixtures/discriminatorflattening/requirexmsflattened/MonitorManagementClientBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/discriminatorflattening/requirexmsflattened/MonitorManagementClientBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -90,6 +91,9 @@ public MonitorManagementClientBuilder httpClient(HttpClient httpClient) { @Generated @Override public MonitorManagementClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -279,4 +283,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(MonitorManagementClientBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/discriminatorflattening/requirexmsflattened/models/ApplicationPackageReference.java b/vanilla-tests/src/main/java/fixtures/discriminatorflattening/requirexmsflattened/models/ApplicationPackageReference.java index 8d80981833..14f97caec0 100644 --- a/vanilla-tests/src/main/java/fixtures/discriminatorflattening/requirexmsflattened/models/ApplicationPackageReference.java +++ b/vanilla-tests/src/main/java/fixtures/discriminatorflattening/requirexmsflattened/models/ApplicationPackageReference.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -93,7 +94,10 @@ public ApplicationPackageReference setVersion(String version) { */ public void validate() { if (getId() == null) { - throw new IllegalArgumentException("Missing required property id in model ApplicationPackageReference"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property id in model ApplicationPackageReference")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ApplicationPackageReference.class); } diff --git a/vanilla-tests/src/main/java/fixtures/discriminatorflattening/requirexmsflattened/models/MetricAlertResource.java b/vanilla-tests/src/main/java/fixtures/discriminatorflattening/requirexmsflattened/models/MetricAlertResource.java index c7d20632d8..50f3cf06e2 100644 --- a/vanilla-tests/src/main/java/fixtures/discriminatorflattening/requirexmsflattened/models/MetricAlertResource.java +++ b/vanilla-tests/src/main/java/fixtures/discriminatorflattening/requirexmsflattened/models/MetricAlertResource.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; import com.azure.core.annotation.JsonFlatten; +import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -58,9 +59,12 @@ public MetricAlertResource setCriteria(MetricAlertCriteria criteria) { */ public void validate() { if (getCriteria() == null) { - throw new IllegalArgumentException("Missing required property criteria in model MetricAlertResource"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property criteria in model MetricAlertResource")); } else { getCriteria().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(MetricAlertResource.class); } diff --git a/vanilla-tests/src/main/java/fixtures/discriminatorsetter/EnumDiscriminatorBuilder.java b/vanilla-tests/src/main/java/fixtures/discriminatorsetter/EnumDiscriminatorBuilder.java index 0754710b75..68a55a147e 100644 --- a/vanilla-tests/src/main/java/fixtures/discriminatorsetter/EnumDiscriminatorBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/discriminatorsetter/EnumDiscriminatorBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -90,6 +91,9 @@ public EnumDiscriminatorBuilder httpClient(HttpClient httpClient) { @Generated @Override public EnumDiscriminatorBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -279,4 +283,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(EnumDiscriminatorBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/extensibleenums/PetStoreIncBuilder.java b/vanilla-tests/src/main/java/fixtures/extensibleenums/PetStoreIncBuilder.java index 18bcbab9ff..ec42740f9a 100644 --- a/vanilla-tests/src/main/java/fixtures/extensibleenums/PetStoreIncBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/extensibleenums/PetStoreIncBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -89,6 +90,9 @@ public PetStoreIncBuilder httpClient(HttpClient httpClient) { @Generated @Override public PetStoreIncBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -278,4 +282,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(PetStoreIncBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/extensibleenums/models/Pet.java b/vanilla-tests/src/main/java/fixtures/extensibleenums/models/Pet.java index 0d32a9a038..bdac444e63 100644 --- a/vanilla-tests/src/main/java/fixtures/extensibleenums/models/Pet.java +++ b/vanilla-tests/src/main/java/fixtures/extensibleenums/models/Pet.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -115,10 +116,12 @@ public Pet setIntEnum(IntEnum intEnum) { */ public void validate() { if (getIntEnum() == null) { - throw new IllegalArgumentException("Missing required property intEnum in model Pet"); + throw LOGGER.atError().log(new IllegalArgumentException("Missing required property intEnum in model Pet")); } } + private static final ClientLogger LOGGER = new ClientLogger(Pet.class); + /** * {@inheritDoc} */ diff --git a/vanilla-tests/src/main/java/fixtures/head/AutoRestHeadTestServiceBuilder.java b/vanilla-tests/src/main/java/fixtures/head/AutoRestHeadTestServiceBuilder.java index b46645d997..03add7a2fd 100644 --- a/vanilla-tests/src/main/java/fixtures/head/AutoRestHeadTestServiceBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/head/AutoRestHeadTestServiceBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -90,6 +91,9 @@ public AutoRestHeadTestServiceBuilder httpClient(HttpClient httpClient) { @Generated @Override public AutoRestHeadTestServiceBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -279,4 +283,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(AutoRestHeadTestServiceBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/header/AutoRestSwaggerBATHeaderServiceBuilder.java b/vanilla-tests/src/main/java/fixtures/header/AutoRestSwaggerBATHeaderServiceBuilder.java index 1850eb3c65..e090493aa3 100644 --- a/vanilla-tests/src/main/java/fixtures/header/AutoRestSwaggerBATHeaderServiceBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/header/AutoRestSwaggerBATHeaderServiceBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -90,6 +91,9 @@ public AutoRestSwaggerBATHeaderServiceBuilder httpClient(HttpClient httpClient) @Generated @Override public AutoRestSwaggerBATHeaderServiceBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -280,4 +284,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(AutoRestSwaggerBATHeaderServiceBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/headexceptions/AutoRestHeadExceptionTestServiceBuilder.java b/vanilla-tests/src/main/java/fixtures/headexceptions/AutoRestHeadExceptionTestServiceBuilder.java index 8d3796b6f2..9c7abf7f73 100644 --- a/vanilla-tests/src/main/java/fixtures/headexceptions/AutoRestHeadExceptionTestServiceBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/headexceptions/AutoRestHeadExceptionTestServiceBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -90,6 +91,9 @@ public AutoRestHeadExceptionTestServiceBuilder httpClient(HttpClient httpClient) @Generated @Override public AutoRestHeadExceptionTestServiceBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -280,4 +284,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(AutoRestHeadExceptionTestServiceBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/httpinfrastructure/AutoRestHttpInfrastructureTestServiceBuilder.java b/vanilla-tests/src/main/java/fixtures/httpinfrastructure/AutoRestHttpInfrastructureTestServiceBuilder.java index 9e7ab353df..6c3d5c92b5 100644 --- a/vanilla-tests/src/main/java/fixtures/httpinfrastructure/AutoRestHttpInfrastructureTestServiceBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/httpinfrastructure/AutoRestHttpInfrastructureTestServiceBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -91,6 +92,9 @@ public AutoRestHttpInfrastructureTestServiceBuilder httpClient(HttpClient httpCl @Generated @Override public AutoRestHttpInfrastructureTestServiceBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -281,4 +285,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(AutoRestHttpInfrastructureTestServiceBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/inheritance/passdiscriminator/MonitorManagementClientBuilder.java b/vanilla-tests/src/main/java/fixtures/inheritance/passdiscriminator/MonitorManagementClientBuilder.java index 01c1c53eff..c7b7c58fca 100644 --- a/vanilla-tests/src/main/java/fixtures/inheritance/passdiscriminator/MonitorManagementClientBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/inheritance/passdiscriminator/MonitorManagementClientBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -90,6 +91,9 @@ public MonitorManagementClientBuilder httpClient(HttpClient httpClient) { @Generated @Override public MonitorManagementClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -279,4 +283,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(MonitorManagementClientBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/inheritance/passdiscriminator/models/ApplicationPackageReference.java b/vanilla-tests/src/main/java/fixtures/inheritance/passdiscriminator/models/ApplicationPackageReference.java index 4a7b1d81f2..fcaaa55efa 100644 --- a/vanilla-tests/src/main/java/fixtures/inheritance/passdiscriminator/models/ApplicationPackageReference.java +++ b/vanilla-tests/src/main/java/fixtures/inheritance/passdiscriminator/models/ApplicationPackageReference.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -93,7 +94,10 @@ public ApplicationPackageReference setVersion(String version) { */ public void validate() { if (getId() == null) { - throw new IllegalArgumentException("Missing required property id in model ApplicationPackageReference"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property id in model ApplicationPackageReference")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ApplicationPackageReference.class); } diff --git a/vanilla-tests/src/main/java/fixtures/inheritance/passdiscriminator/models/MetricAlertResource.java b/vanilla-tests/src/main/java/fixtures/inheritance/passdiscriminator/models/MetricAlertResource.java index 0940c3188f..83814769a5 100644 --- a/vanilla-tests/src/main/java/fixtures/inheritance/passdiscriminator/models/MetricAlertResource.java +++ b/vanilla-tests/src/main/java/fixtures/inheritance/passdiscriminator/models/MetricAlertResource.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; import com.azure.core.annotation.JsonFlatten; +import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -58,9 +59,12 @@ public MetricAlertResource setCriteria(MetricAlertCriteria criteria) { */ public void validate() { if (getCriteria() == null) { - throw new IllegalArgumentException("Missing required property criteria in model MetricAlertResource"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property criteria in model MetricAlertResource")); } else { getCriteria().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(MetricAlertResource.class); } diff --git a/vanilla-tests/src/main/java/fixtures/lro/AutoRestLongRunningOperationTestServiceBuilder.java b/vanilla-tests/src/main/java/fixtures/lro/AutoRestLongRunningOperationTestServiceBuilder.java index 8aae42ef8c..022ccc9b5e 100644 --- a/vanilla-tests/src/main/java/fixtures/lro/AutoRestLongRunningOperationTestServiceBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/lro/AutoRestLongRunningOperationTestServiceBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -91,6 +92,9 @@ public AutoRestLongRunningOperationTestServiceBuilder httpClient(HttpClient http @Generated @Override public AutoRestLongRunningOperationTestServiceBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -281,4 +285,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(AutoRestLongRunningOperationTestServiceBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/mediatypes/MediaTypesClientBuilder.java b/vanilla-tests/src/main/java/fixtures/mediatypes/MediaTypesClientBuilder.java index 14b2048053..2bab140d65 100644 --- a/vanilla-tests/src/main/java/fixtures/mediatypes/MediaTypesClientBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/mediatypes/MediaTypesClientBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -90,6 +91,9 @@ public MediaTypesClientBuilder httpClient(HttpClient httpClient) { @Generated @Override public MediaTypesClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -279,4 +283,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(MediaTypesClientBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/modelflattening/AutoRestResourceFlatteningTestServiceBuilder.java b/vanilla-tests/src/main/java/fixtures/modelflattening/AutoRestResourceFlatteningTestServiceBuilder.java index 003a5fbcef..a3d801dc6c 100644 --- a/vanilla-tests/src/main/java/fixtures/modelflattening/AutoRestResourceFlatteningTestServiceBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/modelflattening/AutoRestResourceFlatteningTestServiceBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -91,6 +92,9 @@ public AutoRestResourceFlatteningTestServiceBuilder httpClient(HttpClient httpCl @Generated @Override public AutoRestResourceFlatteningTestServiceBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -281,4 +285,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(AutoRestResourceFlatteningTestServiceBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/modelflattening/models/BaseProduct.java b/vanilla-tests/src/main/java/fixtures/modelflattening/models/BaseProduct.java index a742cbb550..87a57d677b 100644 --- a/vanilla-tests/src/main/java/fixtures/modelflattening/models/BaseProduct.java +++ b/vanilla-tests/src/main/java/fixtures/modelflattening/models/BaseProduct.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -90,10 +91,13 @@ public BaseProduct setDescription(String description) { */ public void validate() { if (getProductId() == null) { - throw new IllegalArgumentException("Missing required property productId in model BaseProduct"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property productId in model BaseProduct")); } } + private static final ClientLogger LOGGER = new ClientLogger(BaseProduct.class); + /** * {@inheritDoc} */ diff --git a/vanilla-tests/src/main/java/fixtures/modelflattening/models/FlattenParameterGroup.java b/vanilla-tests/src/main/java/fixtures/modelflattening/models/FlattenParameterGroup.java index aa5f7c0a75..0d139e5e6d 100644 --- a/vanilla-tests/src/main/java/fixtures/modelflattening/models/FlattenParameterGroup.java +++ b/vanilla-tests/src/main/java/fixtures/modelflattening/models/FlattenParameterGroup.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; /** * Parameter group. @@ -253,13 +254,18 @@ public FlattenParameterGroup setOdataValue(String odataValue) { */ public void validate() { if (getName() == null) { - throw new IllegalArgumentException("Missing required property name in model FlattenParameterGroup"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property name in model FlattenParameterGroup")); } if (getSimpleBodyProduct() != null) { getSimpleBodyProduct().validate(); } if (getProductId() == null) { - throw new IllegalArgumentException("Missing required property productId in model FlattenParameterGroup"); + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property productId in model FlattenParameterGroup")); } } + + private static final ClientLogger LOGGER = new ClientLogger(FlattenParameterGroup.class); } diff --git a/vanilla-tests/src/main/java/fixtures/modelflattening/models/SimpleProduct.java b/vanilla-tests/src/main/java/fixtures/modelflattening/models/SimpleProduct.java index f31dd9dfcb..68b367ed17 100644 --- a/vanilla-tests/src/main/java/fixtures/modelflattening/models/SimpleProduct.java +++ b/vanilla-tests/src/main/java/fixtures/modelflattening/models/SimpleProduct.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -163,10 +164,13 @@ public SimpleProduct setDescription(String description) { @Override public void validate() { if (getProductId() == null) { - throw new IllegalArgumentException("Missing required property productId in model SimpleProduct"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property productId in model SimpleProduct")); } } + private static final ClientLogger LOGGER = new ClientLogger(SimpleProduct.class); + /** * {@inheritDoc} */ diff --git a/vanilla-tests/src/main/java/fixtures/multipleinheritance/MultipleInheritanceServiceClientBuilder.java b/vanilla-tests/src/main/java/fixtures/multipleinheritance/MultipleInheritanceServiceClientBuilder.java index 5db3eeeaf6..7d4d96c15f 100644 --- a/vanilla-tests/src/main/java/fixtures/multipleinheritance/MultipleInheritanceServiceClientBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/multipleinheritance/MultipleInheritanceServiceClientBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -90,6 +91,9 @@ public MultipleInheritanceServiceClientBuilder httpClient(HttpClient httpClient) @Generated @Override public MultipleInheritanceServiceClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -280,4 +284,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(MultipleInheritanceServiceClientBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/multipleinheritance/models/Cat.java b/vanilla-tests/src/main/java/fixtures/multipleinheritance/models/Cat.java index e26669a7c0..39dff7b561 100644 --- a/vanilla-tests/src/main/java/fixtures/multipleinheritance/models/Cat.java +++ b/vanilla-tests/src/main/java/fixtures/multipleinheritance/models/Cat.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -125,10 +126,12 @@ public Cat setName(String name) { @Override public void validate() { if (getName() == null) { - throw new IllegalArgumentException("Missing required property name in model Cat"); + throw LOGGER.atError().log(new IllegalArgumentException("Missing required property name in model Cat")); } } + private static final ClientLogger LOGGER = new ClientLogger(Cat.class); + /** * {@inheritDoc} */ diff --git a/vanilla-tests/src/main/java/fixtures/multipleinheritance/models/Horse.java b/vanilla-tests/src/main/java/fixtures/multipleinheritance/models/Horse.java index af80b891f9..190490634d 100644 --- a/vanilla-tests/src/main/java/fixtures/multipleinheritance/models/Horse.java +++ b/vanilla-tests/src/main/java/fixtures/multipleinheritance/models/Horse.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -69,10 +70,12 @@ public Horse setName(String name) { @Override public void validate() { if (getName() == null) { - throw new IllegalArgumentException("Missing required property name in model Horse"); + throw LOGGER.atError().log(new IllegalArgumentException("Missing required property name in model Horse")); } } + private static final ClientLogger LOGGER = new ClientLogger(Horse.class); + /** * {@inheritDoc} */ diff --git a/vanilla-tests/src/main/java/fixtures/multipleinheritance/models/Kitten.java b/vanilla-tests/src/main/java/fixtures/multipleinheritance/models/Kitten.java index 71300609a8..f9eae2dc5e 100644 --- a/vanilla-tests/src/main/java/fixtures/multipleinheritance/models/Kitten.java +++ b/vanilla-tests/src/main/java/fixtures/multipleinheritance/models/Kitten.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -99,10 +100,12 @@ public Kitten setName(String name) { @Override public void validate() { if (getName() == null) { - throw new IllegalArgumentException("Missing required property name in model Kitten"); + throw LOGGER.atError().log(new IllegalArgumentException("Missing required property name in model Kitten")); } } + private static final ClientLogger LOGGER = new ClientLogger(Kitten.class); + /** * {@inheritDoc} */ diff --git a/vanilla-tests/src/main/java/fixtures/multipleinheritance/models/Pet.java b/vanilla-tests/src/main/java/fixtures/multipleinheritance/models/Pet.java index 87f63a633b..7fbb1822c1 100644 --- a/vanilla-tests/src/main/java/fixtures/multipleinheritance/models/Pet.java +++ b/vanilla-tests/src/main/java/fixtures/multipleinheritance/models/Pet.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -59,10 +60,12 @@ public Pet setName(String name) { */ public void validate() { if (getName() == null) { - throw new IllegalArgumentException("Missing required property name in model Pet"); + throw LOGGER.atError().log(new IllegalArgumentException("Missing required property name in model Pet")); } } + private static final ClientLogger LOGGER = new ClientLogger(Pet.class); + /** * {@inheritDoc} */ diff --git a/vanilla-tests/src/main/java/fixtures/nonamedresponsetypes/AutoRestSwaggerBATHeaderServiceBuilder.java b/vanilla-tests/src/main/java/fixtures/nonamedresponsetypes/AutoRestSwaggerBATHeaderServiceBuilder.java index b56dbd0d38..d705009e57 100644 --- a/vanilla-tests/src/main/java/fixtures/nonamedresponsetypes/AutoRestSwaggerBATHeaderServiceBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/nonamedresponsetypes/AutoRestSwaggerBATHeaderServiceBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -90,6 +91,9 @@ public AutoRestSwaggerBATHeaderServiceBuilder httpClient(HttpClient httpClient) @Generated @Override public AutoRestSwaggerBATHeaderServiceBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -280,4 +284,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(AutoRestSwaggerBATHeaderServiceBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/notypedheadersmethods/AutoRestSwaggerBATHeaderServiceBuilder.java b/vanilla-tests/src/main/java/fixtures/notypedheadersmethods/AutoRestSwaggerBATHeaderServiceBuilder.java index 8ccc387497..78e86d4449 100644 --- a/vanilla-tests/src/main/java/fixtures/notypedheadersmethods/AutoRestSwaggerBATHeaderServiceBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/notypedheadersmethods/AutoRestSwaggerBATHeaderServiceBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -90,6 +91,9 @@ public AutoRestSwaggerBATHeaderServiceBuilder httpClient(HttpClient httpClient) @Generated @Override public AutoRestSwaggerBATHeaderServiceBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -280,4 +284,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(AutoRestSwaggerBATHeaderServiceBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/parameterflattening/AutoRestParameterFlatteningBuilder.java b/vanilla-tests/src/main/java/fixtures/parameterflattening/AutoRestParameterFlatteningBuilder.java index edeeee6208..818466e8bf 100644 --- a/vanilla-tests/src/main/java/fixtures/parameterflattening/AutoRestParameterFlatteningBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/parameterflattening/AutoRestParameterFlatteningBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -90,6 +91,9 @@ public AutoRestParameterFlatteningBuilder httpClient(HttpClient httpClient) { @Generated @Override public AutoRestParameterFlatteningBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -280,4 +284,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(AutoRestParameterFlatteningBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/parameterflattening/models/AvailabilitySetUpdateParameters.java b/vanilla-tests/src/main/java/fixtures/parameterflattening/models/AvailabilitySetUpdateParameters.java index 4a05142d87..4c1718427a 100644 --- a/vanilla-tests/src/main/java/fixtures/parameterflattening/models/AvailabilitySetUpdateParameters.java +++ b/vanilla-tests/src/main/java/fixtures/parameterflattening/models/AvailabilitySetUpdateParameters.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -60,11 +61,14 @@ public AvailabilitySetUpdateParameters setTags(Map tags) { */ public void validate() { if (getTags() == null) { - throw new IllegalArgumentException( - "Missing required property tags in model AvailabilitySetUpdateParameters"); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property tags in model AvailabilitySetUpdateParameters")); } } + private static final ClientLogger LOGGER = new ClientLogger(AvailabilitySetUpdateParameters.class); + /** * {@inheritDoc} */ diff --git a/vanilla-tests/src/main/java/fixtures/report/AutoRestReportServiceBuilder.java b/vanilla-tests/src/main/java/fixtures/report/AutoRestReportServiceBuilder.java index 235483159e..c2385e8ffc 100644 --- a/vanilla-tests/src/main/java/fixtures/report/AutoRestReportServiceBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/report/AutoRestReportServiceBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -90,6 +91,9 @@ public AutoRestReportServiceBuilder httpClient(HttpClient httpClient) { @Generated @Override public AutoRestReportServiceBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -279,4 +283,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(AutoRestReportServiceBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/requiredfieldsascotrargstransformation/RequiredFieldsAsCtorArgsTransformationBuilder.java b/vanilla-tests/src/main/java/fixtures/requiredfieldsascotrargstransformation/RequiredFieldsAsCtorArgsTransformationBuilder.java index ca82cdcd07..fdb67c95fc 100644 --- a/vanilla-tests/src/main/java/fixtures/requiredfieldsascotrargstransformation/RequiredFieldsAsCtorArgsTransformationBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/requiredfieldsascotrargstransformation/RequiredFieldsAsCtorArgsTransformationBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -91,6 +92,9 @@ public RequiredFieldsAsCtorArgsTransformationBuilder httpClient(HttpClient httpC @Generated @Override public RequiredFieldsAsCtorArgsTransformationBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -281,4 +285,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(RequiredFieldsAsCtorArgsTransformationBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/requiredfieldsascotrargstransformation/models/TransformationAsParentRequiredFields.java b/vanilla-tests/src/main/java/fixtures/requiredfieldsascotrargstransformation/models/TransformationAsParentRequiredFields.java index da6a92b1b0..eb5db75da4 100644 --- a/vanilla-tests/src/main/java/fixtures/requiredfieldsascotrargstransformation/models/TransformationAsParentRequiredFields.java +++ b/vanilla-tests/src/main/java/fixtures/requiredfieldsascotrargstransformation/models/TransformationAsParentRequiredFields.java @@ -9,6 +9,7 @@ import com.azure.core.util.Base64Url; import com.azure.core.util.CoreUtils; import com.azure.core.util.DateTimeRfc1123; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -116,31 +117,39 @@ public OffsetDateTime getRfc1123NonRequired() { @Override public void validate() { if (getRfc1123RequiredChild() == null) { - throw new IllegalArgumentException( - "Missing required property rfc1123RequiredChild in model TransformationAsParentRequiredFields"); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property rfc1123RequiredChild in model TransformationAsParentRequiredFields")); } if (getRfc1123Required() == null) { - throw new IllegalArgumentException( - "Missing required property rfc1123Required in model TransformationAsParentRequiredFields"); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property rfc1123Required in model TransformationAsParentRequiredFields")); } if (getNameRequired() == null) { - throw new IllegalArgumentException( - "Missing required property nameRequired in model TransformationAsParentRequiredFields"); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property nameRequired in model TransformationAsParentRequiredFields")); } if (getUrlBase64EncodedRequired() == null) { - throw new IllegalArgumentException( - "Missing required property urlBase64EncodedRequired in model TransformationAsParentRequiredFields"); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property urlBase64EncodedRequired in model TransformationAsParentRequiredFields")); } if (getUnixTimeLongRequired() == null) { - throw new IllegalArgumentException( - "Missing required property unixTimeLongRequired in model TransformationAsParentRequiredFields"); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property unixTimeLongRequired in model TransformationAsParentRequiredFields")); } if (getUnixTimeDateTimeRequired() == null) { - throw new IllegalArgumentException( - "Missing required property unixTimeDateTimeRequired in model TransformationAsParentRequiredFields"); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property unixTimeDateTimeRequired in model TransformationAsParentRequiredFields")); } } + private static final ClientLogger LOGGER = new ClientLogger(TransformationAsParentRequiredFields.class); + /** * {@inheritDoc} */ diff --git a/vanilla-tests/src/main/java/fixtures/requiredfieldsascotrargstransformation/models/TransformationAsRequiredFields.java b/vanilla-tests/src/main/java/fixtures/requiredfieldsascotrargstransformation/models/TransformationAsRequiredFields.java index 4c362bb4b7..cb335d46de 100644 --- a/vanilla-tests/src/main/java/fixtures/requiredfieldsascotrargstransformation/models/TransformationAsRequiredFields.java +++ b/vanilla-tests/src/main/java/fixtures/requiredfieldsascotrargstransformation/models/TransformationAsRequiredFields.java @@ -9,6 +9,7 @@ import com.azure.core.util.Base64Url; import com.azure.core.util.CoreUtils; import com.azure.core.util.DateTimeRfc1123; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -188,27 +189,34 @@ public OffsetDateTime getUnixTimeDateTimeRequired() { */ public void validate() { if (getRfc1123Required() == null) { - throw new IllegalArgumentException( - "Missing required property rfc1123Required in model TransformationAsRequiredFields"); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property rfc1123Required in model TransformationAsRequiredFields")); } if (getNameRequired() == null) { - throw new IllegalArgumentException( - "Missing required property nameRequired in model TransformationAsRequiredFields"); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property nameRequired in model TransformationAsRequiredFields")); } if (getUrlBase64EncodedRequired() == null) { - throw new IllegalArgumentException( - "Missing required property urlBase64EncodedRequired in model TransformationAsRequiredFields"); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property urlBase64EncodedRequired in model TransformationAsRequiredFields")); } if (getUnixTimeLongRequired() == null) { - throw new IllegalArgumentException( - "Missing required property unixTimeLongRequired in model TransformationAsRequiredFields"); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property unixTimeLongRequired in model TransformationAsRequiredFields")); } if (getUnixTimeDateTimeRequired() == null) { - throw new IllegalArgumentException( - "Missing required property unixTimeDateTimeRequired in model TransformationAsRequiredFields"); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property unixTimeDateTimeRequired in model TransformationAsRequiredFields")); } } + private static final ClientLogger LOGGER = new ClientLogger(TransformationAsRequiredFields.class); + /** * {@inheritDoc} */ diff --git a/vanilla-tests/src/main/java/fixtures/requiredoptional/AutoRestRequiredOptionalTestServiceBuilder.java b/vanilla-tests/src/main/java/fixtures/requiredoptional/AutoRestRequiredOptionalTestServiceBuilder.java index 27421c8f15..1ea85b0305 100644 --- a/vanilla-tests/src/main/java/fixtures/requiredoptional/AutoRestRequiredOptionalTestServiceBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/requiredoptional/AutoRestRequiredOptionalTestServiceBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -91,6 +92,9 @@ public AutoRestRequiredOptionalTestServiceBuilder httpClient(HttpClient httpClie @Generated @Override public AutoRestRequiredOptionalTestServiceBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -338,4 +342,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(AutoRestRequiredOptionalTestServiceBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/requiredoptional/models/ArrayWrapper.java b/vanilla-tests/src/main/java/fixtures/requiredoptional/models/ArrayWrapper.java index 01bc04b302..77152f8364 100644 --- a/vanilla-tests/src/main/java/fixtures/requiredoptional/models/ArrayWrapper.java +++ b/vanilla-tests/src/main/java/fixtures/requiredoptional/models/ArrayWrapper.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -60,10 +61,13 @@ public ArrayWrapper setValue(List value) { */ public void validate() { if (getValue() == null) { - throw new IllegalArgumentException("Missing required property value in model ArrayWrapper"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model ArrayWrapper")); } } + private static final ClientLogger LOGGER = new ClientLogger(ArrayWrapper.class); + /** * {@inheritDoc} */ diff --git a/vanilla-tests/src/main/java/fixtures/requiredoptional/models/ClassWrapper.java b/vanilla-tests/src/main/java/fixtures/requiredoptional/models/ClassWrapper.java index c94db85a8d..516a4b5e12 100644 --- a/vanilla-tests/src/main/java/fixtures/requiredoptional/models/ClassWrapper.java +++ b/vanilla-tests/src/main/java/fixtures/requiredoptional/models/ClassWrapper.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -59,12 +60,15 @@ public ClassWrapper setValue(Product value) { */ public void validate() { if (getValue() == null) { - throw new IllegalArgumentException("Missing required property value in model ClassWrapper"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model ClassWrapper")); } else { getValue().validate(); } } + private static final ClientLogger LOGGER = new ClientLogger(ClassWrapper.class); + /** * {@inheritDoc} */ diff --git a/vanilla-tests/src/main/java/fixtures/requiredoptional/models/StringWrapper.java b/vanilla-tests/src/main/java/fixtures/requiredoptional/models/StringWrapper.java index cee09248c3..a69863bfb8 100644 --- a/vanilla-tests/src/main/java/fixtures/requiredoptional/models/StringWrapper.java +++ b/vanilla-tests/src/main/java/fixtures/requiredoptional/models/StringWrapper.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -59,10 +60,13 @@ public StringWrapper setValue(String value) { */ public void validate() { if (getValue() == null) { - throw new IllegalArgumentException("Missing required property value in model StringWrapper"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model StringWrapper")); } } + private static final ClientLogger LOGGER = new ClientLogger(StringWrapper.class); + /** * {@inheritDoc} */ diff --git a/vanilla-tests/src/main/java/fixtures/specialheader/SpecialHeaderBuilder.java b/vanilla-tests/src/main/java/fixtures/specialheader/SpecialHeaderBuilder.java index 2d510f49e0..a8debcdede 100644 --- a/vanilla-tests/src/main/java/fixtures/specialheader/SpecialHeaderBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/specialheader/SpecialHeaderBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -90,6 +91,9 @@ public SpecialHeaderBuilder httpClient(HttpClient httpClient) { @Generated @Override public SpecialHeaderBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -279,4 +283,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(SpecialHeaderBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/AutoRestSwaggerBATXMLServiceBuilder.java b/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/AutoRestSwaggerBATXMLServiceBuilder.java index 5fb8aac88c..dd5931dbe2 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/AutoRestSwaggerBATXMLServiceBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/AutoRestSwaggerBATXMLServiceBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -90,6 +91,9 @@ public AutoRestSwaggerBATXMLServiceBuilder httpClient(HttpClient httpClient) { @Generated @Override public AutoRestSwaggerBATXMLServiceBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -280,4 +284,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(AutoRestSwaggerBATXMLServiceBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/AccessPolicy.java b/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/AccessPolicy.java index d373694020..881fe637ab 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/AccessPolicy.java +++ b/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/AccessPolicy.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; import com.azure.xml.XmlReader; import com.azure.xml.XmlSerializable; import com.azure.xml.XmlToken; @@ -119,16 +120,21 @@ public AccessPolicy setPermission(String permission) { */ public void validate() { if (getStart() == null) { - throw new IllegalArgumentException("Missing required property start in model AccessPolicy"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property start in model AccessPolicy")); } if (getExpiry() == null) { - throw new IllegalArgumentException("Missing required property expiry in model AccessPolicy"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property expiry in model AccessPolicy")); } if (getPermission() == null) { - throw new IllegalArgumentException("Missing required property permission in model AccessPolicy"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property permission in model AccessPolicy")); } } + private static final ClientLogger LOGGER = new ClientLogger(AccessPolicy.class); + @Generated @Override public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { diff --git a/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/Blob.java b/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/Blob.java index e4605e73ae..343b693237 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/Blob.java +++ b/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/Blob.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.azure.xml.XmlReader; import com.azure.xml.XmlSerializable; import com.azure.xml.XmlToken; @@ -174,18 +175,22 @@ public Blob setMetadata(Map metadata) { */ public void validate() { if (getName() == null) { - throw new IllegalArgumentException("Missing required property name in model Blob"); + throw LOGGER.atError().log(new IllegalArgumentException("Missing required property name in model Blob")); } if (getSnapshot() == null) { - throw new IllegalArgumentException("Missing required property snapshot in model Blob"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property snapshot in model Blob")); } if (getProperties() == null) { - throw new IllegalArgumentException("Missing required property properties in model Blob"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property properties in model Blob")); } else { getProperties().validate(); } } + private static final ClientLogger LOGGER = new ClientLogger(Blob.class); + @Generated @Override public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { diff --git a/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/BlobPrefix.java b/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/BlobPrefix.java index a285c0684c..2f1c6d4704 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/BlobPrefix.java +++ b/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/BlobPrefix.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.azure.xml.XmlReader; import com.azure.xml.XmlSerializable; import com.azure.xml.XmlToken; @@ -60,10 +61,13 @@ public BlobPrefix setName(String name) { */ public void validate() { if (getName() == null) { - throw new IllegalArgumentException("Missing required property name in model BlobPrefix"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property name in model BlobPrefix")); } } + private static final ClientLogger LOGGER = new ClientLogger(BlobPrefix.class); + @Generated @Override public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { diff --git a/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/BlobProperties.java b/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/BlobProperties.java index 9fe47b7cad..04975611d4 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/BlobProperties.java +++ b/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/BlobProperties.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; import com.azure.core.util.DateTimeRfc1123; +import com.azure.core.util.logging.ClientLogger; import com.azure.xml.XmlReader; import com.azure.xml.XmlSerializable; import com.azure.xml.XmlToken; @@ -840,13 +841,17 @@ public BlobProperties setArchiveStatus(ArchiveStatus archiveStatus) { */ public void validate() { if (getLastModified() == null) { - throw new IllegalArgumentException("Missing required property lastModified in model BlobProperties"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property lastModified in model BlobProperties")); } if (getEtag() == null) { - throw new IllegalArgumentException("Missing required property etag in model BlobProperties"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property etag in model BlobProperties")); } } + private static final ClientLogger LOGGER = new ClientLogger(BlobProperties.class); + @Generated @Override public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { diff --git a/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/Container.java b/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/Container.java index 7bae710ad6..2d4b56ba9f 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/Container.java +++ b/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/Container.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.azure.xml.XmlReader; import com.azure.xml.XmlSerializable; import com.azure.xml.XmlToken; @@ -118,15 +119,19 @@ public Container setMetadata(Map metadata) { */ public void validate() { if (getName() == null) { - throw new IllegalArgumentException("Missing required property name in model Container"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property name in model Container")); } if (getProperties() == null) { - throw new IllegalArgumentException("Missing required property properties in model Container"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property properties in model Container")); } else { getProperties().validate(); } } + private static final ClientLogger LOGGER = new ClientLogger(Container.class); + @Generated @Override public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { diff --git a/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/ContainerProperties.java b/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/ContainerProperties.java index 570e6f63e3..585a5b07af 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/ContainerProperties.java +++ b/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/ContainerProperties.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; import com.azure.core.util.DateTimeRfc1123; +import com.azure.core.util.logging.ClientLogger; import com.azure.xml.XmlReader; import com.azure.xml.XmlSerializable; import com.azure.xml.XmlToken; @@ -210,13 +211,18 @@ public ContainerProperties setPublicAccess(PublicAccessType publicAccess) { */ public void validate() { if (getLastModified() == null) { - throw new IllegalArgumentException("Missing required property lastModified in model ContainerProperties"); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property lastModified in model ContainerProperties")); } if (getEtag() == null) { - throw new IllegalArgumentException("Missing required property etag in model ContainerProperties"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property etag in model ContainerProperties")); } } + private static final ClientLogger LOGGER = new ClientLogger(ContainerProperties.class); + @Generated @Override public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { diff --git a/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/CorsRule.java b/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/CorsRule.java index 649c19dbea..0b7b0c18a3 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/CorsRule.java +++ b/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/CorsRule.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.azure.xml.XmlReader; import com.azure.xml.XmlSerializable; import com.azure.xml.XmlToken; @@ -191,19 +192,25 @@ public CorsRule setMaxAgeInSeconds(int maxAgeInSeconds) { */ public void validate() { if (getAllowedOrigins() == null) { - throw new IllegalArgumentException("Missing required property allowedOrigins in model CorsRule"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property allowedOrigins in model CorsRule")); } if (getAllowedMethods() == null) { - throw new IllegalArgumentException("Missing required property allowedMethods in model CorsRule"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property allowedMethods in model CorsRule")); } if (getAllowedHeaders() == null) { - throw new IllegalArgumentException("Missing required property allowedHeaders in model CorsRule"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property allowedHeaders in model CorsRule")); } if (getExposedHeaders() == null) { - throw new IllegalArgumentException("Missing required property exposedHeaders in model CorsRule"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property exposedHeaders in model CorsRule")); } } + private static final ClientLogger LOGGER = new ClientLogger(CorsRule.class); + @Generated @Override public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { diff --git a/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/ListBlobsResponse.java b/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/ListBlobsResponse.java index af6510fa9f..7a89e7d6aa 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/ListBlobsResponse.java +++ b/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/ListBlobsResponse.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.azure.xml.XmlReader; import com.azure.xml.XmlSerializable; import com.azure.xml.XmlToken; @@ -256,27 +257,36 @@ public ListBlobsResponse setNextMarker(String nextMarker) { */ public void validate() { if (getContainerName() == null) { - throw new IllegalArgumentException("Missing required property containerName in model ListBlobsResponse"); + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property containerName in model ListBlobsResponse")); } if (getPrefix() == null) { - throw new IllegalArgumentException("Missing required property prefix in model ListBlobsResponse"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property prefix in model ListBlobsResponse")); } if (getMarker() == null) { - throw new IllegalArgumentException("Missing required property marker in model ListBlobsResponse"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property marker in model ListBlobsResponse")); } if (getDelimiter() == null) { - throw new IllegalArgumentException("Missing required property delimiter in model ListBlobsResponse"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property delimiter in model ListBlobsResponse")); } if (getBlobs() == null) { - throw new IllegalArgumentException("Missing required property blobs in model ListBlobsResponse"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property blobs in model ListBlobsResponse")); } else { getBlobs().validate(); } if (getNextMarker() == null) { - throw new IllegalArgumentException("Missing required property nextMarker in model ListBlobsResponse"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property nextMarker in model ListBlobsResponse")); } } + private static final ClientLogger LOGGER = new ClientLogger(ListBlobsResponse.class); + @Generated @Override public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { diff --git a/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/ListContainersResponse.java b/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/ListContainersResponse.java index 28b199a82b..f6945bc511 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/ListContainersResponse.java +++ b/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/ListContainersResponse.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.azure.xml.XmlReader; import com.azure.xml.XmlSerializable; import com.azure.xml.XmlToken; @@ -205,20 +206,26 @@ public ListContainersResponse setNextMarker(String nextMarker) { */ public void validate() { if (getServiceEndpoint() == null) { - throw new IllegalArgumentException( - "Missing required property serviceEndpoint in model ListContainersResponse"); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property serviceEndpoint in model ListContainersResponse")); } if (getPrefix() == null) { - throw new IllegalArgumentException("Missing required property prefix in model ListContainersResponse"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property prefix in model ListContainersResponse")); } if (getContainers() != null) { getContainers().forEach(e -> e.validate()); } if (getNextMarker() == null) { - throw new IllegalArgumentException("Missing required property nextMarker in model ListContainersResponse"); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property nextMarker in model ListContainersResponse")); } } + private static final ClientLogger LOGGER = new ClientLogger(ListContainersResponse.class); + @Generated @Override public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { diff --git a/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/Logging.java b/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/Logging.java index c52fb451c0..af2ede6e8c 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/Logging.java +++ b/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/Logging.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.azure.xml.XmlReader; import com.azure.xml.XmlSerializable; import com.azure.xml.XmlToken; @@ -172,15 +173,19 @@ public Logging setRetentionPolicy(RetentionPolicy retentionPolicy) { */ public void validate() { if (getVersion() == null) { - throw new IllegalArgumentException("Missing required property version in model Logging"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property version in model Logging")); } if (getRetentionPolicy() == null) { - throw new IllegalArgumentException("Missing required property retentionPolicy in model Logging"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property retentionPolicy in model Logging")); } else { getRetentionPolicy().validate(); } } + private static final ClientLogger LOGGER = new ClientLogger(Logging.class); + @Generated @Override public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { diff --git a/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/SignedIdentifier.java b/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/SignedIdentifier.java index 958fe36df8..e7a82846d0 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/SignedIdentifier.java +++ b/vanilla-tests/src/main/java/fixtures/streamstylexmlserialization/models/SignedIdentifier.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.azure.xml.XmlReader; import com.azure.xml.XmlSerializable; import com.azure.xml.XmlToken; @@ -88,15 +89,19 @@ public SignedIdentifier setAccessPolicy(AccessPolicy accessPolicy) { */ public void validate() { if (getId() == null) { - throw new IllegalArgumentException("Missing required property id in model SignedIdentifier"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property id in model SignedIdentifier")); } if (getAccessPolicy() == null) { - throw new IllegalArgumentException("Missing required property accessPolicy in model SignedIdentifier"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property accessPolicy in model SignedIdentifier")); } else { getAccessPolicy().validate(); } } + private static final ClientLogger LOGGER = new ClientLogger(SignedIdentifier.class); + @Generated @Override public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { diff --git a/vanilla-tests/src/main/java/fixtures/url/AutoRestUrlTestServiceBuilder.java b/vanilla-tests/src/main/java/fixtures/url/AutoRestUrlTestServiceBuilder.java index c557b09f14..db5da8f037 100644 --- a/vanilla-tests/src/main/java/fixtures/url/AutoRestUrlTestServiceBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/url/AutoRestUrlTestServiceBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -90,6 +91,9 @@ public AutoRestUrlTestServiceBuilder httpClient(HttpClient httpClient) { @Generated @Override public AutoRestUrlTestServiceBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -317,4 +321,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(AutoRestUrlTestServiceBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/url/multi/AutoRestUrlMutliCollectionFormatTestServiceBuilder.java b/vanilla-tests/src/main/java/fixtures/url/multi/AutoRestUrlMutliCollectionFormatTestServiceBuilder.java index c53cfe86b7..b3d3a3cf98 100644 --- a/vanilla-tests/src/main/java/fixtures/url/multi/AutoRestUrlMutliCollectionFormatTestServiceBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/url/multi/AutoRestUrlMutliCollectionFormatTestServiceBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -91,6 +92,9 @@ public AutoRestUrlMutliCollectionFormatTestServiceBuilder httpClient(HttpClient @Generated @Override public AutoRestUrlMutliCollectionFormatTestServiceBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -281,4 +285,7 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER + = new ClientLogger(AutoRestUrlMutliCollectionFormatTestServiceBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/validation/AutoRestValidationTestBuilder.java b/vanilla-tests/src/main/java/fixtures/validation/AutoRestValidationTestBuilder.java index bb9834cb0a..47018d46ff 100644 --- a/vanilla-tests/src/main/java/fixtures/validation/AutoRestValidationTestBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/validation/AutoRestValidationTestBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -90,6 +91,9 @@ public AutoRestValidationTestBuilder httpClient(HttpClient httpClient) { @Generated @Override public AutoRestValidationTestBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -318,4 +322,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(AutoRestValidationTestBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/validation/models/Product.java b/vanilla-tests/src/main/java/fixtures/validation/models/Product.java index c96dfec1d1..df0bbdd07c 100644 --- a/vanilla-tests/src/main/java/fixtures/validation/models/Product.java +++ b/vanilla-tests/src/main/java/fixtures/validation/models/Product.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -232,17 +233,21 @@ public Product setConstStringAsEnum(String constStringAsEnum) { */ public void validate() { if (getChild() == null) { - throw new IllegalArgumentException("Missing required property child in model Product"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property child in model Product")); } else { getChild().validate(); } if (getConstChild() == null) { - throw new IllegalArgumentException("Missing required property constChild in model Product"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property constChild in model Product")); } else { getConstChild().validate(); } } + private static final ClientLogger LOGGER = new ClientLogger(Product.class); + /** * {@inheritDoc} */ diff --git a/vanilla-tests/src/main/java/fixtures/xmlconstant/models/QueryRequest.java b/vanilla-tests/src/main/java/fixtures/xmlconstant/models/QueryRequest.java index a0e6e0d1c2..f63fc1a61a 100644 --- a/vanilla-tests/src/main/java/fixtures/xmlconstant/models/QueryRequest.java +++ b/vanilla-tests/src/main/java/fixtures/xmlconstant/models/QueryRequest.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.azure.xml.XmlReader; import com.azure.xml.XmlSerializable; import com.azure.xml.XmlToken; @@ -76,10 +77,13 @@ public QueryRequest setExpression(String expression) { */ public void validate() { if (getExpression() == null) { - throw new IllegalArgumentException("Missing required property expression in model QueryRequest"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property expression in model QueryRequest")); } } + private static final ClientLogger LOGGER = new ClientLogger(QueryRequest.class); + @Generated @Override public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { diff --git a/vanilla-tests/src/main/java/fixtures/xmlservice/AutoRestSwaggerBATXMLServiceBuilder.java b/vanilla-tests/src/main/java/fixtures/xmlservice/AutoRestSwaggerBATXMLServiceBuilder.java index a672d8cfcd..d133b10455 100644 --- a/vanilla-tests/src/main/java/fixtures/xmlservice/AutoRestSwaggerBATXMLServiceBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/xmlservice/AutoRestSwaggerBATXMLServiceBuilder.java @@ -28,6 +28,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; import java.util.ArrayList; @@ -90,6 +91,9 @@ public AutoRestSwaggerBATXMLServiceBuilder httpClient(HttpClient httpClient) { @Generated @Override public AutoRestSwaggerBATXMLServiceBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } this.pipeline = pipeline; return this; } @@ -280,4 +284,6 @@ private HttpPipeline createHttpPipeline() { .build(); return httpPipeline; } + + private static final ClientLogger LOGGER = new ClientLogger(AutoRestSwaggerBATXMLServiceBuilder.class); } diff --git a/vanilla-tests/src/main/java/fixtures/xmlservice/models/AccessPolicy.java b/vanilla-tests/src/main/java/fixtures/xmlservice/models/AccessPolicy.java index f01a62a597..1e3a6673fc 100644 --- a/vanilla-tests/src/main/java/fixtures/xmlservice/models/AccessPolicy.java +++ b/vanilla-tests/src/main/java/fixtures/xmlservice/models/AccessPolicy.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -117,13 +118,18 @@ public AccessPolicy setPermission(String permission) { */ public void validate() { if (getStart() == null) { - throw new IllegalArgumentException("Missing required property start in model AccessPolicy"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property start in model AccessPolicy")); } if (getExpiry() == null) { - throw new IllegalArgumentException("Missing required property expiry in model AccessPolicy"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property expiry in model AccessPolicy")); } if (getPermission() == null) { - throw new IllegalArgumentException("Missing required property permission in model AccessPolicy"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property permission in model AccessPolicy")); } } + + private static final ClientLogger LOGGER = new ClientLogger(AccessPolicy.class); } diff --git a/vanilla-tests/src/main/java/fixtures/xmlservice/models/Blob.java b/vanilla-tests/src/main/java/fixtures/xmlservice/models/Blob.java index 0e527e90d0..7817ea2fd3 100644 --- a/vanilla-tests/src/main/java/fixtures/xmlservice/models/Blob.java +++ b/vanilla-tests/src/main/java/fixtures/xmlservice/models/Blob.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.util.Map; @@ -175,15 +176,19 @@ public Blob setMetadata(Map metadata) { */ public void validate() { if (getName() == null) { - throw new IllegalArgumentException("Missing required property name in model Blob"); + throw LOGGER.atError().log(new IllegalArgumentException("Missing required property name in model Blob")); } if (getSnapshot() == null) { - throw new IllegalArgumentException("Missing required property snapshot in model Blob"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property snapshot in model Blob")); } if (getProperties() == null) { - throw new IllegalArgumentException("Missing required property properties in model Blob"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property properties in model Blob")); } else { getProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(Blob.class); } diff --git a/vanilla-tests/src/main/java/fixtures/xmlservice/models/BlobPrefix.java b/vanilla-tests/src/main/java/fixtures/xmlservice/models/BlobPrefix.java index bd2b6eaac6..93c037ad3f 100644 --- a/vanilla-tests/src/main/java/fixtures/xmlservice/models/BlobPrefix.java +++ b/vanilla-tests/src/main/java/fixtures/xmlservice/models/BlobPrefix.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -58,7 +59,10 @@ public BlobPrefix setName(String name) { */ public void validate() { if (getName() == null) { - throw new IllegalArgumentException("Missing required property name in model BlobPrefix"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property name in model BlobPrefix")); } } + + private static final ClientLogger LOGGER = new ClientLogger(BlobPrefix.class); } diff --git a/vanilla-tests/src/main/java/fixtures/xmlservice/models/BlobProperties.java b/vanilla-tests/src/main/java/fixtures/xmlservice/models/BlobProperties.java index 82b316df37..4d387b3a5f 100644 --- a/vanilla-tests/src/main/java/fixtures/xmlservice/models/BlobProperties.java +++ b/vanilla-tests/src/main/java/fixtures/xmlservice/models/BlobProperties.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; import com.azure.core.util.DateTimeRfc1123; +import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -864,10 +865,14 @@ public BlobProperties setArchiveStatus(ArchiveStatus archiveStatus) { */ public void validate() { if (getLastModified() == null) { - throw new IllegalArgumentException("Missing required property lastModified in model BlobProperties"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property lastModified in model BlobProperties")); } if (getEtag() == null) { - throw new IllegalArgumentException("Missing required property etag in model BlobProperties"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property etag in model BlobProperties")); } } + + private static final ClientLogger LOGGER = new ClientLogger(BlobProperties.class); } diff --git a/vanilla-tests/src/main/java/fixtures/xmlservice/models/Container.java b/vanilla-tests/src/main/java/fixtures/xmlservice/models/Container.java index db7d89861d..10e8ab46ae 100644 --- a/vanilla-tests/src/main/java/fixtures/xmlservice/models/Container.java +++ b/vanilla-tests/src/main/java/fixtures/xmlservice/models/Container.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.util.Map; @@ -117,12 +118,16 @@ public Container setMetadata(Map metadata) { */ public void validate() { if (getName() == null) { - throw new IllegalArgumentException("Missing required property name in model Container"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property name in model Container")); } if (getProperties() == null) { - throw new IllegalArgumentException("Missing required property properties in model Container"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property properties in model Container")); } else { getProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(Container.class); } diff --git a/vanilla-tests/src/main/java/fixtures/xmlservice/models/ContainerProperties.java b/vanilla-tests/src/main/java/fixtures/xmlservice/models/ContainerProperties.java index 31d5da827b..f75ae2f9f2 100644 --- a/vanilla-tests/src/main/java/fixtures/xmlservice/models/ContainerProperties.java +++ b/vanilla-tests/src/main/java/fixtures/xmlservice/models/ContainerProperties.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; import com.azure.core.util.DateTimeRfc1123; +import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; @@ -212,10 +213,15 @@ public ContainerProperties setPublicAccess(PublicAccessType publicAccess) { */ public void validate() { if (getLastModified() == null) { - throw new IllegalArgumentException("Missing required property lastModified in model ContainerProperties"); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property lastModified in model ContainerProperties")); } if (getEtag() == null) { - throw new IllegalArgumentException("Missing required property etag in model ContainerProperties"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property etag in model ContainerProperties")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ContainerProperties.class); } diff --git a/vanilla-tests/src/main/java/fixtures/xmlservice/models/CorsRule.java b/vanilla-tests/src/main/java/fixtures/xmlservice/models/CorsRule.java index 7457d4c78b..30eccdfbfa 100644 --- a/vanilla-tests/src/main/java/fixtures/xmlservice/models/CorsRule.java +++ b/vanilla-tests/src/main/java/fixtures/xmlservice/models/CorsRule.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -193,16 +194,22 @@ public CorsRule setMaxAgeInSeconds(int maxAgeInSeconds) { */ public void validate() { if (getAllowedOrigins() == null) { - throw new IllegalArgumentException("Missing required property allowedOrigins in model CorsRule"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property allowedOrigins in model CorsRule")); } if (getAllowedMethods() == null) { - throw new IllegalArgumentException("Missing required property allowedMethods in model CorsRule"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property allowedMethods in model CorsRule")); } if (getAllowedHeaders() == null) { - throw new IllegalArgumentException("Missing required property allowedHeaders in model CorsRule"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property allowedHeaders in model CorsRule")); } if (getExposedHeaders() == null) { - throw new IllegalArgumentException("Missing required property exposedHeaders in model CorsRule"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property exposedHeaders in model CorsRule")); } } + + private static final ClientLogger LOGGER = new ClientLogger(CorsRule.class); } diff --git a/vanilla-tests/src/main/java/fixtures/xmlservice/models/ListBlobsResponse.java b/vanilla-tests/src/main/java/fixtures/xmlservice/models/ListBlobsResponse.java index c95d906234..095583450e 100644 --- a/vanilla-tests/src/main/java/fixtures/xmlservice/models/ListBlobsResponse.java +++ b/vanilla-tests/src/main/java/fixtures/xmlservice/models/ListBlobsResponse.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -262,24 +263,33 @@ public ListBlobsResponse setNextMarker(String nextMarker) { */ public void validate() { if (getContainerName() == null) { - throw new IllegalArgumentException("Missing required property containerName in model ListBlobsResponse"); + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property containerName in model ListBlobsResponse")); } if (getPrefix() == null) { - throw new IllegalArgumentException("Missing required property prefix in model ListBlobsResponse"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property prefix in model ListBlobsResponse")); } if (getMarker() == null) { - throw new IllegalArgumentException("Missing required property marker in model ListBlobsResponse"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property marker in model ListBlobsResponse")); } if (getDelimiter() == null) { - throw new IllegalArgumentException("Missing required property delimiter in model ListBlobsResponse"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property delimiter in model ListBlobsResponse")); } if (getBlobs() == null) { - throw new IllegalArgumentException("Missing required property blobs in model ListBlobsResponse"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property blobs in model ListBlobsResponse")); } else { getBlobs().validate(); } if (getNextMarker() == null) { - throw new IllegalArgumentException("Missing required property nextMarker in model ListBlobsResponse"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property nextMarker in model ListBlobsResponse")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ListBlobsResponse.class); } diff --git a/vanilla-tests/src/main/java/fixtures/xmlservice/models/ListContainersResponse.java b/vanilla-tests/src/main/java/fixtures/xmlservice/models/ListContainersResponse.java index 58ab0385b4..0b8b045226 100644 --- a/vanilla-tests/src/main/java/fixtures/xmlservice/models/ListContainersResponse.java +++ b/vanilla-tests/src/main/java/fixtures/xmlservice/models/ListContainersResponse.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; @@ -220,17 +221,23 @@ public ListContainersResponse setNextMarker(String nextMarker) { */ public void validate() { if (getServiceEndpoint() == null) { - throw new IllegalArgumentException( - "Missing required property serviceEndpoint in model ListContainersResponse"); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property serviceEndpoint in model ListContainersResponse")); } if (getPrefix() == null) { - throw new IllegalArgumentException("Missing required property prefix in model ListContainersResponse"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property prefix in model ListContainersResponse")); } if (getContainers() != null) { getContainers().forEach(e -> e.validate()); } if (getNextMarker() == null) { - throw new IllegalArgumentException("Missing required property nextMarker in model ListContainersResponse"); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property nextMarker in model ListContainersResponse")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ListContainersResponse.class); } diff --git a/vanilla-tests/src/main/java/fixtures/xmlservice/models/Logging.java b/vanilla-tests/src/main/java/fixtures/xmlservice/models/Logging.java index 01970f3941..06564622d1 100644 --- a/vanilla-tests/src/main/java/fixtures/xmlservice/models/Logging.java +++ b/vanilla-tests/src/main/java/fixtures/xmlservice/models/Logging.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -174,12 +175,16 @@ public Logging setRetentionPolicy(RetentionPolicy retentionPolicy) { */ public void validate() { if (getVersion() == null) { - throw new IllegalArgumentException("Missing required property version in model Logging"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property version in model Logging")); } if (getRetentionPolicy() == null) { - throw new IllegalArgumentException("Missing required property retentionPolicy in model Logging"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property retentionPolicy in model Logging")); } else { getRetentionPolicy().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(Logging.class); } diff --git a/vanilla-tests/src/main/java/fixtures/xmlservice/models/SignedIdentifier.java b/vanilla-tests/src/main/java/fixtures/xmlservice/models/SignedIdentifier.java index a44612bc84..08991b1741 100644 --- a/vanilla-tests/src/main/java/fixtures/xmlservice/models/SignedIdentifier.java +++ b/vanilla-tests/src/main/java/fixtures/xmlservice/models/SignedIdentifier.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; @@ -87,12 +88,16 @@ public SignedIdentifier setAccessPolicy(AccessPolicy accessPolicy) { */ public void validate() { if (getId() == null) { - throw new IllegalArgumentException("Missing required property id in model SignedIdentifier"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property id in model SignedIdentifier")); } if (getAccessPolicy() == null) { - throw new IllegalArgumentException("Missing required property accessPolicy in model SignedIdentifier"); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property accessPolicy in model SignedIdentifier")); } else { getAccessPolicy().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(SignedIdentifier.class); } From c6f9947316f99c7a1ce3e24a5b7c59e69e2e386d Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Thu, 5 Jun 2025 11:20:16 +0800 Subject: [PATCH 07/12] update npm --- .github/copilot-instructions.md | 2 +- typespec-extension/package-lock.json | 864 +++++++++++++++------------ typespec-extension/package.json | 20 +- typespec-tests/package.json | 2 +- 4 files changed, 499 insertions(+), 389 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 57b24eac4c..6b846b3984 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -4,7 +4,7 @@ Steps: 1. In "core" folder, run `git pull upstream main` to fetch latest commit from upstream or origin. 2. Go back to project root (`cd ..`). Commit the change in "core" folder. -3. Run `ncu -u` on "package.json" in both "package.json" from "typespec-extension" and "typespec-tests" folder. +3. Run `ncu -u -x @typescript-eslint/eslint-plugin` on "package.json" in both "package.json" from "typespec-extension" and "typespec-tests" folder. 4. Update package versions in `peerDependencies` (keep the semver range) in "package.json" from "typespec-extension" folder, according to the corresponding package versions in `devDependencies`. 5. Update package versions in `override` (keep the semver range) in "package.json" from "typespec-tests" folder, according to the corresponding package versions in "package.json" from "typespec-extension" folder. 6. Save the files, and run `npm install` in "typespec-extension" folder, so that "package-lock.json" would be updated. diff --git a/typespec-extension/package-lock.json b/typespec-extension/package-lock.json index 7af0bb60ea..15cb0acf1b 100644 --- a/typespec-extension/package-lock.json +++ b/typespec-extension/package-lock.json @@ -18,13 +18,13 @@ "@azure-tools/typespec-azure-core": "0.56.0", "@azure-tools/typespec-azure-resource-manager": "0.56.2", "@azure-tools/typespec-azure-rulesets": "0.56.1", - "@azure-tools/typespec-client-generator-core": "0.56.2", + "@azure-tools/typespec-client-generator-core": "0.56.3", "@azure-tools/typespec-liftr-base": "0.8.0", "@types/js-yaml": "~4.0.9", "@types/lodash": "~4.17.17", - "@types/node": "~22.15.23", + "@types/node": "~22.15.29", "@typescript-eslint/eslint-plugin": "~8.32.1", - "@typescript-eslint/parser": "~8.33.0", + "@typescript-eslint/parser": "~8.33.1", "@typespec/compiler": "1.0.0", "@typespec/events": "0.70.0", "@typespec/http": "1.0.1", @@ -35,18 +35,18 @@ "@typespec/tspd": "0.70.0", "@typespec/versioning": "0.70.0", "@typespec/xml": "0.70.0", - "@vitest/coverage-v8": "^3.1.4", - "@vitest/ui": "^3.1.4", + "@vitest/coverage-v8": "^3.2.1", + "@vitest/ui": "^3.2.1", "c8": "~10.1.3", - "eslint": "~9.27.0", + "eslint": "~9.28.0", "eslint-plugin-deprecation": "~3.0.0", "eslint-plugin-import": "^2.31.0", "eslint-plugin-unicorn": "^59.0.1", "prettier": "~3.5.3", "rimraf": "~6.0.1", "typescript": "~5.8.3", - "typescript-eslint": "^8.33.0", - "vitest": "^3.1.4" + "typescript-eslint": "^8.33.1", + "vitest": "^3.2.1" }, "engines": { "node": ">=20.0.0" @@ -56,7 +56,7 @@ "@azure-tools/typespec-azure-core": ">=0.56.0 <1.0.0", "@azure-tools/typespec-azure-resource-manager": ">=0.56.2 <1.0.0", "@azure-tools/typespec-azure-rulesets": ">=0.56.0 <1.0.0", - "@azure-tools/typespec-client-generator-core": ">=0.56.2 <1.0.0", + "@azure-tools/typespec-client-generator-core": ">=0.56.3 <1.0.0", "@azure-tools/typespec-liftr-base": ">=0.8.0 <1.0.0", "@typespec/compiler": "^1.0.0", "@typespec/http": "^1.0.0", @@ -228,9 +228,9 @@ } }, "node_modules/@azure-tools/typespec-client-generator-core": { - "version": "0.56.2", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.56.2.tgz", - "integrity": "sha512-KplQWeC/iyUTaPfBAdKynCRon8BH15yc34NBXWsjllRz+X+ZwxCQeU3vxzHQnrUPTXtNKhjXpu/les1fdd/rDQ==", + "version": "0.56.3", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.56.3.tgz", + "integrity": "sha512-R5IyWcRrbX8SdGbtRo7doeQxV9sgcfDQeE0GGJDK0gGXaoJRuEWYGgoX6NgCFdtCMQfNTV+SdP832oa5lfOivg==", "dev": true, "license": "MIT", "dependencies": { @@ -343,9 +343,9 @@ } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.4.tgz", - "integrity": "sha512-1VCICWypeQKhVbE9oW/sJaAmjLxhVqacdkvPLEjwlttjfwENRSClS8EjBz0KzRyFSCPDIkuXW34Je/vk7zdB7Q==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.5.tgz", + "integrity": "sha512-9o3TMmpmftaCMepOdA5k/yDw8SfInyzWWTjYTFCX3kPSDJMROQTb8jg+h9Cnwnmm1vOzvxN7gIfB5V2ewpjtGA==", "cpu": [ "ppc64" ], @@ -360,9 +360,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.4.tgz", - "integrity": "sha512-QNdQEps7DfFwE3hXiU4BZeOV68HHzYwGd0Nthhd3uCkkEKK7/R6MTgM0P7H7FAs5pU/DIWsviMmEGxEoxIZ+ZQ==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.5.tgz", + "integrity": "sha512-AdJKSPeEHgi7/ZhuIPtcQKr5RQdo6OO2IL87JkianiMYMPbCtot9fxPbrMiBADOWWm3T2si9stAiVsGbTQFkbA==", "cpu": [ "arm" ], @@ -377,9 +377,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.4.tgz", - "integrity": "sha512-bBy69pgfhMGtCnwpC/x5QhfxAz/cBgQ9enbtwjf6V9lnPI/hMyT9iWpR1arm0l3kttTr4L0KSLpKmLp/ilKS9A==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.5.tgz", + "integrity": "sha512-VGzGhj4lJO+TVGV1v8ntCZWJktV7SGCs3Pn1GRWI1SBFtRALoomm8k5E9Pmwg3HOAal2VDc2F9+PM/rEY6oIDg==", "cpu": [ "arm64" ], @@ -394,9 +394,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.4.tgz", - "integrity": "sha512-TVhdVtQIFuVpIIR282btcGC2oGQoSfZfmBdTip2anCaVYcqWlZXGcdcKIUklfX2wj0JklNYgz39OBqh2cqXvcQ==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.5.tgz", + "integrity": "sha512-D2GyJT1kjvO//drbRT3Hib9XPwQeWd9vZoBJn+bu/lVsOZ13cqNdDeqIF/xQ5/VmWvMduP6AmXvylO/PIc2isw==", "cpu": [ "x64" ], @@ -411,9 +411,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.4.tgz", - "integrity": "sha512-Y1giCfM4nlHDWEfSckMzeWNdQS31BQGs9/rouw6Ub91tkK79aIMTH3q9xHvzH8d0wDru5Ci0kWB8b3up/nl16g==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.5.tgz", + "integrity": "sha512-GtaBgammVvdF7aPIgH2jxMDdivezgFu6iKpmT+48+F8Hhg5J/sfnDieg0aeG/jfSvkYQU2/pceFPDKlqZzwnfQ==", "cpu": [ "arm64" ], @@ -428,9 +428,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.4.tgz", - "integrity": "sha512-CJsry8ZGM5VFVeyUYB3cdKpd/H69PYez4eJh1W/t38vzutdjEjtP7hB6eLKBoOdxcAlCtEYHzQ/PJ/oU9I4u0A==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.5.tgz", + "integrity": "sha512-1iT4FVL0dJ76/q1wd7XDsXrSW+oLoquptvh4CLR4kITDtqi2e/xwXwdCVH8hVHU43wgJdsq7Gxuzcs6Iq/7bxQ==", "cpu": [ "x64" ], @@ -445,9 +445,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.4.tgz", - "integrity": "sha512-yYq+39NlTRzU2XmoPW4l5Ifpl9fqSk0nAJYM/V/WUGPEFfek1epLHJIkTQM6bBs1swApjO5nWgvr843g6TjxuQ==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.5.tgz", + "integrity": "sha512-nk4tGP3JThz4La38Uy/gzyXtpkPW8zSAmoUhK9xKKXdBCzKODMc2adkB2+8om9BDYugz+uGV7sLmpTYzvmz6Sw==", "cpu": [ "arm64" ], @@ -462,9 +462,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.4.tgz", - "integrity": "sha512-0FgvOJ6UUMflsHSPLzdfDnnBBVoCDtBTVyn/MrWloUNvq/5SFmh13l3dvgRPkDihRxb77Y17MbqbCAa2strMQQ==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.5.tgz", + "integrity": "sha512-PrikaNjiXdR2laW6OIjlbeuCPrPaAl0IwPIaRv+SMV8CiM8i2LqVUHFC1+8eORgWyY7yhQY+2U2fA55mBzReaw==", "cpu": [ "x64" ], @@ -479,9 +479,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.4.tgz", - "integrity": "sha512-kro4c0P85GMfFYqW4TWOpvmF8rFShbWGnrLqlzp4X1TNWjRY3JMYUfDCtOxPKOIY8B0WC8HN51hGP4I4hz4AaQ==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.5.tgz", + "integrity": "sha512-cPzojwW2okgh7ZlRpcBEtsX7WBuqbLrNXqLU89GxWbNt6uIg78ET82qifUy3W6OVww6ZWobWub5oqZOVtwolfw==", "cpu": [ "arm" ], @@ -496,9 +496,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.4.tgz", - "integrity": "sha512-+89UsQTfXdmjIvZS6nUnOOLoXnkUTB9hR5QAeLrQdzOSWZvNSAXAtcRDHWtqAUtAmv7ZM1WPOOeSxDzzzMogiQ==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.5.tgz", + "integrity": "sha512-Z9kfb1v6ZlGbWj8EJk9T6czVEjjq2ntSYLY2cw6pAZl4oKtfgQuS4HOq41M/BcoLPzrUbNd+R4BXFyH//nHxVg==", "cpu": [ "arm64" ], @@ -513,9 +513,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.4.tgz", - "integrity": "sha512-yTEjoapy8UP3rv8dB0ip3AfMpRbyhSN3+hY8mo/i4QXFeDxmiYbEKp3ZRjBKcOP862Ua4b1PDfwlvbuwY7hIGQ==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.5.tgz", + "integrity": "sha512-sQ7l00M8bSv36GLV95BVAdhJ2QsIbCuCjh/uYrWiMQSUuV+LpXwIqhgJDcvMTj+VsQmqAHL2yYaasENvJ7CDKA==", "cpu": [ "ia32" ], @@ -530,9 +530,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.4.tgz", - "integrity": "sha512-NeqqYkrcGzFwi6CGRGNMOjWGGSYOpqwCjS9fvaUlX5s3zwOtn1qwg1s2iE2svBe4Q/YOG1q6875lcAoQK/F4VA==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.5.tgz", + "integrity": "sha512-0ur7ae16hDUC4OL5iEnDb0tZHDxYmuQyhKhsPBV8f99f6Z9KQM02g33f93rNH5A30agMS46u2HP6qTdEt6Q1kg==", "cpu": [ "loong64" ], @@ -547,9 +547,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.4.tgz", - "integrity": "sha512-IcvTlF9dtLrfL/M8WgNI/qJYBENP3ekgsHbYUIzEzq5XJzzVEV/fXY9WFPfEEXmu3ck2qJP8LG/p3Q8f7Zc2Xg==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.5.tgz", + "integrity": "sha512-kB/66P1OsHO5zLz0i6X0RxlQ+3cu0mkxS3TKFvkb5lin6uwZ/ttOkP3Z8lfR9mJOBk14ZwZ9182SIIWFGNmqmg==", "cpu": [ "mips64el" ], @@ -564,9 +564,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.4.tgz", - "integrity": "sha512-HOy0aLTJTVtoTeGZh4HSXaO6M95qu4k5lJcH4gxv56iaycfz1S8GO/5Jh6X4Y1YiI0h7cRyLi+HixMR+88swag==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.5.tgz", + "integrity": "sha512-UZCmJ7r9X2fe2D6jBmkLBMQetXPXIsZjQJCjgwpVDz+YMcS6oFR27alkgGv3Oqkv07bxdvw7fyB71/olceJhkQ==", "cpu": [ "ppc64" ], @@ -581,9 +581,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.4.tgz", - "integrity": "sha512-i8JUDAufpz9jOzo4yIShCTcXzS07vEgWzyX3NH2G7LEFVgrLEhjwL3ajFE4fZI3I4ZgiM7JH3GQ7ReObROvSUA==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.5.tgz", + "integrity": "sha512-kTxwu4mLyeOlsVIFPfQo+fQJAV9mh24xL+y+Bm6ej067sYANjyEw1dNHmvoqxJUCMnkBdKpvOn0Ahql6+4VyeA==", "cpu": [ "riscv64" ], @@ -598,9 +598,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.4.tgz", - "integrity": "sha512-jFnu+6UbLlzIjPQpWCNh5QtrcNfMLjgIavnwPQAfoGx4q17ocOU9MsQ2QVvFxwQoWpZT8DvTLooTvmOQXkO51g==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.5.tgz", + "integrity": "sha512-K2dSKTKfmdh78uJ3NcWFiqyRrimfdinS5ErLSn3vluHNeHVnBAFWC8a4X5N+7FgVE1EjXS1QDZbpqZBjfrqMTQ==", "cpu": [ "s390x" ], @@ -615,9 +615,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.4.tgz", - "integrity": "sha512-6e0cvXwzOnVWJHq+mskP8DNSrKBr1bULBvnFLpc1KY+d+irZSgZ02TGse5FsafKS5jg2e4pbvK6TPXaF/A6+CA==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.5.tgz", + "integrity": "sha512-uhj8N2obKTE6pSZ+aMUbqq+1nXxNjZIIjCjGLfsWvVpy7gKCOL6rsY1MhRh9zLtUtAI7vpgLMK6DxjO8Qm9lJw==", "cpu": [ "x64" ], @@ -632,9 +632,9 @@ } }, "node_modules/@esbuild/netbsd-arm64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.4.tgz", - "integrity": "sha512-vUnkBYxZW4hL/ie91hSqaSNjulOnYXE1VSLusnvHg2u3jewJBz3YzB9+oCw8DABeVqZGg94t9tyZFoHma8gWZQ==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.5.tgz", + "integrity": "sha512-pwHtMP9viAy1oHPvgxtOv+OkduK5ugofNTVDilIzBLpoWAM16r7b/mxBvfpuQDpRQFMfuVr5aLcn4yveGvBZvw==", "cpu": [ "arm64" ], @@ -649,9 +649,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.4.tgz", - "integrity": "sha512-XAg8pIQn5CzhOB8odIcAm42QsOfa98SBeKUdo4xa8OvX8LbMZqEtgeWE9P/Wxt7MlG2QqvjGths+nq48TrUiKw==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.5.tgz", + "integrity": "sha512-WOb5fKrvVTRMfWFNCroYWWklbnXH0Q5rZppjq0vQIdlsQKuw6mdSihwSo4RV/YdQ5UCKKvBy7/0ZZYLBZKIbwQ==", "cpu": [ "x64" ], @@ -666,9 +666,9 @@ } }, "node_modules/@esbuild/openbsd-arm64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.4.tgz", - "integrity": "sha512-Ct2WcFEANlFDtp1nVAXSNBPDxyU+j7+tId//iHXU2f/lN5AmO4zLyhDcpR5Cz1r08mVxzt3Jpyt4PmXQ1O6+7A==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.5.tgz", + "integrity": "sha512-7A208+uQKgTxHd0G0uqZO8UjK2R0DDb4fDmERtARjSHWxqMTye4Erz4zZafx7Di9Cv+lNHYuncAkiGFySoD+Mw==", "cpu": [ "arm64" ], @@ -683,9 +683,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.4.tgz", - "integrity": "sha512-xAGGhyOQ9Otm1Xu8NT1ifGLnA6M3sJxZ6ixylb+vIUVzvvd6GOALpwQrYrtlPouMqd/vSbgehz6HaVk4+7Afhw==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.5.tgz", + "integrity": "sha512-G4hE405ErTWraiZ8UiSoesH8DaCsMm0Cay4fsFWOOUcz8b8rC6uCvnagr+gnioEjWn0wC+o1/TAHt+It+MpIMg==", "cpu": [ "x64" ], @@ -700,9 +700,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.4.tgz", - "integrity": "sha512-Mw+tzy4pp6wZEK0+Lwr76pWLjrtjmJyUB23tHKqEDP74R3q95luY/bXqXZeYl4NYlvwOqoRKlInQialgCKy67Q==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.5.tgz", + "integrity": "sha512-l+azKShMy7FxzY0Rj4RCt5VD/q8mG/e+mDivgspo+yL8zW7qEwctQ6YqKX34DTEleFAvCIUviCFX1SDZRSyMQA==", "cpu": [ "x64" ], @@ -717,9 +717,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.4.tgz", - "integrity": "sha512-AVUP428VQTSddguz9dO9ngb+E5aScyg7nOeJDrF1HPYu555gmza3bDGMPhmVXL8svDSoqPCsCPjb265yG/kLKQ==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.5.tgz", + "integrity": "sha512-O2S7SNZzdcFG7eFKgvwUEZ2VG9D/sn/eIiz8XRZ1Q/DO5a3s76Xv0mdBzVM5j5R639lXQmPmSo0iRpHqUUrsxw==", "cpu": [ "arm64" ], @@ -734,9 +734,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.4.tgz", - "integrity": "sha512-i1sW+1i+oWvQzSgfRcxxG2k4I9n3O9NRqy8U+uugaT2Dy7kLO9Y7wI72haOahxceMX8hZAzgGou1FhndRldxRg==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.5.tgz", + "integrity": "sha512-onOJ02pqs9h1iMJ1PQphR+VZv8qBMQ77Klcsqv9CNW2w6yLqoURLcgERAIurY6QE63bbLuqgP9ATqajFLK5AMQ==", "cpu": [ "ia32" ], @@ -751,9 +751,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.4.tgz", - "integrity": "sha512-nOT2vZNw6hJ+z43oP1SPea/G/6AbN6X+bGNhNuq8NtRHy4wsMhw765IKLNmnjek7GvjWBYQ8Q5VBoYTFg9y1UQ==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.5.tgz", + "integrity": "sha512-TXv6YnJ8ZMVdX+SXWVBo/0p8LTcrUYngpWjvm91TMjjBQii7Oz11Lw5lbDV5Y0TzuhSJHwiH4hEtC1I42mMS0g==", "cpu": [ "x64" ], @@ -931,9 +931,9 @@ } }, "node_modules/@eslint/js": { - "version": "9.27.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.27.0.tgz", - "integrity": "sha512-G5JD9Tu5HJEu4z2Uo4aHY2sLV64B7CDMXxFzqzjl3NKd6RVzSXNoE80jk7Y0lJkTTkjiIhBAqmlYwjuBY3tvpA==", + "version": "9.28.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.28.0.tgz", + "integrity": "sha512-fnqSjGWd/CoIp4EXIxWVK/sHA6DOHN4+8Ix2cX5ycOY7LG0UY8nHCU5pIp2eaE1Mc7Qd8kHspYNzYXT2ojPLzg==", "dev": true, "license": "MIT", "engines": { @@ -1034,9 +1034,9 @@ } }, "node_modules/@humanwhocodes/retry": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.2.tgz", - "integrity": "sha512-xeO57FpIu4p1Ri3Jq/EXq4ClRm86dVF2z/+kvFnyqVYRavTZmaFaUBbWCOuuTh0o/g7DSsk6kc2vrS4Vl5oPOQ==", + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", "dev": true, "license": "Apache-2.0", "engines": { @@ -1586,9 +1586,9 @@ "license": "MIT" }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.41.0.tgz", - "integrity": "sha512-KxN+zCjOYHGwCl4UCtSfZ6jrq/qi88JDUtiEFk8LELEHq2Egfc/FgW+jItZiOLRuQfb/3xJSgFuNPC9jzggX+A==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.41.1.tgz", + "integrity": "sha512-NELNvyEWZ6R9QMkiytB4/L4zSEaBC03KIXEghptLGLZWJ6VPrL63ooZQCOnlx36aQPGhzuOMwDerC1Eb2VmrLw==", "cpu": [ "arm" ], @@ -1600,9 +1600,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.41.0.tgz", - "integrity": "sha512-yDvqx3lWlcugozax3DItKJI5j05B0d4Kvnjx+5mwiUpWramVvmAByYigMplaoAQ3pvdprGCTCE03eduqE/8mPQ==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.41.1.tgz", + "integrity": "sha512-DXdQe1BJ6TK47ukAoZLehRHhfKnKg9BjnQYUu9gzhI8Mwa1d2fzxA1aw2JixHVl403bwp1+/o/NhhHtxWJBgEA==", "cpu": [ "arm64" ], @@ -1614,9 +1614,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.41.0.tgz", - "integrity": "sha512-2KOU574vD3gzcPSjxO0eyR5iWlnxxtmW1F5CkNOHmMlueKNCQkxR6+ekgWyVnz6zaZihpUNkGxjsYrkTJKhkaw==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.41.1.tgz", + "integrity": "sha512-5afxvwszzdulsU2w8JKWwY8/sJOLPzf0e1bFuvcW5h9zsEg+RQAojdW0ux2zyYAz7R8HvvzKCjLNJhVq965U7w==", "cpu": [ "arm64" ], @@ -1628,9 +1628,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.41.0.tgz", - "integrity": "sha512-gE5ACNSxHcEZyP2BA9TuTakfZvULEW4YAOtxl/A/YDbIir/wPKukde0BNPlnBiP88ecaN4BJI2TtAd+HKuZPQQ==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.41.1.tgz", + "integrity": "sha512-egpJACny8QOdHNNMZKf8xY0Is6gIMz+tuqXlusxquWu3F833DcMwmGM7WlvCO9sB3OsPjdC4U0wHw5FabzCGZg==", "cpu": [ "x64" ], @@ -1642,9 +1642,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.41.0.tgz", - "integrity": "sha512-GSxU6r5HnWij7FoSo7cZg3l5GPg4HFLkzsFFh0N/b16q5buW1NAWuCJ+HMtIdUEi6XF0qH+hN0TEd78laRp7Dg==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.41.1.tgz", + "integrity": "sha512-DBVMZH5vbjgRk3r0OzgjS38z+atlupJ7xfKIDJdZZL6sM6wjfDNo64aowcLPKIx7LMQi8vybB56uh1Ftck/Atg==", "cpu": [ "arm64" ], @@ -1656,9 +1656,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.41.0.tgz", - "integrity": "sha512-KGiGKGDg8qLRyOWmk6IeiHJzsN/OYxO6nSbT0Vj4MwjS2XQy/5emsmtoqLAabqrohbgLWJ5GV3s/ljdrIr8Qjg==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.41.1.tgz", + "integrity": "sha512-3FkydeohozEskBxNWEIbPfOE0aqQgB6ttTkJ159uWOFn42VLyfAiyD9UK5mhu+ItWzft60DycIN1Xdgiy8o/SA==", "cpu": [ "x64" ], @@ -1670,9 +1670,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.41.0.tgz", - "integrity": "sha512-46OzWeqEVQyX3N2/QdiU/CMXYDH/lSHpgfBkuhl3igpZiaB3ZIfSjKuOnybFVBQzjsLwkus2mjaESy8H41SzvA==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.41.1.tgz", + "integrity": "sha512-wC53ZNDgt0pqx5xCAgNunkTzFE8GTgdZ9EwYGVcg+jEjJdZGtq9xPjDnFgfFozQI/Xm1mh+D9YlYtl+ueswNEg==", "cpu": [ "arm" ], @@ -1684,9 +1684,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.41.0.tgz", - "integrity": "sha512-lfgW3KtQP4YauqdPpcUZHPcqQXmTmH4nYU0cplNeW583CMkAGjtImw4PKli09NFi2iQgChk4e9erkwlfYem6Lg==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.41.1.tgz", + "integrity": "sha512-jwKCca1gbZkZLhLRtsrka5N8sFAaxrGz/7wRJ8Wwvq3jug7toO21vWlViihG85ei7uJTpzbXZRcORotE+xyrLA==", "cpu": [ "arm" ], @@ -1698,9 +1698,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.41.0.tgz", - "integrity": "sha512-nn8mEyzMbdEJzT7cwxgObuwviMx6kPRxzYiOl6o/o+ChQq23gfdlZcUNnt89lPhhz3BYsZ72rp0rxNqBSfqlqw==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.41.1.tgz", + "integrity": "sha512-g0UBcNknsmmNQ8V2d/zD2P7WWfJKU0F1nu0k5pW4rvdb+BIqMm8ToluW/eeRmxCared5dD76lS04uL4UaNgpNA==", "cpu": [ "arm64" ], @@ -1712,9 +1712,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.41.0.tgz", - "integrity": "sha512-l+QK99je2zUKGd31Gh+45c4pGDAqZSuWQiuRFCdHYC2CSiO47qUWsCcenrI6p22hvHZrDje9QjwSMAFL3iwXwQ==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.41.1.tgz", + "integrity": "sha512-XZpeGB5TKEZWzIrj7sXr+BEaSgo/ma/kCgrZgL0oo5qdB1JlTzIYQKel/RmhT6vMAvOdM2teYlAaOGJpJ9lahg==", "cpu": [ "arm64" ], @@ -1726,9 +1726,9 @@ ] }, "node_modules/@rollup/rollup-linux-loongarch64-gnu": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.41.0.tgz", - "integrity": "sha512-WbnJaxPv1gPIm6S8O/Wg+wfE/OzGSXlBMbOe4ie+zMyykMOeqmgD1BhPxZQuDqwUN+0T/xOFtL2RUWBspnZj3w==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.41.1.tgz", + "integrity": "sha512-bkCfDJ4qzWfFRCNt5RVV4DOw6KEgFTUZi2r2RuYhGWC8WhCA8lCAJhDeAmrM/fdiAH54m0mA0Vk2FGRPyzI+tw==", "cpu": [ "loong64" ], @@ -1740,9 +1740,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.41.0.tgz", - "integrity": "sha512-eRDWR5t67/b2g8Q/S8XPi0YdbKcCs4WQ8vklNnUYLaSWF+Cbv2axZsp4jni6/j7eKvMLYCYdcsv8dcU+a6QNFg==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.41.1.tgz", + "integrity": "sha512-3mr3Xm+gvMX+/8EKogIZSIEF0WUu0HL9di+YWlJpO8CQBnoLAEL/roTCxuLncEdgcfJcvA4UMOf+2dnjl4Ut1A==", "cpu": [ "ppc64" ], @@ -1754,9 +1754,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.41.0.tgz", - "integrity": "sha512-TWrZb6GF5jsEKG7T1IHwlLMDRy2f3DPqYldmIhnA2DVqvvhY2Ai184vZGgahRrg8k9UBWoSlHv+suRfTN7Ua4A==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.41.1.tgz", + "integrity": "sha512-3rwCIh6MQ1LGrvKJitQjZFuQnT2wxfU+ivhNBzmxXTXPllewOF7JR1s2vMX/tWtUYFgphygxjqMl76q4aMotGw==", "cpu": [ "riscv64" ], @@ -1768,9 +1768,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.41.0.tgz", - "integrity": "sha512-ieQljaZKuJpmWvd8gW87ZmSFwid6AxMDk5bhONJ57U8zT77zpZ/TPKkU9HpnnFrM4zsgr4kiGuzbIbZTGi7u9A==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.41.1.tgz", + "integrity": "sha512-LdIUOb3gvfmpkgFZuccNa2uYiqtgZAz3PTzjuM5bH3nvuy9ty6RGc/Q0+HDFrHrizJGVpjnTZ1yS5TNNjFlklw==", "cpu": [ "riscv64" ], @@ -1782,9 +1782,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.41.0.tgz", - "integrity": "sha512-/L3pW48SxrWAlVsKCN0dGLB2bi8Nv8pr5S5ocSM+S0XCn5RCVCXqi8GVtHFsOBBCSeR+u9brV2zno5+mg3S4Aw==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.41.1.tgz", + "integrity": "sha512-oIE6M8WC9ma6xYqjvPhzZYk6NbobIURvP/lEbh7FWplcMO6gn7MM2yHKA1eC/GvYwzNKK/1LYgqzdkZ8YFxR8g==", "cpu": [ "s390x" ], @@ -1796,9 +1796,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.41.0.tgz", - "integrity": "sha512-XMLeKjyH8NsEDCRptf6LO8lJk23o9wvB+dJwcXMaH6ZQbbkHu2dbGIUindbMtRN6ux1xKi16iXWu6q9mu7gDhQ==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.41.1.tgz", + "integrity": "sha512-cWBOvayNvA+SyeQMp79BHPK8ws6sHSsYnK5zDcsC3Hsxr1dgTABKjMnMslPq1DvZIp6uO7kIWhiGwaTdR4Og9A==", "cpu": [ "x64" ], @@ -1810,9 +1810,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.41.0.tgz", - "integrity": "sha512-m/P7LycHZTvSQeXhFmgmdqEiTqSV80zn6xHaQ1JSqwCtD1YGtwEK515Qmy9DcB2HK4dOUVypQxvhVSy06cJPEg==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.41.1.tgz", + "integrity": "sha512-y5CbN44M+pUCdGDlZFzGGBSKCA4A/J2ZH4edTYSSxFg7ce1Xt3GtydbVKWLlzL+INfFIZAEg1ZV6hh9+QQf9YQ==", "cpu": [ "x64" ], @@ -1824,9 +1824,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.41.0.tgz", - "integrity": "sha512-4yodtcOrFHpbomJGVEqZ8fzD4kfBeCbpsUy5Pqk4RluXOdsWdjLnjhiKy2w3qzcASWd04fp52Xz7JKarVJ5BTg==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.41.1.tgz", + "integrity": "sha512-lZkCxIrjlJlMt1dLO/FbpZbzt6J/A8p4DnqzSa4PWqPEUUUnzXLeki/iyPLfV0BmHItlYgHUqJe+3KiyydmiNQ==", "cpu": [ "arm64" ], @@ -1838,9 +1838,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.41.0.tgz", - "integrity": "sha512-tmazCrAsKzdkXssEc65zIE1oC6xPHwfy9d5Ta25SRCDOZS+I6RypVVShWALNuU9bxIfGA0aqrmzlzoM5wO5SPQ==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.41.1.tgz", + "integrity": "sha512-+psFT9+pIh2iuGsxFYYa/LhS5MFKmuivRsx9iPJWNSGbh2XVEjk90fmpUEjCnILPEPJnikAU6SFDiEUyOv90Pg==", "cpu": [ "ia32" ], @@ -1852,9 +1852,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.41.0.tgz", - "integrity": "sha512-h1J+Yzjo/X+0EAvR2kIXJDuTuyT7drc+t2ALY0nIcGPbTatNOf0VWdhEA2Z4AAjv6X1NJV7SYo5oCTYRJhSlVA==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.41.1.tgz", + "integrity": "sha512-Wq2zpapRYLfi4aKxf2Xff0tN+7slj2d4R87WEzqw7ZLsVvO5zwYCIuEGSZYiK41+GlwUo1HiR+GdkLEJnCKTCw==", "cpu": [ "x64" ], @@ -1934,6 +1934,23 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@types/chai": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.2.tgz", + "integrity": "sha512-8kB30R7Hwqf40JPiKhVzodJs2Qc1ZJ5zuT3uzw5Hq/dhNCl3G3l83jfpdI1e20BP348+fV7VIL/+FxaXkqBmWg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/deep-eql": "*" + } + }, + "node_modules/@types/deep-eql": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", + "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/estree": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz", @@ -1983,9 +2000,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "22.15.23", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.23.tgz", - "integrity": "sha512-7Ec1zaFPF4RJ0eXu1YT/xgiebqwqoJz8rYPDi/O2BcZ++Wpt0Kq9cl0eg6NN6bYbPnR67ZLo7St5Q3UK0SnARw==", + "version": "22.15.29", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.29.tgz", + "integrity": "sha512-LNdjOkUDlU1RZb8e1kOIUpN1qQUlzGkEtbVNo53vbrwDg5om6oduhm4SiUaPW5ASTXhAiP0jInWG8Qx9fVlOeQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2053,16 +2070,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.33.0.tgz", - "integrity": "sha512-JaehZvf6m0yqYp34+RVnihBAChkqeH+tqqhS0GuX1qgPpwLvmTPheKEs6OeCK6hVJgXZHJ2vbjnC9j119auStQ==", + "version": "8.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.33.1.tgz", + "integrity": "sha512-qwxv6dq682yVvgKKp2qWwLgRbscDAYktPptK4JPojCwwi3R9cwrvIxS4lvBpzmcqzR4bdn54Z0IG1uHFskW4dA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.33.0", - "@typescript-eslint/types": "8.33.0", - "@typescript-eslint/typescript-estree": "8.33.0", - "@typescript-eslint/visitor-keys": "8.33.0", + "@typescript-eslint/scope-manager": "8.33.1", + "@typescript-eslint/types": "8.33.1", + "@typescript-eslint/typescript-estree": "8.33.1", + "@typescript-eslint/visitor-keys": "8.33.1", "debug": "^4.3.4" }, "engines": { @@ -2078,14 +2095,14 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": { - "version": "8.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.33.0.tgz", - "integrity": "sha512-LMi/oqrzpqxyO72ltP+dBSP6V0xiUb4saY7WLtxSfiNEBI8m321LLVFU9/QDJxjDQG9/tjSqKz/E3380TEqSTw==", + "version": "8.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.33.1.tgz", + "integrity": "sha512-dM4UBtgmzHR9bS0Rv09JST0RcHYearoEoo3pG5B6GoTR9XcyeqX87FEhPo+5kTvVfKCvfHaHrcgeJQc6mrDKrA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.33.0", - "@typescript-eslint/visitor-keys": "8.33.0" + "@typescript-eslint/types": "8.33.1", + "@typescript-eslint/visitor-keys": "8.33.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2096,9 +2113,9 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": { - "version": "8.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.33.0.tgz", - "integrity": "sha512-DKuXOKpM5IDT1FA2g9x9x1Ug81YuKrzf4mYX8FAVSNu5Wo/LELHWQyM1pQaDkI42bX15PWl0vNPt1uGiIFUOpg==", + "version": "8.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.33.1.tgz", + "integrity": "sha512-xid1WfizGhy/TKMTwhtVOgalHwPtV8T32MS9MaH50Cwvz6x6YqRIPdD2WvW0XaqOzTV9p5xdLY0h/ZusU5Lokg==", "dev": true, "license": "MIT", "engines": { @@ -2110,16 +2127,16 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": { - "version": "8.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.33.0.tgz", - "integrity": "sha512-vegY4FQoB6jL97Tu/lWRsAiUUp8qJTqzAmENH2k59SJhw0Th1oszb9Idq/FyyONLuNqT1OADJPXfyUNOR8SzAQ==", + "version": "8.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.33.1.tgz", + "integrity": "sha512-+s9LYcT8LWjdYWu7IWs7FvUxpQ/DGkdjZeE/GGulHvv8rvYwQvVaUZ6DE+j5x/prADUgSbbCWZ2nPI3usuVeOA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/project-service": "8.33.0", - "@typescript-eslint/tsconfig-utils": "8.33.0", - "@typescript-eslint/types": "8.33.0", - "@typescript-eslint/visitor-keys": "8.33.0", + "@typescript-eslint/project-service": "8.33.1", + "@typescript-eslint/tsconfig-utils": "8.33.1", + "@typescript-eslint/types": "8.33.1", + "@typescript-eslint/visitor-keys": "8.33.1", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -2139,13 +2156,13 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": { - "version": "8.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.33.0.tgz", - "integrity": "sha512-7RW7CMYoskiz5OOGAWjJFxgb7c5UNjTG292gYhWeOAcFmYCtVCSqjqSBj5zMhxbXo2JOW95YYrUWJfU0zrpaGQ==", + "version": "8.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.33.1.tgz", + "integrity": "sha512-3i8NrFcZeeDHJ+7ZUuDkGT+UHq+XoFGsymNK2jZCOHcfEzRQ0BdpRtdpSx/Iyf3MHLWIcLS0COuOPibKQboIiQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.33.0", + "@typescript-eslint/types": "8.33.1", "eslint-visitor-keys": "^4.2.0" }, "engines": { @@ -2183,14 +2200,14 @@ } }, "node_modules/@typescript-eslint/project-service": { - "version": "8.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.33.0.tgz", - "integrity": "sha512-d1hz0u9l6N+u/gcrk6s6gYdl7/+pp8yHheRTqP6X5hVDKALEaTn8WfGiit7G511yueBEL3OpOEpD+3/MBdoN+A==", + "version": "8.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.33.1.tgz", + "integrity": "sha512-DZR0efeNklDIHHGRpMpR5gJITQpu6tLr9lDJnKdONTC7vvzOlLAG/wcfxcdxEWrbiZApcoBCzXqU/Z458Za5Iw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.33.0", - "@typescript-eslint/types": "^8.33.0", + "@typescript-eslint/tsconfig-utils": "^8.33.1", + "@typescript-eslint/types": "^8.33.1", "debug": "^4.3.4" }, "engines": { @@ -2199,12 +2216,15 @@ "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <5.9.0" } }, "node_modules/@typescript-eslint/project-service/node_modules/@typescript-eslint/types": { - "version": "8.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.33.0.tgz", - "integrity": "sha512-DKuXOKpM5IDT1FA2g9x9x1Ug81YuKrzf4mYX8FAVSNu5Wo/LELHWQyM1pQaDkI42bX15PWl0vNPt1uGiIFUOpg==", + "version": "8.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.33.1.tgz", + "integrity": "sha512-xid1WfizGhy/TKMTwhtVOgalHwPtV8T32MS9MaH50Cwvz6x6YqRIPdD2WvW0XaqOzTV9p5xdLY0h/ZusU5Lokg==", "dev": true, "license": "MIT", "engines": { @@ -2234,9 +2254,9 @@ } }, "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.33.0.tgz", - "integrity": "sha512-sTkETlbqhEoiFmGr1gsdq5HyVbSOF0145SYDJ/EQmXHtKViCaGvnyLqWFFHtEXoS0J1yU8Wyou2UGmgW88fEug==", + "version": "8.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.33.1.tgz", + "integrity": "sha512-STAQsGYbHCF0/e+ShUQ4EatXQ7ceh3fBCXkNU7/MZVKulrlq1usH7t2FhxvCpuCi5O5oi1vmVaAjrGeL71OK1g==", "dev": true, "license": "MIT", "engines": { @@ -2639,15 +2659,16 @@ } }, "node_modules/@vitest/coverage-v8": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-3.1.4.tgz", - "integrity": "sha512-G4p6OtioySL+hPV7Y6JHlhpsODbJzt1ndwHAFkyk6vVjpK03PFsKnauZIzcd0PrK4zAbc5lc+jeZ+eNGiMA+iw==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-3.2.1.tgz", + "integrity": "sha512-6dy0uF/0BE3jpUW9bFzg0V2S4F7XVaZHL/7qma1XANvHPQGoJuc3wtx911zSoAgUnpfvcLVK1vancNJ95d+uxQ==", "dev": true, "license": "MIT", "dependencies": { "@ampproject/remapping": "^2.3.0", "@bcoe/v8-coverage": "^1.0.2", - "debug": "^4.4.0", + "ast-v8-to-istanbul": "^0.3.3", + "debug": "^4.4.1", "istanbul-lib-coverage": "^3.2.2", "istanbul-lib-report": "^3.0.1", "istanbul-lib-source-maps": "^5.0.6", @@ -2662,8 +2683,8 @@ "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "@vitest/browser": "3.1.4", - "vitest": "3.1.4" + "@vitest/browser": "3.2.1", + "vitest": "3.2.1" }, "peerDependenciesMeta": { "@vitest/browser": { @@ -2671,15 +2692,34 @@ } } }, + "node_modules/@vitest/coverage-v8/node_modules/debug": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, "node_modules/@vitest/expect": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.1.4.tgz", - "integrity": "sha512-xkD/ljeliyaClDYqHPNCiJ0plY5YIcM0OlRiZizLhlPmpXWpxnGMyTZXOHFhFeG7w9P5PBeL4IdtJ/HeQwTbQA==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.2.1.tgz", + "integrity": "sha512-FqS/BnDOzV6+IpxrTg5GQRyLOCtcJqkwMwcS8qGCI2IyRVDwPAtutztaf1CjtPHlZlWtl1yUPCd7HM0cNiDOYw==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "3.1.4", - "@vitest/utils": "3.1.4", + "@types/chai": "^5.2.2", + "@vitest/spy": "3.2.1", + "@vitest/utils": "3.2.1", "chai": "^5.2.0", "tinyrainbow": "^2.0.0" }, @@ -2688,13 +2728,13 @@ } }, "node_modules/@vitest/mocker": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.1.4.tgz", - "integrity": "sha512-8IJ3CvwtSw/EFXqWFL8aCMu+YyYXG2WUSrQbViOZkWTKTVicVwZ/YiEZDSqD00kX+v/+W+OnxhNWoeVKorHygA==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.2.1.tgz", + "integrity": "sha512-OXxMJnx1lkB+Vl65Re5BrsZEHc90s5NMjD23ZQ9NlU7f7nZiETGoX4NeKZSmsKjseuMq2uOYXdLOeoM0pJU+qw==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "3.1.4", + "@vitest/spy": "3.2.1", "estree-walker": "^3.0.3", "magic-string": "^0.30.17" }, @@ -2703,7 +2743,7 @@ }, "peerDependencies": { "msw": "^2.4.9", - "vite": "^5.0.0 || ^6.0.0" + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" }, "peerDependenciesMeta": { "msw": { @@ -2715,9 +2755,9 @@ } }, "node_modules/@vitest/pretty-format": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.1.4.tgz", - "integrity": "sha512-cqv9H9GvAEoTaoq+cYqUTCGscUjKqlJZC7PRwY5FMySVj5J+xOm1KQcCiYHJOEzOKRUhLH4R2pTwvFlWCEScsg==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.2.1.tgz", + "integrity": "sha512-xBh1X2GPlOGBupp6E1RcUQWIxw0w/hRLd3XyBS6H+dMdKTAqHDNsIR2AnJwPA3yYe9DFy3VUKTe3VRTrAiQ01g==", "dev": true, "license": "MIT", "dependencies": { @@ -2728,13 +2768,13 @@ } }, "node_modules/@vitest/runner": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.1.4.tgz", - "integrity": "sha512-djTeF1/vt985I/wpKVFBMWUlk/I7mb5hmD5oP8K9ACRmVXgKTae3TUOtXAEBfslNKPzUQvnKhNd34nnRSYgLNQ==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.2.1.tgz", + "integrity": "sha512-kygXhNTu/wkMYbwYpS3z/9tBe0O8qpdBuC3dD/AW9sWa0LE/DAZEjnHtWA9sIad7lpD4nFW1yQ+zN7mEKNH3yA==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/utils": "3.1.4", + "@vitest/utils": "3.2.1", "pathe": "^2.0.3" }, "funding": { @@ -2742,13 +2782,13 @@ } }, "node_modules/@vitest/snapshot": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.1.4.tgz", - "integrity": "sha512-JPHf68DvuO7vilmvwdPr9TS0SuuIzHvxeaCkxYcCD4jTk67XwL45ZhEHFKIuCm8CYstgI6LZ4XbwD6ANrwMpFg==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.2.1.tgz", + "integrity": "sha512-5xko/ZpW2Yc65NVK9Gpfg2y4BFvcF+At7yRT5AHUpTg9JvZ4xZoyuRY4ASlmNcBZjMslV08VRLDrBOmUe2YX3g==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "3.1.4", + "@vitest/pretty-format": "3.2.1", "magic-string": "^0.30.17", "pathe": "^2.0.3" }, @@ -2757,48 +2797,48 @@ } }, "node_modules/@vitest/spy": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.1.4.tgz", - "integrity": "sha512-Xg1bXhu+vtPXIodYN369M86K8shGLouNjoVI78g8iAq2rFoHFdajNvJJ5A/9bPMFcfQqdaCpOgWKEoMQg/s0Yg==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.2.1.tgz", + "integrity": "sha512-Nbfib34Z2rfcJGSetMxjDCznn4pCYPZOtQYox2kzebIJcgH75yheIKd5QYSFmR8DIZf2M8fwOm66qSDIfRFFfQ==", "dev": true, "license": "MIT", "dependencies": { - "tinyspy": "^3.0.2" + "tinyspy": "^4.0.3" }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/@vitest/ui": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@vitest/ui/-/ui-3.1.4.tgz", - "integrity": "sha512-CFc2Bpb3sz4Sdt53kdNGq+qZKLftBwX4qZLC03CBUc0N1LJrOoL0ZeK0oq/708mtnpwccL0BZCY9d1WuiBSr7Q==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/@vitest/ui/-/ui-3.2.1.tgz", + "integrity": "sha512-xT93aOcPn2wn8vvw4T6rZAK9WjGEHdYrEjN3OJ1zcDpl2UInxvcD9fYI10nmPAERNEK6jUVcSCIPAIfNuaRX6Q==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/utils": "3.1.4", + "@vitest/utils": "3.2.1", "fflate": "^0.8.2", "flatted": "^3.3.3", "pathe": "^2.0.3", "sirv": "^3.0.1", - "tinyglobby": "^0.2.13", + "tinyglobby": "^0.2.14", "tinyrainbow": "^2.0.0" }, "funding": { "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "vitest": "3.1.4" + "vitest": "3.2.1" } }, "node_modules/@vitest/utils": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.1.4.tgz", - "integrity": "sha512-yriMuO1cfFhmiGc8ataN51+9ooHRuURdfAZfwFd3usWynjzpLslZdYnRegTv32qdgtJTsj15FoeZe2g15fY1gg==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.2.1.tgz", + "integrity": "sha512-KkHlGhePEKZSub5ViknBcN5KEF+u7dSUr9NW8QsVICusUojrgrOnnY3DEWWO877ax2Pyopuk2qHmt+gkNKnBVw==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "3.1.4", + "@vitest/pretty-format": "3.2.1", "loupe": "^3.1.3", "tinyrainbow": "^2.0.0" }, @@ -3058,6 +3098,25 @@ "node": ">=12" } }, + "node_modules/ast-v8-to-istanbul": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/ast-v8-to-istanbul/-/ast-v8-to-istanbul-0.3.3.tgz", + "integrity": "sha512-MuXMrSLVVoA6sYN/6Hke18vMzrT4TZNbZIj/hvh0fnYFpO+/kFXcLIaiPwXXWaQUPg4yJD8fj+lfJ7/1EBconw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.25", + "estree-walker": "^3.0.3", + "js-tokens": "^9.0.1" + } + }, + "node_modules/ast-v8-to-istanbul/node_modules/js-tokens": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.1.tgz", + "integrity": "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==", + "dev": true, + "license": "MIT" + }, "node_modules/async-function": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz", @@ -3837,9 +3896,9 @@ } }, "node_modules/esbuild": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.4.tgz", - "integrity": "sha512-8pgjLUcUjcgDg+2Q4NYXnPbo/vncAY4UmyaCm0jZevERqCHZIaWwdJHkf8XQtu4AxSKCdvrUbT0XUr1IdZzI8Q==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.5.tgz", + "integrity": "sha512-P8OtKZRv/5J5hhz0cUAdu/cLuPIKXpQl1R9pZtvmHWQvrAUVd0UNIPT4IB4W3rNOqVO0rlqHmCIbSwxh/c9yUQ==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -3850,31 +3909,31 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.25.4", - "@esbuild/android-arm": "0.25.4", - "@esbuild/android-arm64": "0.25.4", - "@esbuild/android-x64": "0.25.4", - "@esbuild/darwin-arm64": "0.25.4", - "@esbuild/darwin-x64": "0.25.4", - "@esbuild/freebsd-arm64": "0.25.4", - "@esbuild/freebsd-x64": "0.25.4", - "@esbuild/linux-arm": "0.25.4", - "@esbuild/linux-arm64": "0.25.4", - "@esbuild/linux-ia32": "0.25.4", - "@esbuild/linux-loong64": "0.25.4", - "@esbuild/linux-mips64el": "0.25.4", - "@esbuild/linux-ppc64": "0.25.4", - "@esbuild/linux-riscv64": "0.25.4", - "@esbuild/linux-s390x": "0.25.4", - "@esbuild/linux-x64": "0.25.4", - "@esbuild/netbsd-arm64": "0.25.4", - "@esbuild/netbsd-x64": "0.25.4", - "@esbuild/openbsd-arm64": "0.25.4", - "@esbuild/openbsd-x64": "0.25.4", - "@esbuild/sunos-x64": "0.25.4", - "@esbuild/win32-arm64": "0.25.4", - "@esbuild/win32-ia32": "0.25.4", - "@esbuild/win32-x64": "0.25.4" + "@esbuild/aix-ppc64": "0.25.5", + "@esbuild/android-arm": "0.25.5", + "@esbuild/android-arm64": "0.25.5", + "@esbuild/android-x64": "0.25.5", + "@esbuild/darwin-arm64": "0.25.5", + "@esbuild/darwin-x64": "0.25.5", + "@esbuild/freebsd-arm64": "0.25.5", + "@esbuild/freebsd-x64": "0.25.5", + "@esbuild/linux-arm": "0.25.5", + "@esbuild/linux-arm64": "0.25.5", + "@esbuild/linux-ia32": "0.25.5", + "@esbuild/linux-loong64": "0.25.5", + "@esbuild/linux-mips64el": "0.25.5", + "@esbuild/linux-ppc64": "0.25.5", + "@esbuild/linux-riscv64": "0.25.5", + "@esbuild/linux-s390x": "0.25.5", + "@esbuild/linux-x64": "0.25.5", + "@esbuild/netbsd-arm64": "0.25.5", + "@esbuild/netbsd-x64": "0.25.5", + "@esbuild/openbsd-arm64": "0.25.5", + "@esbuild/openbsd-x64": "0.25.5", + "@esbuild/sunos-x64": "0.25.5", + "@esbuild/win32-arm64": "0.25.5", + "@esbuild/win32-ia32": "0.25.5", + "@esbuild/win32-x64": "0.25.5" } }, "node_modules/escalade": { @@ -3898,9 +3957,9 @@ } }, "node_modules/eslint": { - "version": "9.27.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.27.0.tgz", - "integrity": "sha512-ixRawFQuMB9DZ7fjU3iGGganFDp3+45bPOdaRurcFHSXO1e/sYwUX/FtQZpLZJR6SjMoJH8hR2pPEAfDyCoU2Q==", + "version": "9.28.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.28.0.tgz", + "integrity": "sha512-ocgh41VhRlf9+fVpe7QKzwLj9c92fDiqOj8Y3Sd4/ZmVA4Btx4PlUYPq4pp9JDyupkf1upbEXecxL2mwNV7jPQ==", "dev": true, "license": "MIT", "dependencies": { @@ -3910,7 +3969,7 @@ "@eslint/config-helpers": "^0.2.1", "@eslint/core": "^0.14.0", "@eslint/eslintrc": "^3.3.1", - "@eslint/js": "9.27.0", + "@eslint/js": "9.28.0", "@eslint/plugin-kit": "^0.3.1", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", @@ -6277,9 +6336,9 @@ } }, "node_modules/postcss": { - "version": "8.5.3", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.3.tgz", - "integrity": "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==", + "version": "8.5.4", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.4.tgz", + "integrity": "sha512-QSa9EBe+uwlGTFmHsPKokv3B/oEMQZxfqW0QqNCyhpa6mB1afzulwn8hihglqAb2pOw+BJgNlmXQ8la2VeHB7w==", "dev": true, "funding": [ { @@ -6297,7 +6356,7 @@ ], "license": "MIT", "dependencies": { - "nanoid": "^3.3.8", + "nanoid": "^3.3.11", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" }, @@ -6584,9 +6643,9 @@ } }, "node_modules/rollup": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.41.0.tgz", - "integrity": "sha512-HqMFpUbWlf/tvcxBFNKnJyzc7Lk+XO3FGc3pbNBLqEbOz0gPLRgcrlS3UF4MfUrVlstOaP/q0kM6GVvi+LrLRg==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.41.1.tgz", + "integrity": "sha512-cPmwD3FnFv8rKMBc1MxWCwVQFxwf1JEmSX3iQXrRVVG15zerAIXRjMFVWnd5Q5QvgKF7Aj+5ykXFhUl+QGnyOw==", "dev": true, "license": "MIT", "dependencies": { @@ -6600,26 +6659,26 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.41.0", - "@rollup/rollup-android-arm64": "4.41.0", - "@rollup/rollup-darwin-arm64": "4.41.0", - "@rollup/rollup-darwin-x64": "4.41.0", - "@rollup/rollup-freebsd-arm64": "4.41.0", - "@rollup/rollup-freebsd-x64": "4.41.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.41.0", - "@rollup/rollup-linux-arm-musleabihf": "4.41.0", - "@rollup/rollup-linux-arm64-gnu": "4.41.0", - "@rollup/rollup-linux-arm64-musl": "4.41.0", - "@rollup/rollup-linux-loongarch64-gnu": "4.41.0", - "@rollup/rollup-linux-powerpc64le-gnu": "4.41.0", - "@rollup/rollup-linux-riscv64-gnu": "4.41.0", - "@rollup/rollup-linux-riscv64-musl": "4.41.0", - "@rollup/rollup-linux-s390x-gnu": "4.41.0", - "@rollup/rollup-linux-x64-gnu": "4.41.0", - "@rollup/rollup-linux-x64-musl": "4.41.0", - "@rollup/rollup-win32-arm64-msvc": "4.41.0", - "@rollup/rollup-win32-ia32-msvc": "4.41.0", - "@rollup/rollup-win32-x64-msvc": "4.41.0", + "@rollup/rollup-android-arm-eabi": "4.41.1", + "@rollup/rollup-android-arm64": "4.41.1", + "@rollup/rollup-darwin-arm64": "4.41.1", + "@rollup/rollup-darwin-x64": "4.41.1", + "@rollup/rollup-freebsd-arm64": "4.41.1", + "@rollup/rollup-freebsd-x64": "4.41.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.41.1", + "@rollup/rollup-linux-arm-musleabihf": "4.41.1", + "@rollup/rollup-linux-arm64-gnu": "4.41.1", + "@rollup/rollup-linux-arm64-musl": "4.41.1", + "@rollup/rollup-linux-loongarch64-gnu": "4.41.1", + "@rollup/rollup-linux-powerpc64le-gnu": "4.41.1", + "@rollup/rollup-linux-riscv64-gnu": "4.41.1", + "@rollup/rollup-linux-riscv64-musl": "4.41.1", + "@rollup/rollup-linux-s390x-gnu": "4.41.1", + "@rollup/rollup-linux-x64-gnu": "4.41.1", + "@rollup/rollup-linux-x64-musl": "4.41.1", + "@rollup/rollup-win32-arm64-msvc": "4.41.1", + "@rollup/rollup-win32-ia32-msvc": "4.41.1", + "@rollup/rollup-win32-x64-msvc": "4.41.1", "fsevents": "~2.3.2" } }, @@ -7166,9 +7225,9 @@ "license": "MIT" }, "node_modules/tinyglobby": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.13.tgz", - "integrity": "sha512-mEwzpUgrLySlveBwEVDMKk5B57bhLPYovRfPAXD5gA/98Opn0rCDj3GtLwFvCvH5RK9uPCExUROW5NjDwvqkxw==", + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz", + "integrity": "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==", "dev": true, "license": "MIT", "dependencies": { @@ -7183,9 +7242,9 @@ } }, "node_modules/tinyglobby/node_modules/fdir": { - "version": "6.4.4", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.4.tgz", - "integrity": "sha512-1NZP+GK4GfuAv3PqKvxQRDMjdSRZjnkq7KfhlNrCNNlZ0ygQFpebfrnfnq/W7fpUnAv9aGWmY1zKx7FYL3gwhg==", + "version": "6.4.5", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.5.tgz", + "integrity": "sha512-4BG7puHpVsIYxZUbiUE3RqGloLaSSwzYie5jvasC4LWuBWzZawynvYouhjbQKw2JuIGYdm0DzIxl8iVidKlUEw==", "dev": true, "license": "MIT", "peerDependencies": { @@ -7211,9 +7270,9 @@ } }, "node_modules/tinypool": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.0.2.tgz", - "integrity": "sha512-al6n+QEANGFOMf/dmUMsuS5/r9B06uwlyNjZZql/zv8J7ybHCgoihBNORZCY2mzUuAnomQa2JdhyHKzZxPCrFA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.1.0.tgz", + "integrity": "sha512-7CotroY9a8DKsKprEy/a14aCCm8jYVmR7aFy4fpkZM8sdpNJbKkixuNjgM50yCmip2ezc8z4N7k3oe2+rfRJCQ==", "dev": true, "license": "MIT", "engines": { @@ -7231,9 +7290,9 @@ } }, "node_modules/tinyspy": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-3.0.2.tgz", - "integrity": "sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-4.0.3.tgz", + "integrity": "sha512-t2T/WLB2WRgZ9EpE4jgPJ9w+i66UZfDc8wHh0xrwiRNN+UwH98GIJkTeZqX9rg0i0ptwzqW+uYeIF0T4F8LR7A==", "dev": true, "license": "MIT", "engines": { @@ -7463,15 +7522,15 @@ } }, "node_modules/typescript-eslint": { - "version": "8.33.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.33.0.tgz", - "integrity": "sha512-5YmNhF24ylCsvdNW2oJwMzTbaeO4bg90KeGtMjUw0AGtHksgEPLRTUil+coHwCfiu4QjVJFnjp94DmU6zV7DhQ==", + "version": "8.33.1", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.33.1.tgz", + "integrity": "sha512-AgRnV4sKkWOiZ0Kjbnf5ytTJXMUZQ0qhSVdQtDNYLPLnjsATEYhaO94GlRQwi4t4gO8FfjM6NnikHeKjUm8D7A==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "8.33.0", - "@typescript-eslint/parser": "8.33.0", - "@typescript-eslint/utils": "8.33.0" + "@typescript-eslint/eslint-plugin": "8.33.1", + "@typescript-eslint/parser": "8.33.1", + "@typescript-eslint/utils": "8.33.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -7486,17 +7545,17 @@ } }, "node_modules/typescript-eslint/node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.33.0.tgz", - "integrity": "sha512-CACyQuqSHt7ma3Ns601xykeBK/rDeZa3w6IS6UtMQbixO5DWy+8TilKkviGDH6jtWCo8FGRKEK5cLLkPvEammQ==", + "version": "8.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.33.1.tgz", + "integrity": "sha512-TDCXj+YxLgtvxvFlAvpoRv9MAncDLBV2oT9Bd7YBGC/b/sEURoOYuIwLI99rjWOfY3QtDzO+mk0n4AmdFExW8A==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.33.0", - "@typescript-eslint/type-utils": "8.33.0", - "@typescript-eslint/utils": "8.33.0", - "@typescript-eslint/visitor-keys": "8.33.0", + "@typescript-eslint/scope-manager": "8.33.1", + "@typescript-eslint/type-utils": "8.33.1", + "@typescript-eslint/utils": "8.33.1", + "@typescript-eslint/visitor-keys": "8.33.1", "graphemer": "^1.4.0", "ignore": "^7.0.0", "natural-compare": "^1.4.0", @@ -7510,20 +7569,20 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.33.0", + "@typescript-eslint/parser": "^8.33.1", "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <5.9.0" } }, "node_modules/typescript-eslint/node_modules/@typescript-eslint/scope-manager": { - "version": "8.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.33.0.tgz", - "integrity": "sha512-LMi/oqrzpqxyO72ltP+dBSP6V0xiUb4saY7WLtxSfiNEBI8m321LLVFU9/QDJxjDQG9/tjSqKz/E3380TEqSTw==", + "version": "8.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.33.1.tgz", + "integrity": "sha512-dM4UBtgmzHR9bS0Rv09JST0RcHYearoEoo3pG5B6GoTR9XcyeqX87FEhPo+5kTvVfKCvfHaHrcgeJQc6mrDKrA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.33.0", - "@typescript-eslint/visitor-keys": "8.33.0" + "@typescript-eslint/types": "8.33.1", + "@typescript-eslint/visitor-keys": "8.33.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -7534,14 +7593,14 @@ } }, "node_modules/typescript-eslint/node_modules/@typescript-eslint/type-utils": { - "version": "8.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.33.0.tgz", - "integrity": "sha512-lScnHNCBqL1QayuSrWeqAL5GmqNdVUQAAMTaCwdYEdWfIrSrOGzyLGRCHXcCixa5NK6i5l0AfSO2oBSjCjf4XQ==", + "version": "8.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.33.1.tgz", + "integrity": "sha512-1cG37d9xOkhlykom55WVwG2QRNC7YXlxMaMzqw2uPeJixBFfKWZgaP/hjAObqMN/u3fr5BrTwTnc31/L9jQ2ww==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.33.0", - "@typescript-eslint/utils": "8.33.0", + "@typescript-eslint/typescript-estree": "8.33.1", + "@typescript-eslint/utils": "8.33.1", "debug": "^4.3.4", "ts-api-utils": "^2.1.0" }, @@ -7558,9 +7617,9 @@ } }, "node_modules/typescript-eslint/node_modules/@typescript-eslint/types": { - "version": "8.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.33.0.tgz", - "integrity": "sha512-DKuXOKpM5IDT1FA2g9x9x1Ug81YuKrzf4mYX8FAVSNu5Wo/LELHWQyM1pQaDkI42bX15PWl0vNPt1uGiIFUOpg==", + "version": "8.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.33.1.tgz", + "integrity": "sha512-xid1WfizGhy/TKMTwhtVOgalHwPtV8T32MS9MaH50Cwvz6x6YqRIPdD2WvW0XaqOzTV9p5xdLY0h/ZusU5Lokg==", "dev": true, "license": "MIT", "engines": { @@ -7572,16 +7631,16 @@ } }, "node_modules/typescript-eslint/node_modules/@typescript-eslint/typescript-estree": { - "version": "8.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.33.0.tgz", - "integrity": "sha512-vegY4FQoB6jL97Tu/lWRsAiUUp8qJTqzAmENH2k59SJhw0Th1oszb9Idq/FyyONLuNqT1OADJPXfyUNOR8SzAQ==", + "version": "8.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.33.1.tgz", + "integrity": "sha512-+s9LYcT8LWjdYWu7IWs7FvUxpQ/DGkdjZeE/GGulHvv8rvYwQvVaUZ6DE+j5x/prADUgSbbCWZ2nPI3usuVeOA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/project-service": "8.33.0", - "@typescript-eslint/tsconfig-utils": "8.33.0", - "@typescript-eslint/types": "8.33.0", - "@typescript-eslint/visitor-keys": "8.33.0", + "@typescript-eslint/project-service": "8.33.1", + "@typescript-eslint/tsconfig-utils": "8.33.1", + "@typescript-eslint/types": "8.33.1", + "@typescript-eslint/visitor-keys": "8.33.1", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -7601,16 +7660,16 @@ } }, "node_modules/typescript-eslint/node_modules/@typescript-eslint/utils": { - "version": "8.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.33.0.tgz", - "integrity": "sha512-lPFuQaLA9aSNa7D5u2EpRiqdAUhzShwGg/nhpBlc4GR6kcTABttCuyjFs8BcEZ8VWrjCBof/bePhP3Q3fS+Yrw==", + "version": "8.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.33.1.tgz", + "integrity": "sha512-52HaBiEQUaRYqAXpfzWSR2U3gxk92Kw006+xZpElaPMg3C4PgM+A5LqwoQI1f9E5aZ/qlxAZxzm42WX+vn92SQ==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", - "@typescript-eslint/scope-manager": "8.33.0", - "@typescript-eslint/types": "8.33.0", - "@typescript-eslint/typescript-estree": "8.33.0" + "@typescript-eslint/scope-manager": "8.33.1", + "@typescript-eslint/types": "8.33.1", + "@typescript-eslint/typescript-estree": "8.33.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -7625,13 +7684,13 @@ } }, "node_modules/typescript-eslint/node_modules/@typescript-eslint/visitor-keys": { - "version": "8.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.33.0.tgz", - "integrity": "sha512-7RW7CMYoskiz5OOGAWjJFxgb7c5UNjTG292gYhWeOAcFmYCtVCSqjqSBj5zMhxbXo2JOW95YYrUWJfU0zrpaGQ==", + "version": "8.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.33.1.tgz", + "integrity": "sha512-3i8NrFcZeeDHJ+7ZUuDkGT+UHq+XoFGsymNK2jZCOHcfEzRQ0BdpRtdpSx/Iyf3MHLWIcLS0COuOPibKQboIiQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.33.0", + "@typescript-eslint/types": "8.33.1", "eslint-visitor-keys": "^4.2.0" }, "engines": { @@ -7656,9 +7715,9 @@ } }, "node_modules/typescript-eslint/node_modules/ignore": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.4.tgz", - "integrity": "sha512-gJzzk+PQNznz8ysRrC0aOkBNVRBDtE1n53IqyqEf3PXrYwomFs5q4pGMizBMJF+ykh03insJ27hB8gSrD2Hn8A==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", "dev": true, "license": "MIT", "engines": { @@ -7841,17 +7900,17 @@ } }, "node_modules/vite-node": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.1.4.tgz", - "integrity": "sha512-6enNwYnpyDo4hEgytbmc6mYWHXDHYEn0D1/rw4Q+tnHUGtKTJsn8T1YkX6Q18wI5LCrS8CTYlBaiCqxOy2kvUA==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.2.1.tgz", + "integrity": "sha512-V4EyKQPxquurNJPtQJRZo8hKOoKNBRIhxcDbQFPFig0JdoWcUhwRgK8yoCXXrfYVPKS6XwirGHPszLnR8FbjCA==", "dev": true, "license": "MIT", "dependencies": { "cac": "^6.7.14", - "debug": "^4.4.0", + "debug": "^4.4.1", "es-module-lexer": "^1.7.0", "pathe": "^2.0.3", - "vite": "^5.0.0 || ^6.0.0" + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" }, "bin": { "vite-node": "vite-node.mjs" @@ -7863,10 +7922,28 @@ "url": "https://opencollective.com/vitest" } }, + "node_modules/vite-node/node_modules/debug": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, "node_modules/vite/node_modules/fdir": { - "version": "6.4.4", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.4.tgz", - "integrity": "sha512-1NZP+GK4GfuAv3PqKvxQRDMjdSRZjnkq7KfhlNrCNNlZ0ygQFpebfrnfnq/W7fpUnAv9aGWmY1zKx7FYL3gwhg==", + "version": "6.4.5", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.5.tgz", + "integrity": "sha512-4BG7puHpVsIYxZUbiUE3RqGloLaSSwzYie5jvasC4LWuBWzZawynvYouhjbQKw2JuIGYdm0DzIxl8iVidKlUEw==", "dev": true, "license": "MIT", "peerDependencies": { @@ -7892,32 +7969,34 @@ } }, "node_modules/vitest": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.1.4.tgz", - "integrity": "sha512-Ta56rT7uWxCSJXlBtKgIlApJnT6e6IGmTYxYcmxjJ4ujuZDI59GUQgVDObXXJujOmPDBYXHK1qmaGtneu6TNIQ==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.2.1.tgz", + "integrity": "sha512-VZ40MBnlE1/V5uTgdqY3DmjUgZtIzsYq758JGlyQrv5syIsaYcabkfPkEuWML49Ph0D/SoqpVFd0dyVTr551oA==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/expect": "3.1.4", - "@vitest/mocker": "3.1.4", - "@vitest/pretty-format": "^3.1.4", - "@vitest/runner": "3.1.4", - "@vitest/snapshot": "3.1.4", - "@vitest/spy": "3.1.4", - "@vitest/utils": "3.1.4", + "@types/chai": "^5.2.2", + "@vitest/expect": "3.2.1", + "@vitest/mocker": "3.2.1", + "@vitest/pretty-format": "^3.2.1", + "@vitest/runner": "3.2.1", + "@vitest/snapshot": "3.2.1", + "@vitest/spy": "3.2.1", + "@vitest/utils": "3.2.1", "chai": "^5.2.0", - "debug": "^4.4.0", + "debug": "^4.4.1", "expect-type": "^1.2.1", "magic-string": "^0.30.17", "pathe": "^2.0.3", + "picomatch": "^4.0.2", "std-env": "^3.9.0", "tinybench": "^2.9.0", "tinyexec": "^0.3.2", - "tinyglobby": "^0.2.13", - "tinypool": "^1.0.2", + "tinyglobby": "^0.2.14", + "tinypool": "^1.1.0", "tinyrainbow": "^2.0.0", - "vite": "^5.0.0 || ^6.0.0", - "vite-node": "3.1.4", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0", + "vite-node": "3.2.1", "why-is-node-running": "^2.3.0" }, "bin": { @@ -7933,8 +8012,8 @@ "@edge-runtime/vm": "*", "@types/debug": "^4.1.12", "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", - "@vitest/browser": "3.1.4", - "@vitest/ui": "3.1.4", + "@vitest/browser": "3.2.1", + "@vitest/ui": "3.2.1", "happy-dom": "*", "jsdom": "*" }, @@ -7962,6 +8041,37 @@ } } }, + "node_modules/vitest/node_modules/debug": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/vitest/node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/vscode-jsonrpc": { "version": "8.2.0", "dev": true, diff --git a/typespec-extension/package.json b/typespec-extension/package.json index 97bb8c5fd0..c1baee8b4d 100644 --- a/typespec-extension/package.json +++ b/typespec-extension/package.json @@ -50,7 +50,7 @@ "@azure-tools/typespec-azure-core": ">=0.56.0 <1.0.0", "@azure-tools/typespec-azure-resource-manager": ">=0.56.2 <1.0.0", "@azure-tools/typespec-azure-rulesets": ">=0.56.0 <1.0.0", - "@azure-tools/typespec-client-generator-core": ">=0.56.2 <1.0.0", + "@azure-tools/typespec-client-generator-core": ">=0.56.3 <1.0.0", "@azure-tools/typespec-liftr-base": ">=0.8.0 <1.0.0", "@typespec/compiler": "^1.0.0", "@typespec/http": "^1.0.0", @@ -69,13 +69,13 @@ "@azure-tools/typespec-azure-core": "0.56.0", "@azure-tools/typespec-azure-resource-manager": "0.56.2", "@azure-tools/typespec-azure-rulesets": "0.56.1", - "@azure-tools/typespec-client-generator-core": "0.56.2", + "@azure-tools/typespec-client-generator-core": "0.56.3", "@azure-tools/typespec-liftr-base": "0.8.0", "@types/js-yaml": "~4.0.9", "@types/lodash": "~4.17.17", - "@types/node": "~22.15.23", + "@types/node": "~22.15.29", "@typescript-eslint/eslint-plugin": "~8.32.1", - "@typescript-eslint/parser": "~8.33.0", + "@typescript-eslint/parser": "~8.33.1", "@typespec/compiler": "1.0.0", "@typespec/http": "1.0.1", "@typespec/openapi": "1.0.0", @@ -86,20 +86,20 @@ "@typespec/sse": "0.70.0", "@typespec/streams": "0.70.0", "@typespec/tspd": "0.70.0", - "@vitest/coverage-v8": "^3.1.4", - "@vitest/ui": "^3.1.4", + "@vitest/coverage-v8": "^3.2.1", + "@vitest/ui": "^3.2.1", "c8": "~10.1.3", - "eslint": "~9.27.0", + "eslint": "~9.28.0", "eslint-plugin-deprecation": "~3.0.0", "eslint-plugin-import": "^2.31.0", "eslint-plugin-unicorn": "^59.0.1", "prettier": "~3.5.3", "rimraf": "~6.0.1", "typescript": "~5.8.3", - "typescript-eslint": "^8.33.0", - "vitest": "^3.1.4" + "typescript-eslint": "^8.33.1", + "vitest": "^3.2.1" }, "overrides": { - "eslint": "~9.27.0" + "eslint": "~9.28.0" } } diff --git a/typespec-tests/package.json b/typespec-tests/package.json index 105c705a45..83ec9d1661 100644 --- a/typespec-tests/package.json +++ b/typespec-tests/package.json @@ -31,7 +31,7 @@ "@typespec/sse": "~0.70.0", "@typespec/streams": "~0.70.0", "@azure-tools/typespec-azure-core": "~0.56.0", - "@azure-tools/typespec-client-generator-core": "~0.56.2", + "@azure-tools/typespec-client-generator-core": "~0.56.3", "@azure-tools/typespec-azure-resource-manager": "~0.56.2", "@azure-tools/typespec-autorest": "~0.56.0" }, From 70a7a901bdc35fd7678e0f43e4124354157378a5 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Thu, 5 Jun 2025 11:20:28 +0800 Subject: [PATCH 08/12] remove deployment in mgmt test --- .../src/test/java/com/azure/mgmttest/CompilationTests.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/fluent-tests/src/test/java/com/azure/mgmttest/CompilationTests.java b/fluent-tests/src/test/java/com/azure/mgmttest/CompilationTests.java index 7db3be1e04..3d7d93c111 100644 --- a/fluent-tests/src/test/java/com/azure/mgmttest/CompilationTests.java +++ b/fluent-tests/src/test/java/com/azure/mgmttest/CompilationTests.java @@ -29,8 +29,6 @@ import com.azure.mgmttest.nonstringexpandableenum.fluent.models.ScheduledQueryRuleProperties; import com.azure.mgmttest.nonstringexpandableenum.models.AlertSeverity; import com.azure.mgmttest.postgresqlhsc.fluent.models.ServerConfigurationInner; -import com.azure.mgmttest.resources.fluent.DeploymentsClient; -import com.azure.mgmttest.resources.fluent.models.DeploymentExtendedInner; import com.azure.mgmttest.resources.fluent.models.ResourceGroupInner; import com.azure.mgmttest.resources.models.IdentityUserAssignedIdentities; import com.azure.mgmttest.resourcewithwritablename.fluent.models.FirewallRuleInner; @@ -77,8 +75,6 @@ public void testInnerSupport() { storageAccounts.list(); // Add InnerSupportsGet to class. - InnerSupportsGet deployments = mock(DeploymentsClient.class); - deployments.getByResourceGroup(anyString(), anyString()); InnerSupportsGet networkInterfaces = mock(NetworkInterfacesClient.class); networkInterfaces.getByResourceGroup(anyString(), anyString()); From 7aea5d7f04eb875ddf586ded7df8bddf4214019f Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Thu, 5 Jun 2025 11:38:50 +0800 Subject: [PATCH 09/12] update core --- core | 2 +- typespec-tests/package.json | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/core b/core index 66e1ee1dac..717210b0a9 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 66e1ee1dacd41dfd658b05411eaa20dff89073bf +Subproject commit 717210b0a93a223e4e396a6d5adc650563385b1c diff --git a/typespec-tests/package.json b/typespec-tests/package.json index 83ec9d1661..7621c3faba 100644 --- a/typespec-tests/package.json +++ b/typespec-tests/package.json @@ -21,19 +21,19 @@ "prettier": "^3.5.3" }, "overrides": { - "@typespec/compiler": "~1.0.0", - "@typespec/http": "~1.0.0", - "@typespec/rest": "~0.70.0", - "@typespec/versioning": "~0.70.0", - "@typespec/openapi": "~1.0.0", - "@typespec/xml": "~0.70.0", - "@typespec/events": "~0.70.0", - "@typespec/sse": "~0.70.0", - "@typespec/streams": "~0.70.0", - "@azure-tools/typespec-azure-core": "~0.56.0", - "@azure-tools/typespec-client-generator-core": "~0.56.3", - "@azure-tools/typespec-azure-resource-manager": "~0.56.2", - "@azure-tools/typespec-autorest": "~0.56.0" + "@typespec/compiler": "1.0.0", + "@typespec/http": "1.0.0", + "@typespec/rest": "0.70.0", + "@typespec/versioning": "0.70.0", + "@typespec/openapi": "1.0.0", + "@typespec/xml": "0.70.0", + "@typespec/events": "0.70.0", + "@typespec/sse": "0.70.0", + "@typespec/streams": "0.70.0", + "@azure-tools/typespec-azure-core": "0.56.0", + "@azure-tools/typespec-client-generator-core": "0.56.3", + "@azure-tools/typespec-azure-resource-manager": "0.56.2", + "@azure-tools/typespec-autorest": "0.56.0" }, "private": true } From 1e15dee2249459e21bd4bcf1adbeb529dacc7d4a Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Thu, 5 Jun 2025 12:38:06 +0800 Subject: [PATCH 10/12] update core --- core | 2 +- .../versioning/added/AddedClientBuilder.java | 22 +------ .../added/implementation/AddedClientImpl.java | 54 ++++++---------- .../implementation/InterfaceV2sImpl.java | 11 ++-- .../versioning/added/models/Versions.java | 56 ----------------- .../MadeOptionalClientBuilder.java | 22 +------ .../MadeOptionalClientImpl.java | 41 ++++--------- .../madeoptional/models/Versions.java | 56 ----------------- .../removed/RemovedClientBuilder.java | 22 +------ .../implementation/RemovedClientImpl.java | 59 ++++++------------ .../versioning/removed/models/Versions.java | 61 ------------------- .../renamedfrom/RenamedFromClientBuilder.java | 22 +------ .../implementation/NewInterfacesImpl.java | 11 ++-- .../implementation/RenamedFromClientImpl.java | 42 ++++--------- .../renamedfrom/models/Versions.java | 56 ----------------- .../ReturnTypeChangedFromClientBuilder.java | 22 +------ .../ReturnTypeChangedFromClientImpl.java | 42 ++++--------- .../models/Versions.java | 56 ----------------- .../models/package-info.java | 11 ---- .../TypeChangedFromClientBuilder.java | 22 +------ .../TypeChangedFromClientImpl.java | 41 ++++--------- .../typechangedfrom/models/Versions.java | 56 ----------------- .../versioning/added/AddedClientTests.java | 11 ++-- .../added/generated/AddedClientTestBase.java | 3 - .../madeoptional/MadeOptionalClienTests.java | 5 +- .../generated/MadeOptionalClientTestBase.java | 2 - .../removed/RemovedClientTests.java | 16 ++--- .../generated/RemovedClientTestBase.java | 2 - .../renamedfrom/RenamedFromClientTests.java | 8 +-- .../generated/RenamedFromClientTestBase.java | 3 - .../ReturnTypeChangedFromClientTests.java | 5 +- .../ReturnTypeChangedFromClientTestBase.java | 2 - .../TypeChangedFromClientTests.java | 5 +- .../TypeChangedFromClientTestBase.java | 2 - 34 files changed, 125 insertions(+), 726 deletions(-) delete mode 100644 typespec-tests/src/main/java/versioning/added/models/Versions.java delete mode 100644 typespec-tests/src/main/java/versioning/madeoptional/models/Versions.java delete mode 100644 typespec-tests/src/main/java/versioning/removed/models/Versions.java delete mode 100644 typespec-tests/src/main/java/versioning/renamedfrom/models/Versions.java delete mode 100644 typespec-tests/src/main/java/versioning/returntypechangedfrom/models/Versions.java delete mode 100644 typespec-tests/src/main/java/versioning/returntypechangedfrom/models/package-info.java delete mode 100644 typespec-tests/src/main/java/versioning/typechangedfrom/models/Versions.java diff --git a/core b/core index 717210b0a9..f3e3f70f8a 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 717210b0a93a223e4e396a6d5adc650563385b1c +Subproject commit f3e3f70f8ad33328b2a847b84e87eb22f4b69f9c diff --git a/typespec-tests/src/main/java/versioning/added/AddedClientBuilder.java b/typespec-tests/src/main/java/versioning/added/AddedClientBuilder.java index 315f09cc34..a2268237c8 100644 --- a/typespec-tests/src/main/java/versioning/added/AddedClientBuilder.java +++ b/typespec-tests/src/main/java/versioning/added/AddedClientBuilder.java @@ -36,7 +36,6 @@ import java.util.Map; import java.util.Objects; import versioning.added.implementation.AddedClientImpl; -import versioning.added.models.Versions; /** * A builder for creating a new instance of the AddedClient type. @@ -195,24 +194,6 @@ public AddedClientBuilder endpoint(String endpoint) { return this; } - /* - * Need to be set as 'v1' or 'v2' in client. - */ - @Generated - private Versions version; - - /** - * Sets Need to be set as 'v1' or 'v2' in client. - * - * @param version the version value. - * @return the AddedClientBuilder. - */ - @Generated - public AddedClientBuilder version(Versions version) { - this.version = version; - return this; - } - /* * Service version */ @@ -261,7 +242,7 @@ private AddedClientImpl buildInnerClient() { AddedServiceVersion localServiceVersion = (serviceVersion != null) ? serviceVersion : AddedServiceVersion.getLatest(); AddedClientImpl client = new AddedClientImpl(localPipeline, JacksonAdapter.createDefaultSerializerAdapter(), - this.endpoint, this.version, localServiceVersion); + this.endpoint, localServiceVersion); return client; } @@ -270,7 +251,6 @@ private void validateClient() { // This method is invoked from 'buildInnerClient'/'buildClient' method. // Developer can customize this method, to validate that the necessary conditions are met for the new client. Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); - Objects.requireNonNull(version, "'version' cannot be null."); } @Generated diff --git a/typespec-tests/src/main/java/versioning/added/implementation/AddedClientImpl.java b/typespec-tests/src/main/java/versioning/added/implementation/AddedClientImpl.java index 00515ad90a..496d8ffc24 100644 --- a/typespec-tests/src/main/java/versioning/added/implementation/AddedClientImpl.java +++ b/typespec-tests/src/main/java/versioning/added/implementation/AddedClientImpl.java @@ -32,7 +32,6 @@ import com.azure.core.util.serializer.SerializerAdapter; import reactor.core.publisher.Mono; import versioning.added.AddedServiceVersion; -import versioning.added.models.Versions; /** * Initializes a new instance of the AddedClient type. @@ -57,20 +56,6 @@ public String getEndpoint() { return this.endpoint; } - /** - * Need to be set as 'v1' or 'v2' in client. - */ - private final Versions version; - - /** - * Gets Need to be set as 'v1' or 'v2' in client. - * - * @return the version value. - */ - public Versions getVersion() { - return this.version; - } - /** * Service version. */ @@ -131,12 +116,11 @@ public InterfaceV2sImpl getInterfaceV2s() { * Initializes an instance of AddedClient client. * * @param endpoint Need to be set as 'http://localhost:3000' in client. - * @param version Need to be set as 'v1' or 'v2' in client. * @param serviceVersion Service version. */ - public AddedClientImpl(String endpoint, Versions version, AddedServiceVersion serviceVersion) { + public AddedClientImpl(String endpoint, AddedServiceVersion serviceVersion) { this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(), - JacksonAdapter.createDefaultSerializerAdapter(), endpoint, version, serviceVersion); + JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); } /** @@ -144,12 +128,10 @@ public AddedClientImpl(String endpoint, Versions version, AddedServiceVersion se * * @param httpPipeline The HTTP pipeline to send requests through. * @param endpoint Need to be set as 'http://localhost:3000' in client. - * @param version Need to be set as 'v1' or 'v2' in client. * @param serviceVersion Service version. */ - public AddedClientImpl(HttpPipeline httpPipeline, String endpoint, Versions version, - AddedServiceVersion serviceVersion) { - this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, version, serviceVersion); + public AddedClientImpl(HttpPipeline httpPipeline, String endpoint, AddedServiceVersion serviceVersion) { + this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); } /** @@ -158,15 +140,13 @@ public AddedClientImpl(HttpPipeline httpPipeline, String endpoint, Versions vers * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. * @param endpoint Need to be set as 'http://localhost:3000' in client. - * @param version Need to be set as 'v1' or 'v2' in client. * @param serviceVersion Service version. */ public AddedClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, String endpoint, - Versions version, AddedServiceVersion serviceVersion) { + AddedServiceVersion serviceVersion) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.endpoint = endpoint; - this.version = version; this.serviceVersion = serviceVersion; this.interfaceV2s = new InterfaceV2sImpl(this); this.service = RestProxy.create(AddedClientService.class, this.httpPipeline, this.getSerializerAdapter()); @@ -184,7 +164,7 @@ public interface AddedClientService { @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> v1(@HostParam("endpoint") String endpoint, @HostParam("version") Versions version, + Mono> v1(@HostParam("endpoint") String endpoint, @HostParam("version") String version, @HeaderParam("header-v2") String headerV2, @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); @@ -195,7 +175,7 @@ Mono> v1(@HostParam("endpoint") String endpoint, @HostParam @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(HttpResponseException.class) - Response v1Sync(@HostParam("endpoint") String endpoint, @HostParam("version") Versions version, + Response v1Sync(@HostParam("endpoint") String endpoint, @HostParam("version") String version, @HeaderParam("header-v2") String headerV2, @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); @@ -206,7 +186,7 @@ Response v1Sync(@HostParam("endpoint") String endpoint, @HostParam(" @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> v2(@HostParam("endpoint") String endpoint, @HostParam("version") Versions version, + Mono> v2(@HostParam("endpoint") String endpoint, @HostParam("version") String version, @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); @@ -216,7 +196,7 @@ Mono> v2(@HostParam("endpoint") String endpoint, @HostParam @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(HttpResponseException.class) - Response v2Sync(@HostParam("endpoint") String endpoint, @HostParam("version") Versions version, + Response v2Sync(@HostParam("endpoint") String endpoint, @HostParam("version") String version, @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); } @@ -261,8 +241,8 @@ public Mono> v1WithResponseAsync(String headerV2, BinaryDat RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil.withContext(context -> service.v1(this.getEndpoint(), this.getVersion(), headerV2, contentType, - accept, body, requestOptions, context)); + return FluxUtil.withContext(context -> service.v1(this.getEndpoint(), this.getServiceVersion().getVersion(), + headerV2, contentType, accept, body, requestOptions, context)); } /** @@ -304,8 +284,8 @@ public Mono> v1WithResponseAsync(String headerV2, BinaryDat public Response v1WithResponse(String headerV2, BinaryData body, RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; - return service.v1Sync(this.getEndpoint(), this.getVersion(), headerV2, contentType, accept, body, - requestOptions, Context.NONE); + return service.v1Sync(this.getEndpoint(), this.getServiceVersion().getVersion(), headerV2, contentType, accept, + body, requestOptions, Context.NONE); } /** @@ -346,8 +326,8 @@ public Response v1WithResponse(String headerV2, BinaryData body, Req public Mono> v2WithResponseAsync(BinaryData body, RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil.withContext(context -> service.v2(this.getEndpoint(), this.getVersion(), contentType, accept, - body, requestOptions, context)); + return FluxUtil.withContext(context -> service.v2(this.getEndpoint(), this.getServiceVersion().getVersion(), + contentType, accept, body, requestOptions, context)); } /** @@ -388,7 +368,7 @@ public Mono> v2WithResponseAsync(BinaryData body, RequestOp public Response v2WithResponse(BinaryData body, RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; - return service.v2Sync(this.getEndpoint(), this.getVersion(), contentType, accept, body, requestOptions, - Context.NONE); + return service.v2Sync(this.getEndpoint(), this.getServiceVersion().getVersion(), contentType, accept, body, + requestOptions, Context.NONE); } } diff --git a/typespec-tests/src/main/java/versioning/added/implementation/InterfaceV2sImpl.java b/typespec-tests/src/main/java/versioning/added/implementation/InterfaceV2sImpl.java index 13688ac1de..fd5e343787 100644 --- a/typespec-tests/src/main/java/versioning/added/implementation/InterfaceV2sImpl.java +++ b/typespec-tests/src/main/java/versioning/added/implementation/InterfaceV2sImpl.java @@ -26,7 +26,6 @@ import com.azure.core.util.FluxUtil; import reactor.core.publisher.Mono; import versioning.added.AddedServiceVersion; -import versioning.added.models.Versions; /** * An instance of this class provides access to all the operations defined in InterfaceV2s. @@ -76,7 +75,7 @@ public interface InterfaceV2sService { @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(HttpResponseException.class) Mono> v2InInterface(@HostParam("endpoint") String endpoint, - @HostParam("version") Versions version, @HeaderParam("Content-Type") String contentType, + @HostParam("version") String version, @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); @@ -87,7 +86,7 @@ Mono> v2InInterface(@HostParam("endpoint") String endpoint, @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(HttpResponseException.class) Response v2InInterfaceSync(@HostParam("endpoint") String endpoint, - @HostParam("version") Versions version, @HeaderParam("Content-Type") String contentType, + @HostParam("version") String version, @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); } @@ -131,7 +130,7 @@ public Mono> v2InInterfaceWithResponseAsync(BinaryData body final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil.withContext(context -> service.v2InInterface(this.client.getEndpoint(), - this.client.getVersion(), contentType, accept, body, requestOptions, context)); + this.client.getServiceVersion().getVersion(), contentType, accept, body, requestOptions, context)); } /** @@ -172,7 +171,7 @@ public Mono> v2InInterfaceWithResponseAsync(BinaryData body public Response v2InInterfaceWithResponse(BinaryData body, RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; - return service.v2InInterfaceSync(this.client.getEndpoint(), this.client.getVersion(), contentType, accept, body, - requestOptions, Context.NONE); + return service.v2InInterfaceSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), + contentType, accept, body, requestOptions, Context.NONE); } } diff --git a/typespec-tests/src/main/java/versioning/added/models/Versions.java b/typespec-tests/src/main/java/versioning/added/models/Versions.java deleted file mode 100644 index 9ce2d244b0..0000000000 --- a/typespec-tests/src/main/java/versioning/added/models/Versions.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package versioning.added.models; - -/** - * The version of the API. - */ -public enum Versions { - /** - * The version v1. - */ - V1("v1"), - - /** - * The version v2. - */ - V2("v2"); - - /** - * The actual serialized value for a Versions instance. - */ - private final String value; - - Versions(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a Versions instance. - * - * @param value the serialized value to parse. - * @return the parsed Versions object, or null if unable to parse. - */ - public static Versions fromString(String value) { - if (value == null) { - return null; - } - Versions[] items = Versions.values(); - for (Versions item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public String toString() { - return this.value; - } -} diff --git a/typespec-tests/src/main/java/versioning/madeoptional/MadeOptionalClientBuilder.java b/typespec-tests/src/main/java/versioning/madeoptional/MadeOptionalClientBuilder.java index 8fcb8b344b..e9b490d5c1 100644 --- a/typespec-tests/src/main/java/versioning/madeoptional/MadeOptionalClientBuilder.java +++ b/typespec-tests/src/main/java/versioning/madeoptional/MadeOptionalClientBuilder.java @@ -36,7 +36,6 @@ import java.util.Map; import java.util.Objects; import versioning.madeoptional.implementation.MadeOptionalClientImpl; -import versioning.madeoptional.models.Versions; /** * A builder for creating a new instance of the MadeOptionalClient type. @@ -190,24 +189,6 @@ public MadeOptionalClientBuilder endpoint(String endpoint) { return this; } - /* - * Need to be set as 'v1' or 'v2' in client. - */ - @Generated - private Versions version; - - /** - * Sets Need to be set as 'v1' or 'v2' in client. - * - * @param version the version value. - * @return the MadeOptionalClientBuilder. - */ - @Generated - public MadeOptionalClientBuilder version(Versions version) { - this.version = version; - return this; - } - /* * Service version */ @@ -256,7 +237,7 @@ private MadeOptionalClientImpl buildInnerClient() { MadeOptionalServiceVersion localServiceVersion = (serviceVersion != null) ? serviceVersion : MadeOptionalServiceVersion.getLatest(); MadeOptionalClientImpl client = new MadeOptionalClientImpl(localPipeline, - JacksonAdapter.createDefaultSerializerAdapter(), this.endpoint, this.version, localServiceVersion); + JacksonAdapter.createDefaultSerializerAdapter(), this.endpoint, localServiceVersion); return client; } @@ -265,7 +246,6 @@ private void validateClient() { // This method is invoked from 'buildInnerClient'/'buildClient' method. // Developer can customize this method, to validate that the necessary conditions are met for the new client. Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); - Objects.requireNonNull(version, "'version' cannot be null."); } @Generated diff --git a/typespec-tests/src/main/java/versioning/madeoptional/implementation/MadeOptionalClientImpl.java b/typespec-tests/src/main/java/versioning/madeoptional/implementation/MadeOptionalClientImpl.java index b33e858f0c..3a3bfba439 100644 --- a/typespec-tests/src/main/java/versioning/madeoptional/implementation/MadeOptionalClientImpl.java +++ b/typespec-tests/src/main/java/versioning/madeoptional/implementation/MadeOptionalClientImpl.java @@ -32,7 +32,6 @@ import com.azure.core.util.serializer.SerializerAdapter; import reactor.core.publisher.Mono; import versioning.madeoptional.MadeOptionalServiceVersion; -import versioning.madeoptional.models.Versions; /** * Initializes a new instance of the MadeOptionalClient type. @@ -57,20 +56,6 @@ public String getEndpoint() { return this.endpoint; } - /** - * Need to be set as 'v1' or 'v2' in client. - */ - private final Versions version; - - /** - * Gets Need to be set as 'v1' or 'v2' in client. - * - * @return the version value. - */ - public Versions getVersion() { - return this.version; - } - /** * Service version. */ @@ -117,12 +102,11 @@ public SerializerAdapter getSerializerAdapter() { * Initializes an instance of MadeOptionalClient client. * * @param endpoint Need to be set as 'http://localhost:3000' in client. - * @param version Need to be set as 'v1' or 'v2' in client. * @param serviceVersion Service version. */ - public MadeOptionalClientImpl(String endpoint, Versions version, MadeOptionalServiceVersion serviceVersion) { + public MadeOptionalClientImpl(String endpoint, MadeOptionalServiceVersion serviceVersion) { this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(), - JacksonAdapter.createDefaultSerializerAdapter(), endpoint, version, serviceVersion); + JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); } /** @@ -130,12 +114,11 @@ public MadeOptionalClientImpl(String endpoint, Versions version, MadeOptionalSer * * @param httpPipeline The HTTP pipeline to send requests through. * @param endpoint Need to be set as 'http://localhost:3000' in client. - * @param version Need to be set as 'v1' or 'v2' in client. * @param serviceVersion Service version. */ - public MadeOptionalClientImpl(HttpPipeline httpPipeline, String endpoint, Versions version, + public MadeOptionalClientImpl(HttpPipeline httpPipeline, String endpoint, MadeOptionalServiceVersion serviceVersion) { - this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, version, serviceVersion); + this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); } /** @@ -144,15 +127,13 @@ public MadeOptionalClientImpl(HttpPipeline httpPipeline, String endpoint, Versio * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. * @param endpoint Need to be set as 'http://localhost:3000' in client. - * @param version Need to be set as 'v1' or 'v2' in client. * @param serviceVersion Service version. */ public MadeOptionalClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, String endpoint, - Versions version, MadeOptionalServiceVersion serviceVersion) { + MadeOptionalServiceVersion serviceVersion) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.endpoint = endpoint; - this.version = version; this.serviceVersion = serviceVersion; this.service = RestProxy.create(MadeOptionalClientService.class, this.httpPipeline, this.getSerializerAdapter()); @@ -171,7 +152,7 @@ public interface MadeOptionalClientService { @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> test(@HostParam("endpoint") String endpoint, @HostParam("version") Versions version, + Mono> test(@HostParam("endpoint") String endpoint, @HostParam("version") String version, @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); @@ -181,7 +162,7 @@ Mono> test(@HostParam("endpoint") String endpoint, @HostPar @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(HttpResponseException.class) - Response testSync(@HostParam("endpoint") String endpoint, @HostParam("version") Versions version, + Response testSync(@HostParam("endpoint") String endpoint, @HostParam("version") String version, @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); } @@ -229,8 +210,8 @@ Response testSync(@HostParam("endpoint") String endpoint, @HostParam public Mono> testWithResponseAsync(BinaryData body, RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil.withContext(context -> service.test(this.getEndpoint(), this.getVersion(), contentType, accept, - body, requestOptions, context)); + return FluxUtil.withContext(context -> service.test(this.getEndpoint(), this.getServiceVersion().getVersion(), + contentType, accept, body, requestOptions, context)); } /** @@ -276,7 +257,7 @@ public Mono> testWithResponseAsync(BinaryData body, Request public Response testWithResponse(BinaryData body, RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; - return service.testSync(this.getEndpoint(), this.getVersion(), contentType, accept, body, requestOptions, - Context.NONE); + return service.testSync(this.getEndpoint(), this.getServiceVersion().getVersion(), contentType, accept, body, + requestOptions, Context.NONE); } } diff --git a/typespec-tests/src/main/java/versioning/madeoptional/models/Versions.java b/typespec-tests/src/main/java/versioning/madeoptional/models/Versions.java deleted file mode 100644 index 484bc36018..0000000000 --- a/typespec-tests/src/main/java/versioning/madeoptional/models/Versions.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package versioning.madeoptional.models; - -/** - * The version of the API. - */ -public enum Versions { - /** - * The version v1. - */ - V1("v1"), - - /** - * The version v2. - */ - V2("v2"); - - /** - * The actual serialized value for a Versions instance. - */ - private final String value; - - Versions(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a Versions instance. - * - * @param value the serialized value to parse. - * @return the parsed Versions object, or null if unable to parse. - */ - public static Versions fromString(String value) { - if (value == null) { - return null; - } - Versions[] items = Versions.values(); - for (Versions item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public String toString() { - return this.value; - } -} diff --git a/typespec-tests/src/main/java/versioning/removed/RemovedClientBuilder.java b/typespec-tests/src/main/java/versioning/removed/RemovedClientBuilder.java index 4811f2d374..26d588337a 100644 --- a/typespec-tests/src/main/java/versioning/removed/RemovedClientBuilder.java +++ b/typespec-tests/src/main/java/versioning/removed/RemovedClientBuilder.java @@ -36,7 +36,6 @@ import java.util.Map; import java.util.Objects; import versioning.removed.implementation.RemovedClientImpl; -import versioning.removed.models.Versions; /** * A builder for creating a new instance of the RemovedClient type. @@ -190,24 +189,6 @@ public RemovedClientBuilder endpoint(String endpoint) { return this; } - /* - * Need to be set as 'v1', 'v2preview' or 'v2' in client. - */ - @Generated - private Versions version; - - /** - * Sets Need to be set as 'v1', 'v2preview' or 'v2' in client. - * - * @param version the version value. - * @return the RemovedClientBuilder. - */ - @Generated - public RemovedClientBuilder version(Versions version) { - this.version = version; - return this; - } - /* * Service version */ @@ -256,7 +237,7 @@ private RemovedClientImpl buildInnerClient() { RemovedServiceVersion localServiceVersion = (serviceVersion != null) ? serviceVersion : RemovedServiceVersion.getLatest(); RemovedClientImpl client = new RemovedClientImpl(localPipeline, JacksonAdapter.createDefaultSerializerAdapter(), - this.endpoint, this.version, localServiceVersion); + this.endpoint, localServiceVersion); return client; } @@ -265,7 +246,6 @@ private void validateClient() { // This method is invoked from 'buildInnerClient'/'buildClient' method. // Developer can customize this method, to validate that the necessary conditions are met for the new client. Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); - Objects.requireNonNull(version, "'version' cannot be null."); } @Generated diff --git a/typespec-tests/src/main/java/versioning/removed/implementation/RemovedClientImpl.java b/typespec-tests/src/main/java/versioning/removed/implementation/RemovedClientImpl.java index 4a0ec64a13..1ed0e073f4 100644 --- a/typespec-tests/src/main/java/versioning/removed/implementation/RemovedClientImpl.java +++ b/typespec-tests/src/main/java/versioning/removed/implementation/RemovedClientImpl.java @@ -32,7 +32,6 @@ import com.azure.core.util.serializer.SerializerAdapter; import reactor.core.publisher.Mono; import versioning.removed.RemovedServiceVersion; -import versioning.removed.models.Versions; /** * Initializes a new instance of the RemovedClient type. @@ -57,20 +56,6 @@ public String getEndpoint() { return this.endpoint; } - /** - * Need to be set as 'v1', 'v2preview' or 'v2' in client. - */ - private final Versions version; - - /** - * Gets Need to be set as 'v1', 'v2preview' or 'v2' in client. - * - * @return the version value. - */ - public Versions getVersion() { - return this.version; - } - /** * Service version. */ @@ -117,12 +102,11 @@ public SerializerAdapter getSerializerAdapter() { * Initializes an instance of RemovedClient client. * * @param endpoint Need to be set as 'http://localhost:3000' in client. - * @param version Need to be set as 'v1', 'v2preview' or 'v2' in client. * @param serviceVersion Service version. */ - public RemovedClientImpl(String endpoint, Versions version, RemovedServiceVersion serviceVersion) { + public RemovedClientImpl(String endpoint, RemovedServiceVersion serviceVersion) { this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(), - JacksonAdapter.createDefaultSerializerAdapter(), endpoint, version, serviceVersion); + JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); } /** @@ -130,12 +114,10 @@ public RemovedClientImpl(String endpoint, Versions version, RemovedServiceVersio * * @param httpPipeline The HTTP pipeline to send requests through. * @param endpoint Need to be set as 'http://localhost:3000' in client. - * @param version Need to be set as 'v1', 'v2preview' or 'v2' in client. * @param serviceVersion Service version. */ - public RemovedClientImpl(HttpPipeline httpPipeline, String endpoint, Versions version, - RemovedServiceVersion serviceVersion) { - this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, version, serviceVersion); + public RemovedClientImpl(HttpPipeline httpPipeline, String endpoint, RemovedServiceVersion serviceVersion) { + this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); } /** @@ -144,15 +126,13 @@ public RemovedClientImpl(HttpPipeline httpPipeline, String endpoint, Versions ve * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. * @param endpoint Need to be set as 'http://localhost:3000' in client. - * @param version Need to be set as 'v1', 'v2preview' or 'v2' in client. * @param serviceVersion Service version. */ public RemovedClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, String endpoint, - Versions version, RemovedServiceVersion serviceVersion) { + RemovedServiceVersion serviceVersion) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.endpoint = endpoint; - this.version = version; this.serviceVersion = serviceVersion; this.service = RestProxy.create(RemovedClientService.class, this.httpPipeline, this.getSerializerAdapter()); } @@ -169,7 +149,7 @@ public interface RemovedClientService { @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> v2(@HostParam("endpoint") String endpoint, @HostParam("version") Versions version, + Mono> v2(@HostParam("endpoint") String endpoint, @HostParam("version") String version, @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); @@ -179,7 +159,7 @@ Mono> v2(@HostParam("endpoint") String endpoint, @HostParam @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(HttpResponseException.class) - Response v2Sync(@HostParam("endpoint") String endpoint, @HostParam("version") Versions version, + Response v2Sync(@HostParam("endpoint") String endpoint, @HostParam("version") String version, @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); @@ -189,10 +169,9 @@ Response v2Sync(@HostParam("endpoint") String endpoint, @HostParam(" @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> modelV3(@HostParam("endpoint") String endpoint, - @HostParam("version") Versions version, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, - RequestOptions requestOptions, Context context); + Mono> modelV3(@HostParam("endpoint") String endpoint, @HostParam("version") String version, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); @Post("/v3") @ExpectedResponses({ 200 }) @@ -200,7 +179,7 @@ Mono> modelV3(@HostParam("endpoint") String endpoint, @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(HttpResponseException.class) - Response modelV3Sync(@HostParam("endpoint") String endpoint, @HostParam("version") Versions version, + Response modelV3Sync(@HostParam("endpoint") String endpoint, @HostParam("version") String version, @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); } @@ -243,8 +222,8 @@ Response modelV3Sync(@HostParam("endpoint") String endpoint, @HostPa public Mono> v2WithResponseAsync(BinaryData body, RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil.withContext(context -> service.v2(this.getEndpoint(), this.getVersion(), contentType, accept, - body, requestOptions, context)); + return FluxUtil.withContext(context -> service.v2(this.getEndpoint(), this.getServiceVersion().getVersion(), + contentType, accept, body, requestOptions, context)); } /** @@ -285,8 +264,8 @@ public Mono> v2WithResponseAsync(BinaryData body, RequestOp public Response v2WithResponse(BinaryData body, RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; - return service.v2Sync(this.getEndpoint(), this.getVersion(), contentType, accept, body, requestOptions, - Context.NONE); + return service.v2Sync(this.getEndpoint(), this.getServiceVersion().getVersion(), contentType, accept, body, + requestOptions, Context.NONE); } /** @@ -325,8 +304,8 @@ public Response v2WithResponse(BinaryData body, RequestOptions reque public Mono> modelV3WithResponseAsync(BinaryData body, RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil.withContext(context -> service.modelV3(this.getEndpoint(), this.getVersion(), contentType, - accept, body, requestOptions, context)); + return FluxUtil.withContext(context -> service.modelV3(this.getEndpoint(), + this.getServiceVersion().getVersion(), contentType, accept, body, requestOptions, context)); } /** @@ -365,7 +344,7 @@ public Mono> modelV3WithResponseAsync(BinaryData body, Requ public Response modelV3WithResponse(BinaryData body, RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; - return service.modelV3Sync(this.getEndpoint(), this.getVersion(), contentType, accept, body, requestOptions, - Context.NONE); + return service.modelV3Sync(this.getEndpoint(), this.getServiceVersion().getVersion(), contentType, accept, body, + requestOptions, Context.NONE); } } diff --git a/typespec-tests/src/main/java/versioning/removed/models/Versions.java b/typespec-tests/src/main/java/versioning/removed/models/Versions.java deleted file mode 100644 index 9c1ad1685f..0000000000 --- a/typespec-tests/src/main/java/versioning/removed/models/Versions.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package versioning.removed.models; - -/** - * The version of the API. - */ -public enum Versions { - /** - * The version v1. - */ - V1("v1"), - - /** - * The V2 Preview version. - */ - V2PREVIEW("v2preview"), - - /** - * The version v2. - */ - V2("v2"); - - /** - * The actual serialized value for a Versions instance. - */ - private final String value; - - Versions(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a Versions instance. - * - * @param value the serialized value to parse. - * @return the parsed Versions object, or null if unable to parse. - */ - public static Versions fromString(String value) { - if (value == null) { - return null; - } - Versions[] items = Versions.values(); - for (Versions item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public String toString() { - return this.value; - } -} diff --git a/typespec-tests/src/main/java/versioning/renamedfrom/RenamedFromClientBuilder.java b/typespec-tests/src/main/java/versioning/renamedfrom/RenamedFromClientBuilder.java index 67be5b5705..144a97dd4a 100644 --- a/typespec-tests/src/main/java/versioning/renamedfrom/RenamedFromClientBuilder.java +++ b/typespec-tests/src/main/java/versioning/renamedfrom/RenamedFromClientBuilder.java @@ -36,7 +36,6 @@ import java.util.Map; import java.util.Objects; import versioning.renamedfrom.implementation.RenamedFromClientImpl; -import versioning.renamedfrom.models.Versions; /** * A builder for creating a new instance of the RenamedFromClient type. @@ -195,24 +194,6 @@ public RenamedFromClientBuilder endpoint(String endpoint) { return this; } - /* - * Need to be set as 'v1' or 'v2' in client. - */ - @Generated - private Versions version; - - /** - * Sets Need to be set as 'v1' or 'v2' in client. - * - * @param version the version value. - * @return the RenamedFromClientBuilder. - */ - @Generated - public RenamedFromClientBuilder version(Versions version) { - this.version = version; - return this; - } - /* * Service version */ @@ -261,7 +242,7 @@ private RenamedFromClientImpl buildInnerClient() { RenamedFromServiceVersion localServiceVersion = (serviceVersion != null) ? serviceVersion : RenamedFromServiceVersion.getLatest(); RenamedFromClientImpl client = new RenamedFromClientImpl(localPipeline, - JacksonAdapter.createDefaultSerializerAdapter(), this.endpoint, this.version, localServiceVersion); + JacksonAdapter.createDefaultSerializerAdapter(), this.endpoint, localServiceVersion); return client; } @@ -270,7 +251,6 @@ private void validateClient() { // This method is invoked from 'buildInnerClient'/'buildClient' method. // Developer can customize this method, to validate that the necessary conditions are met for the new client. Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); - Objects.requireNonNull(version, "'version' cannot be null."); } @Generated diff --git a/typespec-tests/src/main/java/versioning/renamedfrom/implementation/NewInterfacesImpl.java b/typespec-tests/src/main/java/versioning/renamedfrom/implementation/NewInterfacesImpl.java index cfc8b94935..863320871a 100644 --- a/typespec-tests/src/main/java/versioning/renamedfrom/implementation/NewInterfacesImpl.java +++ b/typespec-tests/src/main/java/versioning/renamedfrom/implementation/NewInterfacesImpl.java @@ -26,7 +26,6 @@ import com.azure.core.util.FluxUtil; import reactor.core.publisher.Mono; import versioning.renamedfrom.RenamedFromServiceVersion; -import versioning.renamedfrom.models.Versions; /** * An instance of this class provides access to all the operations defined in NewInterfaces. @@ -76,7 +75,7 @@ public interface NewInterfacesService { @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(HttpResponseException.class) Mono> newOpInNewInterface(@HostParam("endpoint") String endpoint, - @HostParam("version") Versions version, @HeaderParam("Content-Type") String contentType, + @HostParam("version") String version, @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); @@ -87,7 +86,7 @@ Mono> newOpInNewInterface(@HostParam("endpoint") String end @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(HttpResponseException.class) Response newOpInNewInterfaceSync(@HostParam("endpoint") String endpoint, - @HostParam("version") Versions version, @HeaderParam("Content-Type") String contentType, + @HostParam("version") String version, @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); } @@ -132,7 +131,7 @@ public Mono> newOpInNewInterfaceWithResponseAsync(BinaryDat final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil.withContext(context -> service.newOpInNewInterface(this.client.getEndpoint(), - this.client.getVersion(), contentType, accept, body, requestOptions, context)); + this.client.getServiceVersion().getVersion(), contentType, accept, body, requestOptions, context)); } /** @@ -173,7 +172,7 @@ public Mono> newOpInNewInterfaceWithResponseAsync(BinaryDat public Response newOpInNewInterfaceWithResponse(BinaryData body, RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; - return service.newOpInNewInterfaceSync(this.client.getEndpoint(), this.client.getVersion(), contentType, accept, - body, requestOptions, Context.NONE); + return service.newOpInNewInterfaceSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), + contentType, accept, body, requestOptions, Context.NONE); } } diff --git a/typespec-tests/src/main/java/versioning/renamedfrom/implementation/RenamedFromClientImpl.java b/typespec-tests/src/main/java/versioning/renamedfrom/implementation/RenamedFromClientImpl.java index 4a1ffb5bed..c2c0fcac86 100644 --- a/typespec-tests/src/main/java/versioning/renamedfrom/implementation/RenamedFromClientImpl.java +++ b/typespec-tests/src/main/java/versioning/renamedfrom/implementation/RenamedFromClientImpl.java @@ -33,7 +33,6 @@ import com.azure.core.util.serializer.SerializerAdapter; import reactor.core.publisher.Mono; import versioning.renamedfrom.RenamedFromServiceVersion; -import versioning.renamedfrom.models.Versions; /** * Initializes a new instance of the RenamedFromClient type. @@ -58,20 +57,6 @@ public String getEndpoint() { return this.endpoint; } - /** - * Need to be set as 'v1' or 'v2' in client. - */ - private final Versions version; - - /** - * Gets Need to be set as 'v1' or 'v2' in client. - * - * @return the version value. - */ - public Versions getVersion() { - return this.version; - } - /** * Service version. */ @@ -132,12 +117,11 @@ public NewInterfacesImpl getNewInterfaces() { * Initializes an instance of RenamedFromClient client. * * @param endpoint Need to be set as 'http://localhost:3000' in client. - * @param version Need to be set as 'v1' or 'v2' in client. * @param serviceVersion Service version. */ - public RenamedFromClientImpl(String endpoint, Versions version, RenamedFromServiceVersion serviceVersion) { + public RenamedFromClientImpl(String endpoint, RenamedFromServiceVersion serviceVersion) { this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(), - JacksonAdapter.createDefaultSerializerAdapter(), endpoint, version, serviceVersion); + JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); } /** @@ -145,12 +129,10 @@ public RenamedFromClientImpl(String endpoint, Versions version, RenamedFromServi * * @param httpPipeline The HTTP pipeline to send requests through. * @param endpoint Need to be set as 'http://localhost:3000' in client. - * @param version Need to be set as 'v1' or 'v2' in client. * @param serviceVersion Service version. */ - public RenamedFromClientImpl(HttpPipeline httpPipeline, String endpoint, Versions version, - RenamedFromServiceVersion serviceVersion) { - this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, version, serviceVersion); + public RenamedFromClientImpl(HttpPipeline httpPipeline, String endpoint, RenamedFromServiceVersion serviceVersion) { + this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); } /** @@ -159,15 +141,13 @@ public RenamedFromClientImpl(HttpPipeline httpPipeline, String endpoint, Version * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. * @param endpoint Need to be set as 'http://localhost:3000' in client. - * @param version Need to be set as 'v1' or 'v2' in client. * @param serviceVersion Service version. */ public RenamedFromClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, String endpoint, - Versions version, RenamedFromServiceVersion serviceVersion) { + RenamedFromServiceVersion serviceVersion) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.endpoint = endpoint; - this.version = version; this.serviceVersion = serviceVersion; this.newInterfaces = new NewInterfacesImpl(this); this.service = RestProxy.create(RenamedFromClientService.class, this.httpPipeline, this.getSerializerAdapter()); @@ -186,7 +166,7 @@ public interface RenamedFromClientService { @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> newOp(@HostParam("endpoint") String endpoint, @HostParam("version") Versions version, + Mono> newOp(@HostParam("endpoint") String endpoint, @HostParam("version") String version, @QueryParam("newQuery") String newQuery, @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); @@ -197,7 +177,7 @@ Mono> newOp(@HostParam("endpoint") String endpoint, @HostPa @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(HttpResponseException.class) - Response newOpSync(@HostParam("endpoint") String endpoint, @HostParam("version") Versions version, + Response newOpSync(@HostParam("endpoint") String endpoint, @HostParam("version") String version, @QueryParam("newQuery") String newQuery, @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); @@ -243,8 +223,8 @@ public Mono> newOpWithResponseAsync(String newQuery, Binary RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil.withContext(context -> service.newOp(this.getEndpoint(), this.getVersion(), newQuery, - contentType, accept, body, requestOptions, context)); + return FluxUtil.withContext(context -> service.newOp(this.getEndpoint(), this.getServiceVersion().getVersion(), + newQuery, contentType, accept, body, requestOptions, context)); } /** @@ -286,7 +266,7 @@ public Mono> newOpWithResponseAsync(String newQuery, Binary public Response newOpWithResponse(String newQuery, BinaryData body, RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; - return service.newOpSync(this.getEndpoint(), this.getVersion(), newQuery, contentType, accept, body, - requestOptions, Context.NONE); + return service.newOpSync(this.getEndpoint(), this.getServiceVersion().getVersion(), newQuery, contentType, + accept, body, requestOptions, Context.NONE); } } diff --git a/typespec-tests/src/main/java/versioning/renamedfrom/models/Versions.java b/typespec-tests/src/main/java/versioning/renamedfrom/models/Versions.java deleted file mode 100644 index 574cbf58d0..0000000000 --- a/typespec-tests/src/main/java/versioning/renamedfrom/models/Versions.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package versioning.renamedfrom.models; - -/** - * The version of the API. - */ -public enum Versions { - /** - * The version v1. - */ - V1("v1"), - - /** - * The version v2. - */ - V2("v2"); - - /** - * The actual serialized value for a Versions instance. - */ - private final String value; - - Versions(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a Versions instance. - * - * @param value the serialized value to parse. - * @return the parsed Versions object, or null if unable to parse. - */ - public static Versions fromString(String value) { - if (value == null) { - return null; - } - Versions[] items = Versions.values(); - for (Versions item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public String toString() { - return this.value; - } -} diff --git a/typespec-tests/src/main/java/versioning/returntypechangedfrom/ReturnTypeChangedFromClientBuilder.java b/typespec-tests/src/main/java/versioning/returntypechangedfrom/ReturnTypeChangedFromClientBuilder.java index 7073304441..0d63f6ec55 100644 --- a/typespec-tests/src/main/java/versioning/returntypechangedfrom/ReturnTypeChangedFromClientBuilder.java +++ b/typespec-tests/src/main/java/versioning/returntypechangedfrom/ReturnTypeChangedFromClientBuilder.java @@ -36,7 +36,6 @@ import java.util.Map; import java.util.Objects; import versioning.returntypechangedfrom.implementation.ReturnTypeChangedFromClientImpl; -import versioning.returntypechangedfrom.models.Versions; /** * A builder for creating a new instance of the ReturnTypeChangedFromClient type. @@ -191,24 +190,6 @@ public ReturnTypeChangedFromClientBuilder endpoint(String endpoint) { return this; } - /* - * Need to be set as 'v1' or 'v2' in client. - */ - @Generated - private Versions version; - - /** - * Sets Need to be set as 'v1' or 'v2' in client. - * - * @param version the version value. - * @return the ReturnTypeChangedFromClientBuilder. - */ - @Generated - public ReturnTypeChangedFromClientBuilder version(Versions version) { - this.version = version; - return this; - } - /* * Service version */ @@ -257,7 +238,7 @@ private ReturnTypeChangedFromClientImpl buildInnerClient() { ReturnTypeChangedFromServiceVersion localServiceVersion = (serviceVersion != null) ? serviceVersion : ReturnTypeChangedFromServiceVersion.getLatest(); ReturnTypeChangedFromClientImpl client = new ReturnTypeChangedFromClientImpl(localPipeline, - JacksonAdapter.createDefaultSerializerAdapter(), this.endpoint, this.version, localServiceVersion); + JacksonAdapter.createDefaultSerializerAdapter(), this.endpoint, localServiceVersion); return client; } @@ -266,7 +247,6 @@ private void validateClient() { // This method is invoked from 'buildInnerClient'/'buildClient' method. // Developer can customize this method, to validate that the necessary conditions are met for the new client. Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); - Objects.requireNonNull(version, "'version' cannot be null."); } @Generated diff --git a/typespec-tests/src/main/java/versioning/returntypechangedfrom/implementation/ReturnTypeChangedFromClientImpl.java b/typespec-tests/src/main/java/versioning/returntypechangedfrom/implementation/ReturnTypeChangedFromClientImpl.java index 078a11e388..d87c9beb9a 100644 --- a/typespec-tests/src/main/java/versioning/returntypechangedfrom/implementation/ReturnTypeChangedFromClientImpl.java +++ b/typespec-tests/src/main/java/versioning/returntypechangedfrom/implementation/ReturnTypeChangedFromClientImpl.java @@ -32,7 +32,6 @@ import com.azure.core.util.serializer.SerializerAdapter; import reactor.core.publisher.Mono; import versioning.returntypechangedfrom.ReturnTypeChangedFromServiceVersion; -import versioning.returntypechangedfrom.models.Versions; /** * Initializes a new instance of the ReturnTypeChangedFromClient type. @@ -57,20 +56,6 @@ public String getEndpoint() { return this.endpoint; } - /** - * Need to be set as 'v1' or 'v2' in client. - */ - private final Versions version; - - /** - * Gets Need to be set as 'v1' or 'v2' in client. - * - * @return the version value. - */ - public Versions getVersion() { - return this.version; - } - /** * Service version. */ @@ -117,13 +102,11 @@ public SerializerAdapter getSerializerAdapter() { * Initializes an instance of ReturnTypeChangedFromClient client. * * @param endpoint Need to be set as 'http://localhost:3000' in client. - * @param version Need to be set as 'v1' or 'v2' in client. * @param serviceVersion Service version. */ - public ReturnTypeChangedFromClientImpl(String endpoint, Versions version, - ReturnTypeChangedFromServiceVersion serviceVersion) { + public ReturnTypeChangedFromClientImpl(String endpoint, ReturnTypeChangedFromServiceVersion serviceVersion) { this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(), - JacksonAdapter.createDefaultSerializerAdapter(), endpoint, version, serviceVersion); + JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); } /** @@ -131,12 +114,11 @@ public ReturnTypeChangedFromClientImpl(String endpoint, Versions version, * * @param httpPipeline The HTTP pipeline to send requests through. * @param endpoint Need to be set as 'http://localhost:3000' in client. - * @param version Need to be set as 'v1' or 'v2' in client. * @param serviceVersion Service version. */ - public ReturnTypeChangedFromClientImpl(HttpPipeline httpPipeline, String endpoint, Versions version, + public ReturnTypeChangedFromClientImpl(HttpPipeline httpPipeline, String endpoint, ReturnTypeChangedFromServiceVersion serviceVersion) { - this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, version, serviceVersion); + this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); } /** @@ -145,15 +127,13 @@ public ReturnTypeChangedFromClientImpl(HttpPipeline httpPipeline, String endpoin * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. * @param endpoint Need to be set as 'http://localhost:3000' in client. - * @param version Need to be set as 'v1' or 'v2' in client. * @param serviceVersion Service version. */ public ReturnTypeChangedFromClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, - String endpoint, Versions version, ReturnTypeChangedFromServiceVersion serviceVersion) { + String endpoint, ReturnTypeChangedFromServiceVersion serviceVersion) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.endpoint = endpoint; - this.version = version; this.serviceVersion = serviceVersion; this.service = RestProxy.create(ReturnTypeChangedFromClientService.class, this.httpPipeline, this.getSerializerAdapter()); @@ -172,7 +152,7 @@ public interface ReturnTypeChangedFromClientService { @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> test(@HostParam("endpoint") String endpoint, @HostParam("version") Versions version, + Mono> test(@HostParam("endpoint") String endpoint, @HostParam("version") String version, @HeaderParam("content-type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); @@ -182,7 +162,7 @@ Mono> test(@HostParam("endpoint") String endpoint, @HostPar @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(HttpResponseException.class) - Response testSync(@HostParam("endpoint") String endpoint, @HostParam("version") Versions version, + Response testSync(@HostParam("endpoint") String endpoint, @HostParam("version") String version, @HeaderParam("content-type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); } @@ -217,8 +197,8 @@ Response testSync(@HostParam("endpoint") String endpoint, @HostParam public Mono> testWithResponseAsync(BinaryData body, RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil.withContext(context -> service.test(this.getEndpoint(), this.getVersion(), contentType, accept, - body, requestOptions, context)); + return FluxUtil.withContext(context -> service.test(this.getEndpoint(), this.getServiceVersion().getVersion(), + contentType, accept, body, requestOptions, context)); } /** @@ -251,7 +231,7 @@ public Mono> testWithResponseAsync(BinaryData body, Request public Response testWithResponse(BinaryData body, RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; - return service.testSync(this.getEndpoint(), this.getVersion(), contentType, accept, body, requestOptions, - Context.NONE); + return service.testSync(this.getEndpoint(), this.getServiceVersion().getVersion(), contentType, accept, body, + requestOptions, Context.NONE); } } diff --git a/typespec-tests/src/main/java/versioning/returntypechangedfrom/models/Versions.java b/typespec-tests/src/main/java/versioning/returntypechangedfrom/models/Versions.java deleted file mode 100644 index 644972abe6..0000000000 --- a/typespec-tests/src/main/java/versioning/returntypechangedfrom/models/Versions.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package versioning.returntypechangedfrom.models; - -/** - * The version of the API. - */ -public enum Versions { - /** - * The version v1. - */ - V1("v1"), - - /** - * The version v2. - */ - V2("v2"); - - /** - * The actual serialized value for a Versions instance. - */ - private final String value; - - Versions(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a Versions instance. - * - * @param value the serialized value to parse. - * @return the parsed Versions object, or null if unable to parse. - */ - public static Versions fromString(String value) { - if (value == null) { - return null; - } - Versions[] items = Versions.values(); - for (Versions item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public String toString() { - return this.value; - } -} diff --git a/typespec-tests/src/main/java/versioning/returntypechangedfrom/models/package-info.java b/typespec-tests/src/main/java/versioning/returntypechangedfrom/models/package-info.java deleted file mode 100644 index f35f312267..0000000000 --- a/typespec-tests/src/main/java/versioning/returntypechangedfrom/models/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -/** - * - * Package containing the data models for ReturnTypeChangedFrom. - * Test for the `@returnTypeChangedFrom` decorator. - * - */ -package versioning.returntypechangedfrom.models; diff --git a/typespec-tests/src/main/java/versioning/typechangedfrom/TypeChangedFromClientBuilder.java b/typespec-tests/src/main/java/versioning/typechangedfrom/TypeChangedFromClientBuilder.java index 82f9af95b6..25a8e6f43c 100644 --- a/typespec-tests/src/main/java/versioning/typechangedfrom/TypeChangedFromClientBuilder.java +++ b/typespec-tests/src/main/java/versioning/typechangedfrom/TypeChangedFromClientBuilder.java @@ -36,7 +36,6 @@ import java.util.Map; import java.util.Objects; import versioning.typechangedfrom.implementation.TypeChangedFromClientImpl; -import versioning.typechangedfrom.models.Versions; /** * A builder for creating a new instance of the TypeChangedFromClient type. @@ -191,24 +190,6 @@ public TypeChangedFromClientBuilder endpoint(String endpoint) { return this; } - /* - * Need to be set as 'v1' or 'v2' in client. - */ - @Generated - private Versions version; - - /** - * Sets Need to be set as 'v1' or 'v2' in client. - * - * @param version the version value. - * @return the TypeChangedFromClientBuilder. - */ - @Generated - public TypeChangedFromClientBuilder version(Versions version) { - this.version = version; - return this; - } - /* * Service version */ @@ -257,7 +238,7 @@ private TypeChangedFromClientImpl buildInnerClient() { TypeChangedFromServiceVersion localServiceVersion = (serviceVersion != null) ? serviceVersion : TypeChangedFromServiceVersion.getLatest(); TypeChangedFromClientImpl client = new TypeChangedFromClientImpl(localPipeline, - JacksonAdapter.createDefaultSerializerAdapter(), this.endpoint, this.version, localServiceVersion); + JacksonAdapter.createDefaultSerializerAdapter(), this.endpoint, localServiceVersion); return client; } @@ -266,7 +247,6 @@ private void validateClient() { // This method is invoked from 'buildInnerClient'/'buildClient' method. // Developer can customize this method, to validate that the necessary conditions are met for the new client. Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); - Objects.requireNonNull(version, "'version' cannot be null."); } @Generated diff --git a/typespec-tests/src/main/java/versioning/typechangedfrom/implementation/TypeChangedFromClientImpl.java b/typespec-tests/src/main/java/versioning/typechangedfrom/implementation/TypeChangedFromClientImpl.java index b13499ec85..499f5b8cf4 100644 --- a/typespec-tests/src/main/java/versioning/typechangedfrom/implementation/TypeChangedFromClientImpl.java +++ b/typespec-tests/src/main/java/versioning/typechangedfrom/implementation/TypeChangedFromClientImpl.java @@ -33,7 +33,6 @@ import com.azure.core.util.serializer.SerializerAdapter; import reactor.core.publisher.Mono; import versioning.typechangedfrom.TypeChangedFromServiceVersion; -import versioning.typechangedfrom.models.Versions; /** * Initializes a new instance of the TypeChangedFromClient type. @@ -58,20 +57,6 @@ public String getEndpoint() { return this.endpoint; } - /** - * Need to be set as 'v1' or 'v2' in client. - */ - private final Versions version; - - /** - * Gets Need to be set as 'v1' or 'v2' in client. - * - * @return the version value. - */ - public Versions getVersion() { - return this.version; - } - /** * Service version. */ @@ -118,12 +103,11 @@ public SerializerAdapter getSerializerAdapter() { * Initializes an instance of TypeChangedFromClient client. * * @param endpoint Need to be set as 'http://localhost:3000' in client. - * @param version Need to be set as 'v1' or 'v2' in client. * @param serviceVersion Service version. */ - public TypeChangedFromClientImpl(String endpoint, Versions version, TypeChangedFromServiceVersion serviceVersion) { + public TypeChangedFromClientImpl(String endpoint, TypeChangedFromServiceVersion serviceVersion) { this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(), - JacksonAdapter.createDefaultSerializerAdapter(), endpoint, version, serviceVersion); + JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); } /** @@ -131,12 +115,11 @@ public TypeChangedFromClientImpl(String endpoint, Versions version, TypeChangedF * * @param httpPipeline The HTTP pipeline to send requests through. * @param endpoint Need to be set as 'http://localhost:3000' in client. - * @param version Need to be set as 'v1' or 'v2' in client. * @param serviceVersion Service version. */ - public TypeChangedFromClientImpl(HttpPipeline httpPipeline, String endpoint, Versions version, + public TypeChangedFromClientImpl(HttpPipeline httpPipeline, String endpoint, TypeChangedFromServiceVersion serviceVersion) { - this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, version, serviceVersion); + this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); } /** @@ -145,15 +128,13 @@ public TypeChangedFromClientImpl(HttpPipeline httpPipeline, String endpoint, Ver * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. * @param endpoint Need to be set as 'http://localhost:3000' in client. - * @param version Need to be set as 'v1' or 'v2' in client. * @param serviceVersion Service version. */ public TypeChangedFromClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, String endpoint, - Versions version, TypeChangedFromServiceVersion serviceVersion) { + TypeChangedFromServiceVersion serviceVersion) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.endpoint = endpoint; - this.version = version; this.serviceVersion = serviceVersion; this.service = RestProxy.create(TypeChangedFromClientService.class, this.httpPipeline, this.getSerializerAdapter()); @@ -172,7 +153,7 @@ public interface TypeChangedFromClientService { @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> test(@HostParam("endpoint") String endpoint, @HostParam("version") Versions version, + Mono> test(@HostParam("endpoint") String endpoint, @HostParam("version") String version, @QueryParam("param") String param, @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); @@ -183,7 +164,7 @@ Mono> test(@HostParam("endpoint") String endpoint, @HostPar @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(HttpResponseException.class) - Response testSync(@HostParam("endpoint") String endpoint, @HostParam("version") Versions version, + Response testSync(@HostParam("endpoint") String endpoint, @HostParam("version") String version, @QueryParam("param") String param, @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); @@ -227,8 +208,8 @@ public Mono> testWithResponseAsync(String param, BinaryData RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil.withContext(context -> service.test(this.getEndpoint(), this.getVersion(), param, contentType, - accept, body, requestOptions, context)); + return FluxUtil.withContext(context -> service.test(this.getEndpoint(), this.getServiceVersion().getVersion(), + param, contentType, accept, body, requestOptions, context)); } /** @@ -268,7 +249,7 @@ public Mono> testWithResponseAsync(String param, BinaryData public Response testWithResponse(String param, BinaryData body, RequestOptions requestOptions) { final String contentType = "application/json"; final String accept = "application/json"; - return service.testSync(this.getEndpoint(), this.getVersion(), param, contentType, accept, body, requestOptions, - Context.NONE); + return service.testSync(this.getEndpoint(), this.getServiceVersion().getVersion(), param, contentType, accept, + body, requestOptions, Context.NONE); } } diff --git a/typespec-tests/src/main/java/versioning/typechangedfrom/models/Versions.java b/typespec-tests/src/main/java/versioning/typechangedfrom/models/Versions.java deleted file mode 100644 index 1dc8163ab0..0000000000 --- a/typespec-tests/src/main/java/versioning/typechangedfrom/models/Versions.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package versioning.typechangedfrom.models; - -/** - * The version of the API. - */ -public enum Versions { - /** - * The version v1. - */ - V1("v1"), - - /** - * The version v2. - */ - V2("v2"); - - /** - * The actual serialized value for a Versions instance. - */ - private final String value; - - Versions(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a Versions instance. - * - * @param value the serialized value to parse. - * @return the parsed Versions object, or null if unable to parse. - */ - public static Versions fromString(String value) { - if (value == null) { - return null; - } - Versions[] items = Versions.values(); - for (Versions item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public String toString() { - return this.value; - } -} diff --git a/typespec-tests/src/test/java/versioning/added/AddedClientTests.java b/typespec-tests/src/test/java/versioning/added/AddedClientTests.java index 6144a80867..3869a5db96 100644 --- a/typespec-tests/src/test/java/versioning/added/AddedClientTests.java +++ b/typespec-tests/src/test/java/versioning/added/AddedClientTests.java @@ -9,13 +9,14 @@ import versioning.added.models.EnumV2; import versioning.added.models.ModelV1; import versioning.added.models.ModelV2; -import versioning.added.models.Versions; public class AddedClientTests { - private final AddedClient addedClient - = new AddedClientBuilder().endpoint("http://localhost:3000").version(Versions.V2).buildClient(); - private final InterfaceV2Client interfaceV2Client - = new AddedClientBuilder().endpoint("http://localhost:3000").version(Versions.V2).buildInterfaceV2Client(); + private final AddedClient addedClient = new AddedClientBuilder().endpoint("http://localhost:3000") + .serviceVersion(AddedServiceVersion.V2) + .buildClient(); + private final InterfaceV2Client interfaceV2Client = new AddedClientBuilder().endpoint("http://localhost:3000") + .serviceVersion(AddedServiceVersion.V2) + .buildInterfaceV2Client(); @Test public void testAddedClient() { diff --git a/typespec-tests/src/test/java/versioning/added/generated/AddedClientTestBase.java b/typespec-tests/src/test/java/versioning/added/generated/AddedClientTestBase.java index ad5fc7557c..5d798c37d2 100644 --- a/typespec-tests/src/test/java/versioning/added/generated/AddedClientTestBase.java +++ b/typespec-tests/src/test/java/versioning/added/generated/AddedClientTestBase.java @@ -16,7 +16,6 @@ import versioning.added.AddedClient; import versioning.added.AddedClientBuilder; import versioning.added.InterfaceV2Client; -import versioning.added.models.Versions; class AddedClientTestBase extends TestProxyTestBase { protected AddedClient addedClient; @@ -27,7 +26,6 @@ class AddedClientTestBase extends TestProxyTestBase { protected void beforeTest() { AddedClientBuilder addedClientbuilder = new AddedClientBuilder().endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) - .version(Versions.fromString(Configuration.getGlobalConfiguration().get("VERSION", "version"))) .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); if (getTestMode() == TestMode.RECORD) { @@ -37,7 +35,6 @@ protected void beforeTest() { AddedClientBuilder interfaceV2Clientbuilder = new AddedClientBuilder().endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) - .version(Versions.fromString(Configuration.getGlobalConfiguration().get("VERSION", "version"))) .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); if (getTestMode() == TestMode.RECORD) { diff --git a/typespec-tests/src/test/java/versioning/madeoptional/MadeOptionalClienTests.java b/typespec-tests/src/test/java/versioning/madeoptional/MadeOptionalClienTests.java index 10de77bd0a..3b2d8a7b3a 100644 --- a/typespec-tests/src/test/java/versioning/madeoptional/MadeOptionalClienTests.java +++ b/typespec-tests/src/test/java/versioning/madeoptional/MadeOptionalClienTests.java @@ -5,11 +5,12 @@ import org.junit.jupiter.api.Test; import versioning.madeoptional.models.TestModel; -import versioning.madeoptional.models.Versions; public class MadeOptionalClienTests { private final MadeOptionalClient madeOptionalClient - = new MadeOptionalClientBuilder().endpoint("http://localhost:3000").version(Versions.V2).buildClient(); + = new MadeOptionalClientBuilder().endpoint("http://localhost:3000") + .serviceVersion(MadeOptionalServiceVersion.V2) + .buildClient(); @Test public void testMadeOptionalClient() { diff --git a/typespec-tests/src/test/java/versioning/madeoptional/generated/MadeOptionalClientTestBase.java b/typespec-tests/src/test/java/versioning/madeoptional/generated/MadeOptionalClientTestBase.java index 81f097c26b..5a44848e0d 100644 --- a/typespec-tests/src/test/java/versioning/madeoptional/generated/MadeOptionalClientTestBase.java +++ b/typespec-tests/src/test/java/versioning/madeoptional/generated/MadeOptionalClientTestBase.java @@ -15,7 +15,6 @@ import com.azure.core.util.Configuration; import versioning.madeoptional.MadeOptionalClient; import versioning.madeoptional.MadeOptionalClientBuilder; -import versioning.madeoptional.models.Versions; class MadeOptionalClientTestBase extends TestProxyTestBase { protected MadeOptionalClient madeOptionalClient; @@ -24,7 +23,6 @@ class MadeOptionalClientTestBase extends TestProxyTestBase { protected void beforeTest() { MadeOptionalClientBuilder madeOptionalClientbuilder = new MadeOptionalClientBuilder() .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) - .version(Versions.fromString(Configuration.getGlobalConfiguration().get("VERSION", "version"))) .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); if (getTestMode() == TestMode.RECORD) { diff --git a/typespec-tests/src/test/java/versioning/removed/RemovedClientTests.java b/typespec-tests/src/test/java/versioning/removed/RemovedClientTests.java index 923c44a7ae..f8f44e8c0d 100644 --- a/typespec-tests/src/test/java/versioning/removed/RemovedClientTests.java +++ b/typespec-tests/src/test/java/versioning/removed/RemovedClientTests.java @@ -9,18 +9,20 @@ import versioning.removed.models.EnumV3; import versioning.removed.models.ModelV2; import versioning.removed.models.ModelV3; -import versioning.removed.models.Versions; public class RemovedClientTests { - private final RemovedClient removedClientV1 - = new RemovedClientBuilder().endpoint("http://localhost:3000").version(Versions.V1).buildClient(); + private final RemovedClient removedClientV1 = new RemovedClientBuilder().endpoint("http://localhost:3000") + .serviceVersion(RemovedServiceVersion.V1) + .buildClient(); - private final RemovedClient removedClientV2 - = new RemovedClientBuilder().endpoint("http://localhost:3000").version(Versions.V2).buildClient(); + private final RemovedClient removedClientV2 = new RemovedClientBuilder().endpoint("http://localhost:3000") + .serviceVersion(RemovedServiceVersion.V2) + .buildClient(); - private final RemovedClient removedClientV2Preview - = new RemovedClientBuilder().endpoint("http://localhost:3000").version(Versions.V2PREVIEW).buildClient(); + private final RemovedClient removedClientV2Preview = new RemovedClientBuilder().endpoint("http://localhost:3000") + .serviceVersion(RemovedServiceVersion.V2PREVIEW) + .buildClient(); @Test public void tesRemovedClient() { diff --git a/typespec-tests/src/test/java/versioning/removed/generated/RemovedClientTestBase.java b/typespec-tests/src/test/java/versioning/removed/generated/RemovedClientTestBase.java index f642e20959..66f2537db8 100644 --- a/typespec-tests/src/test/java/versioning/removed/generated/RemovedClientTestBase.java +++ b/typespec-tests/src/test/java/versioning/removed/generated/RemovedClientTestBase.java @@ -15,7 +15,6 @@ import com.azure.core.util.Configuration; import versioning.removed.RemovedClient; import versioning.removed.RemovedClientBuilder; -import versioning.removed.models.Versions; class RemovedClientTestBase extends TestProxyTestBase { protected RemovedClient removedClient; @@ -24,7 +23,6 @@ class RemovedClientTestBase extends TestProxyTestBase { protected void beforeTest() { RemovedClientBuilder removedClientbuilder = new RemovedClientBuilder().endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) - .version(Versions.fromString(Configuration.getGlobalConfiguration().get("VERSION", "version"))) .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); if (getTestMode() == TestMode.RECORD) { diff --git a/typespec-tests/src/test/java/versioning/renamedfrom/RenamedFromClientTests.java b/typespec-tests/src/test/java/versioning/renamedfrom/RenamedFromClientTests.java index d8c178ed45..367411058b 100644 --- a/typespec-tests/src/test/java/versioning/renamedfrom/RenamedFromClientTests.java +++ b/typespec-tests/src/test/java/versioning/renamedfrom/RenamedFromClientTests.java @@ -7,14 +7,14 @@ import org.junit.jupiter.api.Test; import versioning.renamedfrom.models.NewEnum; import versioning.renamedfrom.models.NewModel; -import versioning.renamedfrom.models.Versions; public class RenamedFromClientTests { - private final RenamedFromClient renamedFromClient - = new RenamedFromClientBuilder().endpoint("http://localhost:3000").version(Versions.V2).buildClient(); + private final RenamedFromClient renamedFromClient = new RenamedFromClientBuilder().endpoint("http://localhost:3000") + .serviceVersion(RenamedFromServiceVersion.V2) + .buildClient(); private final NewInterfaceClient newInterfaceClient = new RenamedFromClientBuilder().endpoint("http://localhost:3000") - .version(Versions.V2) + .serviceVersion(RenamedFromServiceVersion.V2) .buildNewInterfaceClient(); @Test diff --git a/typespec-tests/src/test/java/versioning/renamedfrom/generated/RenamedFromClientTestBase.java b/typespec-tests/src/test/java/versioning/renamedfrom/generated/RenamedFromClientTestBase.java index 2e4e87d034..ca58c927f5 100644 --- a/typespec-tests/src/test/java/versioning/renamedfrom/generated/RenamedFromClientTestBase.java +++ b/typespec-tests/src/test/java/versioning/renamedfrom/generated/RenamedFromClientTestBase.java @@ -16,7 +16,6 @@ import versioning.renamedfrom.NewInterfaceClient; import versioning.renamedfrom.RenamedFromClient; import versioning.renamedfrom.RenamedFromClientBuilder; -import versioning.renamedfrom.models.Versions; class RenamedFromClientTestBase extends TestProxyTestBase { protected RenamedFromClient renamedFromClient; @@ -27,7 +26,6 @@ class RenamedFromClientTestBase extends TestProxyTestBase { protected void beforeTest() { RenamedFromClientBuilder renamedFromClientbuilder = new RenamedFromClientBuilder() .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) - .version(Versions.fromString(Configuration.getGlobalConfiguration().get("VERSION", "version"))) .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); if (getTestMode() == TestMode.RECORD) { @@ -37,7 +35,6 @@ protected void beforeTest() { RenamedFromClientBuilder newInterfaceClientbuilder = new RenamedFromClientBuilder() .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) - .version(Versions.fromString(Configuration.getGlobalConfiguration().get("VERSION", "version"))) .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); if (getTestMode() == TestMode.RECORD) { diff --git a/typespec-tests/src/test/java/versioning/returntypechangedfrom/ReturnTypeChangedFromClientTests.java b/typespec-tests/src/test/java/versioning/returntypechangedfrom/ReturnTypeChangedFromClientTests.java index 912ff90197..faac54ce53 100644 --- a/typespec-tests/src/test/java/versioning/returntypechangedfrom/ReturnTypeChangedFromClientTests.java +++ b/typespec-tests/src/test/java/versioning/returntypechangedfrom/ReturnTypeChangedFromClientTests.java @@ -4,11 +4,12 @@ package versioning.returntypechangedfrom; import org.junit.jupiter.api.Test; -import versioning.returntypechangedfrom.models.Versions; public class ReturnTypeChangedFromClientTests { private final ReturnTypeChangedFromClient returnTypeChangedFromClient - = new ReturnTypeChangedFromClientBuilder().endpoint("http://localhost:3000").version(Versions.V2).buildClient(); + = new ReturnTypeChangedFromClientBuilder().endpoint("http://localhost:3000") + .serviceVersion(ReturnTypeChangedFromServiceVersion.V2) + .buildClient(); @Test public void testReturnTypeChangedFromClient() { diff --git a/typespec-tests/src/test/java/versioning/returntypechangedfrom/generated/ReturnTypeChangedFromClientTestBase.java b/typespec-tests/src/test/java/versioning/returntypechangedfrom/generated/ReturnTypeChangedFromClientTestBase.java index bff7372da9..7f18897698 100644 --- a/typespec-tests/src/test/java/versioning/returntypechangedfrom/generated/ReturnTypeChangedFromClientTestBase.java +++ b/typespec-tests/src/test/java/versioning/returntypechangedfrom/generated/ReturnTypeChangedFromClientTestBase.java @@ -15,7 +15,6 @@ import com.azure.core.util.Configuration; import versioning.returntypechangedfrom.ReturnTypeChangedFromClient; import versioning.returntypechangedfrom.ReturnTypeChangedFromClientBuilder; -import versioning.returntypechangedfrom.models.Versions; class ReturnTypeChangedFromClientTestBase extends TestProxyTestBase { protected ReturnTypeChangedFromClient returnTypeChangedFromClient; @@ -24,7 +23,6 @@ class ReturnTypeChangedFromClientTestBase extends TestProxyTestBase { protected void beforeTest() { ReturnTypeChangedFromClientBuilder returnTypeChangedFromClientbuilder = new ReturnTypeChangedFromClientBuilder() .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) - .version(Versions.fromString(Configuration.getGlobalConfiguration().get("VERSION", "version"))) .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); if (getTestMode() == TestMode.RECORD) { diff --git a/typespec-tests/src/test/java/versioning/typechangedfrom/TypeChangedFromClientTests.java b/typespec-tests/src/test/java/versioning/typechangedfrom/TypeChangedFromClientTests.java index bc753dfd2f..3e46fd1dad 100644 --- a/typespec-tests/src/test/java/versioning/typechangedfrom/TypeChangedFromClientTests.java +++ b/typespec-tests/src/test/java/versioning/typechangedfrom/TypeChangedFromClientTests.java @@ -5,11 +5,12 @@ import org.junit.jupiter.api.Test; import versioning.typechangedfrom.models.TestModel; -import versioning.typechangedfrom.models.Versions; public class TypeChangedFromClientTests { private final TypeChangedFromClient typeChangedFromClient - = new TypeChangedFromClientBuilder().endpoint("http://localhost:3000").version(Versions.V2).buildClient(); + = new TypeChangedFromClientBuilder().endpoint("http://localhost:3000") + .serviceVersion(TypeChangedFromServiceVersion.V2) + .buildClient(); @Test public void testTypeChangedFromClient() { diff --git a/typespec-tests/src/test/java/versioning/typechangedfrom/generated/TypeChangedFromClientTestBase.java b/typespec-tests/src/test/java/versioning/typechangedfrom/generated/TypeChangedFromClientTestBase.java index e9a5a7da1f..e713ac488a 100644 --- a/typespec-tests/src/test/java/versioning/typechangedfrom/generated/TypeChangedFromClientTestBase.java +++ b/typespec-tests/src/test/java/versioning/typechangedfrom/generated/TypeChangedFromClientTestBase.java @@ -15,7 +15,6 @@ import com.azure.core.util.Configuration; import versioning.typechangedfrom.TypeChangedFromClient; import versioning.typechangedfrom.TypeChangedFromClientBuilder; -import versioning.typechangedfrom.models.Versions; class TypeChangedFromClientTestBase extends TestProxyTestBase { protected TypeChangedFromClient typeChangedFromClient; @@ -24,7 +23,6 @@ class TypeChangedFromClientTestBase extends TestProxyTestBase { protected void beforeTest() { TypeChangedFromClientBuilder typeChangedFromClientbuilder = new TypeChangedFromClientBuilder() .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) - .version(Versions.fromString(Configuration.getGlobalConfiguration().get("VERSION", "version"))) .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); if (getTestMode() == TestMode.RECORD) { From f37bbab667e3415de15a97febb235d43a08e2937 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Thu, 5 Jun 2025 13:37:51 +0800 Subject: [PATCH 11/12] update option description --- typespec-extension/src/options.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typespec-extension/src/options.ts b/typespec-extension/src/options.ts index 7185c87f06..4cc72096a7 100644 --- a/typespec-extension/src/options.ts +++ b/typespec-extension/src/options.ts @@ -117,7 +117,7 @@ export const EmitterOptionsSchema: JSONSchemaType = { }, "rename-model": { type: ["string", "object"], - description: "Specify models to rename, in case unable to do so through TCGC. E.g. anonymous models or resource list models. Format should be in key-value form, or a comma separated string that follows 'BeforeRename:AfterRename' pattern.", + description: "Rename the model classes, in case they cannot be renamed via TCGC. E.g., anonymous models or templated models. Format should be in key-value form, or a comma-separated string that follows 'BeforeRename:AfterRename' pattern. This option is for management-plane SDK.", additionalProperties: true, nullable: true, }, From 6bbb898d2c484c81aafbfeeeaacf97b326c04a11 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Thu, 5 Jun 2025 14:52:46 +0800 Subject: [PATCH 12/12] core on main --- core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core b/core index f3e3f70f8a..5091f7d518 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit f3e3f70f8ad33328b2a847b84e87eb22f4b69f9c +Subproject commit 5091f7d51882ebe046a5f4348e54a64aa5da3678