diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/authentication/apikey/ApiKeyClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/authentication/apikey/ApiKeyClientBuilder.java index f26d7c1b74..bb2cffbc0f 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/authentication/apikey/ApiKeyClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/authentication/apikey/ApiKeyClientBuilder.java @@ -11,19 +11,19 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; import io.clientcore.core.http.pipeline.KeyCredentialPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.KeyCredentialTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -244,7 +244,7 @@ private HttpPipeline createHttpPipeline() { if (keyCredential != null) { policies.add(new KeyCredentialPolicy("x-ms-api-key", keyCredential, null)); } - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/authentication/http/custom/CustomClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/authentication/http/custom/CustomClientBuilder.java index c8ede02b16..1945499864 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/authentication/http/custom/CustomClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/authentication/http/custom/CustomClientBuilder.java @@ -11,19 +11,19 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; import io.clientcore.core.http.pipeline.KeyCredentialPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.KeyCredentialTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -244,7 +244,7 @@ private HttpPipeline createHttpPipeline() { if (keyCredential != null) { policies.add(new KeyCredentialPolicy("authorization", keyCredential, "SharedAccessKey")); } - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/authentication/oauth2/OAuth2ClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/authentication/oauth2/OAuth2ClientBuilder.java index bebb4dc03c..b7ccada4e7 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/authentication/oauth2/OAuth2ClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/authentication/oauth2/OAuth2ClientBuilder.java @@ -11,19 +11,19 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; import io.clientcore.core.http.pipeline.KeyCredentialPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.KeyCredentialTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -244,7 +244,7 @@ private HttpPipeline createHttpPipeline() { if (keyCredential != null) { policies.add(new KeyCredentialPolicy("authorization", keyCredential, "Bearer")); } - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/authentication/union/UnionClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/authentication/union/UnionClientBuilder.java index 8c104faed5..b1143e4b4c 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/authentication/union/UnionClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/authentication/union/UnionClientBuilder.java @@ -11,19 +11,19 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; import io.clientcore.core.http.pipeline.KeyCredentialPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.KeyCredentialTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -243,7 +243,7 @@ private HttpPipeline createHttpPipeline() { if (keyCredential != null) { policies.add(new KeyCredentialPolicy("authorization", keyCredential, "Bearer")); } - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/encode/numeric/NumericClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/encode/numeric/NumericClientBuilder.java index aadefd51f8..fdac3100bf 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/encode/numeric/NumericClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/encode/numeric/NumericClientBuilder.java @@ -10,17 +10,17 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -221,7 +221,7 @@ private HttpPipeline createHttpPipeline() { policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions)); policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/parameters/basic/BasicClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/parameters/basic/BasicClientBuilder.java index a3311e08a8..ab906e5e38 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/parameters/basic/BasicClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/parameters/basic/BasicClientBuilder.java @@ -9,17 +9,17 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -221,7 +221,7 @@ private HttpPipeline createHttpPipeline() { policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions)); policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/parameters/bodyoptionality/BodyOptionalityClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/parameters/bodyoptionality/BodyOptionalityClientBuilder.java index f581a09c0a..fba957c05a 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/parameters/bodyoptionality/BodyOptionalityClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/parameters/bodyoptionality/BodyOptionalityClientBuilder.java @@ -9,17 +9,17 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -222,7 +222,7 @@ private HttpPipeline createHttpPipeline() { policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions)); policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/parameters/collectionformat/CollectionFormatClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/parameters/collectionformat/CollectionFormatClientBuilder.java index 496902e6b9..09f9b9da28 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/parameters/collectionformat/CollectionFormatClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/parameters/collectionformat/CollectionFormatClientBuilder.java @@ -9,17 +9,17 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -222,7 +222,7 @@ private HttpPipeline createHttpPipeline() { policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions)); policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/parameters/spread/SpreadClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/parameters/spread/SpreadClientBuilder.java index 8e26689bd7..0825a9e811 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/parameters/spread/SpreadClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/parameters/spread/SpreadClientBuilder.java @@ -9,17 +9,17 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -221,7 +221,7 @@ private HttpPipeline createHttpPipeline() { policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions)); policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/contentnegotiation/ContentNegotiationClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/contentnegotiation/ContentNegotiationClientBuilder.java index 108fa7a3b7..c524224988 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/contentnegotiation/ContentNegotiationClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/contentnegotiation/ContentNegotiationClientBuilder.java @@ -9,17 +9,17 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -222,7 +222,7 @@ private HttpPipeline createHttpPipeline() { policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions)); policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/jsonmergepatch/JsonMergePatchClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/jsonmergepatch/JsonMergePatchClientBuilder.java index 0a3fd08c6e..3af5051d5c 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/jsonmergepatch/JsonMergePatchClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/jsonmergepatch/JsonMergePatchClientBuilder.java @@ -9,17 +9,17 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -222,7 +222,7 @@ private HttpPipeline createHttpPipeline() { policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions)); policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/mediatype/MediaTypeClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/mediatype/MediaTypeClientBuilder.java index 5f8f964750..c5cac8d72a 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/mediatype/MediaTypeClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/mediatype/MediaTypeClientBuilder.java @@ -9,17 +9,17 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -222,7 +222,7 @@ private HttpPipeline createHttpPipeline() { policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions)); policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/multipart/MultiPartClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/multipart/MultiPartClientBuilder.java index 05d567a128..6264b962af 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/multipart/MultiPartClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/multipart/MultiPartClientBuilder.java @@ -9,17 +9,17 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -227,7 +227,7 @@ private HttpPipeline createHttpPipeline() { policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions)); policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/pageable/PageableClient.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/pageable/PageableClient.java index b76b597528..35fd41fad9 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/pageable/PageableClient.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/pageable/PageableClient.java @@ -3,12 +3,13 @@ package payload.pageable; import io.clientcore.core.annotation.Metadata; +import io.clientcore.core.annotation.ReturnType; import io.clientcore.core.annotation.ServiceClient; +import io.clientcore.core.annotation.ServiceMethod; import io.clientcore.core.http.exception.HttpResponseException; +import io.clientcore.core.http.models.PagedIterable; import io.clientcore.core.http.models.RequestOptions; -import io.clientcore.core.http.models.Response; import payload.pageable.implementation.ServerDrivenPaginationsImpl; -import payload.pageable.serverdrivenpagination.LinkResponse; /** * Initializes a new instance of the synchronous PageableClient type. @@ -51,21 +52,8 @@ public final class PageableClient { * @return the response. */ @Metadata(generated = true) - public Response linkWithResponse(RequestOptions requestOptions) { - return this.serviceClient.linkWithResponse(requestOptions); - } - - /** - * The link operation. - * - * @throws HttpResponseException thrown if the service returns an error. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @Metadata(generated = true) - public LinkResponse link() { - // Generated convenience method for linkWithResponse - RequestOptions requestOptions = new RequestOptions(); - return linkWithResponse(requestOptions).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable link(RequestOptions requestOptions) { + return this.serviceClient.link(requestOptions); } } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/pageable/PageableClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/pageable/PageableClientBuilder.java index e22b123f7e..b283cbd9a9 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/pageable/PageableClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/pageable/PageableClientBuilder.java @@ -9,17 +9,17 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -221,7 +221,7 @@ private HttpPipeline createHttpPipeline() { policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions)); policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/pageable/implementation/ServerDrivenPaginationsImpl.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/pageable/implementation/ServerDrivenPaginationsImpl.java index e8162fd8ef..4ab63d39fe 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/pageable/implementation/ServerDrivenPaginationsImpl.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/pageable/implementation/ServerDrivenPaginationsImpl.java @@ -7,12 +7,17 @@ import io.clientcore.core.http.annotation.HeaderParam; import io.clientcore.core.http.annotation.HostParam; import io.clientcore.core.http.annotation.HttpRequestInformation; +import io.clientcore.core.http.annotation.PathParam; import io.clientcore.core.http.annotation.UnexpectedResponseExceptionDetail; import io.clientcore.core.http.exception.HttpResponseException; import io.clientcore.core.http.models.HttpMethod; +import io.clientcore.core.http.models.PagedIterable; +import io.clientcore.core.http.models.PagedResponse; import io.clientcore.core.http.models.RequestOptions; import io.clientcore.core.http.models.Response; -import payload.pageable.serverdrivenpagination.LinkResponse; +import io.clientcore.core.util.Context; +import payload.pageable.Pet; +import payload.pageable.serverdrivenpagination.implementation.LinkResponse; /** * An instance of this class provides access to all the operations defined in ServerDrivenPaginations. @@ -51,6 +56,12 @@ public interface ServerDrivenPaginationsService { @UnexpectedResponseExceptionDetail Response linkSync(@HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions); + + @HttpRequestInformation(method = HttpMethod.GET, path = "{nextLink}", expectedStatusCodes = { 200 }) + @UnexpectedResponseExceptionDetail + Response linkNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, + RequestOptions requestOptions); } /** @@ -75,8 +86,71 @@ Response linkSync(@HostParam("endpoint") String endpoint, @HeaderP * @throws HttpResponseException thrown if the service returns an error. * @return the response. */ - public Response linkWithResponse(RequestOptions requestOptions) { + private PagedResponse linkSinglePage(RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.linkSync(this.client.getEndpoint(), accept, requestOptions); + return new PagedResponse<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getBody(), + res.getValue().getPets(), null, res.getValue().getNext(), null, null, null); + } + + /** + * The link operation. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     pets (Required): [
+     *          (Required){
+     *             id: String (Required)
+     *             name: String (Required)
+     *         }
+     *     ]
+     *     next: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the service returns an error. + * @return the response. + */ + public PagedIterable link(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext(requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.none()); + return new PagedIterable<>((pagingOptions) -> linkSinglePage(requestOptions), + (pagingOptions, nextLink) -> linkNextSinglePage(nextLink, requestOptionsForNextPage)); + } + + /** + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     pets (Required): [
+     *          (Required){
+     *             id: String (Required)
+     *             name: String (Required)
+     *         }
+     *     ]
+     *     next: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the service returns an error. + * @return the response. + */ + private PagedResponse linkNextSinglePage(String nextLink, RequestOptions requestOptions) { final String accept = "application/json"; - return service.linkSync(this.client.getEndpoint(), accept, requestOptions); + Response res = service.linkNextSync(nextLink, this.client.getEndpoint(), accept, requestOptions); + return new PagedResponse<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getBody(), + res.getValue().getPets(), null, res.getValue().getNext(), null, null, null); } } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/pageable/serverdrivenpagination/LinkResponse.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/pageable/serverdrivenpagination/LinkResponse.java deleted file mode 100644 index c17e1963f5..0000000000 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/pageable/serverdrivenpagination/LinkResponse.java +++ /dev/null @@ -1,106 +0,0 @@ -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package payload.pageable.serverdrivenpagination; - -import io.clientcore.core.annotation.Metadata; -import io.clientcore.core.annotation.TypeConditions; -import io.clientcore.core.serialization.json.JsonReader; -import io.clientcore.core.serialization.json.JsonSerializable; -import io.clientcore.core.serialization.json.JsonToken; -import io.clientcore.core.serialization.json.JsonWriter; -import java.io.IOException; -import java.util.List; -import payload.pageable.Pet; - -/** - * The LinkResponse model. - */ -@Metadata(conditions = { TypeConditions.IMMUTABLE }) -public final class LinkResponse implements JsonSerializable { - /* - * The pets property. - */ - @Metadata(generated = true) - private final List pets; - - /* - * The next property. - */ - @Metadata(generated = true) - private String next; - - /** - * Creates an instance of LinkResponse class. - * - * @param pets the pets value to set. - */ - @Metadata(generated = true) - private LinkResponse(List pets) { - this.pets = pets; - } - - /** - * Get the pets property: The pets property. - * - * @return the pets value. - */ - @Metadata(generated = true) - public List getPets() { - return this.pets; - } - - /** - * Get the next property: The next property. - * - * @return the next value. - */ - @Metadata(generated = true) - public String getNext() { - return this.next; - } - - /** - * {@inheritDoc} - */ - @Metadata(generated = true) - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("pets", this.pets, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("next", this.next); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LinkResponse from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LinkResponse if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the LinkResponse. - */ - @Metadata(generated = true) - public static LinkResponse fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - List pets = null; - String next = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("pets".equals(fieldName)) { - pets = reader.readArray(reader1 -> Pet.fromJson(reader1)); - } else if ("next".equals(fieldName)) { - next = reader.getString(); - } else { - reader.skipChildren(); - } - } - LinkResponse deserializedLinkResponse = new LinkResponse(pets); - deserializedLinkResponse.next = next; - - return deserializedLinkResponse; - }); - } -} diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/pageable/serverdrivenpagination/package-info.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/pageable/serverdrivenpagination/package-info.java deleted file mode 100644 index b954bedda3..0000000000 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/payload/pageable/serverdrivenpagination/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -// Code generated by Microsoft (R) TypeSpec Code Generator. - -/** - * Package containing the data models for Pageable. - * Test for pageable payload. - */ -package payload.pageable.serverdrivenpagination; diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/routes/RoutesClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/routes/RoutesClientBuilder.java index dcca203748..0eac7a8216 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/routes/RoutesClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/routes/RoutesClientBuilder.java @@ -9,17 +9,17 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -239,7 +239,7 @@ private HttpPipeline createHttpPipeline() { policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions)); policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/serialization/encodedname/json/JsonClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/serialization/encodedname/json/JsonClientBuilder.java index d969142be0..3af15c64e4 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/serialization/encodedname/json/JsonClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/serialization/encodedname/json/JsonClientBuilder.java @@ -9,17 +9,17 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -221,7 +221,7 @@ private HttpPipeline createHttpPipeline() { policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions)); policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/server/endpoint/notdefined/NotDefinedClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/server/endpoint/notdefined/NotDefinedClientBuilder.java index 4b53d573be..e70d839096 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/server/endpoint/notdefined/NotDefinedClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/server/endpoint/notdefined/NotDefinedClientBuilder.java @@ -9,17 +9,17 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -222,7 +222,7 @@ private HttpPipeline createHttpPipeline() { policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions)); policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/server/path/multiple/MultipleClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/server/path/multiple/MultipleClientBuilder.java index f188d53506..ca76cd5009 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/server/path/multiple/MultipleClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/server/path/multiple/MultipleClientBuilder.java @@ -9,17 +9,17 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -241,7 +241,7 @@ private HttpPipeline createHttpPipeline() { policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions)); policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/server/path/single/SingleClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/server/path/single/SingleClientBuilder.java index bd8ad953fb..1b0a9ba7e4 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/server/path/single/SingleClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/server/path/single/SingleClientBuilder.java @@ -9,17 +9,17 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -221,7 +221,7 @@ private HttpPipeline createHttpPipeline() { policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions)); policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/server/versions/notversioned/NotVersionedClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/server/versions/notversioned/NotVersionedClientBuilder.java index 2751f51c5d..4d638db174 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/server/versions/notversioned/NotVersionedClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/server/versions/notversioned/NotVersionedClientBuilder.java @@ -9,17 +9,17 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -222,7 +222,7 @@ private HttpPipeline createHttpPipeline() { policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions)); policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/server/versions/versioned/VersionedClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/server/versions/versioned/VersionedClientBuilder.java index c00d2332a8..ff478a0826 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/server/versions/versioned/VersionedClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/server/versions/versioned/VersionedClientBuilder.java @@ -9,17 +9,17 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -242,7 +242,7 @@ private HttpPipeline createHttpPipeline() { policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions)); policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/specialwords/SpecialWordsClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/specialwords/SpecialWordsClientBuilder.java index 49b4b2683e..b68d82a21c 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/specialwords/SpecialWordsClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/specialwords/SpecialWordsClientBuilder.java @@ -9,17 +9,17 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -227,7 +227,7 @@ private HttpPipeline createHttpPipeline() { policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions)); policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/array/ArrayClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/array/ArrayClientBuilder.java index e2d479a965..4f1c9bbcef 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/array/ArrayClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/array/ArrayClientBuilder.java @@ -9,17 +9,17 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -236,7 +236,7 @@ private HttpPipeline createHttpPipeline() { policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions)); policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/dictionary/DictionaryClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/dictionary/DictionaryClientBuilder.java index f2579f7acf..4960497fc9 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/dictionary/DictionaryClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/dictionary/DictionaryClientBuilder.java @@ -9,17 +9,17 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -234,7 +234,7 @@ private HttpPipeline createHttpPipeline() { policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions)); policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/enums/extensible/ExtensibleClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/enums/extensible/ExtensibleClientBuilder.java index d4b0983950..554d75b630 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/enums/extensible/ExtensibleClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/enums/extensible/ExtensibleClientBuilder.java @@ -9,17 +9,17 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -222,7 +222,7 @@ private HttpPipeline createHttpPipeline() { policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions)); policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/enums/fixed/FixedClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/enums/fixed/FixedClientBuilder.java index 653d5ddbd9..0b55fa840c 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/enums/fixed/FixedClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/enums/fixed/FixedClientBuilder.java @@ -9,17 +9,17 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -221,7 +221,7 @@ private HttpPipeline createHttpPipeline() { policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions)); policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/model/empty/EmptyClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/model/empty/EmptyClientBuilder.java index dde3e5be94..058619ffac 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/model/empty/EmptyClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/model/empty/EmptyClientBuilder.java @@ -9,17 +9,17 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -221,7 +221,7 @@ private HttpPipeline createHttpPipeline() { policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions)); policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/model/inheritance/enumdiscriminator/EnumDiscriminatorClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/model/inheritance/enumdiscriminator/EnumDiscriminatorClientBuilder.java index 34f5371061..4a25988239 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/model/inheritance/enumdiscriminator/EnumDiscriminatorClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/model/inheritance/enumdiscriminator/EnumDiscriminatorClientBuilder.java @@ -9,17 +9,17 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -222,7 +222,7 @@ private HttpPipeline createHttpPipeline() { policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions)); policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/model/inheritance/nesteddiscriminator/NestedDiscriminatorClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/model/inheritance/nesteddiscriminator/NestedDiscriminatorClientBuilder.java index 1f6ed3bfaf..9bff0a7998 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/model/inheritance/nesteddiscriminator/NestedDiscriminatorClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/model/inheritance/nesteddiscriminator/NestedDiscriminatorClientBuilder.java @@ -9,17 +9,17 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -222,7 +222,7 @@ private HttpPipeline createHttpPipeline() { policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions)); policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/model/inheritance/notdiscriminated/NotDiscriminatedClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/model/inheritance/notdiscriminated/NotDiscriminatedClientBuilder.java index 367c4a8602..552c94990c 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/model/inheritance/notdiscriminated/NotDiscriminatedClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/model/inheritance/notdiscriminated/NotDiscriminatedClientBuilder.java @@ -9,17 +9,17 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -222,7 +222,7 @@ private HttpPipeline createHttpPipeline() { policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions)); policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/model/inheritance/recursive/RecursiveClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/model/inheritance/recursive/RecursiveClientBuilder.java index f4020cd176..d8ad6e131f 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/model/inheritance/recursive/RecursiveClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/model/inheritance/recursive/RecursiveClientBuilder.java @@ -9,17 +9,17 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -222,7 +222,7 @@ private HttpPipeline createHttpPipeline() { policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions)); policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/model/inheritance/singlediscriminator/SingleDiscriminatorClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/model/inheritance/singlediscriminator/SingleDiscriminatorClientBuilder.java index cf3365feff..60dbe94bbc 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/model/inheritance/singlediscriminator/SingleDiscriminatorClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/model/inheritance/singlediscriminator/SingleDiscriminatorClientBuilder.java @@ -9,17 +9,17 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -222,7 +222,7 @@ private HttpPipeline createHttpPipeline() { policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions)); policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/model/usage/UsageClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/model/usage/UsageClientBuilder.java index a3cd60e954..009efd3de2 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/model/usage/UsageClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/model/usage/UsageClientBuilder.java @@ -9,17 +9,17 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -221,7 +221,7 @@ private HttpPipeline createHttpPipeline() { policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions)); policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/model/visibility/VisibilityClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/model/visibility/VisibilityClientBuilder.java index 45205f07bc..7025d4c903 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/model/visibility/VisibilityClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/model/visibility/VisibilityClientBuilder.java @@ -9,17 +9,17 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -222,7 +222,7 @@ private HttpPipeline createHttpPipeline() { policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions)); policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/property/additionalproperties/AdditionalPropertiesClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/property/additionalproperties/AdditionalPropertiesClientBuilder.java index 4d80a1bb44..ec5afe54a8 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/property/additionalproperties/AdditionalPropertiesClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/property/additionalproperties/AdditionalPropertiesClientBuilder.java @@ -9,17 +9,17 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -255,7 +255,7 @@ private HttpPipeline createHttpPipeline() { policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions)); policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/property/nullable/NullableClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/property/nullable/NullableClientBuilder.java index 8ae843a5a7..ea129ab5e8 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/property/nullable/NullableClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/property/nullable/NullableClientBuilder.java @@ -9,17 +9,17 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -229,7 +229,7 @@ private HttpPipeline createHttpPipeline() { policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions)); policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/property/optional/OptionalClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/property/optional/OptionalClientBuilder.java index f3885bebc8..9289f9570e 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/property/optional/OptionalClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/property/optional/OptionalClientBuilder.java @@ -9,17 +9,17 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -238,7 +238,7 @@ private HttpPipeline createHttpPipeline() { policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions)); policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/property/valuetypes/ValueTypesClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/property/valuetypes/ValueTypesClientBuilder.java index e302814a2f..de073b2dcd 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/property/valuetypes/ValueTypesClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/property/valuetypes/ValueTypesClientBuilder.java @@ -9,17 +9,17 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -252,7 +252,7 @@ private HttpPipeline createHttpPipeline() { policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions)); policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/scalar/ScalarClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/scalar/ScalarClientBuilder.java index 748a17447d..938aac4a87 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/scalar/ScalarClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/scalar/ScalarClientBuilder.java @@ -9,17 +9,17 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -229,7 +229,7 @@ private HttpPipeline createHttpPipeline() { policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions)); policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/union/UnionClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/union/UnionClientBuilder.java index e2437e73b9..5f7c866b2d 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/union/UnionClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/type/union/UnionClientBuilder.java @@ -9,17 +9,17 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -232,7 +232,7 @@ private HttpPipeline createHttpPipeline() { policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions)); policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/versioning/added/AddedClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/versioning/added/AddedClientBuilder.java index 3c23e0fd38..ab19fb824d 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/versioning/added/AddedClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/versioning/added/AddedClientBuilder.java @@ -9,17 +9,17 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -260,7 +260,7 @@ private HttpPipeline createHttpPipeline() { policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions)); policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/versioning/madeoptional/MadeOptionalClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/versioning/madeoptional/MadeOptionalClientBuilder.java index 8f8a00e530..a4fa95408f 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/versioning/madeoptional/MadeOptionalClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/versioning/madeoptional/MadeOptionalClientBuilder.java @@ -9,17 +9,17 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -262,7 +262,7 @@ private HttpPipeline createHttpPipeline() { policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions)); policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/versioning/removed/RemovedClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/versioning/removed/RemovedClientBuilder.java index ed235b0073..5d8ea0a8c5 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/versioning/removed/RemovedClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/versioning/removed/RemovedClientBuilder.java @@ -9,17 +9,17 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -261,7 +261,7 @@ private HttpPipeline createHttpPipeline() { policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions)); policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/versioning/renamedfrom/RenamedFromClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/versioning/renamedfrom/RenamedFromClientBuilder.java index d2b9274bc1..379b99657b 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/versioning/renamedfrom/RenamedFromClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/versioning/renamedfrom/RenamedFromClientBuilder.java @@ -9,17 +9,17 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -262,7 +262,7 @@ private HttpPipeline createHttpPipeline() { policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions)); policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/versioning/returntypechangedfrom/ReturnTypeChangedFromClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/versioning/returntypechangedfrom/ReturnTypeChangedFromClientBuilder.java index d3866d0a09..a554c7ebbb 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/versioning/returntypechangedfrom/ReturnTypeChangedFromClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/versioning/returntypechangedfrom/ReturnTypeChangedFromClientBuilder.java @@ -9,17 +9,17 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -262,7 +262,7 @@ private HttpPipeline createHttpPipeline() { policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions)); policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/versioning/typechangedfrom/TypeChangedFromClientBuilder.java b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/versioning/typechangedfrom/TypeChangedFromClientBuilder.java index 5e6a581b6f..06fe381726 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/versioning/typechangedfrom/TypeChangedFromClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/java/versioning/typechangedfrom/TypeChangedFromClientBuilder.java @@ -9,17 +9,17 @@ import io.clientcore.core.http.models.HttpRedirectOptions; import io.clientcore.core.http.models.HttpRetryOptions; import io.clientcore.core.http.models.ProxyOptions; -import io.clientcore.core.http.pipeline.HttpLoggingPolicy; +import io.clientcore.core.http.pipeline.HttpInstrumentationPolicy; import io.clientcore.core.http.pipeline.HttpPipeline; import io.clientcore.core.http.pipeline.HttpPipelineBuilder; import io.clientcore.core.http.pipeline.HttpPipelinePolicy; import io.clientcore.core.http.pipeline.HttpRedirectPolicy; import io.clientcore.core.http.pipeline.HttpRetryPolicy; +import io.clientcore.core.instrumentation.logging.ClientLogger; import io.clientcore.core.models.traits.ConfigurationTrait; import io.clientcore.core.models.traits.EndpointTrait; import io.clientcore.core.models.traits.HttpTrait; import io.clientcore.core.models.traits.ProxyTrait; -import io.clientcore.core.util.ClientLogger; import io.clientcore.core.util.configuration.Configuration; import java.util.ArrayList; import java.util.List; @@ -262,7 +262,7 @@ private HttpPipeline createHttpPipeline() { policies.add(redirectOptions == null ? new HttpRedirectPolicy() : new HttpRedirectPolicy(redirectOptions)); policies.add(retryOptions == null ? new HttpRetryPolicy() : new HttpRetryPolicy(retryOptions)); this.pipelinePolicies.stream().forEach(p -> policies.add(p)); - policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + policies.add(new HttpInstrumentationPolicy(null, localHttpLogOptions)); httpPipelineBuilder.policies(policies.toArray(new HttpPipelinePolicy[0])); return httpPipelineBuilder.build(); } diff --git a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/resources/META-INF/payload-pageable_apiview_properties.json b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/resources/META-INF/payload-pageable_apiview_properties.json index 896ac3a8d3..7d9902267a 100644 --- a/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/resources/META-INF/payload-pageable_apiview_properties.json +++ b/packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/resources/META-INF/payload-pageable_apiview_properties.json @@ -2,10 +2,8 @@ "flavor": "generic", "CrossLanguageDefinitionId": { "payload.pageable.PageableClient": "Payload.Pageable.ServerDrivenPagination", - "payload.pageable.PageableClient.link": "Payload.Pageable.ServerDrivenPagination.link", - "payload.pageable.PageableClient.linkWithResponse": "Payload.Pageable.ServerDrivenPagination.link", "payload.pageable.PageableClientBuilder": "Payload.Pageable", "payload.pageable.Pet": "Payload.Pageable.Pet", - "payload.pageable.serverdrivenpagination.LinkResponse": "Payload.Pageable.ServerDrivenPagination.link.Response.anonymous" + "payload.pageable.serverdrivenpagination.implementation.LinkResponse": "Payload.Pageable.ServerDrivenPagination.link.Response.anonymous" } }