From 8dd3598476a7b1deabc74523b6d904932f37dbf2 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Wed, 27 Mar 2024 13:58:09 +0800 Subject: [PATCH 1/5] fix test --- .../test/java/com/_specs_/azure/core/basic/CoreTests.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/typespec-tests/src/test/java/com/_specs_/azure/core/basic/CoreTests.java b/typespec-tests/src/test/java/com/_specs_/azure/core/basic/CoreTests.java index 8bb7210a7f..f59ae10409 100644 --- a/typespec-tests/src/test/java/com/_specs_/azure/core/basic/CoreTests.java +++ b/typespec-tests/src/test/java/com/_specs_/azure/core/basic/CoreTests.java @@ -4,6 +4,7 @@ package com._specs_.azure.core.basic; import com._specs_.azure.core.basic.models.ListItemInputBody; +import com._specs_.azure.core.basic.models.ListItemInputExtensibleEnum; import com._specs_.azure.core.basic.models.User; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedFlux; @@ -156,10 +157,10 @@ public void testListSync() { @Test public void testMisc() { - syncClient.listWithParameters(new ListItemInputBody("Madge")); + syncClient.listWithParameters(new ListItemInputBody("Madge"), ListItemInputExtensibleEnum.SECOND).stream().count(); TwoModelsAsPageItemClient client = new BasicClientBuilder().buildTwoModelsAsPageItemClient(); - client.listFirstItem(); - client.listSecondItem(); + client.listFirstItem().stream().count(); + client.listSecondItem().stream().count(); } } From 547dcc0d0453b2eddebb3f9dfc55f79e7641cf84 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Thu, 28 Mar 2024 10:50:16 +0800 Subject: [PATCH 2/5] client, use atLevel for logging --- .../autorest/model/clientmodel/ClientBuilderTrait.java | 10 +++++----- .../azure/autorest/template/ClientMethodTemplate.java | 6 +++--- .../template/ConvenienceSyncMethodTemplate.java | 2 +- .../com/azure/autorest/template/ModelTemplate.java | 2 +- .../template/util/ModelTemplateHeaderHelper.java | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/javagen/src/main/java/com/azure/autorest/model/clientmodel/ClientBuilderTrait.java b/javagen/src/main/java/com/azure/autorest/model/clientmodel/ClientBuilderTrait.java index ad96a54093..df44b9bbf9 100644 --- a/javagen/src/main/java/com/azure/autorest/model/clientmodel/ClientBuilderTrait.java +++ b/javagen/src/main/java/com/azure/autorest/model/clientmodel/ClientBuilderTrait.java @@ -192,15 +192,15 @@ private static String addLogging(LogLevel level, String message) { if (JavaSettings.getInstance().isBranded()) { switch (level) { case VERBOSE: - return String.format("LOGGER.verbose(\"%s\");", message); + return String.format("LOGGER.atVerbose().log(\"%s\");", message); case INFORMATIONAL: - return String.format("LOGGER.info(\"%s\");", message); + return String.format("LOGGER.atInfo().log(\"%s\");", message); case WARNING: - return String.format("LOGGER.warning(\"%s\");", message); + return String.format("LOGGER.atWarning().log(\"%s\");", message); case ERROR: - return String.format("LOGGER.error(\"%s\");", message); + return String.format("LOGGER.atError().log(\"%s\");", message); default: - return String.format("LOGGER.info(\"%s\");", message); + return String.format("LOGGER.atInfo().log(\"%s\");", message); } } else { switch (level) { diff --git a/javagen/src/main/java/com/azure/autorest/template/ClientMethodTemplate.java b/javagen/src/main/java/com/azure/autorest/template/ClientMethodTemplate.java index 83ad737924..4d7b5820e6 100644 --- a/javagen/src/main/java/com/azure/autorest/template/ClientMethodTemplate.java +++ b/javagen/src/main/java/com/azure/autorest/template/ClientMethodTemplate.java @@ -90,7 +90,7 @@ protected static void addValidations(JavaBlock function, List expression JavaIfBlock nullCheck = function.ifBlock(expressionToCheck + " == null", ifBlock -> { if (JavaSettings.getInstance().isSyncStackEnabled()) { if (settings.isUseClientLogger()) { - ifBlock.line("throw LOGGER.logExceptionAsError(%s);", exceptionExpression); + ifBlock.line("throw LOGGER.atError().log(%s);", exceptionExpression); } else { ifBlock.line("throw %s;", exceptionExpression); } @@ -1010,7 +1010,7 @@ protected void generateSyncMethod(ClientMethod clientMethod, JavaType typeBlock, ifAction.methodReturn("value"); }).elseBlock(elseAction -> { if (settings.isUseClientLogger()) { - elseAction.line("throw LOGGER.logExceptionAsError(new NullPointerException());"); + elseAction.line("throw LOGGER.atError().log(new NullPointerException());"); } else { elseAction.line("throw new NullPointerException();"); } @@ -1088,7 +1088,7 @@ protected void generatePlainSyncMethod(ClientMethod clientMethod, JavaType typeB ifAction.methodReturn("value"); }).elseBlock(elseAction -> { if (settings.isUseClientLogger()) { - elseAction.line("throw LOGGER.logExceptionAsError(new NullPointerException());"); + elseAction.line("throw LOGGER.atError().log(new NullPointerException());"); } else { elseAction.line("throw new NullPointerException();"); } diff --git a/javagen/src/main/java/com/azure/autorest/template/ConvenienceSyncMethodTemplate.java b/javagen/src/main/java/com/azure/autorest/template/ConvenienceSyncMethodTemplate.java index bf5f434c73..5ae1eeb7e3 100644 --- a/javagen/src/main/java/com/azure/autorest/template/ConvenienceSyncMethodTemplate.java +++ b/javagen/src/main/java/com/azure/autorest/template/ConvenienceSyncMethodTemplate.java @@ -167,7 +167,7 @@ protected void writeInvocationAndConversion( @Override protected void writeThrowException(ClientMethodType methodType, String exceptionExpression, JavaBlock methodBlock) { if (JavaSettings.getInstance().isUseClientLogger()) { - methodBlock.line(String.format("throw LOGGER.logExceptionAsError(%s);", exceptionExpression)); + methodBlock.line(String.format("throw LOGGER.atError().log(%s);", exceptionExpression)); } else { methodBlock.line(String.format("throw %s;", exceptionExpression)); } diff --git a/javagen/src/main/java/com/azure/autorest/template/ModelTemplate.java b/javagen/src/main/java/com/azure/autorest/template/ModelTemplate.java index 2c77ba150b..b31d6b2a64 100644 --- a/javagen/src/main/java/com/azure/autorest/template/ModelTemplate.java +++ b/javagen/src/main/java/com/azure/autorest/template/ModelTemplate.java @@ -1040,7 +1040,7 @@ private void addPropertyValidations(JavaClass classBlock, ClientModel model, Jav final String errorMessage = String.format("\"Missing required property %s in model %s\"", property.getName(), model.getName()); if (settings.isUseClientLogger()) { ifBlock.line(String.format( - "throw LOGGER.logExceptionAsError(new IllegalArgumentException(%s));", + "throw LOGGER.atError().log(new IllegalArgumentException(%s));", errorMessage)); } else { ifBlock.line(String.format( diff --git a/javagen/src/main/java/com/azure/autorest/template/util/ModelTemplateHeaderHelper.java b/javagen/src/main/java/com/azure/autorest/template/util/ModelTemplateHeaderHelper.java index b228d95125..f222cff62b 100644 --- a/javagen/src/main/java/com/azure/autorest/template/util/ModelTemplateHeaderHelper.java +++ b/javagen/src/main/java/com/azure/autorest/template/util/ModelTemplateHeaderHelper.java @@ -213,7 +213,7 @@ private static void generateHeaderDeserializationFunction(ClientModelProperty pr // At this time all try-catching is for IOExceptions. javaBlock.decreaseIndent(); javaBlock.line("} catch (IOException ex) {"); - javaBlock.indent(() -> javaBlock.line("throw LOGGER.logExceptionAsError(new UncheckedIOException(ex));")); + javaBlock.indent(() -> javaBlock.line("throw LOGGER.atError().log(new UncheckedIOException(ex));")); javaBlock.line("}"); } } From a8640963985eab030c1f88090cb0fd94f75c6fd2 Mon Sep 17 00:00:00 2001 From: actions-user Date: Thu, 28 Mar 2024 03:10:28 +0000 Subject: [PATCH 3/5] re-generate test code --- .../dpg/FormRecognizerClientBuilder.java | 2 +- ...utoRestSwaggerBatServiceClientBuilder.java | 2 +- .../fixtures/llcresi/DpgClientBuilder.java | 2 +- .../fixtures/llcresi/DpgClientBuilder.java | 2 +- .../bodycomplex/ArrayClientBuilder.java | 2 +- .../bodycomplex/BasicClientBuilder.java | 2 +- .../bodycomplex/DictionaryClientBuilder.java | 2 +- .../FlattencomplexClientBuilder.java | 2 +- .../bodycomplex/InheritanceClientBuilder.java | 2 +- .../PolymorphicrecursiveClientBuilder.java | 2 +- .../PolymorphismClientBuilder.java | 2 +- .../bodycomplex/PrimitiveClientBuilder.java | 2 +- .../ReadonlypropertyClientBuilder.java | 2 +- ...estSwaggerBatFileServiceClientBuilder.java | 2 +- .../bodystring/EnumClientBuilder.java | 2 +- .../StringOperationClientBuilder.java | 2 +- ...ndClientParameterServiceClientBuilder.java | 2 +- ...stSwaggerConstantServiceClientBuilder.java | 2 +- .../dpgcustomization/DpgClientBuilder.java | 2 +- .../endpointlro/LroEndpointClientBuilder.java | 2 +- .../enums/EnumServiceClientBuilder.java | 2 +- ...tSwaggerBatHeaderServiceClientBuilder.java | 2 +- ...HeadExceptionTestServiceClientBuilder.java | 2 +- .../HttpClientFailureClientBuilder.java | 2 +- .../HttpFailureClientBuilder.java | 2 +- .../HttpRedirectsClientBuilder.java | 2 +- .../HttpRetryClientBuilder.java | 2 +- .../HttpServerFailureClientBuilder.java | 2 +- .../HttpSuccessClientBuilder.java | 2 +- .../MultipleResponsesClientBuilder.java | 2 +- .../fixtures/llcinitial/DpgClientBuilder.java | 2 +- .../fixtures/llcupdate1/DpgClientBuilder.java | 2 +- .../java/fixtures/lro/LROsClientBuilder.java | 2 +- .../fixtures/lro/LroRetrysClientBuilder.java | 2 +- .../lro/LrosCustomHeaderClientBuilder.java | 2 +- .../fixtures/lro/LrosaDsClientBuilder.java | 2 +- .../mediatypes/MediaTypesClientBuilder.java | 2 +- .../DpgMultiMediaTypesClientBuilder.java | 2 +- ...utoRestPagingTestServiceClientBuilder.java | 2 +- .../ParmaterizedEndpointClientBuilder.java | 2 +- .../DpgRequiredHeaderQueryClientBuilder.java | 2 +- .../RequiredOptionalBodyClientBuilder.java | 2 +- .../SpecialHeaderClientBuilder.java | 2 +- .../fixtures/url/PathItemsClientBuilder.java | 2 +- .../java/fixtures/url/PathsClientBuilder.java | 2 +- .../fixtures/url/QueriesClientBuilder.java | 2 +- ...lectionFormatTestServiceClientBuilder.java | 2 +- .../core/access/AccessClientBuilder.java | 2 +- .../core/usage/UsageClientBuilder.java | 2 +- .../azure/core/basic/BasicClientBuilder.java | 2 +- .../azure/core/lro/rpc/RpcClientBuilder.java | 2 +- .../lro/rpc/legacy/LegacyClientBuilder.java | 2 +- .../lro/standard/StandardClientBuilder.java | 2 +- .../core/scalar/ScalarClientBuilder.java | 2 +- .../core/traits/TraitsClientBuilder.java | 2 +- .../apikey/ApiKeyClientBuilder.java | 2 +- .../http/custom/CustomClientBuilder.java | 2 +- .../oauth2/OAuth2ClientBuilder.java | 2 +- .../union/UnionClientBuilder.java | 2 +- .../models/ChildResourceListResult.java | 4 +- .../models/PagedOperation.java | 4 +- .../models/TopLevelArmResourceListResult.java | 5 +- .../models/TopLevelArmResourceProperties.java | 20 +- .../cadl/builtin/BuiltinClientBuilder.java | 2 +- .../enumservice/EnumServiceClientBuilder.java | 2 +- .../errormodel/ErrorModelClientBuilder.java | 2 +- .../cadl/flatten/FlattenClientBuilder.java | 2 +- .../cadl/internal/InternalClientBuilder.java | 2 +- .../LiteralServiceClientBuilder.java | 2 +- .../longrunning/LongRunningClientBuilder.java | 2 +- .../com/cadl/model/ModelClientBuilder.java | 2 +- .../MultiContentTypesClientBuilder.java | 2 +- .../multipart/MultipartClientBuilder.java | 2 +- .../FirstClientBuilder.java | 2 +- .../NoApiVersionClient.java | 5 +- .../NoApiVersionClientBuilder.java | 2 +- .../SecondClientBuilder.java | 2 +- .../com/cadl/naming/NamingClientBuilder.java | 2 +- .../cadl/optional/OptionalClientBuilder.java | 2 +- .../PartialUpdateClientBuilder.java | 2 +- .../com/cadl/patch/PatchClientBuilder.java | 2 +- .../ProtocolAndConvenientClientBuilder.java | 2 +- .../cadl/response/ResponseClientBuilder.java | 2 +- .../com/cadl/server/ContosoClientBuilder.java | 2 +- .../com/cadl/server/HttpbinClientBuilder.java | 2 +- .../SpecialCharsClientBuilder.java | 2 +- .../SpecialHeadersClientBuilder.java | 2 +- .../com/cadl/union/UnionClientBuilder.java | 2 +- .../com/cadl/versioning/VersioningClient.java | 10 +- .../versioning/VersioningClientBuilder.java | 2 +- .../visibility/VisibilityClientBuilder.java | 2 +- .../cadl/wiretype/WireTypeClientBuilder.java | 2 +- .../client/naming/NamingClientBuilder.java | 2 +- .../service/ClientAClientBuilder.java | 2 +- .../service/ClientBClientBuilder.java | 2 +- .../RenamedOperationClientBuilder.java | 2 +- .../service/ServiceClientClientBuilder.java | 2 +- .../TwoOperationGroupClientBuilder.java | 2 +- .../com/encode/bytes/BytesClientBuilder.java | 2 +- .../datetime/DatetimeClientBuilder.java | 2 +- .../duration/DurationClientBuilder.java | 2 +- .../BodyOptionalityClientBuilder.java | 2 +- .../CollectionFormatClientBuilder.java | 2 +- .../spread/SpreadClientBuilder.java | 2 +- .../ContentNegotiationClientBuilder.java | 2 +- .../JsonMergePatchClientBuilder.java | 2 +- .../mediatype/MediaTypeClientBuilder.java | 2 +- .../multipart/MultiPartClientBuilder.java | 2 +- .../pageable/PageableClientBuilder.java | 2 +- .../ProjectedNameClientBuilder.java | 2 +- .../ResiliencyServiceDrivenClient.java | 12 +- .../ResiliencyServiceDrivenClientBuilder.java | 2 +- .../ResiliencyServiceDrivenClientBuilder.java | 2 +- .../encodedname/json/JsonClientBuilder.java | 2 +- .../notdefined/NotDefinedClientBuilder.java | 2 +- .../path/multiple/MultipleClientBuilder.java | 2 +- .../path/single/SingleClientBuilder.java | 2 +- .../NotVersionedClientBuilder.java | 2 +- .../versioned/VersionedClientBuilder.java | 2 +- .../ClientRequestIdClientBuilder.java | 2 +- .../ConditionalRequestClientBuilder.java | 2 +- .../RepeatabilityClientBuilder.java | 2 +- .../SpecialWordsClientBuilder.java | 2 +- .../com/type/array/ArrayClientBuilder.java | 2 +- .../dictionary/DictionaryClientBuilder.java | 2 +- .../extensible/ExtensibleClientBuilder.java | 2 +- .../type/enums/fixed/FixedClientBuilder.java | 2 +- .../type/model/empty/EmptyClientBuilder.java | 2 +- .../model/flatten/FlattenClientBuilder.java | 2 +- .../EnumDiscriminatorClientBuilder.java | 2 +- .../NestedDiscriminatorClientBuilder.java | 2 +- .../NotDiscriminatedClientBuilder.java | 2 +- .../recursive/RecursiveClientBuilder.java | 2 +- .../SingleDiscriminatorClientBuilder.java | 2 +- .../type/model/usage/UsageClientBuilder.java | 2 +- .../visibility/VisibilityClientBuilder.java | 2 +- .../AdditionalPropertiesClientBuilder.java | 2 +- .../nullable/NullableClientBuilder.java | 2 +- .../optional/OptionalClientBuilder.java | 2 +- .../valuetypes/ValueTypesClientBuilder.java | 2 +- .../com/type/scalar/ScalarClientBuilder.java | 2 +- .../com/type/union/UnionClientBuilder.java | 2 +- .../AutoRestBoolTestServiceBuilder.java | 2 +- .../AutoRestComplexTestServiceBuilder.java | 2 +- .../fixtures/bodycomplex/models/Shark.java | 4 +- .../streamstyleserialization/Arrays.java | 84 ++-- .../AutoRestComplexTestServiceBuilder.java | 2 +- .../streamstyleserialization/Basics.java | 84 ++-- .../Dictionaries.java | 96 ++--- .../Flattencomplexes.java | 12 +- .../Inheritances.java | 36 +- .../Polymorphicrecursives.java | 36 +- .../Polymorphisms.java | 156 +++---- .../streamstyleserialization/Primitives.java | 396 +++++++++--------- .../Readonlyproperties.java | 36 +- .../models/Shark.java | 4 +- .../Arrays.java | 84 ++-- .../AutoRestComplexTestServiceBuilder.java | 2 +- .../Basics.java | 84 ++-- .../Dictionaries.java | 96 ++--- .../Flattencomplexes.java | 12 +- .../Inheritances.java | 36 +- .../Polymorphicrecursives.java | 36 +- .../Polymorphisms.java | 156 +++---- .../Primitives.java | 396 +++++++++--------- .../Readonlyproperties.java | 36 +- .../models/Shark.java | 4 +- .../Arrays.java | 84 ++-- .../AutoRestComplexTestServiceBuilder.java | 2 +- .../Basics.java | 84 ++-- .../Dictionaries.java | 96 ++--- .../Flattencomplexes.java | 12 +- .../Inheritances.java | 36 +- .../Polymorphicrecursives.java | 36 +- .../Polymorphisms.java | 156 +++---- .../Primitives.java | 396 +++++++++--------- .../Readonlyproperties.java | 36 +- .../models/Shark.java | 4 +- 178 files changed, 1586 insertions(+), 1578 deletions(-) diff --git a/azure-dataplane-tests/src/main/java/com/azure/ai/formrecognizer/documentanalysis/dpg/FormRecognizerClientBuilder.java b/azure-dataplane-tests/src/main/java/com/azure/ai/formrecognizer/documentanalysis/dpg/FormRecognizerClientBuilder.java index cacf4bfd02..9ca3758239 100644 --- a/azure-dataplane-tests/src/main/java/com/azure/ai/formrecognizer/documentanalysis/dpg/FormRecognizerClientBuilder.java +++ b/azure-dataplane-tests/src/main/java/com/azure/ai/formrecognizer/documentanalysis/dpg/FormRecognizerClientBuilder.java @@ -82,7 +82,7 @@ public FormRecognizerClientBuilder() { @Override public FormRecognizerClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/partial-update-tests/generated/src/main/java/fixtures/bodystring/AutoRestSwaggerBatServiceClientBuilder.java b/partial-update-tests/generated/src/main/java/fixtures/bodystring/AutoRestSwaggerBatServiceClientBuilder.java index bad7563b28..a75bee2e1f 100644 --- a/partial-update-tests/generated/src/main/java/fixtures/bodystring/AutoRestSwaggerBatServiceClientBuilder.java +++ b/partial-update-tests/generated/src/main/java/fixtures/bodystring/AutoRestSwaggerBatServiceClientBuilder.java @@ -81,7 +81,7 @@ public AutoRestSwaggerBatServiceClientBuilder() { @Override public AutoRestSwaggerBatServiceClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-resilience-test/llcinitial/src/main/java/fixtures/llcresi/DpgClientBuilder.java b/protocol-resilience-test/llcinitial/src/main/java/fixtures/llcresi/DpgClientBuilder.java index 9d784cd037..c288ce7c18 100644 --- a/protocol-resilience-test/llcinitial/src/main/java/fixtures/llcresi/DpgClientBuilder.java +++ b/protocol-resilience-test/llcinitial/src/main/java/fixtures/llcresi/DpgClientBuilder.java @@ -75,7 +75,7 @@ public DpgClientBuilder() { @Override public DpgClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-resilience-test/llcupdate1/src/main/java/fixtures/llcresi/DpgClientBuilder.java b/protocol-resilience-test/llcupdate1/src/main/java/fixtures/llcresi/DpgClientBuilder.java index 9d784cd037..c288ce7c18 100644 --- a/protocol-resilience-test/llcupdate1/src/main/java/fixtures/llcresi/DpgClientBuilder.java +++ b/protocol-resilience-test/llcupdate1/src/main/java/fixtures/llcresi/DpgClientBuilder.java @@ -75,7 +75,7 @@ public DpgClientBuilder() { @Override public DpgClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-tests/src/main/java/fixtures/bodycomplex/ArrayClientBuilder.java b/protocol-tests/src/main/java/fixtures/bodycomplex/ArrayClientBuilder.java index f94e5f75ab..a5a0dc565a 100644 --- a/protocol-tests/src/main/java/fixtures/bodycomplex/ArrayClientBuilder.java +++ b/protocol-tests/src/main/java/fixtures/bodycomplex/ArrayClientBuilder.java @@ -75,7 +75,7 @@ public ArrayClientBuilder() { @Override public ArrayClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-tests/src/main/java/fixtures/bodycomplex/BasicClientBuilder.java b/protocol-tests/src/main/java/fixtures/bodycomplex/BasicClientBuilder.java index a33706e0f5..b810d306f1 100644 --- a/protocol-tests/src/main/java/fixtures/bodycomplex/BasicClientBuilder.java +++ b/protocol-tests/src/main/java/fixtures/bodycomplex/BasicClientBuilder.java @@ -75,7 +75,7 @@ public BasicClientBuilder() { @Override public BasicClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-tests/src/main/java/fixtures/bodycomplex/DictionaryClientBuilder.java b/protocol-tests/src/main/java/fixtures/bodycomplex/DictionaryClientBuilder.java index 78cdc734b5..d2f86932ce 100644 --- a/protocol-tests/src/main/java/fixtures/bodycomplex/DictionaryClientBuilder.java +++ b/protocol-tests/src/main/java/fixtures/bodycomplex/DictionaryClientBuilder.java @@ -76,7 +76,7 @@ public DictionaryClientBuilder() { @Override public DictionaryClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-tests/src/main/java/fixtures/bodycomplex/FlattencomplexClientBuilder.java b/protocol-tests/src/main/java/fixtures/bodycomplex/FlattencomplexClientBuilder.java index 109014807d..bc635ae68f 100644 --- a/protocol-tests/src/main/java/fixtures/bodycomplex/FlattencomplexClientBuilder.java +++ b/protocol-tests/src/main/java/fixtures/bodycomplex/FlattencomplexClientBuilder.java @@ -76,7 +76,7 @@ public FlattencomplexClientBuilder() { @Override public FlattencomplexClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-tests/src/main/java/fixtures/bodycomplex/InheritanceClientBuilder.java b/protocol-tests/src/main/java/fixtures/bodycomplex/InheritanceClientBuilder.java index ddd767358d..8020510ee6 100644 --- a/protocol-tests/src/main/java/fixtures/bodycomplex/InheritanceClientBuilder.java +++ b/protocol-tests/src/main/java/fixtures/bodycomplex/InheritanceClientBuilder.java @@ -76,7 +76,7 @@ public InheritanceClientBuilder() { @Override public InheritanceClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-tests/src/main/java/fixtures/bodycomplex/PolymorphicrecursiveClientBuilder.java b/protocol-tests/src/main/java/fixtures/bodycomplex/PolymorphicrecursiveClientBuilder.java index 399a6c4232..03d890ec89 100644 --- a/protocol-tests/src/main/java/fixtures/bodycomplex/PolymorphicrecursiveClientBuilder.java +++ b/protocol-tests/src/main/java/fixtures/bodycomplex/PolymorphicrecursiveClientBuilder.java @@ -76,7 +76,7 @@ public PolymorphicrecursiveClientBuilder() { @Override public PolymorphicrecursiveClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-tests/src/main/java/fixtures/bodycomplex/PolymorphismClientBuilder.java b/protocol-tests/src/main/java/fixtures/bodycomplex/PolymorphismClientBuilder.java index 70e95ebcfa..ee53b98a9e 100644 --- a/protocol-tests/src/main/java/fixtures/bodycomplex/PolymorphismClientBuilder.java +++ b/protocol-tests/src/main/java/fixtures/bodycomplex/PolymorphismClientBuilder.java @@ -76,7 +76,7 @@ public PolymorphismClientBuilder() { @Override public PolymorphismClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-tests/src/main/java/fixtures/bodycomplex/PrimitiveClientBuilder.java b/protocol-tests/src/main/java/fixtures/bodycomplex/PrimitiveClientBuilder.java index 4f29cff88d..6084039604 100644 --- a/protocol-tests/src/main/java/fixtures/bodycomplex/PrimitiveClientBuilder.java +++ b/protocol-tests/src/main/java/fixtures/bodycomplex/PrimitiveClientBuilder.java @@ -76,7 +76,7 @@ public PrimitiveClientBuilder() { @Override public PrimitiveClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-tests/src/main/java/fixtures/bodycomplex/ReadonlypropertyClientBuilder.java b/protocol-tests/src/main/java/fixtures/bodycomplex/ReadonlypropertyClientBuilder.java index 59a0362720..e9aa550e8f 100644 --- a/protocol-tests/src/main/java/fixtures/bodycomplex/ReadonlypropertyClientBuilder.java +++ b/protocol-tests/src/main/java/fixtures/bodycomplex/ReadonlypropertyClientBuilder.java @@ -76,7 +76,7 @@ public ReadonlypropertyClientBuilder() { @Override public ReadonlypropertyClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-tests/src/main/java/fixtures/bodyfile/AutoRestSwaggerBatFileServiceClientBuilder.java b/protocol-tests/src/main/java/fixtures/bodyfile/AutoRestSwaggerBatFileServiceClientBuilder.java index c0f74c57d2..6730a8521b 100644 --- a/protocol-tests/src/main/java/fixtures/bodyfile/AutoRestSwaggerBatFileServiceClientBuilder.java +++ b/protocol-tests/src/main/java/fixtures/bodyfile/AutoRestSwaggerBatFileServiceClientBuilder.java @@ -78,7 +78,7 @@ public AutoRestSwaggerBatFileServiceClientBuilder() { @Override public AutoRestSwaggerBatFileServiceClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-tests/src/main/java/fixtures/bodystring/EnumClientBuilder.java b/protocol-tests/src/main/java/fixtures/bodystring/EnumClientBuilder.java index fcb6a4bbd3..1fbbaca494 100644 --- a/protocol-tests/src/main/java/fixtures/bodystring/EnumClientBuilder.java +++ b/protocol-tests/src/main/java/fixtures/bodystring/EnumClientBuilder.java @@ -75,7 +75,7 @@ public EnumClientBuilder() { @Override public EnumClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-tests/src/main/java/fixtures/bodystring/StringOperationClientBuilder.java b/protocol-tests/src/main/java/fixtures/bodystring/StringOperationClientBuilder.java index 83182eba85..bbeb8d1966 100644 --- a/protocol-tests/src/main/java/fixtures/bodystring/StringOperationClientBuilder.java +++ b/protocol-tests/src/main/java/fixtures/bodystring/StringOperationClientBuilder.java @@ -76,7 +76,7 @@ public StringOperationClientBuilder() { @Override public StringOperationClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-tests/src/main/java/fixtures/constantandclientparam/ConstantAndClientParameterServiceClientBuilder.java b/protocol-tests/src/main/java/fixtures/constantandclientparam/ConstantAndClientParameterServiceClientBuilder.java index 8c7df6b727..0285cd3d97 100644 --- a/protocol-tests/src/main/java/fixtures/constantandclientparam/ConstantAndClientParameterServiceClientBuilder.java +++ b/protocol-tests/src/main/java/fixtures/constantandclientparam/ConstantAndClientParameterServiceClientBuilder.java @@ -81,7 +81,7 @@ public ConstantAndClientParameterServiceClientBuilder() { @Override public ConstantAndClientParameterServiceClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-tests/src/main/java/fixtures/constants/AutoRestSwaggerConstantServiceClientBuilder.java b/protocol-tests/src/main/java/fixtures/constants/AutoRestSwaggerConstantServiceClientBuilder.java index ec21d70a14..e87011131d 100644 --- a/protocol-tests/src/main/java/fixtures/constants/AutoRestSwaggerConstantServiceClientBuilder.java +++ b/protocol-tests/src/main/java/fixtures/constants/AutoRestSwaggerConstantServiceClientBuilder.java @@ -78,7 +78,7 @@ public AutoRestSwaggerConstantServiceClientBuilder() { @Override public AutoRestSwaggerConstantServiceClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-tests/src/main/java/fixtures/dpgcustomization/DpgClientBuilder.java b/protocol-tests/src/main/java/fixtures/dpgcustomization/DpgClientBuilder.java index 9e7b74b291..931f508092 100644 --- a/protocol-tests/src/main/java/fixtures/dpgcustomization/DpgClientBuilder.java +++ b/protocol-tests/src/main/java/fixtures/dpgcustomization/DpgClientBuilder.java @@ -76,7 +76,7 @@ public DpgClientBuilder() { @Override public DpgClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-tests/src/main/java/fixtures/endpointlro/LroEndpointClientBuilder.java b/protocol-tests/src/main/java/fixtures/endpointlro/LroEndpointClientBuilder.java index f364404ce8..c880762d2b 100644 --- a/protocol-tests/src/main/java/fixtures/endpointlro/LroEndpointClientBuilder.java +++ b/protocol-tests/src/main/java/fixtures/endpointlro/LroEndpointClientBuilder.java @@ -77,7 +77,7 @@ public LroEndpointClientBuilder() { @Override public LroEndpointClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-tests/src/main/java/fixtures/enums/EnumServiceClientBuilder.java b/protocol-tests/src/main/java/fixtures/enums/EnumServiceClientBuilder.java index 42d6cfd88c..2707606d71 100644 --- a/protocol-tests/src/main/java/fixtures/enums/EnumServiceClientBuilder.java +++ b/protocol-tests/src/main/java/fixtures/enums/EnumServiceClientBuilder.java @@ -76,7 +76,7 @@ public EnumServiceClientBuilder() { @Override public EnumServiceClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-tests/src/main/java/fixtures/header/AutoRestSwaggerBatHeaderServiceClientBuilder.java b/protocol-tests/src/main/java/fixtures/header/AutoRestSwaggerBatHeaderServiceClientBuilder.java index 9841e2ae56..08e331cdc7 100644 --- a/protocol-tests/src/main/java/fixtures/header/AutoRestSwaggerBatHeaderServiceClientBuilder.java +++ b/protocol-tests/src/main/java/fixtures/header/AutoRestSwaggerBatHeaderServiceClientBuilder.java @@ -78,7 +78,7 @@ public AutoRestSwaggerBatHeaderServiceClientBuilder() { @Override public AutoRestSwaggerBatHeaderServiceClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-tests/src/main/java/fixtures/headexceptions/AutoRestHeadExceptionTestServiceClientBuilder.java b/protocol-tests/src/main/java/fixtures/headexceptions/AutoRestHeadExceptionTestServiceClientBuilder.java index e8d4a11bc1..8e58657441 100644 --- a/protocol-tests/src/main/java/fixtures/headexceptions/AutoRestHeadExceptionTestServiceClientBuilder.java +++ b/protocol-tests/src/main/java/fixtures/headexceptions/AutoRestHeadExceptionTestServiceClientBuilder.java @@ -80,7 +80,7 @@ public AutoRestHeadExceptionTestServiceClientBuilder() { @Override public AutoRestHeadExceptionTestServiceClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-tests/src/main/java/fixtures/httpinfrastructure/HttpClientFailureClientBuilder.java b/protocol-tests/src/main/java/fixtures/httpinfrastructure/HttpClientFailureClientBuilder.java index ca836df525..570ddc0249 100644 --- a/protocol-tests/src/main/java/fixtures/httpinfrastructure/HttpClientFailureClientBuilder.java +++ b/protocol-tests/src/main/java/fixtures/httpinfrastructure/HttpClientFailureClientBuilder.java @@ -77,7 +77,7 @@ public HttpClientFailureClientBuilder() { @Override public HttpClientFailureClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-tests/src/main/java/fixtures/httpinfrastructure/HttpFailureClientBuilder.java b/protocol-tests/src/main/java/fixtures/httpinfrastructure/HttpFailureClientBuilder.java index cff9c3cb82..4b11c680ec 100644 --- a/protocol-tests/src/main/java/fixtures/httpinfrastructure/HttpFailureClientBuilder.java +++ b/protocol-tests/src/main/java/fixtures/httpinfrastructure/HttpFailureClientBuilder.java @@ -77,7 +77,7 @@ public HttpFailureClientBuilder() { @Override public HttpFailureClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-tests/src/main/java/fixtures/httpinfrastructure/HttpRedirectsClientBuilder.java b/protocol-tests/src/main/java/fixtures/httpinfrastructure/HttpRedirectsClientBuilder.java index 2139dffc33..b13eb20854 100644 --- a/protocol-tests/src/main/java/fixtures/httpinfrastructure/HttpRedirectsClientBuilder.java +++ b/protocol-tests/src/main/java/fixtures/httpinfrastructure/HttpRedirectsClientBuilder.java @@ -77,7 +77,7 @@ public HttpRedirectsClientBuilder() { @Override public HttpRedirectsClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-tests/src/main/java/fixtures/httpinfrastructure/HttpRetryClientBuilder.java b/protocol-tests/src/main/java/fixtures/httpinfrastructure/HttpRetryClientBuilder.java index cf48e676ec..ded182c30e 100644 --- a/protocol-tests/src/main/java/fixtures/httpinfrastructure/HttpRetryClientBuilder.java +++ b/protocol-tests/src/main/java/fixtures/httpinfrastructure/HttpRetryClientBuilder.java @@ -77,7 +77,7 @@ public HttpRetryClientBuilder() { @Override public HttpRetryClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-tests/src/main/java/fixtures/httpinfrastructure/HttpServerFailureClientBuilder.java b/protocol-tests/src/main/java/fixtures/httpinfrastructure/HttpServerFailureClientBuilder.java index fe85027486..459760597a 100644 --- a/protocol-tests/src/main/java/fixtures/httpinfrastructure/HttpServerFailureClientBuilder.java +++ b/protocol-tests/src/main/java/fixtures/httpinfrastructure/HttpServerFailureClientBuilder.java @@ -77,7 +77,7 @@ public HttpServerFailureClientBuilder() { @Override public HttpServerFailureClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-tests/src/main/java/fixtures/httpinfrastructure/HttpSuccessClientBuilder.java b/protocol-tests/src/main/java/fixtures/httpinfrastructure/HttpSuccessClientBuilder.java index aaca89ce49..1b4ea53f2b 100644 --- a/protocol-tests/src/main/java/fixtures/httpinfrastructure/HttpSuccessClientBuilder.java +++ b/protocol-tests/src/main/java/fixtures/httpinfrastructure/HttpSuccessClientBuilder.java @@ -77,7 +77,7 @@ public HttpSuccessClientBuilder() { @Override public HttpSuccessClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-tests/src/main/java/fixtures/httpinfrastructure/MultipleResponsesClientBuilder.java b/protocol-tests/src/main/java/fixtures/httpinfrastructure/MultipleResponsesClientBuilder.java index 796bf495f7..5e9759b116 100644 --- a/protocol-tests/src/main/java/fixtures/httpinfrastructure/MultipleResponsesClientBuilder.java +++ b/protocol-tests/src/main/java/fixtures/httpinfrastructure/MultipleResponsesClientBuilder.java @@ -77,7 +77,7 @@ public MultipleResponsesClientBuilder() { @Override public MultipleResponsesClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-tests/src/main/java/fixtures/llcinitial/DpgClientBuilder.java b/protocol-tests/src/main/java/fixtures/llcinitial/DpgClientBuilder.java index 9a1baa9815..4044233b6c 100644 --- a/protocol-tests/src/main/java/fixtures/llcinitial/DpgClientBuilder.java +++ b/protocol-tests/src/main/java/fixtures/llcinitial/DpgClientBuilder.java @@ -75,7 +75,7 @@ public DpgClientBuilder() { @Override public DpgClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-tests/src/main/java/fixtures/llcupdate1/DpgClientBuilder.java b/protocol-tests/src/main/java/fixtures/llcupdate1/DpgClientBuilder.java index 8fa2a10e42..a059641a34 100644 --- a/protocol-tests/src/main/java/fixtures/llcupdate1/DpgClientBuilder.java +++ b/protocol-tests/src/main/java/fixtures/llcupdate1/DpgClientBuilder.java @@ -75,7 +75,7 @@ public DpgClientBuilder() { @Override public DpgClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-tests/src/main/java/fixtures/lro/LROsClientBuilder.java b/protocol-tests/src/main/java/fixtures/lro/LROsClientBuilder.java index fdfe3bccf0..24c6ba0c5b 100644 --- a/protocol-tests/src/main/java/fixtures/lro/LROsClientBuilder.java +++ b/protocol-tests/src/main/java/fixtures/lro/LROsClientBuilder.java @@ -75,7 +75,7 @@ public LROsClientBuilder() { @Override public LROsClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-tests/src/main/java/fixtures/lro/LroRetrysClientBuilder.java b/protocol-tests/src/main/java/fixtures/lro/LroRetrysClientBuilder.java index 9846f38a02..849ca3b96a 100644 --- a/protocol-tests/src/main/java/fixtures/lro/LroRetrysClientBuilder.java +++ b/protocol-tests/src/main/java/fixtures/lro/LroRetrysClientBuilder.java @@ -76,7 +76,7 @@ public LroRetrysClientBuilder() { @Override public LroRetrysClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-tests/src/main/java/fixtures/lro/LrosCustomHeaderClientBuilder.java b/protocol-tests/src/main/java/fixtures/lro/LrosCustomHeaderClientBuilder.java index 8d66812716..0d7f368fe8 100644 --- a/protocol-tests/src/main/java/fixtures/lro/LrosCustomHeaderClientBuilder.java +++ b/protocol-tests/src/main/java/fixtures/lro/LrosCustomHeaderClientBuilder.java @@ -76,7 +76,7 @@ public LrosCustomHeaderClientBuilder() { @Override public LrosCustomHeaderClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-tests/src/main/java/fixtures/lro/LrosaDsClientBuilder.java b/protocol-tests/src/main/java/fixtures/lro/LrosaDsClientBuilder.java index 95f1c1a613..3346fffbf9 100644 --- a/protocol-tests/src/main/java/fixtures/lro/LrosaDsClientBuilder.java +++ b/protocol-tests/src/main/java/fixtures/lro/LrosaDsClientBuilder.java @@ -76,7 +76,7 @@ public LrosaDsClientBuilder() { @Override public LrosaDsClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-tests/src/main/java/fixtures/mediatypes/MediaTypesClientBuilder.java b/protocol-tests/src/main/java/fixtures/mediatypes/MediaTypesClientBuilder.java index b1d7217d24..28e9e0309a 100644 --- a/protocol-tests/src/main/java/fixtures/mediatypes/MediaTypesClientBuilder.java +++ b/protocol-tests/src/main/java/fixtures/mediatypes/MediaTypesClientBuilder.java @@ -76,7 +76,7 @@ public MediaTypesClientBuilder() { @Override public MediaTypesClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-tests/src/main/java/fixtures/multimediatypes/DpgMultiMediaTypesClientBuilder.java b/protocol-tests/src/main/java/fixtures/multimediatypes/DpgMultiMediaTypesClientBuilder.java index b519d72711..8013a71d3c 100644 --- a/protocol-tests/src/main/java/fixtures/multimediatypes/DpgMultiMediaTypesClientBuilder.java +++ b/protocol-tests/src/main/java/fixtures/multimediatypes/DpgMultiMediaTypesClientBuilder.java @@ -77,7 +77,7 @@ public DpgMultiMediaTypesClientBuilder() { @Override public DpgMultiMediaTypesClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-tests/src/main/java/fixtures/paging/AutoRestPagingTestServiceClientBuilder.java b/protocol-tests/src/main/java/fixtures/paging/AutoRestPagingTestServiceClientBuilder.java index 0852ba04e7..387d4a30f0 100644 --- a/protocol-tests/src/main/java/fixtures/paging/AutoRestPagingTestServiceClientBuilder.java +++ b/protocol-tests/src/main/java/fixtures/paging/AutoRestPagingTestServiceClientBuilder.java @@ -77,7 +77,7 @@ public AutoRestPagingTestServiceClientBuilder() { @Override public AutoRestPagingTestServiceClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-tests/src/main/java/fixtures/parameterizedendpoint/ParmaterizedEndpointClientBuilder.java b/protocol-tests/src/main/java/fixtures/parameterizedendpoint/ParmaterizedEndpointClientBuilder.java index d6eaf91db7..7bc3949826 100644 --- a/protocol-tests/src/main/java/fixtures/parameterizedendpoint/ParmaterizedEndpointClientBuilder.java +++ b/protocol-tests/src/main/java/fixtures/parameterizedendpoint/ParmaterizedEndpointClientBuilder.java @@ -78,7 +78,7 @@ public ParmaterizedEndpointClientBuilder() { @Override public ParmaterizedEndpointClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-tests/src/main/java/fixtures/requiredheaderquery/DpgRequiredHeaderQueryClientBuilder.java b/protocol-tests/src/main/java/fixtures/requiredheaderquery/DpgRequiredHeaderQueryClientBuilder.java index b72d37e9a7..c843630f68 100644 --- a/protocol-tests/src/main/java/fixtures/requiredheaderquery/DpgRequiredHeaderQueryClientBuilder.java +++ b/protocol-tests/src/main/java/fixtures/requiredheaderquery/DpgRequiredHeaderQueryClientBuilder.java @@ -77,7 +77,7 @@ public DpgRequiredHeaderQueryClientBuilder() { @Override public DpgRequiredHeaderQueryClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-tests/src/main/java/fixtures/requiredoptionalbody/RequiredOptionalBodyClientBuilder.java b/protocol-tests/src/main/java/fixtures/requiredoptionalbody/RequiredOptionalBodyClientBuilder.java index 1773ab5735..c53c0f0b1d 100644 --- a/protocol-tests/src/main/java/fixtures/requiredoptionalbody/RequiredOptionalBodyClientBuilder.java +++ b/protocol-tests/src/main/java/fixtures/requiredoptionalbody/RequiredOptionalBodyClientBuilder.java @@ -77,7 +77,7 @@ public RequiredOptionalBodyClientBuilder() { @Override public RequiredOptionalBodyClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-tests/src/main/java/fixtures/specialheader/SpecialHeaderClientBuilder.java b/protocol-tests/src/main/java/fixtures/specialheader/SpecialHeaderClientBuilder.java index 8bc5fe70da..96666d5bb2 100644 --- a/protocol-tests/src/main/java/fixtures/specialheader/SpecialHeaderClientBuilder.java +++ b/protocol-tests/src/main/java/fixtures/specialheader/SpecialHeaderClientBuilder.java @@ -76,7 +76,7 @@ public SpecialHeaderClientBuilder() { @Override public SpecialHeaderClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-tests/src/main/java/fixtures/url/PathItemsClientBuilder.java b/protocol-tests/src/main/java/fixtures/url/PathItemsClientBuilder.java index f1c3a3c68e..40ec985b6e 100644 --- a/protocol-tests/src/main/java/fixtures/url/PathItemsClientBuilder.java +++ b/protocol-tests/src/main/java/fixtures/url/PathItemsClientBuilder.java @@ -76,7 +76,7 @@ public PathItemsClientBuilder() { @Override public PathItemsClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-tests/src/main/java/fixtures/url/PathsClientBuilder.java b/protocol-tests/src/main/java/fixtures/url/PathsClientBuilder.java index 9e18db3430..ae24029ed2 100644 --- a/protocol-tests/src/main/java/fixtures/url/PathsClientBuilder.java +++ b/protocol-tests/src/main/java/fixtures/url/PathsClientBuilder.java @@ -75,7 +75,7 @@ public PathsClientBuilder() { @Override public PathsClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-tests/src/main/java/fixtures/url/QueriesClientBuilder.java b/protocol-tests/src/main/java/fixtures/url/QueriesClientBuilder.java index a71133cc07..8ca85721dd 100644 --- a/protocol-tests/src/main/java/fixtures/url/QueriesClientBuilder.java +++ b/protocol-tests/src/main/java/fixtures/url/QueriesClientBuilder.java @@ -76,7 +76,7 @@ public QueriesClientBuilder() { @Override public QueriesClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/protocol-tests/src/main/java/fixtures/url/multi/AutoRestUrlMutliCollectionFormatTestServiceClientBuilder.java b/protocol-tests/src/main/java/fixtures/url/multi/AutoRestUrlMutliCollectionFormatTestServiceClientBuilder.java index 48ee315e6d..a6613ed929 100644 --- a/protocol-tests/src/main/java/fixtures/url/multi/AutoRestUrlMutliCollectionFormatTestServiceClientBuilder.java +++ b/protocol-tests/src/main/java/fixtures/url/multi/AutoRestUrlMutliCollectionFormatTestServiceClientBuilder.java @@ -80,7 +80,7 @@ public AutoRestUrlMutliCollectionFormatTestServiceClientBuilder() { @Override public AutoRestUrlMutliCollectionFormatTestServiceClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/_specs_/azure/clientgenerator/core/access/AccessClientBuilder.java b/typespec-tests/src/main/java/com/_specs_/azure/clientgenerator/core/access/AccessClientBuilder.java index 77e60a0bc2..f479f9b77f 100644 --- a/typespec-tests/src/main/java/com/_specs_/azure/clientgenerator/core/access/AccessClientBuilder.java +++ b/typespec-tests/src/main/java/com/_specs_/azure/clientgenerator/core/access/AccessClientBuilder.java @@ -86,7 +86,7 @@ public AccessClientBuilder() { @Override public AccessClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/_specs_/azure/clientgenerator/core/usage/UsageClientBuilder.java b/typespec-tests/src/main/java/com/_specs_/azure/clientgenerator/core/usage/UsageClientBuilder.java index b981b10cf3..4365296c77 100644 --- a/typespec-tests/src/main/java/com/_specs_/azure/clientgenerator/core/usage/UsageClientBuilder.java +++ b/typespec-tests/src/main/java/com/_specs_/azure/clientgenerator/core/usage/UsageClientBuilder.java @@ -76,7 +76,7 @@ public UsageClientBuilder() { @Override public UsageClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/_specs_/azure/core/basic/BasicClientBuilder.java b/typespec-tests/src/main/java/com/_specs_/azure/core/basic/BasicClientBuilder.java index ca3cec88e1..1c57931f0e 100644 --- a/typespec-tests/src/main/java/com/_specs_/azure/core/basic/BasicClientBuilder.java +++ b/typespec-tests/src/main/java/com/_specs_/azure/core/basic/BasicClientBuilder.java @@ -81,7 +81,7 @@ public BasicClientBuilder() { @Override public BasicClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/_specs_/azure/core/lro/rpc/RpcClientBuilder.java b/typespec-tests/src/main/java/com/_specs_/azure/core/lro/rpc/RpcClientBuilder.java index 9990e618df..869490fc0f 100644 --- a/typespec-tests/src/main/java/com/_specs_/azure/core/lro/rpc/RpcClientBuilder.java +++ b/typespec-tests/src/main/java/com/_specs_/azure/core/lro/rpc/RpcClientBuilder.java @@ -76,7 +76,7 @@ public RpcClientBuilder() { @Override public RpcClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/_specs_/azure/core/lro/rpc/legacy/LegacyClientBuilder.java b/typespec-tests/src/main/java/com/_specs_/azure/core/lro/rpc/legacy/LegacyClientBuilder.java index c1f525d546..9de89d6d14 100644 --- a/typespec-tests/src/main/java/com/_specs_/azure/core/lro/rpc/legacy/LegacyClientBuilder.java +++ b/typespec-tests/src/main/java/com/_specs_/azure/core/lro/rpc/legacy/LegacyClientBuilder.java @@ -77,7 +77,7 @@ public LegacyClientBuilder() { @Override public LegacyClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/_specs_/azure/core/lro/standard/StandardClientBuilder.java b/typespec-tests/src/main/java/com/_specs_/azure/core/lro/standard/StandardClientBuilder.java index 7eb0f11a1d..2b57613ff7 100644 --- a/typespec-tests/src/main/java/com/_specs_/azure/core/lro/standard/StandardClientBuilder.java +++ b/typespec-tests/src/main/java/com/_specs_/azure/core/lro/standard/StandardClientBuilder.java @@ -77,7 +77,7 @@ public StandardClientBuilder() { @Override public StandardClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/_specs_/azure/core/scalar/ScalarClientBuilder.java b/typespec-tests/src/main/java/com/_specs_/azure/core/scalar/ScalarClientBuilder.java index 23975591cc..012b4b70cc 100644 --- a/typespec-tests/src/main/java/com/_specs_/azure/core/scalar/ScalarClientBuilder.java +++ b/typespec-tests/src/main/java/com/_specs_/azure/core/scalar/ScalarClientBuilder.java @@ -77,7 +77,7 @@ public ScalarClientBuilder() { @Override public ScalarClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/_specs_/azure/core/traits/TraitsClientBuilder.java b/typespec-tests/src/main/java/com/_specs_/azure/core/traits/TraitsClientBuilder.java index 129e2fd304..4ac67115e3 100644 --- a/typespec-tests/src/main/java/com/_specs_/azure/core/traits/TraitsClientBuilder.java +++ b/typespec-tests/src/main/java/com/_specs_/azure/core/traits/TraitsClientBuilder.java @@ -77,7 +77,7 @@ public TraitsClientBuilder() { @Override public TraitsClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/authentication/apikey/ApiKeyClientBuilder.java b/typespec-tests/src/main/java/com/authentication/apikey/ApiKeyClientBuilder.java index 5052dff06f..8a388f0450 100644 --- a/typespec-tests/src/main/java/com/authentication/apikey/ApiKeyClientBuilder.java +++ b/typespec-tests/src/main/java/com/authentication/apikey/ApiKeyClientBuilder.java @@ -79,7 +79,7 @@ public ApiKeyClientBuilder() { @Override public ApiKeyClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/authentication/http/custom/CustomClientBuilder.java b/typespec-tests/src/main/java/com/authentication/http/custom/CustomClientBuilder.java index 8dff5eb45a..bb18cf4784 100644 --- a/typespec-tests/src/main/java/com/authentication/http/custom/CustomClientBuilder.java +++ b/typespec-tests/src/main/java/com/authentication/http/custom/CustomClientBuilder.java @@ -80,7 +80,7 @@ public CustomClientBuilder() { @Override public CustomClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/authentication/oauth2/OAuth2ClientBuilder.java b/typespec-tests/src/main/java/com/authentication/oauth2/OAuth2ClientBuilder.java index c5d68a5e68..523e702adc 100644 --- a/typespec-tests/src/main/java/com/authentication/oauth2/OAuth2ClientBuilder.java +++ b/typespec-tests/src/main/java/com/authentication/oauth2/OAuth2ClientBuilder.java @@ -82,7 +82,7 @@ public OAuth2ClientBuilder() { @Override public OAuth2ClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/authentication/union/UnionClientBuilder.java b/typespec-tests/src/main/java/com/authentication/union/UnionClientBuilder.java index 8dbc0453e5..2c460a29ee 100644 --- a/typespec-tests/src/main/java/com/authentication/union/UnionClientBuilder.java +++ b/typespec-tests/src/main/java/com/authentication/union/UnionClientBuilder.java @@ -85,7 +85,7 @@ public UnionClientBuilder() { @Override public UnionClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/cadl/armresourceprovider/models/ChildResourceListResult.java b/typespec-tests/src/main/java/com/cadl/armresourceprovider/models/ChildResourceListResult.java index 6d33b5dbd3..412422c344 100644 --- a/typespec-tests/src/main/java/com/cadl/armresourceprovider/models/ChildResourceListResult.java +++ b/typespec-tests/src/main/java/com/cadl/armresourceprovider/models/ChildResourceListResult.java @@ -69,8 +69,8 @@ public String nextLink() { */ public void validate() { if (value() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property value in model ChildResourceListResult")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model ChildResourceListResult")); } else { value().forEach(e -> e.validate()); } diff --git a/typespec-tests/src/main/java/com/cadl/armresourceprovider/models/PagedOperation.java b/typespec-tests/src/main/java/com/cadl/armresourceprovider/models/PagedOperation.java index 7ebc364795..68a214ab3c 100644 --- a/typespec-tests/src/main/java/com/cadl/armresourceprovider/models/PagedOperation.java +++ b/typespec-tests/src/main/java/com/cadl/armresourceprovider/models/PagedOperation.java @@ -70,8 +70,8 @@ public String nextLink() { */ public void validate() { if (value() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property value in model PagedOperation")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model PagedOperation")); } else { value().forEach(e -> e.validate()); } diff --git a/typespec-tests/src/main/java/com/cadl/armresourceprovider/models/TopLevelArmResourceListResult.java b/typespec-tests/src/main/java/com/cadl/armresourceprovider/models/TopLevelArmResourceListResult.java index dc7b3a001e..a750545ecb 100644 --- a/typespec-tests/src/main/java/com/cadl/armresourceprovider/models/TopLevelArmResourceListResult.java +++ b/typespec-tests/src/main/java/com/cadl/armresourceprovider/models/TopLevelArmResourceListResult.java @@ -69,8 +69,9 @@ public String nextLink() { */ public void validate() { if (value() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property value in model TopLevelArmResourceListResult")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model TopLevelArmResourceListResult")); } else { value().forEach(e -> e.validate()); } diff --git a/typespec-tests/src/main/java/com/cadl/armresourceprovider/models/TopLevelArmResourceProperties.java b/typespec-tests/src/main/java/com/cadl/armresourceprovider/models/TopLevelArmResourceProperties.java index bf7169406f..c9f81161e4 100644 --- a/typespec-tests/src/main/java/com/cadl/armresourceprovider/models/TopLevelArmResourceProperties.java +++ b/typespec-tests/src/main/java/com/cadl/armresourceprovider/models/TopLevelArmResourceProperties.java @@ -162,20 +162,24 @@ public ProvisioningState provisioningState() { */ public void validate() { if (username() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property username in model TopLevelArmResourceProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property username in model TopLevelArmResourceProperties")); } if (userNames() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property userNames in model TopLevelArmResourceProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property userNames in model TopLevelArmResourceProperties")); } if (accuserName() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property accuserName in model TopLevelArmResourceProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property accuserName in model TopLevelArmResourceProperties")); } if (startTimestamp() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property startTimestamp in model TopLevelArmResourceProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property startTimestamp in model TopLevelArmResourceProperties")); } } diff --git a/typespec-tests/src/main/java/com/cadl/builtin/BuiltinClientBuilder.java b/typespec-tests/src/main/java/com/cadl/builtin/BuiltinClientBuilder.java index 56a9a380b4..475256b9e5 100644 --- a/typespec-tests/src/main/java/com/cadl/builtin/BuiltinClientBuilder.java +++ b/typespec-tests/src/main/java/com/cadl/builtin/BuiltinClientBuilder.java @@ -77,7 +77,7 @@ public BuiltinClientBuilder() { @Override public BuiltinClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/cadl/enumservice/EnumServiceClientBuilder.java b/typespec-tests/src/main/java/com/cadl/enumservice/EnumServiceClientBuilder.java index 0651de78f1..c7a05cd712 100644 --- a/typespec-tests/src/main/java/com/cadl/enumservice/EnumServiceClientBuilder.java +++ b/typespec-tests/src/main/java/com/cadl/enumservice/EnumServiceClientBuilder.java @@ -77,7 +77,7 @@ public EnumServiceClientBuilder() { @Override public EnumServiceClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/cadl/errormodel/ErrorModelClientBuilder.java b/typespec-tests/src/main/java/com/cadl/errormodel/ErrorModelClientBuilder.java index 42434729bd..b8b4c9b05e 100644 --- a/typespec-tests/src/main/java/com/cadl/errormodel/ErrorModelClientBuilder.java +++ b/typespec-tests/src/main/java/com/cadl/errormodel/ErrorModelClientBuilder.java @@ -77,7 +77,7 @@ public ErrorModelClientBuilder() { @Override public ErrorModelClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/cadl/flatten/FlattenClientBuilder.java b/typespec-tests/src/main/java/com/cadl/flatten/FlattenClientBuilder.java index 45253f0651..db21f13b96 100644 --- a/typespec-tests/src/main/java/com/cadl/flatten/FlattenClientBuilder.java +++ b/typespec-tests/src/main/java/com/cadl/flatten/FlattenClientBuilder.java @@ -77,7 +77,7 @@ public FlattenClientBuilder() { @Override public FlattenClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/cadl/internal/InternalClientBuilder.java b/typespec-tests/src/main/java/com/cadl/internal/InternalClientBuilder.java index cb57827b42..e32051bdaf 100644 --- a/typespec-tests/src/main/java/com/cadl/internal/InternalClientBuilder.java +++ b/typespec-tests/src/main/java/com/cadl/internal/InternalClientBuilder.java @@ -77,7 +77,7 @@ public InternalClientBuilder() { @Override public InternalClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/cadl/literalservice/LiteralServiceClientBuilder.java b/typespec-tests/src/main/java/com/cadl/literalservice/LiteralServiceClientBuilder.java index 8e13e281fd..66dff11b1e 100644 --- a/typespec-tests/src/main/java/com/cadl/literalservice/LiteralServiceClientBuilder.java +++ b/typespec-tests/src/main/java/com/cadl/literalservice/LiteralServiceClientBuilder.java @@ -77,7 +77,7 @@ public LiteralServiceClientBuilder() { @Override public LiteralServiceClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/cadl/longrunning/LongRunningClientBuilder.java b/typespec-tests/src/main/java/com/cadl/longrunning/LongRunningClientBuilder.java index 450f986b30..01a001147c 100644 --- a/typespec-tests/src/main/java/com/cadl/longrunning/LongRunningClientBuilder.java +++ b/typespec-tests/src/main/java/com/cadl/longrunning/LongRunningClientBuilder.java @@ -77,7 +77,7 @@ public LongRunningClientBuilder() { @Override public LongRunningClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/cadl/model/ModelClientBuilder.java b/typespec-tests/src/main/java/com/cadl/model/ModelClientBuilder.java index b5295cd190..cabc64b7ac 100644 --- a/typespec-tests/src/main/java/com/cadl/model/ModelClientBuilder.java +++ b/typespec-tests/src/main/java/com/cadl/model/ModelClientBuilder.java @@ -77,7 +77,7 @@ public ModelClientBuilder() { @Override public ModelClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/cadl/multicontenttypes/MultiContentTypesClientBuilder.java b/typespec-tests/src/main/java/com/cadl/multicontenttypes/MultiContentTypesClientBuilder.java index 047ee7c08f..63a74cc51c 100644 --- a/typespec-tests/src/main/java/com/cadl/multicontenttypes/MultiContentTypesClientBuilder.java +++ b/typespec-tests/src/main/java/com/cadl/multicontenttypes/MultiContentTypesClientBuilder.java @@ -84,7 +84,7 @@ public MultiContentTypesClientBuilder() { @Override public MultiContentTypesClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/cadl/multipart/MultipartClientBuilder.java b/typespec-tests/src/main/java/com/cadl/multipart/MultipartClientBuilder.java index 66859818a6..f0dfff7563 100644 --- a/typespec-tests/src/main/java/com/cadl/multipart/MultipartClientBuilder.java +++ b/typespec-tests/src/main/java/com/cadl/multipart/MultipartClientBuilder.java @@ -77,7 +77,7 @@ public MultipartClientBuilder() { @Override public MultipartClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/cadl/multipleapiversion/FirstClientBuilder.java b/typespec-tests/src/main/java/com/cadl/multipleapiversion/FirstClientBuilder.java index 6e3ece18a7..5dfb93b1eb 100644 --- a/typespec-tests/src/main/java/com/cadl/multipleapiversion/FirstClientBuilder.java +++ b/typespec-tests/src/main/java/com/cadl/multipleapiversion/FirstClientBuilder.java @@ -77,7 +77,7 @@ public FirstClientBuilder() { @Override public FirstClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/cadl/multipleapiversion/NoApiVersionClient.java b/typespec-tests/src/main/java/com/cadl/multipleapiversion/NoApiVersionClient.java index 47e58f379e..6c7447bae3 100644 --- a/typespec-tests/src/main/java/com/cadl/multipleapiversion/NoApiVersionClient.java +++ b/typespec-tests/src/main/java/com/cadl/multipleapiversion/NoApiVersionClient.java @@ -76,8 +76,9 @@ public void action(String param1) { // Generated convenience method for actionWithResponse RequestOptions requestOptions = new RequestOptions(); if (!Arrays.asList("2022-12-01-preview").contains(serviceClient.getServiceVersion().getVersion())) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter param1 is only available in api-version 2022-12-01-preview.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter param1 is only available in api-version 2022-12-01-preview.")); } if (param1 != null) { requestOptions.addQueryParam("param1", param1, false); diff --git a/typespec-tests/src/main/java/com/cadl/multipleapiversion/NoApiVersionClientBuilder.java b/typespec-tests/src/main/java/com/cadl/multipleapiversion/NoApiVersionClientBuilder.java index b499517a96..7fd68ea7f2 100644 --- a/typespec-tests/src/main/java/com/cadl/multipleapiversion/NoApiVersionClientBuilder.java +++ b/typespec-tests/src/main/java/com/cadl/multipleapiversion/NoApiVersionClientBuilder.java @@ -77,7 +77,7 @@ public NoApiVersionClientBuilder() { @Override public NoApiVersionClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/cadl/multipleapiversion/SecondClientBuilder.java b/typespec-tests/src/main/java/com/cadl/multipleapiversion/SecondClientBuilder.java index 9583f14287..c118d8f8f2 100644 --- a/typespec-tests/src/main/java/com/cadl/multipleapiversion/SecondClientBuilder.java +++ b/typespec-tests/src/main/java/com/cadl/multipleapiversion/SecondClientBuilder.java @@ -77,7 +77,7 @@ public SecondClientBuilder() { @Override public SecondClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/cadl/naming/NamingClientBuilder.java b/typespec-tests/src/main/java/com/cadl/naming/NamingClientBuilder.java index e8c63c2a22..070336f077 100644 --- a/typespec-tests/src/main/java/com/cadl/naming/NamingClientBuilder.java +++ b/typespec-tests/src/main/java/com/cadl/naming/NamingClientBuilder.java @@ -77,7 +77,7 @@ public NamingClientBuilder() { @Override public NamingClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/cadl/optional/OptionalClientBuilder.java b/typespec-tests/src/main/java/com/cadl/optional/OptionalClientBuilder.java index 3ef63731bb..75a063d10a 100644 --- a/typespec-tests/src/main/java/com/cadl/optional/OptionalClientBuilder.java +++ b/typespec-tests/src/main/java/com/cadl/optional/OptionalClientBuilder.java @@ -77,7 +77,7 @@ public OptionalClientBuilder() { @Override public OptionalClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/cadl/partialupdate/PartialUpdateClientBuilder.java b/typespec-tests/src/main/java/com/cadl/partialupdate/PartialUpdateClientBuilder.java index 8f0c6de764..1bc5fefbe1 100644 --- a/typespec-tests/src/main/java/com/cadl/partialupdate/PartialUpdateClientBuilder.java +++ b/typespec-tests/src/main/java/com/cadl/partialupdate/PartialUpdateClientBuilder.java @@ -77,7 +77,7 @@ public PartialUpdateClientBuilder() { @Override public PartialUpdateClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/cadl/patch/PatchClientBuilder.java b/typespec-tests/src/main/java/com/cadl/patch/PatchClientBuilder.java index 3dd9e83f9a..43127967ec 100644 --- a/typespec-tests/src/main/java/com/cadl/patch/PatchClientBuilder.java +++ b/typespec-tests/src/main/java/com/cadl/patch/PatchClientBuilder.java @@ -77,7 +77,7 @@ public PatchClientBuilder() { @Override public PatchClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/cadl/protocolandconvenient/ProtocolAndConvenientClientBuilder.java b/typespec-tests/src/main/java/com/cadl/protocolandconvenient/ProtocolAndConvenientClientBuilder.java index 060c984815..7df2b7fa7f 100644 --- a/typespec-tests/src/main/java/com/cadl/protocolandconvenient/ProtocolAndConvenientClientBuilder.java +++ b/typespec-tests/src/main/java/com/cadl/protocolandconvenient/ProtocolAndConvenientClientBuilder.java @@ -78,7 +78,7 @@ public ProtocolAndConvenientClientBuilder() { @Override public ProtocolAndConvenientClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/cadl/response/ResponseClientBuilder.java b/typespec-tests/src/main/java/com/cadl/response/ResponseClientBuilder.java index 25cead2722..2cf433ea99 100644 --- a/typespec-tests/src/main/java/com/cadl/response/ResponseClientBuilder.java +++ b/typespec-tests/src/main/java/com/cadl/response/ResponseClientBuilder.java @@ -77,7 +77,7 @@ public ResponseClientBuilder() { @Override public ResponseClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/cadl/server/ContosoClientBuilder.java b/typespec-tests/src/main/java/com/cadl/server/ContosoClientBuilder.java index 726c338418..55b3c23058 100644 --- a/typespec-tests/src/main/java/com/cadl/server/ContosoClientBuilder.java +++ b/typespec-tests/src/main/java/com/cadl/server/ContosoClientBuilder.java @@ -77,7 +77,7 @@ public ContosoClientBuilder() { @Override public ContosoClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/cadl/server/HttpbinClientBuilder.java b/typespec-tests/src/main/java/com/cadl/server/HttpbinClientBuilder.java index 34129c15de..c9565091de 100644 --- a/typespec-tests/src/main/java/com/cadl/server/HttpbinClientBuilder.java +++ b/typespec-tests/src/main/java/com/cadl/server/HttpbinClientBuilder.java @@ -76,7 +76,7 @@ public HttpbinClientBuilder() { @Override public HttpbinClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/cadl/specialchars/SpecialCharsClientBuilder.java b/typespec-tests/src/main/java/com/cadl/specialchars/SpecialCharsClientBuilder.java index 0b2abb8175..9c0c4c56fb 100644 --- a/typespec-tests/src/main/java/com/cadl/specialchars/SpecialCharsClientBuilder.java +++ b/typespec-tests/src/main/java/com/cadl/specialchars/SpecialCharsClientBuilder.java @@ -77,7 +77,7 @@ public SpecialCharsClientBuilder() { @Override public SpecialCharsClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/cadl/specialheaders/SpecialHeadersClientBuilder.java b/typespec-tests/src/main/java/com/cadl/specialheaders/SpecialHeadersClientBuilder.java index f86cdaa1db..0bdb5d3a35 100644 --- a/typespec-tests/src/main/java/com/cadl/specialheaders/SpecialHeadersClientBuilder.java +++ b/typespec-tests/src/main/java/com/cadl/specialheaders/SpecialHeadersClientBuilder.java @@ -86,7 +86,7 @@ public SpecialHeadersClientBuilder() { @Override public SpecialHeadersClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/cadl/union/UnionClientBuilder.java b/typespec-tests/src/main/java/com/cadl/union/UnionClientBuilder.java index 6e19df6f55..4e707cd473 100644 --- a/typespec-tests/src/main/java/com/cadl/union/UnionClientBuilder.java +++ b/typespec-tests/src/main/java/com/cadl/union/UnionClientBuilder.java @@ -77,7 +77,7 @@ public UnionClientBuilder() { @Override public UnionClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/cadl/versioning/VersioningClient.java b/typespec-tests/src/main/java/com/cadl/versioning/VersioningClient.java index fe9ab162c3..4e31b77103 100644 --- a/typespec-tests/src/main/java/com/cadl/versioning/VersioningClient.java +++ b/typespec-tests/src/main/java/com/cadl/versioning/VersioningClient.java @@ -138,8 +138,9 @@ public SyncPoller beginExport(String nam // Generated convenience method for beginExportWithModel RequestOptions requestOptions = new RequestOptions(); if (!Arrays.asList("2022-12-01-preview").contains(serviceClient.getServiceVersion().getVersion())) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Parameter projectedFileFormat is only available in api-version 2022-12-01-preview.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter projectedFileFormat is only available in api-version 2022-12-01-preview.")); } if (projectFileVersion != null) { requestOptions.addQueryParam("projectFileVersion", projectFileVersion, false); @@ -213,8 +214,9 @@ public PagedIterable list(List select, String filter) { // Generated convenience method for list RequestOptions requestOptions = new RequestOptions(); if (!Arrays.asList("2022-12-01-preview").contains(serviceClient.getServiceVersion().getVersion())) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter filter is only available in api-version 2022-12-01-preview.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter filter is only available in api-version 2022-12-01-preview.")); } if (select != null) { for (String paramItemValue : select) { diff --git a/typespec-tests/src/main/java/com/cadl/versioning/VersioningClientBuilder.java b/typespec-tests/src/main/java/com/cadl/versioning/VersioningClientBuilder.java index 0bdc5e12fc..fc2d1b4940 100644 --- a/typespec-tests/src/main/java/com/cadl/versioning/VersioningClientBuilder.java +++ b/typespec-tests/src/main/java/com/cadl/versioning/VersioningClientBuilder.java @@ -77,7 +77,7 @@ public VersioningClientBuilder() { @Override public VersioningClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/cadl/visibility/VisibilityClientBuilder.java b/typespec-tests/src/main/java/com/cadl/visibility/VisibilityClientBuilder.java index f834a4e0d6..3213434ec4 100644 --- a/typespec-tests/src/main/java/com/cadl/visibility/VisibilityClientBuilder.java +++ b/typespec-tests/src/main/java/com/cadl/visibility/VisibilityClientBuilder.java @@ -84,7 +84,7 @@ public VisibilityClientBuilder() { @Override public VisibilityClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/cadl/wiretype/WireTypeClientBuilder.java b/typespec-tests/src/main/java/com/cadl/wiretype/WireTypeClientBuilder.java index 9147b14b80..c92bf9d547 100644 --- a/typespec-tests/src/main/java/com/cadl/wiretype/WireTypeClientBuilder.java +++ b/typespec-tests/src/main/java/com/cadl/wiretype/WireTypeClientBuilder.java @@ -77,7 +77,7 @@ public WireTypeClientBuilder() { @Override public WireTypeClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/client/naming/NamingClientBuilder.java b/typespec-tests/src/main/java/com/client/naming/NamingClientBuilder.java index 06d6805b8d..c15d1b867f 100644 --- a/typespec-tests/src/main/java/com/client/naming/NamingClientBuilder.java +++ b/typespec-tests/src/main/java/com/client/naming/NamingClientBuilder.java @@ -83,7 +83,7 @@ public NamingClientBuilder() { @Override public NamingClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/client/structure/service/ClientAClientBuilder.java b/typespec-tests/src/main/java/com/client/structure/service/ClientAClientBuilder.java index 96d0500cac..0869fbe5c6 100644 --- a/typespec-tests/src/main/java/com/client/structure/service/ClientAClientBuilder.java +++ b/typespec-tests/src/main/java/com/client/structure/service/ClientAClientBuilder.java @@ -78,7 +78,7 @@ public ClientAClientBuilder() { @Override public ClientAClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/client/structure/service/ClientBClientBuilder.java b/typespec-tests/src/main/java/com/client/structure/service/ClientBClientBuilder.java index 619521fb63..2142ce52c2 100644 --- a/typespec-tests/src/main/java/com/client/structure/service/ClientBClientBuilder.java +++ b/typespec-tests/src/main/java/com/client/structure/service/ClientBClientBuilder.java @@ -78,7 +78,7 @@ public ClientBClientBuilder() { @Override public ClientBClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/client/structure/service/RenamedOperationClientBuilder.java b/typespec-tests/src/main/java/com/client/structure/service/RenamedOperationClientBuilder.java index 72d80e2a0b..1e492c1327 100644 --- a/typespec-tests/src/main/java/com/client/structure/service/RenamedOperationClientBuilder.java +++ b/typespec-tests/src/main/java/com/client/structure/service/RenamedOperationClientBuilder.java @@ -83,7 +83,7 @@ public RenamedOperationClientBuilder() { @Override public RenamedOperationClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/client/structure/service/ServiceClientClientBuilder.java b/typespec-tests/src/main/java/com/client/structure/service/ServiceClientClientBuilder.java index f04a19c715..62b527fa18 100644 --- a/typespec-tests/src/main/java/com/client/structure/service/ServiceClientClientBuilder.java +++ b/typespec-tests/src/main/java/com/client/structure/service/ServiceClientClientBuilder.java @@ -91,7 +91,7 @@ public ServiceClientClientBuilder() { @Override public ServiceClientClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/client/structure/service/TwoOperationGroupClientBuilder.java b/typespec-tests/src/main/java/com/client/structure/service/TwoOperationGroupClientBuilder.java index 5c96ffa324..6b420ab901 100644 --- a/typespec-tests/src/main/java/com/client/structure/service/TwoOperationGroupClientBuilder.java +++ b/typespec-tests/src/main/java/com/client/structure/service/TwoOperationGroupClientBuilder.java @@ -79,7 +79,7 @@ public TwoOperationGroupClientBuilder() { @Override public TwoOperationGroupClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/encode/bytes/BytesClientBuilder.java b/typespec-tests/src/main/java/com/encode/bytes/BytesClientBuilder.java index 593f5a3110..1ac1ba14a3 100644 --- a/typespec-tests/src/main/java/com/encode/bytes/BytesClientBuilder.java +++ b/typespec-tests/src/main/java/com/encode/bytes/BytesClientBuilder.java @@ -86,7 +86,7 @@ public BytesClientBuilder() { @Override public BytesClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/encode/datetime/DatetimeClientBuilder.java b/typespec-tests/src/main/java/com/encode/datetime/DatetimeClientBuilder.java index 643c15fe39..d6e1f1b662 100644 --- a/typespec-tests/src/main/java/com/encode/datetime/DatetimeClientBuilder.java +++ b/typespec-tests/src/main/java/com/encode/datetime/DatetimeClientBuilder.java @@ -85,7 +85,7 @@ public DatetimeClientBuilder() { @Override public DatetimeClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/encode/duration/DurationClientBuilder.java b/typespec-tests/src/main/java/com/encode/duration/DurationClientBuilder.java index 18386bd56d..20044aeabb 100644 --- a/typespec-tests/src/main/java/com/encode/duration/DurationClientBuilder.java +++ b/typespec-tests/src/main/java/com/encode/duration/DurationClientBuilder.java @@ -83,7 +83,7 @@ public DurationClientBuilder() { @Override public DurationClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/parameters/bodyoptionality/BodyOptionalityClientBuilder.java b/typespec-tests/src/main/java/com/parameters/bodyoptionality/BodyOptionalityClientBuilder.java index 528c83d542..72967f1f5b 100644 --- a/typespec-tests/src/main/java/com/parameters/bodyoptionality/BodyOptionalityClientBuilder.java +++ b/typespec-tests/src/main/java/com/parameters/bodyoptionality/BodyOptionalityClientBuilder.java @@ -82,7 +82,7 @@ public BodyOptionalityClientBuilder() { @Override public BodyOptionalityClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/parameters/collectionformat/CollectionFormatClientBuilder.java b/typespec-tests/src/main/java/com/parameters/collectionformat/CollectionFormatClientBuilder.java index b5276d18ad..69b46a6bbf 100644 --- a/typespec-tests/src/main/java/com/parameters/collectionformat/CollectionFormatClientBuilder.java +++ b/typespec-tests/src/main/java/com/parameters/collectionformat/CollectionFormatClientBuilder.java @@ -78,7 +78,7 @@ public CollectionFormatClientBuilder() { @Override public CollectionFormatClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/parameters/spread/SpreadClientBuilder.java b/typespec-tests/src/main/java/com/parameters/spread/SpreadClientBuilder.java index 79a9d6b788..6718d508c5 100644 --- a/typespec-tests/src/main/java/com/parameters/spread/SpreadClientBuilder.java +++ b/typespec-tests/src/main/java/com/parameters/spread/SpreadClientBuilder.java @@ -77,7 +77,7 @@ public SpreadClientBuilder() { @Override public SpreadClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/payload/contentnegotiation/ContentNegotiationClientBuilder.java b/typespec-tests/src/main/java/com/payload/contentnegotiation/ContentNegotiationClientBuilder.java index 33175f5354..0bb8c4e249 100644 --- a/typespec-tests/src/main/java/com/payload/contentnegotiation/ContentNegotiationClientBuilder.java +++ b/typespec-tests/src/main/java/com/payload/contentnegotiation/ContentNegotiationClientBuilder.java @@ -82,7 +82,7 @@ public ContentNegotiationClientBuilder() { @Override public ContentNegotiationClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/payload/jsonmergepatch/JsonMergePatchClientBuilder.java b/typespec-tests/src/main/java/com/payload/jsonmergepatch/JsonMergePatchClientBuilder.java index 9f99086337..9e59fe4715 100644 --- a/typespec-tests/src/main/java/com/payload/jsonmergepatch/JsonMergePatchClientBuilder.java +++ b/typespec-tests/src/main/java/com/payload/jsonmergepatch/JsonMergePatchClientBuilder.java @@ -76,7 +76,7 @@ public JsonMergePatchClientBuilder() { @Override public JsonMergePatchClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/payload/mediatype/MediaTypeClientBuilder.java b/typespec-tests/src/main/java/com/payload/mediatype/MediaTypeClientBuilder.java index 7ef3ae726d..70f8146418 100644 --- a/typespec-tests/src/main/java/com/payload/mediatype/MediaTypeClientBuilder.java +++ b/typespec-tests/src/main/java/com/payload/mediatype/MediaTypeClientBuilder.java @@ -76,7 +76,7 @@ public MediaTypeClientBuilder() { @Override public MediaTypeClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/payload/multipart/MultiPartClientBuilder.java b/typespec-tests/src/main/java/com/payload/multipart/MultiPartClientBuilder.java index ec1480e99d..04f8ae2ede 100644 --- a/typespec-tests/src/main/java/com/payload/multipart/MultiPartClientBuilder.java +++ b/typespec-tests/src/main/java/com/payload/multipart/MultiPartClientBuilder.java @@ -76,7 +76,7 @@ public MultiPartClientBuilder() { @Override public MultiPartClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/payload/pageable/PageableClientBuilder.java b/typespec-tests/src/main/java/com/payload/pageable/PageableClientBuilder.java index d723b3afe1..3dd55e0368 100644 --- a/typespec-tests/src/main/java/com/payload/pageable/PageableClientBuilder.java +++ b/typespec-tests/src/main/java/com/payload/pageable/PageableClientBuilder.java @@ -76,7 +76,7 @@ public PageableClientBuilder() { @Override public PageableClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/projection/projectedname/ProjectedNameClientBuilder.java b/typespec-tests/src/main/java/com/projection/projectedname/ProjectedNameClientBuilder.java index 5ef011cd35..b403ab6135 100644 --- a/typespec-tests/src/main/java/com/projection/projectedname/ProjectedNameClientBuilder.java +++ b/typespec-tests/src/main/java/com/projection/projectedname/ProjectedNameClientBuilder.java @@ -84,7 +84,7 @@ public ProjectedNameClientBuilder() { @Override public ProjectedNameClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/resiliency/servicedriven/ResiliencyServiceDrivenClient.java b/typespec-tests/src/main/java/com/resiliency/servicedriven/ResiliencyServiceDrivenClient.java index e66d48de9a..91835d22fb 100644 --- a/typespec-tests/src/main/java/com/resiliency/servicedriven/ResiliencyServiceDrivenClient.java +++ b/typespec-tests/src/main/java/com/resiliency/servicedriven/ResiliencyServiceDrivenClient.java @@ -159,8 +159,8 @@ public void fromNone(String newParameter) { // Generated convenience method for fromNoneWithResponse RequestOptions requestOptions = new RequestOptions(); if (!Arrays.asList("v2").contains(serviceClient.getServiceVersion().getVersion())) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter newParameter is only available in api-version v2.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter newParameter is only available in api-version v2.")); } if (newParameter != null) { requestOptions.addQueryParam("new-parameter", newParameter, false); @@ -204,8 +204,8 @@ public void fromOneRequired(String parameter, String newParameter) { // Generated convenience method for fromOneRequiredWithResponse RequestOptions requestOptions = new RequestOptions(); if (!Arrays.asList("v2").contains(serviceClient.getServiceVersion().getVersion())) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter newParameter is only available in api-version v2.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter newParameter is only available in api-version v2.")); } if (newParameter != null) { requestOptions.addQueryParam("new-parameter", newParameter, false); @@ -252,8 +252,8 @@ public void fromOneOptional(String parameter, String newParameter) { // Generated convenience method for fromOneOptionalWithResponse RequestOptions requestOptions = new RequestOptions(); if (!Arrays.asList("v2").contains(serviceClient.getServiceVersion().getVersion())) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter newParameter is only available in api-version v2.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter newParameter is only available in api-version v2.")); } if (parameter != null) { requestOptions.addQueryParam("parameter", parameter, false); diff --git a/typespec-tests/src/main/java/com/resiliency/servicedriven/ResiliencyServiceDrivenClientBuilder.java b/typespec-tests/src/main/java/com/resiliency/servicedriven/ResiliencyServiceDrivenClientBuilder.java index 0b497bf10e..f73a13a67b 100644 --- a/typespec-tests/src/main/java/com/resiliency/servicedriven/ResiliencyServiceDrivenClientBuilder.java +++ b/typespec-tests/src/main/java/com/resiliency/servicedriven/ResiliencyServiceDrivenClientBuilder.java @@ -79,7 +79,7 @@ public ResiliencyServiceDrivenClientBuilder() { @Override public ResiliencyServiceDrivenClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/resiliency/servicedriven/v1/ResiliencyServiceDrivenClientBuilder.java b/typespec-tests/src/main/java/com/resiliency/servicedriven/v1/ResiliencyServiceDrivenClientBuilder.java index 739d33a758..9977582d35 100644 --- a/typespec-tests/src/main/java/com/resiliency/servicedriven/v1/ResiliencyServiceDrivenClientBuilder.java +++ b/typespec-tests/src/main/java/com/resiliency/servicedriven/v1/ResiliencyServiceDrivenClientBuilder.java @@ -79,7 +79,7 @@ public ResiliencyServiceDrivenClientBuilder() { @Override public ResiliencyServiceDrivenClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/serialization/encodedname/json/JsonClientBuilder.java b/typespec-tests/src/main/java/com/serialization/encodedname/json/JsonClientBuilder.java index 4274860178..470fc145c2 100644 --- a/typespec-tests/src/main/java/com/serialization/encodedname/json/JsonClientBuilder.java +++ b/typespec-tests/src/main/java/com/serialization/encodedname/json/JsonClientBuilder.java @@ -76,7 +76,7 @@ public JsonClientBuilder() { @Override public JsonClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/server/endpoint/notdefined/NotDefinedClientBuilder.java b/typespec-tests/src/main/java/com/server/endpoint/notdefined/NotDefinedClientBuilder.java index 43c895c396..1bb06fa352 100644 --- a/typespec-tests/src/main/java/com/server/endpoint/notdefined/NotDefinedClientBuilder.java +++ b/typespec-tests/src/main/java/com/server/endpoint/notdefined/NotDefinedClientBuilder.java @@ -78,7 +78,7 @@ public NotDefinedClientBuilder() { @Override public NotDefinedClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/server/path/multiple/MultipleClientBuilder.java b/typespec-tests/src/main/java/com/server/path/multiple/MultipleClientBuilder.java index fd81ef1f58..2ca475f1b7 100644 --- a/typespec-tests/src/main/java/com/server/path/multiple/MultipleClientBuilder.java +++ b/typespec-tests/src/main/java/com/server/path/multiple/MultipleClientBuilder.java @@ -77,7 +77,7 @@ public MultipleClientBuilder() { @Override public MultipleClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/server/path/single/SingleClientBuilder.java b/typespec-tests/src/main/java/com/server/path/single/SingleClientBuilder.java index 5c89232448..4ed0e51dbe 100644 --- a/typespec-tests/src/main/java/com/server/path/single/SingleClientBuilder.java +++ b/typespec-tests/src/main/java/com/server/path/single/SingleClientBuilder.java @@ -77,7 +77,7 @@ public SingleClientBuilder() { @Override public SingleClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/server/versions/notversioned/NotVersionedClientBuilder.java b/typespec-tests/src/main/java/com/server/versions/notversioned/NotVersionedClientBuilder.java index 0eedc9f642..02ea513d3d 100644 --- a/typespec-tests/src/main/java/com/server/versions/notversioned/NotVersionedClientBuilder.java +++ b/typespec-tests/src/main/java/com/server/versions/notversioned/NotVersionedClientBuilder.java @@ -78,7 +78,7 @@ public NotVersionedClientBuilder() { @Override public NotVersionedClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/server/versions/versioned/VersionedClientBuilder.java b/typespec-tests/src/main/java/com/server/versions/versioned/VersionedClientBuilder.java index a3f71484bb..742c5fdf81 100644 --- a/typespec-tests/src/main/java/com/server/versions/versioned/VersionedClientBuilder.java +++ b/typespec-tests/src/main/java/com/server/versions/versioned/VersionedClientBuilder.java @@ -78,7 +78,7 @@ public VersionedClientBuilder() { @Override public VersionedClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/specialheaders/clientrequestid/ClientRequestIdClientBuilder.java b/typespec-tests/src/main/java/com/specialheaders/clientrequestid/ClientRequestIdClientBuilder.java index b1bb4e6a60..af63601600 100644 --- a/typespec-tests/src/main/java/com/specialheaders/clientrequestid/ClientRequestIdClientBuilder.java +++ b/typespec-tests/src/main/java/com/specialheaders/clientrequestid/ClientRequestIdClientBuilder.java @@ -77,7 +77,7 @@ public ClientRequestIdClientBuilder() { @Override public ClientRequestIdClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/specialheaders/conditionalrequest/ConditionalRequestClientBuilder.java b/typespec-tests/src/main/java/com/specialheaders/conditionalrequest/ConditionalRequestClientBuilder.java index a1359214c1..42a72f3ed7 100644 --- a/typespec-tests/src/main/java/com/specialheaders/conditionalrequest/ConditionalRequestClientBuilder.java +++ b/typespec-tests/src/main/java/com/specialheaders/conditionalrequest/ConditionalRequestClientBuilder.java @@ -77,7 +77,7 @@ public ConditionalRequestClientBuilder() { @Override public ConditionalRequestClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/specialheaders/repeatability/RepeatabilityClientBuilder.java b/typespec-tests/src/main/java/com/specialheaders/repeatability/RepeatabilityClientBuilder.java index 0ed71cbf3a..49cbea5cef 100644 --- a/typespec-tests/src/main/java/com/specialheaders/repeatability/RepeatabilityClientBuilder.java +++ b/typespec-tests/src/main/java/com/specialheaders/repeatability/RepeatabilityClientBuilder.java @@ -77,7 +77,7 @@ public RepeatabilityClientBuilder() { @Override public RepeatabilityClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/specialwords/SpecialWordsClientBuilder.java b/typespec-tests/src/main/java/com/specialwords/SpecialWordsClientBuilder.java index 97f0fca8d6..5539eeea13 100644 --- a/typespec-tests/src/main/java/com/specialwords/SpecialWordsClientBuilder.java +++ b/typespec-tests/src/main/java/com/specialwords/SpecialWordsClientBuilder.java @@ -85,7 +85,7 @@ public SpecialWordsClientBuilder() { @Override public SpecialWordsClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/type/array/ArrayClientBuilder.java b/typespec-tests/src/main/java/com/type/array/ArrayClientBuilder.java index ff7c96ee2e..50e6237076 100644 --- a/typespec-tests/src/main/java/com/type/array/ArrayClientBuilder.java +++ b/typespec-tests/src/main/java/com/type/array/ArrayClientBuilder.java @@ -96,7 +96,7 @@ public ArrayClientBuilder() { @Override public ArrayClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/type/dictionary/DictionaryClientBuilder.java b/typespec-tests/src/main/java/com/type/dictionary/DictionaryClientBuilder.java index 709fb7c50e..4e1485f20d 100644 --- a/typespec-tests/src/main/java/com/type/dictionary/DictionaryClientBuilder.java +++ b/typespec-tests/src/main/java/com/type/dictionary/DictionaryClientBuilder.java @@ -99,7 +99,7 @@ public DictionaryClientBuilder() { @Override public DictionaryClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/type/enums/extensible/ExtensibleClientBuilder.java b/typespec-tests/src/main/java/com/type/enums/extensible/ExtensibleClientBuilder.java index 07a93d9fe9..c14c601e96 100644 --- a/typespec-tests/src/main/java/com/type/enums/extensible/ExtensibleClientBuilder.java +++ b/typespec-tests/src/main/java/com/type/enums/extensible/ExtensibleClientBuilder.java @@ -76,7 +76,7 @@ public ExtensibleClientBuilder() { @Override public ExtensibleClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/type/enums/fixed/FixedClientBuilder.java b/typespec-tests/src/main/java/com/type/enums/fixed/FixedClientBuilder.java index 2f7f68c842..f8e362b726 100644 --- a/typespec-tests/src/main/java/com/type/enums/fixed/FixedClientBuilder.java +++ b/typespec-tests/src/main/java/com/type/enums/fixed/FixedClientBuilder.java @@ -75,7 +75,7 @@ public FixedClientBuilder() { @Override public FixedClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/type/model/empty/EmptyClientBuilder.java b/typespec-tests/src/main/java/com/type/model/empty/EmptyClientBuilder.java index cc71131496..88f01cf07f 100644 --- a/typespec-tests/src/main/java/com/type/model/empty/EmptyClientBuilder.java +++ b/typespec-tests/src/main/java/com/type/model/empty/EmptyClientBuilder.java @@ -75,7 +75,7 @@ public EmptyClientBuilder() { @Override public EmptyClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/type/model/flatten/FlattenClientBuilder.java b/typespec-tests/src/main/java/com/type/model/flatten/FlattenClientBuilder.java index 074feb412f..7cad8cb994 100644 --- a/typespec-tests/src/main/java/com/type/model/flatten/FlattenClientBuilder.java +++ b/typespec-tests/src/main/java/com/type/model/flatten/FlattenClientBuilder.java @@ -76,7 +76,7 @@ public FlattenClientBuilder() { @Override public FlattenClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/type/model/inheritance/enumdiscriminator/EnumDiscriminatorClientBuilder.java b/typespec-tests/src/main/java/com/type/model/inheritance/enumdiscriminator/EnumDiscriminatorClientBuilder.java index dfdef35add..f0f7c62187 100644 --- a/typespec-tests/src/main/java/com/type/model/inheritance/enumdiscriminator/EnumDiscriminatorClientBuilder.java +++ b/typespec-tests/src/main/java/com/type/model/inheritance/enumdiscriminator/EnumDiscriminatorClientBuilder.java @@ -77,7 +77,7 @@ public EnumDiscriminatorClientBuilder() { @Override public EnumDiscriminatorClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/type/model/inheritance/nesteddiscriminator/NestedDiscriminatorClientBuilder.java b/typespec-tests/src/main/java/com/type/model/inheritance/nesteddiscriminator/NestedDiscriminatorClientBuilder.java index fa96f20f82..2389c7f15d 100644 --- a/typespec-tests/src/main/java/com/type/model/inheritance/nesteddiscriminator/NestedDiscriminatorClientBuilder.java +++ b/typespec-tests/src/main/java/com/type/model/inheritance/nesteddiscriminator/NestedDiscriminatorClientBuilder.java @@ -77,7 +77,7 @@ public NestedDiscriminatorClientBuilder() { @Override public NestedDiscriminatorClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/type/model/inheritance/notdiscriminated/NotDiscriminatedClientBuilder.java b/typespec-tests/src/main/java/com/type/model/inheritance/notdiscriminated/NotDiscriminatedClientBuilder.java index 9d43bdd6b6..15b33515ac 100644 --- a/typespec-tests/src/main/java/com/type/model/inheritance/notdiscriminated/NotDiscriminatedClientBuilder.java +++ b/typespec-tests/src/main/java/com/type/model/inheritance/notdiscriminated/NotDiscriminatedClientBuilder.java @@ -77,7 +77,7 @@ public NotDiscriminatedClientBuilder() { @Override public NotDiscriminatedClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/type/model/inheritance/recursive/RecursiveClientBuilder.java b/typespec-tests/src/main/java/com/type/model/inheritance/recursive/RecursiveClientBuilder.java index bd89fd7958..330833214e 100644 --- a/typespec-tests/src/main/java/com/type/model/inheritance/recursive/RecursiveClientBuilder.java +++ b/typespec-tests/src/main/java/com/type/model/inheritance/recursive/RecursiveClientBuilder.java @@ -77,7 +77,7 @@ public RecursiveClientBuilder() { @Override public RecursiveClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/type/model/inheritance/singlediscriminator/SingleDiscriminatorClientBuilder.java b/typespec-tests/src/main/java/com/type/model/inheritance/singlediscriminator/SingleDiscriminatorClientBuilder.java index f821c89ddc..6fcf83c822 100644 --- a/typespec-tests/src/main/java/com/type/model/inheritance/singlediscriminator/SingleDiscriminatorClientBuilder.java +++ b/typespec-tests/src/main/java/com/type/model/inheritance/singlediscriminator/SingleDiscriminatorClientBuilder.java @@ -77,7 +77,7 @@ public SingleDiscriminatorClientBuilder() { @Override public SingleDiscriminatorClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/type/model/usage/UsageClientBuilder.java b/typespec-tests/src/main/java/com/type/model/usage/UsageClientBuilder.java index 7ec93cf4c2..7e3385ed42 100644 --- a/typespec-tests/src/main/java/com/type/model/usage/UsageClientBuilder.java +++ b/typespec-tests/src/main/java/com/type/model/usage/UsageClientBuilder.java @@ -75,7 +75,7 @@ public UsageClientBuilder() { @Override public UsageClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/type/model/visibility/VisibilityClientBuilder.java b/typespec-tests/src/main/java/com/type/model/visibility/VisibilityClientBuilder.java index 08a62c3158..b0a9e8c40d 100644 --- a/typespec-tests/src/main/java/com/type/model/visibility/VisibilityClientBuilder.java +++ b/typespec-tests/src/main/java/com/type/model/visibility/VisibilityClientBuilder.java @@ -76,7 +76,7 @@ public VisibilityClientBuilder() { @Override public VisibilityClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/type/property/additionalproperties/AdditionalPropertiesClientBuilder.java b/typespec-tests/src/main/java/com/type/property/additionalproperties/AdditionalPropertiesClientBuilder.java index a351e7dcf6..106338f780 100644 --- a/typespec-tests/src/main/java/com/type/property/additionalproperties/AdditionalPropertiesClientBuilder.java +++ b/typespec-tests/src/main/java/com/type/property/additionalproperties/AdditionalPropertiesClientBuilder.java @@ -106,7 +106,7 @@ public AdditionalPropertiesClientBuilder() { @Override public AdditionalPropertiesClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/type/property/nullable/NullableClientBuilder.java b/typespec-tests/src/main/java/com/type/property/nullable/NullableClientBuilder.java index f32dc885e5..3592ba1469 100644 --- a/typespec-tests/src/main/java/com/type/property/nullable/NullableClientBuilder.java +++ b/typespec-tests/src/main/java/com/type/property/nullable/NullableClientBuilder.java @@ -89,7 +89,7 @@ public NullableClientBuilder() { @Override public NullableClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/type/property/optional/OptionalClientBuilder.java b/typespec-tests/src/main/java/com/type/property/optional/OptionalClientBuilder.java index 6e469b5801..25c4948c7a 100644 --- a/typespec-tests/src/main/java/com/type/property/optional/OptionalClientBuilder.java +++ b/typespec-tests/src/main/java/com/type/property/optional/OptionalClientBuilder.java @@ -105,7 +105,7 @@ public OptionalClientBuilder() { @Override public OptionalClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/type/property/valuetypes/ValueTypesClientBuilder.java b/typespec-tests/src/main/java/com/type/property/valuetypes/ValueTypesClientBuilder.java index 7f5d067077..407735a715 100644 --- a/typespec-tests/src/main/java/com/type/property/valuetypes/ValueTypesClientBuilder.java +++ b/typespec-tests/src/main/java/com/type/property/valuetypes/ValueTypesClientBuilder.java @@ -136,7 +136,7 @@ public ValueTypesClientBuilder() { @Override public ValueTypesClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/type/scalar/ScalarClientBuilder.java b/typespec-tests/src/main/java/com/type/scalar/ScalarClientBuilder.java index 0764b4febc..f3d807fdf7 100644 --- a/typespec-tests/src/main/java/com/type/scalar/ScalarClientBuilder.java +++ b/typespec-tests/src/main/java/com/type/scalar/ScalarClientBuilder.java @@ -91,7 +91,7 @@ public ScalarClientBuilder() { @Override public ScalarClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/typespec-tests/src/main/java/com/type/union/UnionClientBuilder.java b/typespec-tests/src/main/java/com/type/union/UnionClientBuilder.java index 6eb0ff525d..453295e955 100644 --- a/typespec-tests/src/main/java/com/type/union/UnionClientBuilder.java +++ b/typespec-tests/src/main/java/com/type/union/UnionClientBuilder.java @@ -96,7 +96,7 @@ public UnionClientBuilder() { @Override public UnionClientBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/vanilla-tests/src/main/java/fixtures/bodyboolean/AutoRestBoolTestServiceBuilder.java b/vanilla-tests/src/main/java/fixtures/bodyboolean/AutoRestBoolTestServiceBuilder.java index 3489635a17..14e1d491ae 100644 --- a/vanilla-tests/src/main/java/fixtures/bodyboolean/AutoRestBoolTestServiceBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/bodyboolean/AutoRestBoolTestServiceBuilder.java @@ -77,7 +77,7 @@ public AutoRestBoolTestServiceBuilder() { @Override public AutoRestBoolTestServiceBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/vanilla-tests/src/main/java/fixtures/bodycomplex/AutoRestComplexTestServiceBuilder.java b/vanilla-tests/src/main/java/fixtures/bodycomplex/AutoRestComplexTestServiceBuilder.java index f753c8d1c9..1ad0caaf44 100644 --- a/vanilla-tests/src/main/java/fixtures/bodycomplex/AutoRestComplexTestServiceBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/bodycomplex/AutoRestComplexTestServiceBuilder.java @@ -77,7 +77,7 @@ public AutoRestComplexTestServiceBuilder() { @Override public AutoRestComplexTestServiceBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/vanilla-tests/src/main/java/fixtures/bodycomplex/models/Shark.java b/vanilla-tests/src/main/java/fixtures/bodycomplex/models/Shark.java index 120ace78ac..74af9dc885 100644 --- a/vanilla-tests/src/main/java/fixtures/bodycomplex/models/Shark.java +++ b/vanilla-tests/src/main/java/fixtures/bodycomplex/models/Shark.java @@ -112,8 +112,8 @@ public Shark setSiblings(List siblings) { public void validate() { super.validate(); if (getBirthday() == null) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("Missing required property birthday in model Shark")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property birthday in model Shark")); } } diff --git a/vanilla-tests/src/main/java/fixtures/streamstyleserialization/Arrays.java b/vanilla-tests/src/main/java/fixtures/streamstyleserialization/Arrays.java index 209d4717ed..a61b1d1ecc 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstyleserialization/Arrays.java +++ b/vanilla-tests/src/main/java/fixtures/streamstyleserialization/Arrays.java @@ -130,8 +130,8 @@ Response getNotProvidedSync(@HostParam("$host") String host, @Head @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getValid(this.client.getHost(), accept, context)); @@ -149,8 +149,8 @@ public Mono> getValidWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValid(this.client.getHost(), accept, context); @@ -194,8 +194,8 @@ public Mono getValidAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getValidWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValidSync(this.client.getHost(), accept, context); @@ -226,12 +226,12 @@ public ArrayWrapper getValid() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidWithResponseAsync(ArrayWrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -253,12 +253,12 @@ public Mono> putValidWithResponseAsync(ArrayWrapper complexBody) @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidWithResponseAsync(ArrayWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -311,12 +311,12 @@ public Mono putValidAsync(ArrayWrapper complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putValidWithResponse(ArrayWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -349,8 +349,8 @@ public void putValid(ArrayWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getEmptyWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getEmpty(this.client.getHost(), accept, context)); @@ -369,8 +369,8 @@ public Mono> getEmptyWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getEmptyWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getEmpty(this.client.getHost(), accept, context); @@ -414,8 +414,8 @@ public Mono getEmptyAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getEmptyWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getEmptySync(this.client.getHost(), accept, context); @@ -445,12 +445,12 @@ public ArrayWrapper getEmpty() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putEmptyWithResponseAsync(ArrayWrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -471,12 +471,12 @@ public Mono> putEmptyWithResponseAsync(ArrayWrapper complexBody) @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putEmptyWithResponseAsync(ArrayWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -526,12 +526,12 @@ public Mono putEmptyAsync(ArrayWrapper complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putEmptyWithResponse(ArrayWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -563,8 +563,8 @@ public void putEmpty(ArrayWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getNotProvidedWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getNotProvided(this.client.getHost(), accept, context)); @@ -583,8 +583,8 @@ public Mono> getNotProvidedWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getNotProvidedWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getNotProvided(this.client.getHost(), accept, context); @@ -631,8 +631,8 @@ public Mono getNotProvidedAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getNotProvidedWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getNotProvidedSync(this.client.getHost(), accept, context); diff --git a/vanilla-tests/src/main/java/fixtures/streamstyleserialization/AutoRestComplexTestServiceBuilder.java b/vanilla-tests/src/main/java/fixtures/streamstyleserialization/AutoRestComplexTestServiceBuilder.java index 22c118b694..bc92d5abff 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstyleserialization/AutoRestComplexTestServiceBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/streamstyleserialization/AutoRestComplexTestServiceBuilder.java @@ -77,7 +77,7 @@ public AutoRestComplexTestServiceBuilder() { @Override public AutoRestComplexTestServiceBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/vanilla-tests/src/main/java/fixtures/streamstyleserialization/Basics.java b/vanilla-tests/src/main/java/fixtures/streamstyleserialization/Basics.java index b817ae2582..c04d3e199a 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstyleserialization/Basics.java +++ b/vanilla-tests/src/main/java/fixtures/streamstyleserialization/Basics.java @@ -140,8 +140,8 @@ Response getNotProvidedSync(@HostParam("$host") String host, @HeaderParam @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getValid(this.client.getHost(), accept, context)); @@ -160,8 +160,8 @@ public Mono> getValidWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValid(this.client.getHost(), accept, context); @@ -205,8 +205,8 @@ public Mono getValidAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getValidWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValidSync(this.client.getHost(), accept, context); @@ -236,12 +236,12 @@ public Basic getValid() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidWithResponseAsync(Basic complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -263,12 +263,12 @@ public Mono> putValidWithResponseAsync(Basic complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidWithResponseAsync(Basic complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -318,12 +318,12 @@ public Mono putValidAsync(Basic complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putValidWithResponse(Basic complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -355,8 +355,8 @@ public void putValid(Basic complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getInvalidWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getInvalid(this.client.getHost(), accept, context)); @@ -375,8 +375,8 @@ public Mono> getInvalidWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getInvalidWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getInvalid(this.client.getHost(), accept, context); @@ -420,8 +420,8 @@ public Mono getInvalidAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getInvalidWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getInvalidSync(this.client.getHost(), accept, context); @@ -449,8 +449,8 @@ public Basic getInvalid() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getEmptyWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getEmpty(this.client.getHost(), accept, context)); @@ -468,8 +468,8 @@ public Mono> getEmptyWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getEmptyWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getEmpty(this.client.getHost(), accept, context); @@ -513,8 +513,8 @@ public Mono getEmptyAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getEmptyWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getEmptySync(this.client.getHost(), accept, context); @@ -543,8 +543,8 @@ public Basic getEmpty() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getNullWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getNull(this.client.getHost(), accept, context)); @@ -563,8 +563,8 @@ public Mono> getNullWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getNullWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getNull(this.client.getHost(), accept, context); @@ -608,8 +608,8 @@ public Mono getNullAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getNullWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getNullSync(this.client.getHost(), accept, context); @@ -638,8 +638,8 @@ public Basic getNull() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getNotProvidedWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getNotProvided(this.client.getHost(), accept, context)); @@ -658,8 +658,8 @@ public Mono> getNotProvidedWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getNotProvidedWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getNotProvided(this.client.getHost(), accept, context); @@ -705,8 +705,8 @@ public Mono getNotProvidedAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getNotProvidedWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getNotProvidedSync(this.client.getHost(), accept, context); diff --git a/vanilla-tests/src/main/java/fixtures/streamstyleserialization/Dictionaries.java b/vanilla-tests/src/main/java/fixtures/streamstyleserialization/Dictionaries.java index 577e746d14..6cd361b8cb 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstyleserialization/Dictionaries.java +++ b/vanilla-tests/src/main/java/fixtures/streamstyleserialization/Dictionaries.java @@ -144,8 +144,8 @@ Response getNotProvidedSync(@HostParam("$host") String host, @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getValid(this.client.getHost(), accept, context)); @@ -164,8 +164,8 @@ public Mono> getValidWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValid(this.client.getHost(), accept, context); @@ -209,8 +209,8 @@ public Mono getValidAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getValidWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValidSync(this.client.getHost(), accept, context); @@ -241,12 +241,12 @@ public DictionaryWrapper getValid() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidWithResponseAsync(DictionaryWrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -268,12 +268,12 @@ public Mono> putValidWithResponseAsync(DictionaryWrapper complexB @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidWithResponseAsync(DictionaryWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -326,12 +326,12 @@ public Mono putValidAsync(DictionaryWrapper complexBody, Context context) @ServiceMethod(returns = ReturnType.SINGLE) public Response putValidWithResponse(DictionaryWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -364,8 +364,8 @@ public void putValid(DictionaryWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getEmptyWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getEmpty(this.client.getHost(), accept, context)); @@ -384,8 +384,8 @@ public Mono> getEmptyWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getEmptyWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getEmpty(this.client.getHost(), accept, context); @@ -429,8 +429,8 @@ public Mono getEmptyAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getEmptyWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getEmptySync(this.client.getHost(), accept, context); @@ -460,12 +460,12 @@ public DictionaryWrapper getEmpty() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putEmptyWithResponseAsync(DictionaryWrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -486,12 +486,12 @@ public Mono> putEmptyWithResponseAsync(DictionaryWrapper complexB @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putEmptyWithResponseAsync(DictionaryWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -541,12 +541,12 @@ public Mono putEmptyAsync(DictionaryWrapper complexBody, Context context) @ServiceMethod(returns = ReturnType.SINGLE) public Response putEmptyWithResponse(DictionaryWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -578,8 +578,8 @@ public void putEmpty(DictionaryWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getNullWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getNull(this.client.getHost(), accept, context)); @@ -598,8 +598,8 @@ public Mono> getNullWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getNullWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getNull(this.client.getHost(), accept, context); @@ -643,8 +643,8 @@ public Mono getNullAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getNullWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getNullSync(this.client.getHost(), accept, context); @@ -673,8 +673,8 @@ public DictionaryWrapper getNull() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getNotProvidedWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getNotProvided(this.client.getHost(), accept, context)); @@ -693,8 +693,8 @@ public Mono> getNotProvidedWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getNotProvidedWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getNotProvided(this.client.getHost(), accept, context); @@ -741,8 +741,8 @@ public Mono getNotProvidedAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getNotProvidedWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getNotProvidedSync(this.client.getHost(), accept, context); diff --git a/vanilla-tests/src/main/java/fixtures/streamstyleserialization/Flattencomplexes.java b/vanilla-tests/src/main/java/fixtures/streamstyleserialization/Flattencomplexes.java index 53f64d126b..065bee9ac3 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstyleserialization/Flattencomplexes.java +++ b/vanilla-tests/src/main/java/fixtures/streamstyleserialization/Flattencomplexes.java @@ -77,8 +77,8 @@ Response getValidSync(@HostParam("$host") String host, @HeaderParam( @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getValid(this.client.getHost(), accept, context)); @@ -96,8 +96,8 @@ public Mono> getValidWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValid(this.client.getHost(), accept, context); @@ -141,8 +141,8 @@ public Mono getValidAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getValidWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValidSync(this.client.getHost(), accept, context); diff --git a/vanilla-tests/src/main/java/fixtures/streamstyleserialization/Inheritances.java b/vanilla-tests/src/main/java/fixtures/streamstyleserialization/Inheritances.java index 8e71c201f3..c0a30f11df 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstyleserialization/Inheritances.java +++ b/vanilla-tests/src/main/java/fixtures/streamstyleserialization/Inheritances.java @@ -91,8 +91,8 @@ Response putValidSync(@HostParam("$host") String host, @BodyParam("applica @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getValid(this.client.getHost(), accept, context)); @@ -110,8 +110,8 @@ public Mono> getValidWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValid(this.client.getHost(), accept, context); @@ -155,8 +155,8 @@ public Mono getValidAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getValidWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValidSync(this.client.getHost(), accept, context); @@ -188,12 +188,12 @@ public Siamese getValid() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidWithResponseAsync(Siamese complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -216,12 +216,12 @@ public Mono> putValidWithResponseAsync(Siamese complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidWithResponseAsync(Siamese complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -277,12 +277,12 @@ public Mono putValidAsync(Siamese complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putValidWithResponse(Siamese complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } diff --git a/vanilla-tests/src/main/java/fixtures/streamstyleserialization/Polymorphicrecursives.java b/vanilla-tests/src/main/java/fixtures/streamstyleserialization/Polymorphicrecursives.java index ca20de08fc..721407f7dd 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstyleserialization/Polymorphicrecursives.java +++ b/vanilla-tests/src/main/java/fixtures/streamstyleserialization/Polymorphicrecursives.java @@ -92,8 +92,8 @@ Response putValidSync(@HostParam("$host") String host, @BodyParam("applica @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getValid(this.client.getHost(), accept, context)); @@ -112,8 +112,8 @@ public Mono> getValidWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValid(this.client.getHost(), accept, context); @@ -159,8 +159,8 @@ public Mono getValidAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getValidWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValidSync(this.client.getHost(), accept, context); @@ -242,12 +242,12 @@ public Fish getValid() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidWithResponseAsync(Fish complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -320,12 +320,12 @@ public Mono> putValidWithResponseAsync(Fish complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidWithResponseAsync(Fish complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -531,12 +531,12 @@ public Mono putValidAsync(Fish complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putValidWithResponse(Fish complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } diff --git a/vanilla-tests/src/main/java/fixtures/streamstyleserialization/Polymorphisms.java b/vanilla-tests/src/main/java/fixtures/streamstyleserialization/Polymorphisms.java index 13e05d8c2d..8118c83d5e 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstyleserialization/Polymorphisms.java +++ b/vanilla-tests/src/main/java/fixtures/streamstyleserialization/Polymorphisms.java @@ -178,8 +178,8 @@ Response putValidMissingRequiredSync(@HostParam("$host") String host, @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getValid(this.client.getHost(), accept, context)); @@ -197,8 +197,8 @@ public Mono> getValidWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValid(this.client.getHost(), accept, context); @@ -242,8 +242,8 @@ public Mono getValidAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getValidWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValidSync(this.client.getHost(), accept, context); @@ -305,12 +305,12 @@ public Fish getValid() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidWithResponseAsync(Fish complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -363,12 +363,12 @@ public Mono> putValidWithResponseAsync(Fish complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidWithResponseAsync(Fish complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -514,12 +514,12 @@ public Mono putValidAsync(Fish complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putValidWithResponse(Fish complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -583,8 +583,8 @@ public void putValid(Fish complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDotSyntaxWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getDotSyntax(this.client.getHost(), accept, context)); @@ -603,8 +603,8 @@ public Mono> getDotSyntaxWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDotSyntaxWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getDotSyntax(this.client.getHost(), accept, context); @@ -648,8 +648,8 @@ public Mono getDotSyntaxAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getDotSyntaxWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getDotSyntaxSync(this.client.getHost(), accept, context); @@ -679,8 +679,8 @@ public DotFish getDotSyntax() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getComposedWithDiscriminatorWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil @@ -701,8 +701,8 @@ public Mono> getComposedWithDiscriminatorWithResponseAsy @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getComposedWithDiscriminatorWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getComposedWithDiscriminator(this.client.getHost(), accept, context); @@ -752,8 +752,8 @@ public Mono getComposedWithDiscriminatorAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getComposedWithDiscriminatorWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getComposedWithDiscriminatorSync(this.client.getHost(), accept, context); @@ -785,8 +785,8 @@ public DotFishMarket getComposedWithDiscriminator() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getComposedWithoutDiscriminatorWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil @@ -807,8 +807,8 @@ public Mono> getComposedWithoutDiscriminatorWithResponse @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getComposedWithoutDiscriminatorWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getComposedWithoutDiscriminator(this.client.getHost(), accept, context); @@ -859,8 +859,8 @@ public Mono getComposedWithoutDiscriminatorAsync(Context context) @ServiceMethod(returns = ReturnType.SINGLE) public Response getComposedWithoutDiscriminatorWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getComposedWithoutDiscriminatorSync(this.client.getHost(), accept, context); @@ -891,8 +891,8 @@ public DotFishMarket getComposedWithoutDiscriminator() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getComplicatedWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getComplicated(this.client.getHost(), accept, context)); @@ -911,8 +911,8 @@ public Mono> getComplicatedWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getComplicatedWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getComplicated(this.client.getHost(), accept, context); @@ -959,8 +959,8 @@ public Mono getComplicatedAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getComplicatedWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getComplicatedSync(this.client.getHost(), accept, context); @@ -991,12 +991,12 @@ public Salmon getComplicated() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putComplicatedWithResponseAsync(Salmon complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1018,12 +1018,12 @@ public Mono> putComplicatedWithResponseAsync(Salmon complexBody) @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putComplicatedWithResponseAsync(Salmon complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1073,12 +1073,12 @@ public Mono putComplicatedAsync(Salmon complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putComplicatedWithResponse(Salmon complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1111,12 +1111,12 @@ public void putComplicated(Salmon complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putMissingDiscriminatorWithResponseAsync(Salmon complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1138,12 +1138,12 @@ public Mono> putMissingDiscriminatorWithResponseAsync(Salmon co @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putMissingDiscriminatorWithResponseAsync(Salmon complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1194,12 +1194,12 @@ public Mono putMissingDiscriminatorAsync(Salmon complexBody, Context con @ServiceMethod(returns = ReturnType.SINGLE) public Response putMissingDiscriminatorWithResponse(Salmon complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1260,12 +1260,12 @@ public Salmon putMissingDiscriminator(Salmon complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidMissingRequiredWithResponseAsync(Fish complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1314,12 +1314,12 @@ public Mono> putValidMissingRequiredWithResponseAsync(Fish comple @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidMissingRequiredWithResponseAsync(Fish complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1450,12 +1450,12 @@ public Mono putValidMissingRequiredAsync(Fish complexBody, Context context @ServiceMethod(returns = ReturnType.SINGLE) public Response putValidMissingRequiredWithResponse(Fish complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } diff --git a/vanilla-tests/src/main/java/fixtures/streamstyleserialization/Primitives.java b/vanilla-tests/src/main/java/fixtures/streamstyleserialization/Primitives.java index 06b6f31d15..7494847e16 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstyleserialization/Primitives.java +++ b/vanilla-tests/src/main/java/fixtures/streamstyleserialization/Primitives.java @@ -364,8 +364,8 @@ Response putByteSync(@HostParam("$host") String host, @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getIntWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getInt(this.client.getHost(), accept, context)); @@ -384,8 +384,8 @@ public Mono> getIntWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getIntWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getInt(this.client.getHost(), accept, context); @@ -429,8 +429,8 @@ public Mono getIntAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getIntWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getIntSync(this.client.getHost(), accept, context); @@ -460,12 +460,12 @@ public IntWrapper getInt() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putIntWithResponseAsync(IntWrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -486,12 +486,12 @@ public Mono> putIntWithResponseAsync(IntWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putIntWithResponseAsync(IntWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -541,12 +541,12 @@ public Mono putIntAsync(IntWrapper complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putIntWithResponse(IntWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -577,8 +577,8 @@ public void putInt(IntWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getLongWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getLong(this.client.getHost(), accept, context)); @@ -596,8 +596,8 @@ public Mono> getLongWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getLongWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getLong(this.client.getHost(), accept, context); @@ -641,8 +641,8 @@ public Mono getLongAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getLongWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getLongSync(this.client.getHost(), accept, context); @@ -672,12 +672,12 @@ public LongWrapper getLong() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putLongWithResponseAsync(LongWrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -698,12 +698,12 @@ public Mono> putLongWithResponseAsync(LongWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putLongWithResponseAsync(LongWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -753,12 +753,12 @@ public Mono putLongAsync(LongWrapper complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putLongWithResponse(LongWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -789,8 +789,8 @@ public void putLong(LongWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getFloatWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getFloat(this.client.getHost(), accept, context)); @@ -808,8 +808,8 @@ public Mono> getFloatWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getFloatWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getFloat(this.client.getHost(), accept, context); @@ -853,8 +853,8 @@ public Mono getFloatAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getFloatWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getFloatSync(this.client.getHost(), accept, context); @@ -884,12 +884,12 @@ public FloatWrapper getFloat() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putFloatWithResponseAsync(FloatWrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -910,12 +910,12 @@ public Mono> putFloatWithResponseAsync(FloatWrapper complexBody) @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putFloatWithResponseAsync(FloatWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -965,12 +965,12 @@ public Mono putFloatAsync(FloatWrapper complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putFloatWithResponse(FloatWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1002,8 +1002,8 @@ public void putFloat(FloatWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDoubleWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getDouble(this.client.getHost(), accept, context)); @@ -1022,8 +1022,8 @@ public Mono> getDoubleWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDoubleWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getDouble(this.client.getHost(), accept, context); @@ -1067,8 +1067,8 @@ public Mono getDoubleAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getDoubleWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getDoubleSync(this.client.getHost(), accept, context); @@ -1098,12 +1098,12 @@ public DoubleWrapper getDouble() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putDoubleWithResponseAsync(DoubleWrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1124,12 +1124,12 @@ public Mono> putDoubleWithResponseAsync(DoubleWrapper complexBody @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putDoubleWithResponseAsync(DoubleWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1179,12 +1179,12 @@ public Mono putDoubleAsync(DoubleWrapper complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putDoubleWithResponse(DoubleWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1215,8 +1215,8 @@ public void putDouble(DoubleWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getBoolWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getBool(this.client.getHost(), accept, context)); @@ -1234,8 +1234,8 @@ public Mono> getBoolWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getBoolWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getBool(this.client.getHost(), accept, context); @@ -1279,8 +1279,8 @@ public Mono getBoolAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getBoolWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getBoolSync(this.client.getHost(), accept, context); @@ -1310,12 +1310,12 @@ public BooleanWrapper getBool() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putBoolWithResponseAsync(BooleanWrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1336,12 +1336,12 @@ public Mono> putBoolWithResponseAsync(BooleanWrapper complexBody) @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putBoolWithResponseAsync(BooleanWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1391,12 +1391,12 @@ public Mono putBoolAsync(BooleanWrapper complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putBoolWithResponse(BooleanWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1428,8 +1428,8 @@ public void putBool(BooleanWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getStringWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getString(this.client.getHost(), accept, context)); @@ -1448,8 +1448,8 @@ public Mono> getStringWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getStringWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getString(this.client.getHost(), accept, context); @@ -1493,8 +1493,8 @@ public Mono getStringAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getStringWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getStringSync(this.client.getHost(), accept, context); @@ -1524,12 +1524,12 @@ public StringWrapper getString() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putStringWithResponseAsync(StringWrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1550,12 +1550,12 @@ public Mono> putStringWithResponseAsync(StringWrapper complexBody @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putStringWithResponseAsync(StringWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1605,12 +1605,12 @@ public Mono putStringAsync(StringWrapper complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putStringWithResponse(StringWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1641,8 +1641,8 @@ public void putString(StringWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDateWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getDate(this.client.getHost(), accept, context)); @@ -1660,8 +1660,8 @@ public Mono> getDateWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDateWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getDate(this.client.getHost(), accept, context); @@ -1705,8 +1705,8 @@ public Mono getDateAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getDateWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getDateSync(this.client.getHost(), accept, context); @@ -1736,12 +1736,12 @@ public DateWrapper getDate() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putDateWithResponseAsync(DateWrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1762,12 +1762,12 @@ public Mono> putDateWithResponseAsync(DateWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putDateWithResponseAsync(DateWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1817,12 +1817,12 @@ public Mono putDateAsync(DateWrapper complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putDateWithResponse(DateWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1854,8 +1854,8 @@ public void putDate(DateWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDateTimeWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getDateTime(this.client.getHost(), accept, context)); @@ -1874,8 +1874,8 @@ public Mono> getDateTimeWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDateTimeWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getDateTime(this.client.getHost(), accept, context); @@ -1919,8 +1919,8 @@ public Mono getDateTimeAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getDateTimeWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getDateTimeSync(this.client.getHost(), accept, context); @@ -1950,12 +1950,12 @@ public DatetimeWrapper getDateTime() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putDateTimeWithResponseAsync(DatetimeWrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1977,12 +1977,12 @@ public Mono> putDateTimeWithResponseAsync(DatetimeWrapper complex @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putDateTimeWithResponseAsync(DatetimeWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -2032,12 +2032,12 @@ public Mono putDateTimeAsync(DatetimeWrapper complexBody, Context context) @ServiceMethod(returns = ReturnType.SINGLE) public Response putDateTimeWithResponse(DatetimeWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -2069,8 +2069,8 @@ public void putDateTime(DatetimeWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDateTimeRfc1123WithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getDateTimeRfc1123(this.client.getHost(), accept, context)); @@ -2089,8 +2089,8 @@ public Mono> getDateTimeRfc1123WithResponseAsyn @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDateTimeRfc1123WithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getDateTimeRfc1123(this.client.getHost(), accept, context); @@ -2134,8 +2134,8 @@ public Mono getDateTimeRfc1123Async(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getDateTimeRfc1123WithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getDateTimeRfc1123Sync(this.client.getHost(), accept, context); @@ -2165,12 +2165,12 @@ public Datetimerfc1123Wrapper getDateTimeRfc1123() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putDateTimeRfc1123WithResponseAsync(Datetimerfc1123Wrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -2193,12 +2193,12 @@ public Mono> putDateTimeRfc1123WithResponseAsync(Datetimerfc1123W public Mono> putDateTimeRfc1123WithResponseAsync(Datetimerfc1123Wrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -2248,12 +2248,12 @@ public Mono putDateTimeRfc1123Async(Datetimerfc1123Wrapper complexBody, Co @ServiceMethod(returns = ReturnType.SINGLE) public Response putDateTimeRfc1123WithResponse(Datetimerfc1123Wrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -2285,8 +2285,8 @@ public void putDateTimeRfc1123(Datetimerfc1123Wrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDurationWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getDuration(this.client.getHost(), accept, context)); @@ -2305,8 +2305,8 @@ public Mono> getDurationWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDurationWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getDuration(this.client.getHost(), accept, context); @@ -2350,8 +2350,8 @@ public Mono getDurationAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getDurationWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getDurationSync(this.client.getHost(), accept, context); @@ -2381,12 +2381,12 @@ public DurationWrapper getDuration() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putDurationWithResponseAsync(DurationWrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -2408,12 +2408,12 @@ public Mono> putDurationWithResponseAsync(DurationWrapper complex @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putDurationWithResponseAsync(DurationWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -2463,12 +2463,12 @@ public Mono putDurationAsync(DurationWrapper complexBody, Context context) @ServiceMethod(returns = ReturnType.SINGLE) public Response putDurationWithResponse(DurationWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -2499,8 +2499,8 @@ public void putDuration(DurationWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getByteWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getByte(this.client.getHost(), accept, context)); @@ -2518,8 +2518,8 @@ public Mono> getByteWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getByteWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getByte(this.client.getHost(), accept, context); @@ -2563,8 +2563,8 @@ public Mono getByteAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getByteWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getByteSync(this.client.getHost(), accept, context); @@ -2594,12 +2594,12 @@ public ByteWrapper getByte() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putByteWithResponseAsync(ByteWrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -2620,12 +2620,12 @@ public Mono> putByteWithResponseAsync(ByteWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putByteWithResponseAsync(ByteWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -2675,12 +2675,12 @@ public Mono putByteAsync(ByteWrapper complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putByteWithResponse(ByteWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } diff --git a/vanilla-tests/src/main/java/fixtures/streamstyleserialization/Readonlyproperties.java b/vanilla-tests/src/main/java/fixtures/streamstyleserialization/Readonlyproperties.java index e2a6e0899f..9ddd72e0ad 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstyleserialization/Readonlyproperties.java +++ b/vanilla-tests/src/main/java/fixtures/streamstyleserialization/Readonlyproperties.java @@ -94,8 +94,8 @@ Response putValidSync(@HostParam("$host") String host, @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getValid(this.client.getHost(), accept, context)); @@ -114,8 +114,8 @@ public Mono> getValidWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValid(this.client.getHost(), accept, context); @@ -159,8 +159,8 @@ public Mono getValidAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getValidWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValidSync(this.client.getHost(), accept, context); @@ -190,12 +190,12 @@ public ReadonlyObj getValid() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidWithResponseAsync(ReadonlyObj complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -216,12 +216,12 @@ public Mono> putValidWithResponseAsync(ReadonlyObj complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidWithResponseAsync(ReadonlyObj complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -271,12 +271,12 @@ public Mono putValidAsync(ReadonlyObj complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putValidWithResponse(ReadonlyObj complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } diff --git a/vanilla-tests/src/main/java/fixtures/streamstyleserialization/models/Shark.java b/vanilla-tests/src/main/java/fixtures/streamstyleserialization/models/Shark.java index 52929f3565..83f4e5b5ad 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstyleserialization/models/Shark.java +++ b/vanilla-tests/src/main/java/fixtures/streamstyleserialization/models/Shark.java @@ -126,8 +126,8 @@ public Shark setSiblings(List siblings) { public void validate() { super.validate(); if (getBirthday() == null) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("Missing required property birthday in model Shark")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property birthday in model Shark")); } } diff --git a/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/Arrays.java b/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/Arrays.java index fa8db14791..e54ca6bbbd 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/Arrays.java +++ b/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/Arrays.java @@ -130,8 +130,8 @@ Response getNotProvidedSync(@HostParam("$host") String host, @Head @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getValid(this.client.getHost(), accept, context)); @@ -149,8 +149,8 @@ public Mono> getValidWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValid(this.client.getHost(), accept, context); @@ -194,8 +194,8 @@ public Mono getValidAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getValidWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValidSync(this.client.getHost(), accept, context); @@ -226,12 +226,12 @@ public ArrayWrapper getValid() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidWithResponseAsync(ArrayWrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -253,12 +253,12 @@ public Mono> putValidWithResponseAsync(ArrayWrapper complexBody) @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidWithResponseAsync(ArrayWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -311,12 +311,12 @@ public Mono putValidAsync(ArrayWrapper complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putValidWithResponse(ArrayWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -349,8 +349,8 @@ public void putValid(ArrayWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getEmptyWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getEmpty(this.client.getHost(), accept, context)); @@ -369,8 +369,8 @@ public Mono> getEmptyWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getEmptyWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getEmpty(this.client.getHost(), accept, context); @@ -414,8 +414,8 @@ public Mono getEmptyAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getEmptyWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getEmptySync(this.client.getHost(), accept, context); @@ -445,12 +445,12 @@ public ArrayWrapper getEmpty() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putEmptyWithResponseAsync(ArrayWrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -471,12 +471,12 @@ public Mono> putEmptyWithResponseAsync(ArrayWrapper complexBody) @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putEmptyWithResponseAsync(ArrayWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -526,12 +526,12 @@ public Mono putEmptyAsync(ArrayWrapper complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putEmptyWithResponse(ArrayWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -563,8 +563,8 @@ public void putEmpty(ArrayWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getNotProvidedWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getNotProvided(this.client.getHost(), accept, context)); @@ -583,8 +583,8 @@ public Mono> getNotProvidedWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getNotProvidedWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getNotProvided(this.client.getHost(), accept, context); @@ -631,8 +631,8 @@ public Mono getNotProvidedAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getNotProvidedWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getNotProvidedSync(this.client.getHost(), accept, context); diff --git a/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/AutoRestComplexTestServiceBuilder.java b/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/AutoRestComplexTestServiceBuilder.java index c50943c202..e4f6f64903 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/AutoRestComplexTestServiceBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/AutoRestComplexTestServiceBuilder.java @@ -77,7 +77,7 @@ public AutoRestComplexTestServiceBuilder() { @Override public AutoRestComplexTestServiceBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/Basics.java b/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/Basics.java index dcbc13023a..feb07a62aa 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/Basics.java +++ b/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/Basics.java @@ -140,8 +140,8 @@ Response getNotProvidedSync(@HostParam("$host") String host, @HeaderParam @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getValid(this.client.getHost(), accept, context)); @@ -160,8 +160,8 @@ public Mono> getValidWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValid(this.client.getHost(), accept, context); @@ -205,8 +205,8 @@ public Mono getValidAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getValidWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValidSync(this.client.getHost(), accept, context); @@ -236,12 +236,12 @@ public Basic getValid() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidWithResponseAsync(Basic complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -263,12 +263,12 @@ public Mono> putValidWithResponseAsync(Basic complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidWithResponseAsync(Basic complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -318,12 +318,12 @@ public Mono putValidAsync(Basic complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putValidWithResponse(Basic complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -355,8 +355,8 @@ public void putValid(Basic complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getInvalidWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getInvalid(this.client.getHost(), accept, context)); @@ -375,8 +375,8 @@ public Mono> getInvalidWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getInvalidWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getInvalid(this.client.getHost(), accept, context); @@ -420,8 +420,8 @@ public Mono getInvalidAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getInvalidWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getInvalidSync(this.client.getHost(), accept, context); @@ -449,8 +449,8 @@ public Basic getInvalid() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getEmptyWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getEmpty(this.client.getHost(), accept, context)); @@ -468,8 +468,8 @@ public Mono> getEmptyWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getEmptyWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getEmpty(this.client.getHost(), accept, context); @@ -513,8 +513,8 @@ public Mono getEmptyAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getEmptyWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getEmptySync(this.client.getHost(), accept, context); @@ -543,8 +543,8 @@ public Basic getEmpty() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getNullWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getNull(this.client.getHost(), accept, context)); @@ -563,8 +563,8 @@ public Mono> getNullWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getNullWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getNull(this.client.getHost(), accept, context); @@ -608,8 +608,8 @@ public Mono getNullAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getNullWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getNullSync(this.client.getHost(), accept, context); @@ -638,8 +638,8 @@ public Basic getNull() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getNotProvidedWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getNotProvided(this.client.getHost(), accept, context)); @@ -658,8 +658,8 @@ public Mono> getNotProvidedWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getNotProvidedWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getNotProvided(this.client.getHost(), accept, context); @@ -705,8 +705,8 @@ public Mono getNotProvidedAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getNotProvidedWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getNotProvidedSync(this.client.getHost(), accept, context); diff --git a/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/Dictionaries.java b/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/Dictionaries.java index 62366c56fa..bf76d8e23b 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/Dictionaries.java +++ b/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/Dictionaries.java @@ -144,8 +144,8 @@ Response getNotProvidedSync(@HostParam("$host") String host, @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getValid(this.client.getHost(), accept, context)); @@ -164,8 +164,8 @@ public Mono> getValidWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValid(this.client.getHost(), accept, context); @@ -209,8 +209,8 @@ public Mono getValidAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getValidWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValidSync(this.client.getHost(), accept, context); @@ -241,12 +241,12 @@ public DictionaryWrapper getValid() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidWithResponseAsync(DictionaryWrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -268,12 +268,12 @@ public Mono> putValidWithResponseAsync(DictionaryWrapper complexB @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidWithResponseAsync(DictionaryWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -326,12 +326,12 @@ public Mono putValidAsync(DictionaryWrapper complexBody, Context context) @ServiceMethod(returns = ReturnType.SINGLE) public Response putValidWithResponse(DictionaryWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -364,8 +364,8 @@ public void putValid(DictionaryWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getEmptyWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getEmpty(this.client.getHost(), accept, context)); @@ -384,8 +384,8 @@ public Mono> getEmptyWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getEmptyWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getEmpty(this.client.getHost(), accept, context); @@ -429,8 +429,8 @@ public Mono getEmptyAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getEmptyWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getEmptySync(this.client.getHost(), accept, context); @@ -460,12 +460,12 @@ public DictionaryWrapper getEmpty() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putEmptyWithResponseAsync(DictionaryWrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -486,12 +486,12 @@ public Mono> putEmptyWithResponseAsync(DictionaryWrapper complexB @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putEmptyWithResponseAsync(DictionaryWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -541,12 +541,12 @@ public Mono putEmptyAsync(DictionaryWrapper complexBody, Context context) @ServiceMethod(returns = ReturnType.SINGLE) public Response putEmptyWithResponse(DictionaryWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -578,8 +578,8 @@ public void putEmpty(DictionaryWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getNullWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getNull(this.client.getHost(), accept, context)); @@ -598,8 +598,8 @@ public Mono> getNullWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getNullWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getNull(this.client.getHost(), accept, context); @@ -643,8 +643,8 @@ public Mono getNullAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getNullWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getNullSync(this.client.getHost(), accept, context); @@ -673,8 +673,8 @@ public DictionaryWrapper getNull() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getNotProvidedWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getNotProvided(this.client.getHost(), accept, context)); @@ -693,8 +693,8 @@ public Mono> getNotProvidedWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getNotProvidedWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getNotProvided(this.client.getHost(), accept, context); @@ -741,8 +741,8 @@ public Mono getNotProvidedAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getNotProvidedWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getNotProvidedSync(this.client.getHost(), accept, context); diff --git a/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/Flattencomplexes.java b/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/Flattencomplexes.java index b09ffd88a5..b304ca9542 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/Flattencomplexes.java +++ b/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/Flattencomplexes.java @@ -77,8 +77,8 @@ Response getValidSync(@HostParam("$host") String host, @HeaderParam( @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getValid(this.client.getHost(), accept, context)); @@ -96,8 +96,8 @@ public Mono> getValidWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValid(this.client.getHost(), accept, context); @@ -141,8 +141,8 @@ public Mono getValidAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getValidWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValidSync(this.client.getHost(), accept, context); diff --git a/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/Inheritances.java b/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/Inheritances.java index b13aa080c1..f8d5cae5de 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/Inheritances.java +++ b/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/Inheritances.java @@ -91,8 +91,8 @@ Response putValidSync(@HostParam("$host") String host, @BodyParam("applica @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getValid(this.client.getHost(), accept, context)); @@ -110,8 +110,8 @@ public Mono> getValidWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValid(this.client.getHost(), accept, context); @@ -155,8 +155,8 @@ public Mono getValidAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getValidWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValidSync(this.client.getHost(), accept, context); @@ -188,12 +188,12 @@ public Siamese getValid() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidWithResponseAsync(Siamese complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -216,12 +216,12 @@ public Mono> putValidWithResponseAsync(Siamese complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidWithResponseAsync(Siamese complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -277,12 +277,12 @@ public Mono putValidAsync(Siamese complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putValidWithResponse(Siamese complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } diff --git a/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/Polymorphicrecursives.java b/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/Polymorphicrecursives.java index 2512620c81..37e4121958 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/Polymorphicrecursives.java +++ b/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/Polymorphicrecursives.java @@ -92,8 +92,8 @@ Response putValidSync(@HostParam("$host") String host, @BodyParam("applica @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getValid(this.client.getHost(), accept, context)); @@ -112,8 +112,8 @@ public Mono> getValidWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValid(this.client.getHost(), accept, context); @@ -159,8 +159,8 @@ public Mono getValidAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getValidWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValidSync(this.client.getHost(), accept, context); @@ -242,12 +242,12 @@ public Fish getValid() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidWithResponseAsync(Fish complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -320,12 +320,12 @@ public Mono> putValidWithResponseAsync(Fish complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidWithResponseAsync(Fish complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -531,12 +531,12 @@ public Mono putValidAsync(Fish complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putValidWithResponse(Fish complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } diff --git a/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/Polymorphisms.java b/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/Polymorphisms.java index b267126e32..719959d90d 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/Polymorphisms.java +++ b/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/Polymorphisms.java @@ -178,8 +178,8 @@ Response putValidMissingRequiredSync(@HostParam("$host") String host, @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getValid(this.client.getHost(), accept, context)); @@ -197,8 +197,8 @@ public Mono> getValidWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValid(this.client.getHost(), accept, context); @@ -242,8 +242,8 @@ public Mono getValidAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getValidWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValidSync(this.client.getHost(), accept, context); @@ -305,12 +305,12 @@ public Fish getValid() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidWithResponseAsync(Fish complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -363,12 +363,12 @@ public Mono> putValidWithResponseAsync(Fish complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidWithResponseAsync(Fish complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -514,12 +514,12 @@ public Mono putValidAsync(Fish complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putValidWithResponse(Fish complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -583,8 +583,8 @@ public void putValid(Fish complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDotSyntaxWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getDotSyntax(this.client.getHost(), accept, context)); @@ -603,8 +603,8 @@ public Mono> getDotSyntaxWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDotSyntaxWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getDotSyntax(this.client.getHost(), accept, context); @@ -648,8 +648,8 @@ public Mono getDotSyntaxAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getDotSyntaxWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getDotSyntaxSync(this.client.getHost(), accept, context); @@ -679,8 +679,8 @@ public DotFish getDotSyntax() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getComposedWithDiscriminatorWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil @@ -701,8 +701,8 @@ public Mono> getComposedWithDiscriminatorWithResponseAsy @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getComposedWithDiscriminatorWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getComposedWithDiscriminator(this.client.getHost(), accept, context); @@ -752,8 +752,8 @@ public Mono getComposedWithDiscriminatorAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getComposedWithDiscriminatorWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getComposedWithDiscriminatorSync(this.client.getHost(), accept, context); @@ -785,8 +785,8 @@ public DotFishMarket getComposedWithDiscriminator() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getComposedWithoutDiscriminatorWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil @@ -807,8 +807,8 @@ public Mono> getComposedWithoutDiscriminatorWithResponse @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getComposedWithoutDiscriminatorWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getComposedWithoutDiscriminator(this.client.getHost(), accept, context); @@ -859,8 +859,8 @@ public Mono getComposedWithoutDiscriminatorAsync(Context context) @ServiceMethod(returns = ReturnType.SINGLE) public Response getComposedWithoutDiscriminatorWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getComposedWithoutDiscriminatorSync(this.client.getHost(), accept, context); @@ -891,8 +891,8 @@ public DotFishMarket getComposedWithoutDiscriminator() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getComplicatedWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getComplicated(this.client.getHost(), accept, context)); @@ -911,8 +911,8 @@ public Mono> getComplicatedWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getComplicatedWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getComplicated(this.client.getHost(), accept, context); @@ -959,8 +959,8 @@ public Mono getComplicatedAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getComplicatedWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getComplicatedSync(this.client.getHost(), accept, context); @@ -991,12 +991,12 @@ public Salmon getComplicated() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putComplicatedWithResponseAsync(Salmon complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1018,12 +1018,12 @@ public Mono> putComplicatedWithResponseAsync(Salmon complexBody) @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putComplicatedWithResponseAsync(Salmon complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1073,12 +1073,12 @@ public Mono putComplicatedAsync(Salmon complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putComplicatedWithResponse(Salmon complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1111,12 +1111,12 @@ public void putComplicated(Salmon complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putMissingDiscriminatorWithResponseAsync(Salmon complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1138,12 +1138,12 @@ public Mono> putMissingDiscriminatorWithResponseAsync(Salmon co @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putMissingDiscriminatorWithResponseAsync(Salmon complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1194,12 +1194,12 @@ public Mono putMissingDiscriminatorAsync(Salmon complexBody, Context con @ServiceMethod(returns = ReturnType.SINGLE) public Response putMissingDiscriminatorWithResponse(Salmon complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1260,12 +1260,12 @@ public Salmon putMissingDiscriminator(Salmon complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidMissingRequiredWithResponseAsync(Fish complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1314,12 +1314,12 @@ public Mono> putValidMissingRequiredWithResponseAsync(Fish comple @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidMissingRequiredWithResponseAsync(Fish complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1450,12 +1450,12 @@ public Mono putValidMissingRequiredAsync(Fish complexBody, Context context @ServiceMethod(returns = ReturnType.SINGLE) public Response putValidMissingRequiredWithResponse(Fish complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } diff --git a/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/Primitives.java b/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/Primitives.java index c47e3bba69..57cb94ccd2 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/Primitives.java +++ b/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/Primitives.java @@ -364,8 +364,8 @@ Response putByteSync(@HostParam("$host") String host, @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getIntWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getInt(this.client.getHost(), accept, context)); @@ -384,8 +384,8 @@ public Mono> getIntWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getIntWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getInt(this.client.getHost(), accept, context); @@ -429,8 +429,8 @@ public Mono getIntAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getIntWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getIntSync(this.client.getHost(), accept, context); @@ -460,12 +460,12 @@ public IntWrapper getInt() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putIntWithResponseAsync(IntWrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -486,12 +486,12 @@ public Mono> putIntWithResponseAsync(IntWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putIntWithResponseAsync(IntWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -541,12 +541,12 @@ public Mono putIntAsync(IntWrapper complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putIntWithResponse(IntWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -577,8 +577,8 @@ public void putInt(IntWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getLongWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getLong(this.client.getHost(), accept, context)); @@ -596,8 +596,8 @@ public Mono> getLongWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getLongWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getLong(this.client.getHost(), accept, context); @@ -641,8 +641,8 @@ public Mono getLongAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getLongWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getLongSync(this.client.getHost(), accept, context); @@ -672,12 +672,12 @@ public LongWrapper getLong() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putLongWithResponseAsync(LongWrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -698,12 +698,12 @@ public Mono> putLongWithResponseAsync(LongWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putLongWithResponseAsync(LongWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -753,12 +753,12 @@ public Mono putLongAsync(LongWrapper complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putLongWithResponse(LongWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -789,8 +789,8 @@ public void putLong(LongWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getFloatWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getFloat(this.client.getHost(), accept, context)); @@ -808,8 +808,8 @@ public Mono> getFloatWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getFloatWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getFloat(this.client.getHost(), accept, context); @@ -853,8 +853,8 @@ public Mono getFloatAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getFloatWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getFloatSync(this.client.getHost(), accept, context); @@ -884,12 +884,12 @@ public FloatWrapper getFloat() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putFloatWithResponseAsync(FloatWrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -910,12 +910,12 @@ public Mono> putFloatWithResponseAsync(FloatWrapper complexBody) @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putFloatWithResponseAsync(FloatWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -965,12 +965,12 @@ public Mono putFloatAsync(FloatWrapper complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putFloatWithResponse(FloatWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1002,8 +1002,8 @@ public void putFloat(FloatWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDoubleWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getDouble(this.client.getHost(), accept, context)); @@ -1022,8 +1022,8 @@ public Mono> getDoubleWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDoubleWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getDouble(this.client.getHost(), accept, context); @@ -1067,8 +1067,8 @@ public Mono getDoubleAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getDoubleWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getDoubleSync(this.client.getHost(), accept, context); @@ -1098,12 +1098,12 @@ public DoubleWrapper getDouble() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putDoubleWithResponseAsync(DoubleWrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1124,12 +1124,12 @@ public Mono> putDoubleWithResponseAsync(DoubleWrapper complexBody @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putDoubleWithResponseAsync(DoubleWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1179,12 +1179,12 @@ public Mono putDoubleAsync(DoubleWrapper complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putDoubleWithResponse(DoubleWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1215,8 +1215,8 @@ public void putDouble(DoubleWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getBoolWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getBool(this.client.getHost(), accept, context)); @@ -1234,8 +1234,8 @@ public Mono> getBoolWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getBoolWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getBool(this.client.getHost(), accept, context); @@ -1279,8 +1279,8 @@ public Mono getBoolAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getBoolWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getBoolSync(this.client.getHost(), accept, context); @@ -1310,12 +1310,12 @@ public BooleanWrapper getBool() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putBoolWithResponseAsync(BooleanWrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1336,12 +1336,12 @@ public Mono> putBoolWithResponseAsync(BooleanWrapper complexBody) @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putBoolWithResponseAsync(BooleanWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1391,12 +1391,12 @@ public Mono putBoolAsync(BooleanWrapper complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putBoolWithResponse(BooleanWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1428,8 +1428,8 @@ public void putBool(BooleanWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getStringWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getString(this.client.getHost(), accept, context)); @@ -1448,8 +1448,8 @@ public Mono> getStringWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getStringWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getString(this.client.getHost(), accept, context); @@ -1493,8 +1493,8 @@ public Mono getStringAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getStringWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getStringSync(this.client.getHost(), accept, context); @@ -1524,12 +1524,12 @@ public StringWrapper getString() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putStringWithResponseAsync(StringWrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1550,12 +1550,12 @@ public Mono> putStringWithResponseAsync(StringWrapper complexBody @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putStringWithResponseAsync(StringWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1605,12 +1605,12 @@ public Mono putStringAsync(StringWrapper complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putStringWithResponse(StringWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1641,8 +1641,8 @@ public void putString(StringWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDateWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getDate(this.client.getHost(), accept, context)); @@ -1660,8 +1660,8 @@ public Mono> getDateWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDateWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getDate(this.client.getHost(), accept, context); @@ -1705,8 +1705,8 @@ public Mono getDateAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getDateWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getDateSync(this.client.getHost(), accept, context); @@ -1736,12 +1736,12 @@ public DateWrapper getDate() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putDateWithResponseAsync(DateWrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1762,12 +1762,12 @@ public Mono> putDateWithResponseAsync(DateWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putDateWithResponseAsync(DateWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1817,12 +1817,12 @@ public Mono putDateAsync(DateWrapper complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putDateWithResponse(DateWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1854,8 +1854,8 @@ public void putDate(DateWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDateTimeWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getDateTime(this.client.getHost(), accept, context)); @@ -1874,8 +1874,8 @@ public Mono> getDateTimeWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDateTimeWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getDateTime(this.client.getHost(), accept, context); @@ -1919,8 +1919,8 @@ public Mono getDateTimeAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getDateTimeWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getDateTimeSync(this.client.getHost(), accept, context); @@ -1950,12 +1950,12 @@ public DatetimeWrapper getDateTime() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putDateTimeWithResponseAsync(DatetimeWrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1977,12 +1977,12 @@ public Mono> putDateTimeWithResponseAsync(DatetimeWrapper complex @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putDateTimeWithResponseAsync(DatetimeWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -2032,12 +2032,12 @@ public Mono putDateTimeAsync(DatetimeWrapper complexBody, Context context) @ServiceMethod(returns = ReturnType.SINGLE) public Response putDateTimeWithResponse(DatetimeWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -2069,8 +2069,8 @@ public void putDateTime(DatetimeWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDateTimeRfc1123WithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getDateTimeRfc1123(this.client.getHost(), accept, context)); @@ -2089,8 +2089,8 @@ public Mono> getDateTimeRfc1123WithResponseAsyn @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDateTimeRfc1123WithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getDateTimeRfc1123(this.client.getHost(), accept, context); @@ -2134,8 +2134,8 @@ public Mono getDateTimeRfc1123Async(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getDateTimeRfc1123WithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getDateTimeRfc1123Sync(this.client.getHost(), accept, context); @@ -2165,12 +2165,12 @@ public Datetimerfc1123Wrapper getDateTimeRfc1123() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putDateTimeRfc1123WithResponseAsync(Datetimerfc1123Wrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -2193,12 +2193,12 @@ public Mono> putDateTimeRfc1123WithResponseAsync(Datetimerfc1123W public Mono> putDateTimeRfc1123WithResponseAsync(Datetimerfc1123Wrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -2248,12 +2248,12 @@ public Mono putDateTimeRfc1123Async(Datetimerfc1123Wrapper complexBody, Co @ServiceMethod(returns = ReturnType.SINGLE) public Response putDateTimeRfc1123WithResponse(Datetimerfc1123Wrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -2285,8 +2285,8 @@ public void putDateTimeRfc1123(Datetimerfc1123Wrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDurationWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getDuration(this.client.getHost(), accept, context)); @@ -2305,8 +2305,8 @@ public Mono> getDurationWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDurationWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getDuration(this.client.getHost(), accept, context); @@ -2350,8 +2350,8 @@ public Mono getDurationAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getDurationWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getDurationSync(this.client.getHost(), accept, context); @@ -2381,12 +2381,12 @@ public DurationWrapper getDuration() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putDurationWithResponseAsync(DurationWrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -2408,12 +2408,12 @@ public Mono> putDurationWithResponseAsync(DurationWrapper complex @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putDurationWithResponseAsync(DurationWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -2463,12 +2463,12 @@ public Mono putDurationAsync(DurationWrapper complexBody, Context context) @ServiceMethod(returns = ReturnType.SINGLE) public Response putDurationWithResponse(DurationWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -2499,8 +2499,8 @@ public void putDuration(DurationWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getByteWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getByte(this.client.getHost(), accept, context)); @@ -2518,8 +2518,8 @@ public Mono> getByteWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getByteWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getByte(this.client.getHost(), accept, context); @@ -2563,8 +2563,8 @@ public Mono getByteAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getByteWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getByteSync(this.client.getHost(), accept, context); @@ -2594,12 +2594,12 @@ public ByteWrapper getByte() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putByteWithResponseAsync(ByteWrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -2620,12 +2620,12 @@ public Mono> putByteWithResponseAsync(ByteWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putByteWithResponseAsync(ByteWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -2675,12 +2675,12 @@ public Mono putByteAsync(ByteWrapper complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putByteWithResponse(ByteWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } diff --git a/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/Readonlyproperties.java b/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/Readonlyproperties.java index f2eea9e27b..dfb8c8b522 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/Readonlyproperties.java +++ b/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/Readonlyproperties.java @@ -94,8 +94,8 @@ Response putValidSync(@HostParam("$host") String host, @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getValid(this.client.getHost(), accept, context)); @@ -114,8 +114,8 @@ public Mono> getValidWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValid(this.client.getHost(), accept, context); @@ -159,8 +159,8 @@ public Mono getValidAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getValidWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValidSync(this.client.getHost(), accept, context); @@ -190,12 +190,12 @@ public ReadonlyObj getValid() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidWithResponseAsync(ReadonlyObj complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -216,12 +216,12 @@ public Mono> putValidWithResponseAsync(ReadonlyObj complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidWithResponseAsync(ReadonlyObj complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -271,12 +271,12 @@ public Mono putValidAsync(ReadonlyObj complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putValidWithResponse(ReadonlyObj complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } diff --git a/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/models/Shark.java b/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/models/Shark.java index e86690c246..d08d41b3e1 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/models/Shark.java +++ b/vanilla-tests/src/main/java/fixtures/streamstyleserializationctorargs/models/Shark.java @@ -112,8 +112,8 @@ public Shark setSiblings(List siblings) { public void validate() { super.validate(); if (getBirthday() == null) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("Missing required property birthday in model Shark")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property birthday in model Shark")); } } diff --git a/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/Arrays.java b/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/Arrays.java index 413c31428d..33b326633a 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/Arrays.java +++ b/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/Arrays.java @@ -130,8 +130,8 @@ Response getNotProvidedSync(@HostParam("$host") String host, @Head @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getValid(this.client.getHost(), accept, context)); @@ -149,8 +149,8 @@ public Mono> getValidWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValid(this.client.getHost(), accept, context); @@ -194,8 +194,8 @@ public Mono getValidAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getValidWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValidSync(this.client.getHost(), accept, context); @@ -226,12 +226,12 @@ public ArrayWrapper getValid() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidWithResponseAsync(ArrayWrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -253,12 +253,12 @@ public Mono> putValidWithResponseAsync(ArrayWrapper complexBody) @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidWithResponseAsync(ArrayWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -311,12 +311,12 @@ public Mono putValidAsync(ArrayWrapper complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putValidWithResponse(ArrayWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -349,8 +349,8 @@ public void putValid(ArrayWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getEmptyWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getEmpty(this.client.getHost(), accept, context)); @@ -369,8 +369,8 @@ public Mono> getEmptyWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getEmptyWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getEmpty(this.client.getHost(), accept, context); @@ -414,8 +414,8 @@ public Mono getEmptyAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getEmptyWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getEmptySync(this.client.getHost(), accept, context); @@ -445,12 +445,12 @@ public ArrayWrapper getEmpty() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putEmptyWithResponseAsync(ArrayWrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -471,12 +471,12 @@ public Mono> putEmptyWithResponseAsync(ArrayWrapper complexBody) @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putEmptyWithResponseAsync(ArrayWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -526,12 +526,12 @@ public Mono putEmptyAsync(ArrayWrapper complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putEmptyWithResponse(ArrayWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -563,8 +563,8 @@ public void putEmpty(ArrayWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getNotProvidedWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getNotProvided(this.client.getHost(), accept, context)); @@ -583,8 +583,8 @@ public Mono> getNotProvidedWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getNotProvidedWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getNotProvided(this.client.getHost(), accept, context); @@ -631,8 +631,8 @@ public Mono getNotProvidedAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getNotProvidedWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getNotProvidedSync(this.client.getHost(), accept, context); diff --git a/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/AutoRestComplexTestServiceBuilder.java b/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/AutoRestComplexTestServiceBuilder.java index d212951193..e8b5590d31 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/AutoRestComplexTestServiceBuilder.java +++ b/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/AutoRestComplexTestServiceBuilder.java @@ -77,7 +77,7 @@ public AutoRestComplexTestServiceBuilder() { @Override public AutoRestComplexTestServiceBuilder pipeline(HttpPipeline pipeline) { if (this.pipeline != null && pipeline == null) { - LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured."); + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); } this.pipeline = pipeline; return this; diff --git a/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/Basics.java b/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/Basics.java index 3be9fc6dab..323ed05d08 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/Basics.java +++ b/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/Basics.java @@ -140,8 +140,8 @@ Response getNotProvidedSync(@HostParam("$host") String host, @HeaderParam @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getValid(this.client.getHost(), accept, context)); @@ -160,8 +160,8 @@ public Mono> getValidWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValid(this.client.getHost(), accept, context); @@ -205,8 +205,8 @@ public Mono getValidAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getValidWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValidSync(this.client.getHost(), accept, context); @@ -236,12 +236,12 @@ public Basic getValid() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidWithResponseAsync(Basic complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -263,12 +263,12 @@ public Mono> putValidWithResponseAsync(Basic complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidWithResponseAsync(Basic complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -318,12 +318,12 @@ public Mono putValidAsync(Basic complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putValidWithResponse(Basic complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -355,8 +355,8 @@ public void putValid(Basic complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getInvalidWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getInvalid(this.client.getHost(), accept, context)); @@ -375,8 +375,8 @@ public Mono> getInvalidWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getInvalidWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getInvalid(this.client.getHost(), accept, context); @@ -420,8 +420,8 @@ public Mono getInvalidAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getInvalidWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getInvalidSync(this.client.getHost(), accept, context); @@ -449,8 +449,8 @@ public Basic getInvalid() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getEmptyWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getEmpty(this.client.getHost(), accept, context)); @@ -468,8 +468,8 @@ public Mono> getEmptyWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getEmptyWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getEmpty(this.client.getHost(), accept, context); @@ -513,8 +513,8 @@ public Mono getEmptyAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getEmptyWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getEmptySync(this.client.getHost(), accept, context); @@ -543,8 +543,8 @@ public Basic getEmpty() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getNullWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getNull(this.client.getHost(), accept, context)); @@ -563,8 +563,8 @@ public Mono> getNullWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getNullWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getNull(this.client.getHost(), accept, context); @@ -608,8 +608,8 @@ public Mono getNullAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getNullWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getNullSync(this.client.getHost(), accept, context); @@ -638,8 +638,8 @@ public Basic getNull() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getNotProvidedWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getNotProvided(this.client.getHost(), accept, context)); @@ -658,8 +658,8 @@ public Mono> getNotProvidedWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getNotProvidedWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getNotProvided(this.client.getHost(), accept, context); @@ -705,8 +705,8 @@ public Mono getNotProvidedAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getNotProvidedWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getNotProvidedSync(this.client.getHost(), accept, context); diff --git a/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/Dictionaries.java b/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/Dictionaries.java index 8efe7d3ca7..7324716e3e 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/Dictionaries.java +++ b/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/Dictionaries.java @@ -144,8 +144,8 @@ Response getNotProvidedSync(@HostParam("$host") String host, @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getValid(this.client.getHost(), accept, context)); @@ -164,8 +164,8 @@ public Mono> getValidWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValid(this.client.getHost(), accept, context); @@ -209,8 +209,8 @@ public Mono getValidAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getValidWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValidSync(this.client.getHost(), accept, context); @@ -241,12 +241,12 @@ public DictionaryWrapper getValid() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidWithResponseAsync(DictionaryWrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -268,12 +268,12 @@ public Mono> putValidWithResponseAsync(DictionaryWrapper complexB @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidWithResponseAsync(DictionaryWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -326,12 +326,12 @@ public Mono putValidAsync(DictionaryWrapper complexBody, Context context) @ServiceMethod(returns = ReturnType.SINGLE) public Response putValidWithResponse(DictionaryWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -364,8 +364,8 @@ public void putValid(DictionaryWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getEmptyWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getEmpty(this.client.getHost(), accept, context)); @@ -384,8 +384,8 @@ public Mono> getEmptyWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getEmptyWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getEmpty(this.client.getHost(), accept, context); @@ -429,8 +429,8 @@ public Mono getEmptyAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getEmptyWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getEmptySync(this.client.getHost(), accept, context); @@ -460,12 +460,12 @@ public DictionaryWrapper getEmpty() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putEmptyWithResponseAsync(DictionaryWrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -486,12 +486,12 @@ public Mono> putEmptyWithResponseAsync(DictionaryWrapper complexB @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putEmptyWithResponseAsync(DictionaryWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -541,12 +541,12 @@ public Mono putEmptyAsync(DictionaryWrapper complexBody, Context context) @ServiceMethod(returns = ReturnType.SINGLE) public Response putEmptyWithResponse(DictionaryWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -578,8 +578,8 @@ public void putEmpty(DictionaryWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getNullWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getNull(this.client.getHost(), accept, context)); @@ -598,8 +598,8 @@ public Mono> getNullWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getNullWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getNull(this.client.getHost(), accept, context); @@ -643,8 +643,8 @@ public Mono getNullAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getNullWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getNullSync(this.client.getHost(), accept, context); @@ -673,8 +673,8 @@ public DictionaryWrapper getNull() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getNotProvidedWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getNotProvided(this.client.getHost(), accept, context)); @@ -693,8 +693,8 @@ public Mono> getNotProvidedWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getNotProvidedWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getNotProvided(this.client.getHost(), accept, context); @@ -741,8 +741,8 @@ public Mono getNotProvidedAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getNotProvidedWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getNotProvidedSync(this.client.getHost(), accept, context); diff --git a/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/Flattencomplexes.java b/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/Flattencomplexes.java index 0f58cfd1b0..ec3a79e2d2 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/Flattencomplexes.java +++ b/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/Flattencomplexes.java @@ -77,8 +77,8 @@ Response getValidSync(@HostParam("$host") String host, @HeaderParam( @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getValid(this.client.getHost(), accept, context)); @@ -96,8 +96,8 @@ public Mono> getValidWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValid(this.client.getHost(), accept, context); @@ -141,8 +141,8 @@ public Mono getValidAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getValidWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValidSync(this.client.getHost(), accept, context); diff --git a/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/Inheritances.java b/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/Inheritances.java index 2f0cd60086..31376c3c8e 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/Inheritances.java +++ b/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/Inheritances.java @@ -91,8 +91,8 @@ Response putValidSync(@HostParam("$host") String host, @BodyParam("applica @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getValid(this.client.getHost(), accept, context)); @@ -110,8 +110,8 @@ public Mono> getValidWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValid(this.client.getHost(), accept, context); @@ -155,8 +155,8 @@ public Mono getValidAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getValidWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValidSync(this.client.getHost(), accept, context); @@ -188,12 +188,12 @@ public Siamese getValid() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidWithResponseAsync(Siamese complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -216,12 +216,12 @@ public Mono> putValidWithResponseAsync(Siamese complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidWithResponseAsync(Siamese complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -277,12 +277,12 @@ public Mono putValidAsync(Siamese complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putValidWithResponse(Siamese complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } diff --git a/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/Polymorphicrecursives.java b/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/Polymorphicrecursives.java index dcff9752b0..86d1103de0 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/Polymorphicrecursives.java +++ b/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/Polymorphicrecursives.java @@ -92,8 +92,8 @@ Response putValidSync(@HostParam("$host") String host, @BodyParam("applica @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getValid(this.client.getHost(), accept, context)); @@ -112,8 +112,8 @@ public Mono> getValidWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValid(this.client.getHost(), accept, context); @@ -159,8 +159,8 @@ public Mono getValidAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getValidWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValidSync(this.client.getHost(), accept, context); @@ -242,12 +242,12 @@ public Fish getValid() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidWithResponseAsync(Fish complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -320,12 +320,12 @@ public Mono> putValidWithResponseAsync(Fish complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidWithResponseAsync(Fish complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -531,12 +531,12 @@ public Mono putValidAsync(Fish complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putValidWithResponse(Fish complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } diff --git a/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/Polymorphisms.java b/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/Polymorphisms.java index 2b5e08bff1..719967ce1a 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/Polymorphisms.java +++ b/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/Polymorphisms.java @@ -178,8 +178,8 @@ Response putValidMissingRequiredSync(@HostParam("$host") String host, @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getValid(this.client.getHost(), accept, context)); @@ -197,8 +197,8 @@ public Mono> getValidWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValid(this.client.getHost(), accept, context); @@ -242,8 +242,8 @@ public Mono getValidAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getValidWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValidSync(this.client.getHost(), accept, context); @@ -305,12 +305,12 @@ public Fish getValid() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidWithResponseAsync(Fish complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -363,12 +363,12 @@ public Mono> putValidWithResponseAsync(Fish complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidWithResponseAsync(Fish complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -514,12 +514,12 @@ public Mono putValidAsync(Fish complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putValidWithResponse(Fish complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -583,8 +583,8 @@ public void putValid(Fish complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDotSyntaxWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getDotSyntax(this.client.getHost(), accept, context)); @@ -603,8 +603,8 @@ public Mono> getDotSyntaxWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDotSyntaxWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getDotSyntax(this.client.getHost(), accept, context); @@ -648,8 +648,8 @@ public Mono getDotSyntaxAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getDotSyntaxWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getDotSyntaxSync(this.client.getHost(), accept, context); @@ -679,8 +679,8 @@ public DotFish getDotSyntax() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getComposedWithDiscriminatorWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil @@ -701,8 +701,8 @@ public Mono> getComposedWithDiscriminatorWithResponseAsy @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getComposedWithDiscriminatorWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getComposedWithDiscriminator(this.client.getHost(), accept, context); @@ -752,8 +752,8 @@ public Mono getComposedWithDiscriminatorAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getComposedWithDiscriminatorWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getComposedWithDiscriminatorSync(this.client.getHost(), accept, context); @@ -785,8 +785,8 @@ public DotFishMarket getComposedWithDiscriminator() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getComposedWithoutDiscriminatorWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil @@ -807,8 +807,8 @@ public Mono> getComposedWithoutDiscriminatorWithResponse @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getComposedWithoutDiscriminatorWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getComposedWithoutDiscriminator(this.client.getHost(), accept, context); @@ -859,8 +859,8 @@ public Mono getComposedWithoutDiscriminatorAsync(Context context) @ServiceMethod(returns = ReturnType.SINGLE) public Response getComposedWithoutDiscriminatorWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getComposedWithoutDiscriminatorSync(this.client.getHost(), accept, context); @@ -891,8 +891,8 @@ public DotFishMarket getComposedWithoutDiscriminator() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getComplicatedWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getComplicated(this.client.getHost(), accept, context)); @@ -911,8 +911,8 @@ public Mono> getComplicatedWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getComplicatedWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getComplicated(this.client.getHost(), accept, context); @@ -959,8 +959,8 @@ public Mono getComplicatedAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getComplicatedWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getComplicatedSync(this.client.getHost(), accept, context); @@ -991,12 +991,12 @@ public Salmon getComplicated() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putComplicatedWithResponseAsync(Salmon complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1018,12 +1018,12 @@ public Mono> putComplicatedWithResponseAsync(Salmon complexBody) @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putComplicatedWithResponseAsync(Salmon complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1073,12 +1073,12 @@ public Mono putComplicatedAsync(Salmon complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putComplicatedWithResponse(Salmon complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1111,12 +1111,12 @@ public void putComplicated(Salmon complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putMissingDiscriminatorWithResponseAsync(Salmon complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1138,12 +1138,12 @@ public Mono> putMissingDiscriminatorWithResponseAsync(Salmon co @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putMissingDiscriminatorWithResponseAsync(Salmon complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1194,12 +1194,12 @@ public Mono putMissingDiscriminatorAsync(Salmon complexBody, Context con @ServiceMethod(returns = ReturnType.SINGLE) public Response putMissingDiscriminatorWithResponse(Salmon complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1260,12 +1260,12 @@ public Salmon putMissingDiscriminator(Salmon complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidMissingRequiredWithResponseAsync(Fish complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1314,12 +1314,12 @@ public Mono> putValidMissingRequiredWithResponseAsync(Fish comple @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidMissingRequiredWithResponseAsync(Fish complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1450,12 +1450,12 @@ public Mono putValidMissingRequiredAsync(Fish complexBody, Context context @ServiceMethod(returns = ReturnType.SINGLE) public Response putValidMissingRequiredWithResponse(Fish complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } diff --git a/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/Primitives.java b/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/Primitives.java index f0d5ea9c8a..c4f08930a8 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/Primitives.java +++ b/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/Primitives.java @@ -364,8 +364,8 @@ Response putByteSync(@HostParam("$host") String host, @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getIntWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getInt(this.client.getHost(), accept, context)); @@ -384,8 +384,8 @@ public Mono> getIntWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getIntWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getInt(this.client.getHost(), accept, context); @@ -429,8 +429,8 @@ public Mono getIntAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getIntWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getIntSync(this.client.getHost(), accept, context); @@ -460,12 +460,12 @@ public IntWrapper getInt() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putIntWithResponseAsync(IntWrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -486,12 +486,12 @@ public Mono> putIntWithResponseAsync(IntWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putIntWithResponseAsync(IntWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -541,12 +541,12 @@ public Mono putIntAsync(IntWrapper complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putIntWithResponse(IntWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -577,8 +577,8 @@ public void putInt(IntWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getLongWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getLong(this.client.getHost(), accept, context)); @@ -596,8 +596,8 @@ public Mono> getLongWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getLongWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getLong(this.client.getHost(), accept, context); @@ -641,8 +641,8 @@ public Mono getLongAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getLongWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getLongSync(this.client.getHost(), accept, context); @@ -672,12 +672,12 @@ public LongWrapper getLong() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putLongWithResponseAsync(LongWrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -698,12 +698,12 @@ public Mono> putLongWithResponseAsync(LongWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putLongWithResponseAsync(LongWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -753,12 +753,12 @@ public Mono putLongAsync(LongWrapper complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putLongWithResponse(LongWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -789,8 +789,8 @@ public void putLong(LongWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getFloatWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getFloat(this.client.getHost(), accept, context)); @@ -808,8 +808,8 @@ public Mono> getFloatWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getFloatWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getFloat(this.client.getHost(), accept, context); @@ -853,8 +853,8 @@ public Mono getFloatAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getFloatWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getFloatSync(this.client.getHost(), accept, context); @@ -884,12 +884,12 @@ public FloatWrapper getFloat() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putFloatWithResponseAsync(FloatWrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -910,12 +910,12 @@ public Mono> putFloatWithResponseAsync(FloatWrapper complexBody) @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putFloatWithResponseAsync(FloatWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -965,12 +965,12 @@ public Mono putFloatAsync(FloatWrapper complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putFloatWithResponse(FloatWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1002,8 +1002,8 @@ public void putFloat(FloatWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDoubleWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getDouble(this.client.getHost(), accept, context)); @@ -1022,8 +1022,8 @@ public Mono> getDoubleWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDoubleWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getDouble(this.client.getHost(), accept, context); @@ -1067,8 +1067,8 @@ public Mono getDoubleAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getDoubleWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getDoubleSync(this.client.getHost(), accept, context); @@ -1098,12 +1098,12 @@ public DoubleWrapper getDouble() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putDoubleWithResponseAsync(DoubleWrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1124,12 +1124,12 @@ public Mono> putDoubleWithResponseAsync(DoubleWrapper complexBody @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putDoubleWithResponseAsync(DoubleWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1179,12 +1179,12 @@ public Mono putDoubleAsync(DoubleWrapper complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putDoubleWithResponse(DoubleWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1215,8 +1215,8 @@ public void putDouble(DoubleWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getBoolWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getBool(this.client.getHost(), accept, context)); @@ -1234,8 +1234,8 @@ public Mono> getBoolWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getBoolWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getBool(this.client.getHost(), accept, context); @@ -1279,8 +1279,8 @@ public Mono getBoolAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getBoolWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getBoolSync(this.client.getHost(), accept, context); @@ -1310,12 +1310,12 @@ public BooleanWrapper getBool() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putBoolWithResponseAsync(BooleanWrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1336,12 +1336,12 @@ public Mono> putBoolWithResponseAsync(BooleanWrapper complexBody) @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putBoolWithResponseAsync(BooleanWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1391,12 +1391,12 @@ public Mono putBoolAsync(BooleanWrapper complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putBoolWithResponse(BooleanWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1428,8 +1428,8 @@ public void putBool(BooleanWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getStringWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getString(this.client.getHost(), accept, context)); @@ -1448,8 +1448,8 @@ public Mono> getStringWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getStringWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getString(this.client.getHost(), accept, context); @@ -1493,8 +1493,8 @@ public Mono getStringAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getStringWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getStringSync(this.client.getHost(), accept, context); @@ -1524,12 +1524,12 @@ public StringWrapper getString() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putStringWithResponseAsync(StringWrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1550,12 +1550,12 @@ public Mono> putStringWithResponseAsync(StringWrapper complexBody @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putStringWithResponseAsync(StringWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1605,12 +1605,12 @@ public Mono putStringAsync(StringWrapper complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putStringWithResponse(StringWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1641,8 +1641,8 @@ public void putString(StringWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDateWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getDate(this.client.getHost(), accept, context)); @@ -1660,8 +1660,8 @@ public Mono> getDateWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDateWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getDate(this.client.getHost(), accept, context); @@ -1705,8 +1705,8 @@ public Mono getDateAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getDateWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getDateSync(this.client.getHost(), accept, context); @@ -1736,12 +1736,12 @@ public DateWrapper getDate() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putDateWithResponseAsync(DateWrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1762,12 +1762,12 @@ public Mono> putDateWithResponseAsync(DateWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putDateWithResponseAsync(DateWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1817,12 +1817,12 @@ public Mono putDateAsync(DateWrapper complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putDateWithResponse(DateWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1854,8 +1854,8 @@ public void putDate(DateWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDateTimeWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getDateTime(this.client.getHost(), accept, context)); @@ -1874,8 +1874,8 @@ public Mono> getDateTimeWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDateTimeWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getDateTime(this.client.getHost(), accept, context); @@ -1919,8 +1919,8 @@ public Mono getDateTimeAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getDateTimeWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getDateTimeSync(this.client.getHost(), accept, context); @@ -1950,12 +1950,12 @@ public DatetimeWrapper getDateTime() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putDateTimeWithResponseAsync(DatetimeWrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -1977,12 +1977,12 @@ public Mono> putDateTimeWithResponseAsync(DatetimeWrapper complex @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putDateTimeWithResponseAsync(DatetimeWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -2032,12 +2032,12 @@ public Mono putDateTimeAsync(DatetimeWrapper complexBody, Context context) @ServiceMethod(returns = ReturnType.SINGLE) public Response putDateTimeWithResponse(DatetimeWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -2069,8 +2069,8 @@ public void putDateTime(DatetimeWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDateTimeRfc1123WithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getDateTimeRfc1123(this.client.getHost(), accept, context)); @@ -2089,8 +2089,8 @@ public Mono> getDateTimeRfc1123WithResponseAsyn @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDateTimeRfc1123WithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getDateTimeRfc1123(this.client.getHost(), accept, context); @@ -2134,8 +2134,8 @@ public Mono getDateTimeRfc1123Async(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getDateTimeRfc1123WithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getDateTimeRfc1123Sync(this.client.getHost(), accept, context); @@ -2165,12 +2165,12 @@ public Datetimerfc1123Wrapper getDateTimeRfc1123() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putDateTimeRfc1123WithResponseAsync(Datetimerfc1123Wrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -2193,12 +2193,12 @@ public Mono> putDateTimeRfc1123WithResponseAsync(Datetimerfc1123W public Mono> putDateTimeRfc1123WithResponseAsync(Datetimerfc1123Wrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -2248,12 +2248,12 @@ public Mono putDateTimeRfc1123Async(Datetimerfc1123Wrapper complexBody, Co @ServiceMethod(returns = ReturnType.SINGLE) public Response putDateTimeRfc1123WithResponse(Datetimerfc1123Wrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -2285,8 +2285,8 @@ public void putDateTimeRfc1123(Datetimerfc1123Wrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDurationWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getDuration(this.client.getHost(), accept, context)); @@ -2305,8 +2305,8 @@ public Mono> getDurationWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDurationWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getDuration(this.client.getHost(), accept, context); @@ -2350,8 +2350,8 @@ public Mono getDurationAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getDurationWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getDurationSync(this.client.getHost(), accept, context); @@ -2381,12 +2381,12 @@ public DurationWrapper getDuration() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putDurationWithResponseAsync(DurationWrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -2408,12 +2408,12 @@ public Mono> putDurationWithResponseAsync(DurationWrapper complex @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putDurationWithResponseAsync(DurationWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -2463,12 +2463,12 @@ public Mono putDurationAsync(DurationWrapper complexBody, Context context) @ServiceMethod(returns = ReturnType.SINGLE) public Response putDurationWithResponse(DurationWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -2499,8 +2499,8 @@ public void putDuration(DurationWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getByteWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getByte(this.client.getHost(), accept, context)); @@ -2518,8 +2518,8 @@ public Mono> getByteWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getByteWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getByte(this.client.getHost(), accept, context); @@ -2563,8 +2563,8 @@ public Mono getByteAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getByteWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getByteSync(this.client.getHost(), accept, context); @@ -2594,12 +2594,12 @@ public ByteWrapper getByte() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putByteWithResponseAsync(ByteWrapper complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -2620,12 +2620,12 @@ public Mono> putByteWithResponseAsync(ByteWrapper complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putByteWithResponseAsync(ByteWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -2675,12 +2675,12 @@ public Mono putByteAsync(ByteWrapper complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putByteWithResponse(ByteWrapper complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } diff --git a/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/Readonlyproperties.java b/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/Readonlyproperties.java index 9758604a20..2369464102 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/Readonlyproperties.java +++ b/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/Readonlyproperties.java @@ -94,8 +94,8 @@ Response putValidSync(@HostParam("$host") String host, @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync() { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return FluxUtil.withContext(context -> service.getValid(this.client.getHost(), accept, context)); @@ -114,8 +114,8 @@ public Mono> getValidWithResponseAsync() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getValidWithResponseAsync(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValid(this.client.getHost(), accept, context); @@ -159,8 +159,8 @@ public Mono getValidAsync(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getValidWithResponse(Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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.")); } final String accept = "application/json"; return service.getValidSync(this.client.getHost(), accept, context); @@ -190,12 +190,12 @@ public ReadonlyObj getValid() { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidWithResponseAsync(ReadonlyObj complexBody) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -216,12 +216,12 @@ public Mono> putValidWithResponseAsync(ReadonlyObj complexBody) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> putValidWithResponseAsync(ReadonlyObj complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } @@ -271,12 +271,12 @@ public Mono putValidAsync(ReadonlyObj complexBody, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response putValidWithResponse(ReadonlyObj complexBody, Context context) { if (this.client.getHost() == null) { - throw LOGGER.logExceptionAsError( - 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 (complexBody == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter complexBody is required and cannot be null.")); } else { complexBody.validate(); } diff --git a/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/models/Shark.java b/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/models/Shark.java index 3a7a61fb0e..1de6fd3abf 100644 --- a/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/models/Shark.java +++ b/vanilla-tests/src/main/java/fixtures/streamstyleserializationimmutableoutput/models/Shark.java @@ -126,8 +126,8 @@ public Shark setSiblings(List siblings) { public void validate() { super.validate(); if (getBirthday() == null) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("Missing required property birthday in model Shark")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property birthday in model Shark")); } } From 2c63aebd0d522267788923ca881cdfb001fd2248 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Thu, 28 Mar 2024 11:15:47 +0800 Subject: [PATCH 4/5] code style --- .../java/com/azure/autorest/util/TemplateUtil.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/javagen/src/main/java/com/azure/autorest/util/TemplateUtil.java b/javagen/src/main/java/com/azure/autorest/util/TemplateUtil.java index f167a89884..62d3b9ddce 100644 --- a/javagen/src/main/java/com/azure/autorest/util/TemplateUtil.java +++ b/javagen/src/main/java/com/azure/autorest/util/TemplateUtil.java @@ -195,10 +195,11 @@ public static String getTypeReferenceCreation(IType type) { return (type instanceof ArrayType || type instanceof ClassType || type instanceof EnumType || type instanceof PrimitiveType) ? type.asNullable() + ".class" : CodeNamer.getEnumMemberName("TypeReference" + ((GenericType) type).toJavaPropertyString()); + } else { + return (type instanceof ArrayType || type instanceof ClassType || type instanceof EnumType || type instanceof PrimitiveType) + ? String.format("TypeReference.createInstance(%s.class)", type.asNullable()) + : CodeNamer.getEnumMemberName("TypeReference" + ((GenericType) type).toJavaPropertyString()); } - return (type instanceof ArrayType || type instanceof ClassType || type instanceof EnumType || type instanceof PrimitiveType) - ? String.format("TypeReference.createInstance(%s.class)", type.asNullable()) - : CodeNamer.getEnumMemberName("TypeReference" + ((GenericType) type).toJavaPropertyString()); } /** @@ -224,10 +225,10 @@ public static void writeTypeReferenceStaticVariable(JavaClass classBlock, Generi + "@Override public Type[] getActualTypeArguments() { return new Type[] { " + sb + " }; }" + "@Override public Type getOwnerType() { return null; } }", CodeNamer.getEnumMemberName("TypeReference" + type.toJavaPropertyString()))); - return; + } else { + classBlock.privateStaticFinalVariable(String.format("TypeReference<%1$s> %2$s = new TypeReference<%1$s>() {}", + type, CodeNamer.getEnumMemberName("TypeReference" + type.toJavaPropertyString()))); } - classBlock.privateStaticFinalVariable(String.format("TypeReference<%1$s> %2$s = new TypeReference<%1$s>() {}", - type, CodeNamer.getEnumMemberName("TypeReference" + type.toJavaPropertyString()))); } /** From b66927406391c8da46d338f3525961b4476c10da Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Thu, 28 Mar 2024 11:18:10 +0800 Subject: [PATCH 5/5] bump to 0.15.6 --- typespec-extension/changelog.md | 4 ++++ typespec-extension/package-lock.json | 4 ++-- typespec-extension/package.json | 2 +- typespec-tests/package.json | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/typespec-extension/changelog.md b/typespec-extension/changelog.md index 87fc454080..42c8613e3e 100644 --- a/typespec-extension/changelog.md +++ b/typespec-extension/changelog.md @@ -1,5 +1,9 @@ # Release History +## 0.15.6 (2024-03-29) + +Compatible with compiler 0.54. + ## 0.15.5 (2024-03-27) Compatible with compiler 0.54. diff --git a/typespec-extension/package-lock.json b/typespec-extension/package-lock.json index 303135c2e8..a88061494b 100644 --- a/typespec-extension/package-lock.json +++ b/typespec-extension/package-lock.json @@ -1,12 +1,12 @@ { "name": "@azure-tools/typespec-java", - "version": "0.15.5", + "version": "0.15.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@azure-tools/typespec-java", - "version": "0.15.5", + "version": "0.15.6", "license": "MIT", "dependencies": { "@autorest/codemodel": "~4.20.0", diff --git a/typespec-extension/package.json b/typespec-extension/package.json index d2708b0823..595308bd52 100644 --- a/typespec-extension/package.json +++ b/typespec-extension/package.json @@ -1,6 +1,6 @@ { "name": "@azure-tools/typespec-java", - "version": "0.15.5", + "version": "0.15.6", "description": "TypeSpec library for emitting Java client from the TypeSpec REST protocol binding", "keywords": [ "TypeSpec" diff --git a/typespec-tests/package.json b/typespec-tests/package.json index a505698ff9..f7e8b5961a 100644 --- a/typespec-tests/package.json +++ b/typespec-tests/package.json @@ -10,7 +10,7 @@ }, "dependencies": { "@azure-tools/cadl-ranch-specs": "0.31.5", - "@azure-tools/typespec-java": "file:/../typespec-extension/azure-tools-typespec-java-0.15.5.tgz" + "@azure-tools/typespec-java": "file:/../typespec-extension/azure-tools-typespec-java-0.15.6.tgz" }, "devDependencies": { "@typespec/prettier-plugin-typespec": "~0.54.0",